vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If any of these fields don't match the PV, then a new PV is created automatically instead.

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: block-storage-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "20Gi"
storageClassName: ""
8. Create your PVC.

oc apply -f static-pvc.yaml
9. Verify that your PVC is created and bound to the PV that you created earlier. This process can take a few minutes.

oc describe pvc static-pvc

Example output

Name: static-pvc
Namespace: default
StorageClass:
Status: Bound
10. Optional Save the following example pod configuration as a file called pod.yaml.

apiVersion: v1
kind: Pod
metadata:
name: block-storage
labels:
app: block-storage
spec:
containers:
- name: block-storage
image: nginx
command: ["/bin/sh"]
args: ["-c", "while true; do date "+%Y-%m-%d %H:%M:%S"; sleep 3600; done"]
workingDir: /home
imagePullPolicy: Always
ports:
- containerPort: 80
volumeMounts:
- name: block-storage-pv
mountPath: /home
volumes:
- name: block-storage-pv
persistentVolumeClaim:
claimName: block-storage-pvc
Show more
11. Create the pod in your cluster.

oc create -f pod.yaml
12. After the pod is in Running status, get the logs.

oc logs

Example output.

2022-01-21 16:11:00



You successfully created a PV and bound it to a PVC. Then, you deployed and app that uses block storage.
* UI
* CLI
* API
* Terraform







 Creating Block Storage for VPC volumes 

Create a Block Storage for VPC volume by using the UI, CLI, or programically with the API. You can create a volume as part of instance provisioning, as a stand-alone volume that you can later attach to an instance, or by restoring from a snapshot.

Before you get started, make sure that you [created a VPC](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-a-vpc-using-the-ibm-cloud-console).



 Creating Block Storage for VPC volumes in the UI 

Use the IBM Cloud console to create a Block Storage for VPC volume when you create a virtual server instance or as a stand-alone volume.



 Creating and attach a Block Storage for VPC volume when you create a new instance 



