vania-janet/multiturn-rag-retrieval-data huggingface dataset:
2020-06-18 12:21:59 +0000 UTC 2020-06-18 12:26:59 +0000 UTC 10 10

 create a random, base64-encoded, 32-byte key material
$ KEY_MATERIAL=$(openssl rand -base64 32)

$ echo $KEY_MATERIAL

sADDNDE3pcJlbYXu2z5QFORvsxV1PosRiAPERrhYJdk=

 extract the nonce that was created by the "kp import-token create" command
$ NONCE=$(ibmcloud kp import-token show | jq -r '.["nonce"]')

$ echo $NONCE

/QhqOsqlVPC+ZPWz

 extract the public key that was created by the "kp import-token create" command
$ PUBLIC_KEY=$(ibmcloud kp import-token show | jq -r '.["payload"]')

$ echo $PUBLIC_KEY

LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0t ...<redacted>... QyBLRVktLS0tLQo=

 encrypt the key material using the public key
$ ibmcloud kp import-token key-encrypt -k $KEY_MATERIAL -p $PUBLIC_KEY

Encrypted Key
C+/puHn1v5p7aohitM4r6N4ohiVkCecP ...<redacted>... eWmJRuvsSxDg/OY=

 capture the encrypted key material
$ ENCRYPTED_KEY=C+/puHn1v5p7aohitM4r6N4ohiVkCecP ...<redacted>... eWmJRuvsSxDg/OY=

 encrypt the nonce
$ ibmcloud kp import-token nonce-encrypt -k $KEY_MATERIAL -n $NONCE

