vania-janet/multiturn-rag-retrieval-data huggingface dataset:
You can use the structure of the example as a starting point for developing your own business logic. The extension provides all the dependencies that are required to deploy your smart contract to an instance of Hyperledger Fabric.



1. Click the IBM Blockchain icon to open the IBM Blockchain tab. Click the overflow menu in the smart contracts pane and click Create New Project.
2. Select the smart contract type to generate. The Default Contract example is recommended for first-time users and demonstrates how to perform create, read, update, and delete operations to the public ledger that's shared by all network members. The Private Data Contract example demonstrates how to perform create, read, update, delete, and verify operations to a collection, that is private to a single network member.
3. Select the language that you want to create a smart contract in. The current options are JavaScript, TypeScript, Go, and Java. Note: If you are deploying the smart contracts to a production network, JavaScript and TypeScript smart contracts require more resources than contracts written in Go.
4. Select an asset to be managed by the example contract. For example, bond.
5. Create a folder with the name of your project and open it.
6. Select how to open your new project. The project folder should now open.



When the project opens, you can find the new smart contract in the explorer window in the left pane. The structure of the project depends on the language that you selected. However, each smart contract contains the same elements:



* The source code of the smart contract. If you selected to create a JavaScript or TypeScript contract, the extension builds a basic smart contract by using the fabric-contract-api with a series of functions that manage your example asset. For example, if you selected bond, you can find the functions of createBond, updateBond, readBond, bondExists, and deleteBond.
* A test file.
* The accompanying smart contract dependencies.





 Do I need to update my smart contract for Fabric v2.x?
Do not show the message of the day or update reminders.





 Example 

ibmcloud sat key rotate --name my_key_name









 Location commands 

Use these commands to create and manage Satellite locations.



 ibmcloud sat location create 

Create a Satellite location. When you create a location, a location master is automatically deployed in one of the IBM Cloud regions that you select during location creation. The location master is used to manage the location from the public IBM Cloud.

ibmcloud sat location create --managed-from REGION --name NAME [--cos-bucket COS_BUCKET_NAME] [--description DESCRIPTION] [--ha-zone ZONE1_NAME --ha-zone ZONE2_NAME --ha-zone ZONE3_NAME] [--coreos-enabled] [--logging-account-id LOGGING_ACCOUNT] [--pod-subnet SUBNET] [--pod-network-interface-selection METHOD] [--provider INFRASTRUCTURE_PROVIDER] [--provider-region PROVIDER_REGION] [--provider-credential PATH_TO_PROVIDER_CREDENTIAL] [-q] [--service-subnet SUBNET]



 Minimum required permissions 



* To run this operation, IBM Cloud IAM Administrator platform role for the Location resource in Satellite. For more information, see [Checking user permissions](https://cloud.ibm.com/docs/satellite?topic=satellite-iam-assign-accesschecking-perms).
* To create a location, you also need to set up [permissions to other cloud services](https://cloud.ibm.com/docs/satellite?topic=satellite-iamiam-roles-usecases).







 Command options 

--managed-from REGION
: Required. The IBM Cloud region, such as wdc or lon, that your Satellite location is managed from. You can use any region, but to reduce latency between IBM Cloud and your location, choose the region that is closest to the compute hosts that you plan to attach to your location later.
"href": "https://uko.us-south.hs-crypto.cloud.ibm.com:9549/api/v4/templates/4411f1ae-62cc-484e-9910-65d2e8f258bb"
}
]
}







 ibmcloud hpcs uko key-template-create 

Create a new key template. Key templates are used to combine information that is necessary for creating a key. With key templates, you can easily create subsequent keys without specifying any details.

ibmcloud hpcs uko key-template-create --uko-vault UKO-VAULT --vault VAULT --name NAME --key KEY --keystores KEYSTORES [--description DESCRIPTION]



* Command options

--uko-vault (string)
: Required. The UUID of the vault where the update is to take place. You can use the ibmcloud hpcs uko key-templates command to retrieve the UUID.