1. In the [IBM Cloud console](https://cloud.ibm.com/login), go to menu icon ![menu icon](https://cloud.ibm.com/docs-content/v1/content/icons/icon_hamburger.svg) > VPC Infrastructure > Compute > Virtual server instances.
2. From the list of virtual server instances, click Create.
3. In the Virtual server for VPC provisioning page, select Server type, Location, OS, Profile, Placement Group, and so on. For more information about provisioning the instance, see [Creating a virtual server instance with the UI](https://cloud.ibm.com/docs/vpc?topic=vpc-creating-virtual-servers&interface=uicreating-virtual-servers-ui). The details of the boot volume that is to be created are displayed on the page. You can edit the boot volume by clicking the pencil icon to change the size, encryption, and add any user tags to identify this resource.
4. To create a data volume and attach it to the instance, in the Data volumes section of the instance provisioning page, click Create. In the side panel, specify the volume details. Table 1 shows the values that need to be defined.
* [Optional: Creating the IBM Cloud Object Storage service instance](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remotesat-storage-odf-remote-cos)



* [Creating and assigning a configuration in the console](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remoteodf-remote-config-create-console)
* [Creating a configuration in the CLI](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remoteodf-remote-config-create-cli)
* [Creating a configuration in the API](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remoteodf-remote-config-create-api)
* [Creating a storage assignment in the console](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remotestorage-odf-remote-include-assignment-create-console)
* [Creating an assignment in the CLI](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remotestorage-odf-remote-include-assignment-create-cli)
* [Creating a storage assignment in the API](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remotestorage-odf-remote-include-assignment-create-api)



* [Optional: Adding additional worker nodes to your ODF configuration](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remoteadd-worker-nodes-odf-remote)



* [Deploying an app that uses OpenShift Data Foundation](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-odf-remotesat-storage-odf-remote-deploy)
Watch the following video to learn how to add a peer organization to the consortium, create the channel, and join a peer to the channel. For video tutorials on how how to create a peer and an ordering service, see [video series](https://developer.ibm.com/series/ibm-blockchain-platform-console-video-series/):

Video transcript

Hello again, and welcome to this demonstration of how to create a channel using the IBM Blockchain Platform console. If you've watched our videos on creating a peer and an ordering service, you should have a deployment that looks similar to this one, with one peer org, two CAs and an ordering service.

As with our previous videos, the steps we'll be going through today are from our Build a network tutorial in the IBM Blockchain Platform documentation. This tutorial will complete the structure you see here, with Org1, which we created in our first video, creating a channel run on our ordering service, which we created in our second video.

If you don't know what channels are, they're the place where transactions involving assets happen in the IBM Blockchain Platform. And because channels can be created with a subset of the members of a network, channels are also a powerful tool to enable privacy. Only the members of a channel will know about that channel and have access to its ledger, enabling the related business partners who form networks a space to execute deals that only they know about. Whatever the reason, the process for creating a channel is the same.

Since we’re creating a channel, you might be tempted to click over to the channels tab. But there's actually a step we need to do first, which is to add org1 to the consortium. Now what is the consortium? A consortium is the list of organizations that are allowed to create channels on a particular ordering service. Once an organization is added to this list, which is maintained by the admins of the ordering service, an organization will be able to create a channel. To do that, we must click into the Ordering Service and click Add Organization under the Consortium members header. Then we must select the org1msp, as this is our peer organization. Then click submit. Easy as that.
{toolchain_description} A description for your toolchain. 
 {toolchain_name} A name for your toolchain. 



For more information about creating toolchains with the API, see [Create a toolchain](https://cloud.ibm.com/apidocs/toolchaincreate-toolchain) in the IBM Cloud API Docs.





 Creating a toolchain with Terraform 



1. To install the Terraform CLI and configure the IBM Cloud provider plug-in for Terraform, follow the tutorial for [Getting started with Terraform on IBM Cloud®](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-getting-started).
2. Create a Terraform configuration file that is named main.tf. In this file, add the configuration to create a toolchain by using the HashiCorp Configuration Language. For more information about using this configuration language, see the [Terraform documentation](https://developer.hashicorp.com/terraform/language).

The following example creates a toolchain by using the ibm_cd_toolchain resource.

data "ibm_resource_group" "group" {
name = "default"
}

resource "ibm_cd_toolchain" "cd_toolchain" {
name = "my toolchain"
resource_group_id = data.ibm_resource_group.group.id
}

For more information about ibm_cd_toolchain, see the argument reference details in the [Terraform Registry Documentation](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cd_toolchain).
3. Initialize the Terraform CLI.

terraform init
4. Create a Terraform execution plan. This plan summarizes all of the actions that must run to create a toolchain.

terraform plan
5. Apply the Terraform execution plan.
About creating an image from a volume 

You can create a custom image from a boot volume of a virtual server instance. The image is a full copy of the source volume. It includes the operating system and any user data. You can use the custom image to create new virtual server instances.



 Image from volume creation overview 

You can create a custom image in your region from an instance's boot volume in the console, by using the CLI or the API.

The image is a full copy of the boot volume. It has the same capacity and contains identical data. The OS information for the custom image comes from the originating boot volume. Optionally, you can specify resource groups and tags for your image.

The custom image that you create is regional, based on the location of the original boot volume. All custom images are private to the account in which they are created and labeled as custom.

The image also inherits the [encryption type](https://cloud.ibm.com/docs/vpc?topic=vpc-image-from-volume-vpcifv-encryption). If the original volume used provider-managed encryption, you can keep that or you can specify customer-managed encryption and provide your own root keys. If the original volume used customer-managed encryption, the image inherits the root key. However, you can change that root key if you want to use another key.

Custom images that are created from a volume are independent from the original volume. You can update the image and delete it as needed. You can delete the original volume and the custom image persists. Optionally specify resource groups and tags for your image.



 Requirements 

To create an image from a volume, the volume must meet the following requirements:



* The volume must be in the region where you want to create the custom image.
* The volume must be a primary boot volume with 100 GB capacity. Data volumes are not supported.
* The volume must be attached to an instance. Unattached boot volumes are not supported.
* The instance must be in an available state.
* The available, running instance must be stopped before you create the custom image. Creating an image from a running instance is not allowed.
ibm.io/secret-namespace: "<secret-namespace>" By default, the COS plug-in searches for your secret in the same namespace where you create the PVC. If you created your secret in a namespace other than the namespace where you want to create your PVC, enter the namespace where you created your secret.
ibm.io/add-mount-param: "<option-1>,<option-2>" s3fs mount options
ibm.io/access-policy-allowed-ips: "XX.XXX.XX.XXX, XX.XX.XX.XXX, XX.XX.XX.XX" A csv of allow listed IPs.
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: <size>
storageClassName: <storage_class>
Show more

ibm.io/auto-create-bucket
: Choose between the following options.
: true: When you create the PVC, the PV and the bucket in your IBM Cloud Object Storage service instance are automatically created. Choose this option to create a new bucket in your IBM Cloud Object Storage service instance. Note that the service credentials must have Writer permissions to automatically create the bucket.
: false: Choose this option if you want to access data in an existing bucket. When you create the PVC, the PV is automatically created and linked to the bucket that you specify in ibm.io/bucket.

ibm.io/auto-delete-bucket
: Choose between the following options.
: true: Your data, the bucket, and the PV is automatically removed when you delete the PVC. Your IBM Cloud Object Storage service instance remains and is not deleted. If you choose to set this option to true, then you must 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.
: false: When you delete the PVC, the PV is deleted automatically, but your data and the bucket in your IBM Cloud Object Storage service instance remain.
ibmcloud is placement-group-create --strategy host_spread --name MyPlacementGroup --resource-group-id RESOURCE_GROUP_ID --resource-group-name RESOURCE_GROUP_NAME





 Creating a placement group with the API 

You can create a placement group in your IBM Cloud VPC by using the API.

A placement group must be created first before an instance can use it. After a placement group is created, an instance can be attached to it during provisioning.

The following example creates a placement group that uses the host spread placement group strategy.

curl -X POST "$vpc_api_endpoint/v1/placement_groups?version=2021-04-20&generation=2" -H "Authorization: $iam_token" -d '{
"name": "my-placement-group"
"strategy": "host_spread"
}'

For more information about the host_spread and power_spread strategy variables, see [Create a placement group](https://cloud.ibm.com/apidocs/vpc/latestcreate-placement-group) in the Virtual Private Cloud API documentation.





 Creating the placement group with Terraform 

You can create a placement group in your IBM Cloud VPC by using Terraform.

A placement group must be created first before an instance can use it. After a placement group is created, an instance can be attached to it during provisioning.



 Before you begin 

Make sure that you set up [Terraform for VPC](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest).

The following example creates a placement group with a host spread strategy, named my-placement-group, and a resource group name of data.ibm_resource_group.default.id.

resource "ibm_is_placement_group" "is_placement_group" {
strategy = "host_spread"
name = "my-placement-group"
resource_group = data.ibm_resource_group.default.id
}
For more information, see the [multipath.conf man page](https://linux.die.net/man/5/multipath.conf).

The volume is now mounted and accessible on the host. You can create a file system next.







 Step 7: Creating a file system (optional) 

Follow these steps to create a file system on the newly mounted volume. A file system is necessary for most applications to use the volume. Use [fdisk for drives that are less than 2 TB](https://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-mountingCloudLin8fdiskclin8) and [parted for a disk bigger than 2 TB](https://cloud.ibm.com/docs/BlockStorage?topic=BlockStorage-mountingCloudLin8partedclin8).



 Creating a file system with fdisk 



1. Get the disk name.

fdisk -l | grep /dev/mapper

The disk name that is returned looks similar to /dev/mapper/XXX.
2. Create a partition on the disk.

fdisk /dev/mapper/XXX

The XXX represents the disk name that is returned in Step 1.

Scroll further down for the commands codes that are listed in the fdisk command table.
3. Create a file system on the new partition.

fdisk –l /dev/mapper/XXX



* The new partition is listed with the disk, similar to XXXp1, followed by the size, Type (83), and Linux®.
* Take a note of the partition name, you need it in the next step. (The XXXp1 represents the partition name.)
* Create the file system:



mkfs.ext3 /dev/mapper/XXXp1
4. Create a mount point for the file system, and mount it.



* Create a partition name PerfDisk or where you want to mount the file system.



mkdir /PerfDisk



* Mount the storage with the partition name.
Channels replicate the structure of a blockchain network in that they contain members, peers, an ordering service, a ledger, policies, and smart contracts. But by restricting the membership, and even the knowledge of the channel, to particular subsets of the network membership, channels ensure that network members can leverage the overall structure of the network while maintaining privacy, where needed.

To join a peer from Org1 to a channel, Org1 must first be added to the consortium. After which, it can create a channel and join a peer to it. If the organization is not a member of the consortium at channel creation time, it is possible to create the channel and add the organization later by clicking the Settings button on the page of the relevant channel and editing the channel.

After the channel has been created, subsequent organizations do not have to join the consortium before being joined to a channel by the channel administrators through a channel configuration update. However, these organizations will only be able to create their own channels if they are added to the consortium first.

For more information about channels and how to use them, see the [Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/release-2.2/channels.html).

Watch [Video 3](http://ibm.biz/BlockchainPlatformSeries4) above to learn about the process to create channel and join your peer to the channel.



 Creating a channel: channel1 

Because the console uses peers to gather information about the channels that the peers belong to, unless an organization has joined a peer to a channel, it cannot interact with the channel.

When you have created your CAs, identities, MSPs, ordering service, a peer, and have added your peer organization to the consortium, navigate to the Channels tab in the left navigation. This is where channel creation and management are handled.

When you first navigate to this tab, it will be empty except for the Create channel and Join channel buttons. This is because you haven't created a channel and joined a peer to it yet.



 Creating the channel 

Perform the following steps from your console:



1. Navigate to the Channels tab.
2. Click Create channel. The create channel panel will open.
Machine learning model creation workflow 

Create a machine learning model that trains a model you can use to identify entities, coreferences, and relationships of interest in new documents.

Understand the typical workflow for creating a machine learning model in Knowledge Studio for IBM Cloud Pak for Data.

All the steps are performed by the project manager, except for the Annotate documents step, which is performed by the human annotator. Because human annotators are often subject matter experts, they might be consulted during the creation of workspace resources, such as the type system, also.

![The workflow for developing a machine learning model](https://cloud.ibm.com/docs-content/v1/content/148d3bd95f946aa1bb53ea1540475f522e6b61c9/watson-knowledge-studio-data/images/wks-checklist.svg) Figure 1. The workflow for developing a machine learning model



 Step Description 

 Create a workspace See [Creating a workspace](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-create-project). A workspace contains the resources that are used to create the model, including: <br> <br>- Type system: Upload or create the type system, and define the entity types and relation types that human annotators can apply when annotating text. The model process manager typically works with subject matter experts for your domain to define the type system. See [Establishing a type system](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-typesystem) <br> <br>- Source documents: Create a corpus by uploading sample documents that are representative of your domain content into the workspace. See [Adding documents for annotation](https://cloud.ibm.com/docs/watson-knowledge-studio-data?topic=watson-knowledge-studio-data-documents-for-annotation).
For the purpose of this tutorial, it is assumed that a user has followed the [Build a network tutorial](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-build-network) in their console and has created a peer, ordering service, and an application channel. Subsequent to this, a separate user, with a separate console, wishes to add a node to that ordering service, which is called Ordering Service.

As part of describing the process for creating a new node from a separate console, we will refer to "Console 1" and "Console 2". Console 1 is the originating console; it's where the ordering service was originally created. Console 2 is where a user is attempting to create a new node for this ordering service using a different organization in a different console.

Unless you have already created new nodes for this ordering service, do not reuse an existing CA and MSP.

The process of creating a CA, registering identities, and creating an MSP is identical to the process described in [Creating your ordering service organization CA](https://cloud.ibm.com/docs/blockchain?topic=blockchain-ibp-console-build-networkibp-console-build-network-create-orderer-ca) from the Build a network tutorial. However, use the following values:



 Task: Create a CA and register users 



Table 1. Create a CA and register users

 Field Description Enroll ID Secret Type 

 Create CA Ordering Service2 CA admin adminpw 
 Register users Ordering Service2 admin OS2admin OS2adminpw admin 
 Ordering Service node identity OS2 OS2pw orderer 



If you are using a separate console, it is possible to specify exactly the same values for these fields as was specified in the Build a network tutorial. Only the mspid from the fields below must be different than osmsp, as two different MSPs cannot have the same ID in the same console (the MSP you create here will be exported to the other console in a future step). However, we have given different values in this tutorial in case users are running this tutorial inside the same console.
[After you create an instance of Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-provision), you're ready to create keys in the service. In this example, we'll create a root key.



1. [Log in to the IBM Cloud console](https://cloud.ibm.com/login/).
2. Go to Menu > Resource List to view a list of your resources.
3. From your IBM Cloud resource list, select your provisioned instance of Key Protect.
4. To create a new key, click Add. A side panel will open. Make sure the Create a key option is selected.

Specify the key's details:





Table 1. Describes the Create a key settings.

 Setting Description 

 Type The [type of key](https://cloud.ibm.com/docs/key-protect?topic=key-protect-envelope-encryptionkey-types) that you would like to manage in Key Protect. Root keys are selected by default. 
 Key name A human-readable display name for easy identification of your key. Length must be within 2 - 90 characters (inclusive). To protect your privacy, ensure that the key name does not contain personally identifiable information (PII), such as your name or location. Note that key names do not need to be unique. 
 Key alias Optional. [Key aliases](https://cloud.ibm.com/docs/key-protect?topic=key-protect-create-key-alias) are ways to describe a key that allow them to be identified and grouped beyond the limits of a display name. Keys can have up to five aliases. 
 Key ring Optional. [Key rings](https://cloud.ibm.com/docs/key-protect?topic=key-protect-grouping-keys) are groupings of keys that allow those groupings to be managed independently as needed. Every key must be a part of a key ring. If no key ring is selected, keys are placed in the default key ring.