Encrypted Nonce IV
If the problem continues, go to [IBM Cloud Support](https://cloud.ibm.com/unifiedsupport/supportcenter).





 BXNUI0501E 

Message: That container name is already in use.

Enter a different name.





 BXNUI0502E 

Message: The container wasn't created.

Either your user role doesn't have the required authority in this space, or you're not a member of the space.

If you're a member of the space, you must have the developer user role to create container instances. You can request that role from your org manager. If you aren't a member of this space, you can request to be added to it.





 BXNUI0503E 

Message: The container wasn't created because of an internal error.

Try again later. If the problem continues, go to [IBM Cloud Support](https://cloud.ibm.com/unifiedsupport/supportcenter).





 BXNUI0504E 

Message: The container was created, but the IP address was not assigned to it because that IP address isn't available.

Select a different IP address or select to request and bind public IP address.





 BXNUI0505E 

Message: The container was created, but it wasn't assigned an IP address because no IP addresses are available.

You can adjust the quota on the Quota tab for your organization.





 BXNUI0506E 

Message: The container wasn't created because the VCAP_SERVICES environment variable details were not retrieved.

Bind a service to your selected app or select a different app.





 BXNUI0507E 

Message: That container group name is already in use.

Enter a different name.





 BXNUI0508E 

Message: The container group wasn't created because your user role does not have the required authority in this space.

To create container groups, you must have the developer role. Request that role from your org manager.





 BXNUI0509E 

Message: The container group wasn't created because of an internal error.

Try again later.
In addition, when a workspace is created, more events are also generated:



* Event with action schematics.tag.attach to report tagging of the workspace
* Event with action schematics.instance.create to report the creation of the workspace instance in your account
* Event with action schematics.instance.update to report updates to the workspace properties



You can search by target.id to identify all events that report actions on a workspace. For example, you can use a query such as, crn:v1:bluemix:public:schematics:eu-de:a/xxxxxx:xxxxxxx:workspace:eu-de.workspace.observability-workspace.xxxxxxxx.

Events that are generated by Schematics are automatically forwarded to your IBM Cloud Activity Tracker service instance based on the regions. Schematics sends events to the us-south or eu-de region only. You can create an instance of IBM Cloud Activity Tracker in the us-south/eu-de region to view event details.



1. Create a service instance of [IBM Cloud Activity Tracker](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-getting-started) in the us-south/eu-de region.
2. [Start the IBM Cloud Activity Tracker web console](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-launch) to access your events.
Creating a private catalog with all products included by using the API 

To create a catalog that includes all products in the IBM Cloud catalog, call the [Catalog Management API](https://cloud.ibm.com/apidocs/resource-catalog/private-catalog?code=gocreate-catalog) as shown in the following sample request. Replace variables with the values from your account.



* Curl
* Java
* Python
* Go
* Node



curl -X 'POST' 'https://cm.globalcatalog.cloud.ibm.com/api/v1-beta/catalogs' -H 'accept: application/json' -H 'Content-Type: application/json' -H "Authorization: ${IC_IAM_TOKEN}" -d '{"label": "testcurlcatalog", "short_description": "testing creating a catalog through curl"}'

ServiceCall<Catalog> createCatalog(CreateCatalogOptions createCatalogOptions)

Example request

String label = "{label}";
String shortDesc = "{shortDesc}";
CreateCatalogOptions createOptions = new CreateCatalogOptions.Builder().label(label).shortDescription(shortDesc).build();
Response<Catalog> response = service.createCatalog(createOptions).execute();
System.out.println(response.getResult());

create_catalog(self, id=None, rev=None, label=None, short_description=None, catalog_icon_url=None, tags=None, url=None, crn=None, offerings_url=None, features=None, disabled=None, created=None, updated=None, resource_group_id=None, owning_account=None, catalog_filters=None, syndication_settings=None, kwargs)

Exapmle request

label = "{label}"
shortDesc = "{shortDesc}"
response = self.service.create_catalog(label=label, short_description=shortDesc)
Then, [create an application identity](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-appibp-console-app-identities) by using your CA and save the enrollID and secret. Use the following steps to connect to the IBM Blockchain Platform from VS Code.



1. Open the IBM Blockchain Platform tab.
2. Hover your mouse over the Fabric Gateways pane and click +.
3. Choose Create a gateway from a connection profile.
4. Enter a name for the connection.
5. Enter the fully qualified file path of your connection profile. Your connection should now appear in the connections list underneath 1 Org Local Fabric.
6. Hover your mouse over the Fabric Wallets pane and click +.
7. Choose Create a new wallet and add an identity from the options. Provide a name for your wallet and your identity.
8. Enter the MSP ID of your organization.
9. Click Select a gateway and provide an enrollment ID and secret option and choose the gateway that you created above.
10. Enter the enrollID and secret of the application identity that you created with the console. A new identity is created in the Fabric Wallets pane.
11. You can now connect to your instance of your IBM Blockchain Platform network. Click the connection name and select the name of the wallet that you created. You can also associate the wallet that you created with the gateway by right-clicking the gateway and selecting Associate A Wallet. This allows the connection to use the same wallet each time when it connects.



After you connect to the IBM Blockchain Platform from VS Code, you can see the list of channels joined by your organization peers under the gateway. Under each channel, you can see the list of smart contracts that are instantiated or committed on each channel and the transactions within each smart contract. You can submit transactions to your network by right-clicking a function and selecting Submit Transaction and passing the required arguments. You can also generate a test file for the smart contracts that are instantiated on your channels.





 Deploy a smart contract from VS Code
Verify that the static route is created. In the output, check the node_status for each worker node where you create the static route.

oc get staticroute <route_name> -o yaml

Example output

apiVersion: static-route.ibm.com/v1
kind: StaticRoute
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: 
{"apiVersion":"static-route.ibm.com/v1","kind":"StaticRoute","metadata":{"annotations":{},"name":"mystaticroute"},"spec":{"selectors":[{"key":"kubernetes.io/arch","operator":"In","values":"amd64"]}],"subnet":"10.94.227.46/24"}}
creationTimestamp: "2020-05-20T16:43:12Z"
finalizers:
- finalizer.static-route.ibm.com
generation: 1
name: mystaticroute
resourceVersion: "3753886"
selfLink: /apis/static-route.ibm.com/v1/staticroutes/mystaticroute
uid: f284359f-9d13-4e27-9d3a-8fb38cbc7a5c
spec:
selectors:
- key: kubernetes.io/arch
operator: In
values:
- amd64
subnet: 10.94.227.46/24
status:
nodeStatus:
- error: ""
hostname: 10.94.227.19
state:
gateway: 10.94.227.1
selectors:
- key: kubernetes.io/arch
operator: In
values:
- amd64
subnet: 10.94.227.46/24
- error: ""
In your PVC, set ibm.io/auto-create-bucket: "false" and provide the name of the existing bucket in ibm.io/bucket. 
 bucket auto-create must be enabled when bucket auto-delete is enabled In your PVC, you set ibm.io/auto-delete-bucket: true to automatically delete your data, the bucket, and the PV when you remove the PVC. This option requires ibm.io/auto-create-bucket to be set to true, and ibm.io/bucket to be set to "" at the same time. In your PVC, set ibm.io/auto-create-bucket: true and ibm.io/bucket: "" so that your bucket is automatically created with a name with the format tmp-s3fs-xxxx. 
 bucket can't be set when auto-delete is enabled In your PVC, you set ibm.io/auto-delete-bucket: true to automatically delete your data, the bucket, and the PV when you remove the PVC. This option requires ibm.io/auto-create-bucket to be set to true, and ibm.io/bucket to be set to "" at the same time. In your PVC, set ibm.io/auto-create-bucket: true and ibm.io/bucket: "" so that your bucket is automatically created with a name with the format tmp-s3fs-xxxx. 
 can't create bucket using API key without service-instance-id If you want to use IAM API keys to access your IBM Cloud Object Storage service instance, you must store the API key and the ID of the IBM Cloud Object Storage service instance in a Kubernetes secret. See [Creating a secret for the object storage service credentials](https://cloud.ibm.com/docs/containers?topic=containers-storage-cos-understandcreate_cos_secret). 
 object-path “<subdirectory_name>” not found inside bucket <bucket_name> You specified an existing subdirectory in your bucket that you want to mount to your PVC by using the ibm.io/object-path annotation. This subdirectory could not be found in the bucket that you specified.
"id": "8635b804-9966-4918-a16b-d561fdbf181f",
"name": "my-root-key",
"type": "application/vnd.ibm.kms.key+json",
"algorithmType": "AES",
"createdBy": "user id ...<redacted>...",
"creationDate": "2020-05-05T19:58:02Z",
"lastUpdateDate": "2020-05-05T19:58:24Z",
"lastRotateDate": "2020-05-05T19:58:24Z",
"keyVersion": {
"id": "85b65b20-4165-4da3-8ba9-880e72390461",
"creationDate": "2020-05-05T19:58:24Z"
},
"extractable": false,
"state": 1,
"crn": "crn:v1:bluemix:public:kms:us-south:a/ea998d3389c3473aa0987652b46fb146:390086ac-76fa-4094-8cf3-c0829bd69526:key:8635b804-9966-4918-a16b-d561fdbf181f"
}



 Key Description 

 id This is the KEY_ID, it is unique and is used whenever the CLI specifies a KEY_ID 
 name The name provided when the key was created 
 type Used by the API to set the content-type in a REST call 
 algorithmType Algorithm types are advanced encryption standard (AES) or cipher block chaining (CBC) 
 createdBy The user id that created the key 
 creationDate Date and time the key was created 
 lastUpdateDate Date and time the key was last updated
Before you create a server and vmKernel in vSphere, you must create the VLAN interfaces with appropriate VLAN ID. When you create the VM or VMKernal NIC, you need to specify its IP address to that of the corresponding VLAN interface that was created on the server.



 Example vSphere network topology 

To create a simple topology use the following steps:



1. On each bare metal server, check that you did the following actions.



* Create a PCI interface and make sure that VLAN ID 777 is included in the PCI interface VLAN allowlist.
* Create at least one VLAN interface with VLAN ID that is specified to 777.
* Record the MAC address and IP address of the new network interfaces.



2. In vSphere Client, check that you did the following actions.



* Enable vMotion on the “vmk0” VMkernel adapter of the 2 ESXi hosts.
* Create a distributed vSwitch and add the two ESXi hosts to the distributed vSwitch.
* Identify the PCI interfaces that you created in the vmnic list (by MAC address).
* Set the identified vmnics as the uplinks of the hosts. In this example, the identified vmnics are named "vmnic3".
* Create a Distributed Port Group ("DPortGroup") and set the VLAN ID to 777.
* Create a server and set its IP address to the IP of the VLAN interface (VLAN ID 777) that you created previously.





You can now migrate the VM by using vMotion.

The VLAN interface that is used by the VM is migrated to the destination host.

You can set up network topologies that are more complicated than the example, which is beyond the scope of this information. For more information, see the [VMware vSphere documentation](https://docs.vmware.com/en/VMware-vSphere/index.html).





 Configuration tips for VMware vSphere network interfaces 



1.
To create a document classifier, complete the following steps:



1. From the Content Mining application, click the Collections link in the breadcrumb to open the Create a collection page.

The status of index creation is displayed. Wait for the collection to be fully indexed before you continue with this procedure.
2. To create a classifier, click collection, and then choose classifier from the list.

Zoom

![Shows the collection menu](https://cloud.ibm.com/docs-content/v1/content/f16b1f78a92498247223b337bd9303c2758b9ba8/discovery-data/images/cm-collection-menu.png)

Figure 1. Collection menu
3. Click Create classifier.
4. Name your classifier.

When you deploy the model as an enrichment later, the enrichment is given a name with the format {classifier name} - {model name}. For example, if your classifier is named Product reviews and the model is named v0.1, then the enrichment name is Product reviews - v0.1.

Optionally, add a description and identify the language of your training data by selecting it from the Language field.
5. Click Next
6. On the Training data page, select the file that you uploaded previously from the list, and then click Next.

Alternatively, you can upload a CSV file that contains your training data.

The Fields page is displayed. It shows details about the fields that are generated from the file that you added. Typically, each column in a CSV file is converted into a field and is assigned a name that is copied from the column header.
7. Deselect any metadata fields that you want to exclude from the data set for your document classifier to learn from, and then click Next.

Any fields that you include are used as additional features in the classification. All of the fields are selected by default. You might need to scroll horizontally to review all of the fields.
8. On the Classifier page, specify the fields to use for machine learning training and prediction.
A gate is created when you enact a policy. A policy is a set of rules that you can customize, and a rule is the passing criteria that you define for each type of test data you upload. The gate passes or fails a build based on the quality standards that you choose. So, if your code doesn't meet or exceed a policy that is enacted at a particular gate, the deployment is stopped to prevent risky changes from being released.

For the Weather Application, the code coverage rule set for the policy is that the minimum code coverage required is 80%. The gate is placed before the production stage within the pipeline. When you first create this template, the app passes all current gates, but gates sometimes fail.

To make a gate fail, edit the code in the routes/apivl.js file so that the code coverage reaches only 60%. The gate fails because the code doesn't reach the necessary quality and deployment isn't pushed to production.



1. Open the routes/apivl.js file in an editor.
2. Uncomment lines 42-72 and save the file.
3. From a Git client, commit and push your changes.
4. On your toolchain's Overview page, on the IBM Cloud tools card, click the DevOps Insights tool integration to observe the gate fail in real time.







 Step 5. Analyze the failed gate 

The gate fails because the code coverage isn't met. When you gate your own deployments, you can determine whether it failed or passed by looking at the Risk Analysis page. Also, you can define, change, and customize policies and rules to fit your needs when it comes to gating deployments. View the policies and rules that make the gate.



1. Click the menu icon ![hamburger icon](https://cloud.ibm.com/docs-content/v1/content/562806c0b18119f4d21cb66f5ae6d051634b4a16/ContinuousDelivery/images/icon_hamburger.svg), and select DevOps.
2.
First, create a root key from a [base64 value](https://cloud.ibm.com/docs/key-protect?topic=key-protect-cli-reference-five-twokp-key-create-example-3) or an [imported token](https://cloud.ibm.com/docs/key-protect?topic=key-protect-cli-reference-five-twokp-key-create-example-4).

 create a random, base64-encoded, 32-byte key material
$ KEY_MATERIAL=$(openssl rand -base64 32)

 create a root key from a base64-encoded value
$ ibmcloud kp key create my-base64-root-key -k $KEY_MATERIAL

Creating key: 'my-base64-root-key', in instance: '390086ac-76fa-4094-8cf3-c0829bd69526'...
OK
Key ID Key Name
e55f86ab-6984-4594-ad23-3024f6440a58 my-base64-root-key

 create a new key material
$ NEW_KEY_MATERIAL=$(openssl rand -base64 32)

 rotate the key
$ ibmcloud kp key rotate e55f86ab-6984-4594-ad23-3024f6440a58 -k $NEW_KEY_MATERIAL

Rotating root key...
OK

 the key was created from a key material, NOT providing a new key material will fail
$ ibmcloud kp key rotate e55f86ab-6984-4594-ad23-3024f6440a58

Rotating root key...
FAILED





 Example 3 

This examples shows how to...



1. Create a root key
2. Create a data encryption key (DEK), this is the plaintext
3. Wrap the DEK with the root key, this creates a ciphertext
4. Rotate the root key
5.
[Select Accept to finalize creation of your direct link](https://cloud.ibm.com/docs-content/v1/content/b698ea8660e1f51664f7479f870bbf8840335d06/dl//images/equinix-accept.png)

Select Accept to finalize creation of your direct link
12. After your direct link settings are accepted successfully, select a resource group, routing option, and billing type. Optionally, you can [enable MD5 authentication](https://cloud.ibm.com/docs/dl?topic=dl-enable-disable-md5) to provide additional security for the BGP session, or [update your network connection type](https://cloud.ibm.com/docs/dl?topic=dl-virtual-connection-types).

Review your order summary, agree to the [Direct Link Connect prerequisites](https://cloud.ibm.com/docs/dl?topic=dl-ibm-cloud-dl-prerequisites), and then click Create to complete this order.

Zoom

![Complete your direct link settings, then click Create.](https://cloud.ibm.com/docs-content/v1/content/b698ea8660e1f51664f7479f870bbf8840335d06/dl//images/equinix-create.png)

Complete your direct link settings, then click Create



Your direct link is created:

Zoom

![Completion of your direct link.](https://cloud.ibm.com/docs-content/v1/content/b698ea8660e1f51664f7479f870bbf8840335d06/dl//images/equinix-created.png)

Completion of your direct link
Message: That container group name is already in use.

Enter a different name.





 BXNUI0508E 

Message: The container group wasn't created because your user role does not have the required authority in this space.

To create container groups, you must have the developer role. Request that role from your org manager.





 BXNUI0509E 

Message: The container group wasn't created because of an internal error.

Try again later. If the problem continues, go to [IBM Cloud Support](https://cloud.ibm.com/unifiedsupport/supportcenter).





 BXNUI0510E 

Message: The container wasn't created because some resources, such as an IP address or memory, are not available.

To adjust the quotas, go to Manage Organizations, click the Quota tab for your org, and click Containers. Then, try to select the image again.





 BXNUI0511E 

Message: The container group wasn't created because some resources, such as an IP address or memory, are not available.

To adjust the quotas, go to Manage Organizations, click the Quota tab for your org, and click Containers. Then, try to create the container group again.





 BXNUI0512E 

Message: While attempting to create a container from the image, an internal error occurred. Some resources, such as an IP address or memory, were not available when the namespace was being retrieved.

To adjust the quotas, go to Manage Organizations, click the Quota tab for your org, and click Containers. Then, try to select the image again.





 BXNUI0513E 

Message: The containers weren't retrieved because a problem occurred contacting IBM Containers.

Try again later. If you see this message again, go to the [IBM Cloud status page](https://cloud.ibm.com/status?selected=status) to check whether a service or component has an issue. If the problem continues, go to [IBM Cloud Support](https://cloud.ibm.com/unifiedsupport/supportcenter).





 BXNUI0514E
* Max retries: 2



5. Click Save.
6. Create a back-end pool:



1. Click Attach to add server instances to the region1-pool.
2. Add the CIDR range that is associated with vpc-region1-zone1-ui, select the virtual server instance (vpc-region1-zone1-ui1) that you created and set 80 as the port. Repeat for the other virtual server instance, vpc-region1-zone1-ui2.
3. Click Save to complete the creation of a back-end pool.



7. Click New listener and create a Front-end listener process that checks for connection requests:



1. Set the listener values:



* Protocol: HTTP
* Port: 80
* Back-end pool: region1-zone1-pool
* Max connections: Leave it empty



2. Click Save.



8. Click Create load balancer.
9. Repeat steps 1-8 to create the other load balancer for the application tier. Set the Type to Private and change to Port to the port applicable to the tier that is being serviced.
ibmcloud kp import-token create --instance-id $INSTANCE_ID --max-retrievals=1 --expiration=1200 -o json > createImportTokenResponse.json



3. View details for the import token.

jq '.' createImportTokenResponse.json

The output displays the metadata that is associated with your import token, such as the creation date and policy details. The following snippet shows example output.

{
"creationDate": "2020-06-08T16:58:29Z",
"expirationDate": "2020-06-08T17:18:29Z",
"maxAllowedRetrievals": 1,
"remainingRetrievals": 1
}







 Step 2: Retrieve the import token 

In the previous step, you created an import token and you viewed the metadata that is associated with the token.

In this step, you'll retrieve the public key and nonce value that are associated with the import token. You'll need the public key to encrypt data in a later step, and the nonce to verify your secure import request to the Hyper Protect Crypto Services service.

To retrieve the import token contents:



1. Retrieve the import token that you generated the previous step, and then save the response to a JSON file.



Use the API

curl -X GET $HPCS_API_URL/api/v2/import_token -H "Accept: application/vnd.ibm.collection+json" -H "Authorization: $ACCESS_TOKEN" -H "Bluemix-Instance: $INSTANCE_ID" > getImportTokenResponse.json
Use the IBM Key Protect CLI

ibmcloud kp import-token show -o json > getImportTokenResponse.json



2. Optional: Inspect the contents of the import token.

jq '.' getImportTokenResponse.json

The output displays detailed information about the import token. The following snippet shows example output with truncated values.

{