--vault ([VaultReferenceInCreationRequest](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-cli-plugin-hpcs-cli-pluginuko-vault-reference-in-creation-request-example-schema))
: Required. The ID of the vault where the key template is to be created.

--name (string)
: Required. The name of the template. You need to reference it when creating managed keys. The length must be between 1 and 30 characters. The value must match the regular expression /^[A-Za-z]$/.

--key ([KeyProperties](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-cli-plugin-hpcs-cli-pluginuko-key-properties-example-schema))
: Required. Properties that describe the managed key.
"created_by": "iam-ServiceId-b7ebcf90-c7a9-495b-8ce8-bbf33cb95ca0",
"creation_date": "2020-10-05T21:52:29Z",
"id": "f53b8061-359e-3236-5bcc-fb120e170c87"
}
]
},
"warnings": null
}

The command to create an arbitrary secret returns the following output:

{
"request_id": "56f8532d-cd2b-372c-7b14-5a5875d1c6e6",
"lease_id": "",
"lease_duration": 0,
"renewable": false,
"data": {
"created_by": "iam-ServiceId-b7ebcf90-c7a9-495b-8ce8-bbf33cb95ca0",
"creation_date": "2020-10-05T21:47:27Z",
"crn": "crn:v1:bluemix:public:secrets-manager:us-south:a/791f5fb10986423e97aa8512f18b7e65:e415e570-f073-423a-abdc-55de9b58f54e:secret:2ca56a3b-a6e8-d2e2-5377-b6559babfac0",
"expiration_date": "2020-12-31T23:59:59Z",
"id": "2ca56a3b-a6e8-d2e2-5377-b6559babfac0",
"labels": [
"label-1",
"label-2"
],
"last_update_date": "2020-10-05T21:47:27Z",
* [CREATE TABLE ROW SECURITY](https://www.ibm.com/docs/en/netezza?topic=npsscr-create-table-2), [CREATE EXTERNAL TABLE](https://www.ibm.com/docs/en/netezza?topic=npsscr-create-external-table-2), CREATE TEMPORARY TABLE
If DATA_VERSION_RETENTION_TIME is specified to a nonzero value, the commands fail.
* [ALTER TABLE DATA_VERSION_RETENTION_TIME](https://www.ibm.com/docs/en/netezza?topic=npsscr-alter-table-2)
If the table is a temporary, row-secure, versioned, or an external table and DATA_VERSION_RETENTION_TIME is specified with a nonzero value, the command fails.
* [ALTER TABLE ADD COLUMN](https://www.ibm.com/docs/en/netezza?topic=npsscr-alter-table-2), [ALTER TABLE DROP COLUMN](https://www.ibm.com/docs/en/netezza?topic=npsscr-alter-table-2)
If the table has a nonzero DATA_VERSION_RETENTION_TIME specified, the command fails.



The [GROOM TABLE VERSIONS](https://www.ibm.com/docs/en/netezza?topic=npsscr-groom-table-2) command turns a versioned table into nonversioned. When this happens, you can specify a nonzero DATA_VERSION_RETENTION_TIME with the ALTER TABLE command.





 Creating time travel objects with the command-line 



 Creating temporal tables with the command-line 

To create a temporal table, set DATA_VERSION_RETENTION_TIME to a nonzero value.

For detailed syntax and privileges, see [the CREATE TABLE command](https://www.ibm.com/docs/en/netezza?topic=npsscr-create-table-2).

CREATE TABLE <tablename> ( <col>[, <col>… ] ) DATA_VERSION_RETENTION_TIME <number-of-days>;

Example:
* Writer: To push the created image to the target namespace.
* Manager: To create the specified namespace if it does not exist.
* Administrator: To create a service ID, policies, and an API key needed to set up a Code Engine registry access secret to use for the app or job.



Code Engine



* Editor: To access a Code Engine project or to create one, if it does not exist.
* Writer: To manage apps, jobs, and secrets within the Code Engine project.



Resource Group:



* Viewer: To view the resource group that the Code Engine project is located in.



If you want to your app to bind another IBM Cloud service, you must set the following additional permissions.

All Identity and Access enabled services



* Administrator: To create a service ID, policies, and API key to set up a Code Engine service access secret, which is used to maintain service credentials to connect individual services to a Code Engine app or job.







 Creating a toolchain 

You can create a toolchain from the [Toolchain page](https://cloud.ibm.com/devops/toolchains) by selecting Create toolchain and then choosing the Code Engine template. Want to try a tutorial? See [Develop and deploy an app by using Code Engine](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-tutorial-cd-code-engine).





 Code Engine options in your toolchain 

You can set the following options for your Code Engine toolchain by editing your ci-pipeline Configuration and selecting Environment properties.



Table 1. Code Engine options in toolchain

 Option Description 

 apikey The IBM Cloud API key that is used for this toolchain. 
 app-concurrency The maximum number of requests that can be processed concurrently per instance. The default value is 100. 
 app-deployment-timeout The amount of time, in seconds, that can pass before the build must succeed or fail. 
 app-health-endpoint The app health endpoint; for example, /health. 
 app-max-scale The maximum number of instances that can be used for this application. If you set this value to 0, the application scales as needed.
* [Sizing an ordering node during creation](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-orderer-sizing-creation)
* [Customizing an ordering service configuration](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-orderer-create-json)



* [Using certificates from an external CA with your peer or ordering service](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-third-party-ca)



* [Before you begin](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-third-party-ca-prereq)
* [Option 1: Create a new peer or single-node ordering service using certificates from an external CA](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-third-party-ca-create-peer-orderer)
* [Option 2: Create a five node ordering service using certificates from an external CA](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-create-five-node)



* [Configuring a node to use a Hardware Security Module (HSM)](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-adv-deploymentibp-console-adv-deployment-cfg-hsm)



* [What capability does HSM add to my blockchain node?]
For example, the following command creates a service instance that is named my-service-instance, uses service plan test- service-plan of service test-service on location eu-gb:

ibmcloud resource service-instance-create my-service-instance test-service test-service-plan eu-gb





 Creating new resource instances by using the API 

You can programmatically create a new resource instance by calling the Resource Controller API as shown in the following sample request. For detailed information about the API, see [Resource Controller API](https://cloud.ibm.com/apidocs/resource-controller/resource-controllercreate-resource-instance).



* Curl
* Java
* Python
* Go
* Node



curl -X POST https://resource-controller.cloud.ibm.com/v2/resource_instances -H 'Authorization: Bearer <>' -H 'Content-Type: application/json' -d '{
"name": "my-instance",
"target": "bluemix-global",
"resource_group": "5g9f447903254bb58972a2f3f5a4c711",
"resource_plan_id": "0be5ad401ae913d8ff665d92680664ed",
"tags": [
"my-tag"
]
}'

CreateResourceInstanceOptions createResourceInstanceOptions = new CreateResourceInstanceOptions.Builder()
.name(resourceInstanceName)
.target(targetRegion)
.resourceGroup(resourceGroup)
.resourcePlanId(resourcePlanId)
.build();

Response<ResourceInstance> response = service.createResourceInstance(createResourceInstanceOptions).execute();
ResourceInstance resourceInstance = response.getResult();

System.out.printf("createResourceInstance() response:n%sn", resourceInstance.toString());
* "{field_name}" - The name of the field to be created.



Field names defined in your configuration must meet the restrictions defined in [Field Name Requirements](https://cloud.ibm.com/docs/discovery?topic=discovery-configreffield_reqs).



* "css_selector" : stringrequired - a CSS selector expression that defines the area of content to be stored in a field.
* "type" : stringrequired - The type of field to be created, can be string, date For detailed information, see [Using CSS selectors to extract fields](https://cloud.ibm.com/docs/discovery?topic=discovery-configserviceusing-css).









 Segment 

The segment object is a set of configuration options that split ingested documents into one or more segments based on the identified HTML headings (h1, h2).

"segment": {
"enabled": true,
"selector_tags": ["h1", "h2", "h3", "h4", "h5", "h6"]
}



* "enabled": boolean - required - must be set to true to enable document segmentation.
* "selector_tags": array - required - a comma separated array of HMTL h tags on which to split documents.



As an overview, when document segmentation is enabled the following cannot be specified:



* json_normalizations cannot be specified as part of the configuration.
* normalizations cannot be specified as part of the configuration.
* The extracted_fields option of the html conversion cannot be specified as part of the configuration.



For detailed information, see [Performing segmentation](https://cloud.ibm.com/docs/discovery?topic=discovery-configserviceperforming-segmentation).





 JSON 

You can perform pre-enrichment normalization of the ingested JSON by defining operation objects in the json_normalizations array.

"json_normalizations": [
{
"operation": "remove",
"source_field": "header"
},
The key management system lists the instance that are created from your specific location and region. Following prerequisites are followed to perform the KMS activity.



* You should have your KYOK, or BYOK. To create the IBM Key Protect keys, see [create KYOK root key by using UI](https://cloud.ibm.com/docs/key-protect?topic=key-protect-create-root-keys). To create an IBM Cloud Hyper Protect Crypto Services keys, see [create BYOK root key by using UI](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-create-root-keys).
* You need to [add root key](https://cloud.ibm.com/docs/key-protect?topic=key-protect-import-root-keysimport-root-key-gui) to Schematics services.
* You need to configure [service to service authorization](https://cloud.ibm.com/docs/account?topic=account-serviceauthcreate-auth) to integrate BYOK, and KYOK in Schematics service.



KMS setting is a one time settings. You need to open the [support ticket](https://cloud.ibm.com/docs/get-support?topic=get-support-using-avatar) to update KMS settings.





 ibmcloud schematics kms instance ls 

Lists all the KMS instances of your IBM Cloud account to find your Key Protector Hyper Protect Crypto Services by using your location where keys are created and encrypted scheme such as KYOK, or BYOK.

Syntax

ibmcloud schematics kms instances ls --location LOCATION_NAME --scheme ENCRYPTION_SCHEME [--output OUTPUT]

Command options



Schematics KMS list flags

 Flag Required / Optional Description 

 --location or -l Required Set the Schematics location name. Supported values are US, or EU. 
 --scheme or -s Required Specify the encryption scheme. Supported values are KYOK, or BYOK.
Copy the following PVC configuration and save it to a file called pvc.yaml. This example PVC automatically creates a bucket with a quota equal to 20Gi.

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: my-cos-pvc
namespace: default
annotations:
ibm.io/auto-create-bucket: "true"
ibm.io/auto-delete-bucket: "true"
ibm.io/secret-name: "my-cos-secret"
ibm.io/quota-limit: "true"
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: ibmc-s3fs-standard-cross-region
Show more
2. Create the PVC in your cluster.

kubectl apply -f pvc.yaml

Example output.

persistentvolumeclaim/my-cos-pvc created
3. List your PVCs and verify the my-cos-pvc is in the Bound state.

NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
my-cos-pvc Bound pvc-64a4e0c9-b5ec-40e3-8b7e-77ff47ae6c5e 20Gi RWO ibmc-s3fs-standard-cross-region 6s
4. [Navigate to your Object Storage instance in the console](https://cloud.ibm.com/objectstorage) and click the Buckets tab.
5. Review the details of the automatically created bucket. The bucket name is in the format tmp-s3fs-XXXX.
6. Click the tmp-s3fs-XXXX bucket, then click the Configuration tab.
7. On the Configuration page, look for the Quota enforcement section. Note that the bucket was automatically created with a quota equal to the size you specified in the PVC. In this example, the value was 20Gi.







 Step 5: Uploading a file to your bucket 



1.
create a KP root key that COS uses to encrypt data
$ ibmcloud kp key create my-cos-key --output json

{
"id": "2cbea94c-6070-4a24-b0f8-7a56e4d7cb6f",
"name": "my-cos-key",
"type": "application/vnd.ibm.kms.key+json",
"extractable": false,
"state": 1,
"crn": "crn:v1:bluemix:public:kms:us-south:a/ea998d3389c3473aa0987652b46fb146:b3933ab0-d579-46fc-8ed5-351aea657b9a:key:2cbea94c-6070-4a24-b0f8-7a56e4d7cb6f"
}

 capture the KP root key id
$ MY_COS_KEY_ID=2cbea94c-6070-4a24-b0f8-7a56e4d7cb6f

 create a COS bucket and set KP encryption
 must be done in the console user interface (UI) because
 there is no API or CLI support at this time
 1 - In the UI, go to... Resource list -> Storage -> my-cos-1
 2 - Create bucket -> custom bucket
 3 - Properties of a custom bucket
 a - bucket name: my-cos-kms-bucket
 b - location: us-south (same region as KP)
 c - checkbox: Key Protect
 d - instance: my-kms-1
 e - key name: my-cos-key
 f - button: Create bucket

 capture the name of the COS bucket that was created
$ COS_BUCKET=my-cos-kms-bucket

 view the KP registration; it's a result of creating the COS bucket
Notice that the output of the function create command provides information about the progression of the build run before the function is created and deployed.



1. Code Engine receives a request to create an function from source code.
2. Code Engine checks for an IAM service ID and API key that is associated with the selected project. This service ID must be authorized to read and write to IBM Cloud Container Registry. If no service ID exists, Code Engine creates one for you. Note that this service ID is used for subsequent Code Engine build requests that are run from the same project.
3. This example builds code from a local source (--build-source). The source code (hello.js) is packed into a code-bundle file and uploaded to a managed namespace within the IBM Cloud Container Registry instance in your account. Note that you can target only IBM Cloud Container Registry for your local builds. For more information about IBM Container Registry, including information about quota limits and access, see [Getting started with IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-getting-started).
4. Code Engine builds your source code into a code bundle. The source code bundle is created in the same namespace as your source archive file.
5. After the build completes, your function is deployed. You can access your function from the provided URL.







 Step 4: Invoke your function 

Invoke the Function URL by pasting it into a browser window. You can also use the curl command in your command line.

Hello, Functions on CodeEngine!

You successfully created and invoked a Code Engine Function!





 Step 5: Provide parameters for your function 

Invoke the Function URL with a parameter by adding ?name=Sunshine to the end of the URL and pasting it into a browser window.

https://funhello.13c66hbi3rhz.us-south.codeengine.appdomain.cloud?name=Sunshine

Hello, Sunshine!





 Clean up 

You can delete your function with the following command.

ibmcloud ce fn delete -n funhello
Customers that use the trial version from Red Hat Marketplace, can refer to [self-help resources](https://cloud.ibm.com/docs/blockchain-sw-254?topic=blockchain-sw-254-blockchain-supportblockchain-support-resources) for assistance.





 Create a project for your IBM Blockchain Platform deployment 

Before you can deploy the operator, you need to create a project for your deployment of IBM Blockchain Platform. You can create a new project by using the OpenShift web console or OpenShift CLI. The new project needs to be created by a cluster administrator.

If you are using the CLI, create a new project by the following command:

oc new-project <PROJECT_NAME>

Replace <PROJECT_NAME> with the name that you want to use for your IBM Blockchain Platform deployment project.

It is required that you create a new OpenShift project for each blockchain network that you deploy with the IBM Blockchain Platform. For example, if you plan to create different networks for development, staging, and production, then you need to create a unique project for each environment. Each project creates a new Kubernetes namespace. Using a separate namespace provides each network with separate resources and allows you to set unique access policies for each network. You need to follow these deployment instructions to deploy a separate operator and console for each project.

When you create a new project, a new namespace is created with the same name as your project. You can verify that the existence of the new namespace by using the oc get namespace command:

$ oc get namespace
NAME STATUS AGE
blockchain-project Active 2m

You can also use the CLI to find the available storage classes for your namespace. If you created a new storage class for your deployment, that storage class must be visible in the output in the following command:

kubectl get storageclasses