vania-janet/multiturn-rag-retrieval-data huggingface dataset:
For more information, see [Creating a Windows custom image](https://cloud.ibm.com/docs/vpc?topic=vpc-create-windows-custom-image), [Bring your own license](https://cloud.ibm.com/docs/vpc?topic=vpc-byol-vpc-about) and [Uploading data](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-upload) to IBM Cloud Object Storage.
2. In [IBM Cloud console](https://console.cloud.ibm.com/vpc-ext), go to Menu icon ![Menu icon](https://cloud.ibm.com/docs-content/v1/content/e9cda99c64ea1ee68cf0eda257d6a1de69ddbc4e/icons/icon_hamburger.svg) > VPC Infrastructure > Compute > Custom Images.
3. Click Create.
4. Complete the required fields that are described in Table 1 and click Create Custom Image.





Table 1. Import custom image user interface fields

 Field Value 

 Name A name is required for your custom image. 
 Resource group Select a resource group for the server. 
 Tags You can assign a label to this resource so that you can easily filter resources in your resource list. 
 Region Select the location, or specific geographic area, where you want your custom image to be available for provisioning. 
 Source Select Cloud Object Storage as the source. A list displays from which you select a Cloud Object Storage service instance where the image that you want to import is stored. <br>Need to create a custom image from a volume instead? Select the source for the custom image by choosing either Virtual server instance boot volume or Block storage boot volume. For more information, see [Creating an image from a volume](https://cloud.ibm.com/docs/vpc?topic=vpc-create-ifv). 
 Location Select the specific geographic region where your image is stored. 
 Bucket Select the IBM Cloud Object Storage bucket where your image is stored.
* You must have an IBM Cloud user account with the following roles:

Zoom

![Figure showing the required roles for an IBM Cloud user account.](https://cloud.ibm.com/docs-content/v1/content/b6066ebcc4ff31f2a8b558531f2ee791d108a7e1/cloud-pak-multicloud-management/images/required_roles.png)

Figure 1. Required roles for IBM Cloud user account







 Step A. Setting up the Custom image for CloudForms in IBM Cloud 

Create a custom Linux-based image to deploy CloudForms as a virtual server instance in IBM Cloud.



1. If you don't already have an instance of IBM Cloud Object Storage, see [Getting started with IBM Cloud Object Storage](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=cloud-object-storage-getting-started)

Zoom

![Figure showing example Cloud Object Storage created.](https://cloud.ibm.com/docs-content/v1/content/b6066ebcc4ff31f2a8b558531f2ee791d108a7e1/cloud-pak-multicloud-management/images/cloud_object_storage.png)

Figure 2. Example Cloud Object Storage created

You must also create a bucket in IBM Cloud Object Storage to store your images.

Zoom

![Figure showing example standard type bucket created.](https://cloud.ibm.com/docs-content/v1/content/b6066ebcc4ff31f2a8b558531f2ee791d108a7e1/cloud-pak-multicloud-management/images/buckets.png)

Figure 3. Example Standard type bucket created
2. Upload the CloudForms installation image (file name: cfme-rhos-5.11.4.x86_64.qcow2) to your IBM Cloud Object Storage. Select your bucket and click Add Objects to upload the images.
Import an image from IBM Cloud Object Storage to IBM Cloud for Government account 

To import an image from IBM Cloud® Object Storage to an IBM Cloud for Government account, you need to use the SoftLayer API. For more information about the SoftLayer API and virtual server APIs, see the following resources in the SoftLayer® Development Network:



*  [SoftLayer API Overview ](https://sldn.softlayer.com/reference/softlayerapi/)
*  [Getting Started with the SoftLayer API](([https://sldn.softlayer.com/article/getting-started/](https://sldn.softlayer.com/article/getting-started/))





  Importing an image 

To import an image from IBM Cloud Object Storage to an IBM Cloud for Government account, submit a POST request to https://api.usgov.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest_Block_Device_Template_Group/createFromIcos.json with the following JSON in the request body.

The following JSON request body is a generic example.



  Example JSON request body 

{
"parameters": [
{
"name": "IMAGE_NAME",
"note": "NOTE_FOR_IMAGE",
"operatingSystemReferenceCode": "UBUNTU_16_64",
"uri": "cos://us-south/my-bucket-name/my-image-object-name.vhd",
"isEncrypted": 0,
"ibmAccessKey": "MY_HMAC_ACCESS_KEY",
"ibmSecretKey": "MY_HMAC_SECRET_KEY"
}
]
}
: Use a cloud service such as [IBM Cloudant](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant) or [IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage).





 How can I scale my app? 

If you want to dynamically add and remove apps in response to workload usage, see [Scaling apps](https://cloud.ibm.com/docs/containers?topic=containers-update_appapp_scaling) for steps to enable horizontal pod autoscaling.







 Versioning and updating apps 

You put in a lot of effort preparing for the next version of your app. You can use IBM Cloud and Kubernetes update tools to roll out different versions of your app.



 How can I organize my deployments to make them easier to update and manage? 

Now that you have a good idea of what to include in your deployment, you might wonder how are you going to manage all these different YAML files? Not to mention the objects that they create in your Kubernetes environment!

The following tips can help you organize your deployment YAML files.



* Use a version-control system, such as Git.
* Group closely related Kubernetes objects within a single YAML file. For example, if you are creating a deployment, you might also add the service file to the YAML. Separate objects with --- such as in the following example.

apiVersion: apps/v1
kind: Deployment
metadata:
...
---
apiVersion: v1
kind: Service
metadata:
...
* You can use the kubectl apply -f command to apply to an entire directory, not just a single file.
* Try out the [kustomize project](https://cloud.ibm.com/docs/containers?topic=containers-appkustomize) that you can use to help write, customize, and reuse your Kubernetes resource YAML configurations.
IBM Cloud Container Registry provides a multi-tenant private image registry that you can use to store and share your container images with users in your IBM Cloud account. Select the location for your namespace, and click Create. [Learn more.](https://cloud.ibm.com/docs/Registry?topic=Registry-getting-started)





 Step 5: Complete optional steps 

Complete any or all of the following optional steps. If you don't complete these steps now, you can complete them in the next tutorial.



1. Create an [image signing key](https://cloud.ibm.com/docs/devsecops?topic=devsecops-devsecops-image-signing) with the proper encoding to sign your application docker images.
2. Create an [IBM Cloud API key](https://cloud.ibm.com/iam/apikeys). Save the API key value by either copying, downloading it or adding it to your vault. Alternatively, you can create the API key during the template-guided setup process.
3. Validate that the [recommended IAM permissions](https://cloud.ibm.com/docs/devsecops?topic=devsecops-iam-permissions) are assigned to corresponding integrations.
4. [Install the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cloud-cli-getting-started).
5. Create an [IBM Cloud Object Storage instance and bucket](https://cloud.ibm.com/docs/devsecops?topic=devsecops-cd-devsecops-cos-config). [Learn more.](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-about-cloud-object-storage)
6.
import com.ibm.cloud.cloudant.v1.model.Document;
import com.ibm.cloud.cloudant.v1.model.DocumentResult;
import com.ibm.cloud.cloudant.v1.model.PostBulkDocsOptions;

import java.util.Arrays;
import java.util.List;

Cloudant service = Cloudant.newInstance();

Document eventDoc1 = new Document();
eventDoc1.setId("0007241142412418284");
eventDoc1.put("type", "event");
eventDoc1.put("userid", "abc123");
eventDoc1.put("eventType", "addedToBasket");
eventDoc1.put("productId", "1000042");
eventDoc1.put("date", "2019-01-28T10:44:22.000Z");

Document eventDoc2 = new Document();
eventDoc2.setId("0007241142412418285");
eventDoc2.put("type", "event");
eventDoc2.put("userid", "abc234");
eventDoc2.put("eventType", "addedToBasket");
eventDoc2.put("productId", "1000050");
eventDoc2.put("date", "2019-01-28T10:44:22.000Z");

BulkDocs bulkDocs = new BulkDocs.Builder()
.docs(Arrays.asList(eventDoc1, eventDoc2))
.build();

PostBulkDocsOptions bulkDocsOptions = new PostBulkDocsOptions.Builder()
.db("events")
.bulkDocs(bulkDocs)
.build();

List<DocumentResult> response =
If your image is stored in a public repository, such as a public Docker Hub, then you can simply reference the image directly when you deploy your application or run your job. Note that while storing images in a public registry is fine for getting started with applications and jobs, store your enterprise images in a private registry.





 Accessing images in your own account from console 

If you are accessing Code Engine from an account that you own or administer, then Code Engine can automatically push and pull images to and from an IBM Cloud Container Registry namespace in your account when you create or update apps, jobs, or builds from the console. Code Engine can even create a namespace for you when you push an image. For more information, see the following topics.



* [Deploying an app that references an image in IBM Cloud Container Registry with the console](https://cloud.ibm.com/docs/codeengine?topic=codeengine-deploy-app-crimagedeploy-app-crimage-console).
* [Deploying your app from source code](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-source-code).
* [Creating a job from images in IBM Cloud Container Registry with the console](https://cloud.ibm.com/docs/codeengine?topic=codeengine-create-job-crimagecreate-job-crimage-console).
* [Creating a job from source code](https://cloud.ibm.com/docs/codeengine?topic=codeengine-run-job-source-code).







 Accessing images from your account with an API key 

If you are accessing Code Engine with the CLI, you must first create an IAM API key and then [save the IAM API key as registry access](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registryadd-registry-access-ce) in Code Engine.

The following steps create an API key that stores the credentials of a user ID.
* --source-image: ID, name, or CRN of the source image.
* --copies: ID, name, or CRN of the snapshot copies. Combination of these three types are not supported. Only passing either one of three types is supported.
* --copies-remote-region: Name of the snapshot copies remote region.
* --source-snapshot: ID or name of source snapshot.
* --source-snapshot-remote-region: Name of the source snapshot remote region.
* --volume-remote-region: Name of the source volume remote region.
* --source-image-remote-region: Name of the source image remote region.
* --backup-policy-plan: ID or name of the backup policy plan.
* --backup-policy: ID or name of the backup policy.
* --clones-zone-name: Name of the snapshot clone zone.
* --resource-group-id: ID of the resource group. This ID is mutually exclusive with --resource-group-name.
* --resource-group-name: Name of the resource group. This name is mutually exclusive with --resource-group-id.
* --all-resource-groups: Query all resource groups.
* --output: Specify output format, only JSON is supported. One of: JSON.
* -q, --quiet: Suppress verbose output.



--------------------







 ibmcloud is snapshot 

View details of a snapshot.

ibmcloud is snapshot SNAPSHOT [--output JSON] [-q, --quiet]



 Command examples 



* ibmcloud is snapshot my-snapshot
* ibmcloud is snapshot r134-2fbe71a8-126e-4a05-80ad-dad45df491a5







 Command options 



* SNAPSHOT: ID or name of the snapshot.
* --output: Specify output format, only JSON is supported. One of: JSON.
DELETE /{db}/{docid} <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantdeletedocument), [CouchDB](https://docs.couchdb.org/en/latest/api/document/common.htmldelete--db-docid) Delete the specified document. 
 COPY /{db}/{docid} <br>Cloudant, [CouchDB](https://docs.couchdb.org/en/latest/api/document/common.htmlcopy--db-docid) Copy an existing document to a new or existing document. 
 HEAD /{db}/{docid}/{attname} <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantheadattachment), [CouchDB](https://docs.couchdb.org/en/latest/api/document/attachments.htmlhead--db-docid-attname) Retrieve the HTTP headers that contain a minimal amount of information about the specified attachment. For IBM Cloudant, use {attachment_name} instead of {attname}. 
 GET /{db}/{docid}/{attname} <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantgetattachment), [CouchDB](https://docs.couchdb.org/en/latest/api/document/attachments.htmlget--db-docid-attname) Retrieve the file attachment associated with the document. For IBM Cloudant, use {attachment_name} instead of {attname}. 
 PUT /{db}/{docid}/{attname} <br>[Cloudant](https://cloud.ibm.com/apidocs/cloudantputattachment), [CouchDB](https://docs.couchdb.org/en/latest/api/document/attachments.htmlput--db-docid-attname) Upload the supplied content as an attachment to the specified document.
import com.ibm.cloud.cloudant.v1.model.DocumentResult;
import com.ibm.cloud.cloudant.v1.model.PutAttachmentOptions;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;

Cloudant service = Cloudant.newInstance();

String detailedDescription = "This appliance includes...";

InputStream detailedDescriptionStream =
new ByteArrayInputStream(detailedDescription
.getBytes(StandardCharsets.UTF_8));

PutAttachmentOptions attachmentOptions =
new PutAttachmentOptions.Builder()
.db("products")
.docId("small-appliances:100001")
.attachmentName("product_details.txt")
.attachment(detailedDescriptionStream)
.contentType("text/plain")
.build();

DocumentResult response =
service.putAttachment(attachmentOptions).execute()
.getResult();

System.out.println(response);

from ibmcloudant.cloudant_v1 import CloudantV1

service = CloudantV1.new_instance()

detailed_description = "This appliance includes..."
response = service.put_attachment(
db='products',
doc_id='small-appliances:100001',
attachment_name='product_details.txt',
attachment=detailed_description,
content_type='text/plain'
).get_result()

print(response)

putAttachmentOptions := service.NewPutAttachmentOptions(
"products",
"small-appliances:100001",
"product_details.txt",
ioutil.NopCloser(
Creating a backup 

This tutorial demonstrates how to use the [CouchBackup](https://www.npmjs.com/package/@cloudant/couchbackup) utility to back up and restore a CouchDB or IBM® Cloudant® for IBM Cloud® instance. CouchBackup backs up the database to a file. If the database fails, you can use the backup file to restore the information to an existing database.



 Objectives 



1. Install CouchBackup.
2. Create a sample database with documents.
3. Set an environment variable.
4. Back up a database.
5. Create a log file.
6. Restore a backup from a text file.







 Step 1: Installing CouchBackup 

Install CouchBackup by running the install command.

npm install -g @cloudant/couchbackup





 Step 2: Creating a sample database 

Create a sample couchbackup-demo database for use with this tutorial.



1. Create a database by running this command.

curl "https://username:password@myhost.cloudant.com/couchbackup-demo" -X PUT
2. Review the results.

{
"ok": true
}







 Step 3: Creating documents in the sample database 

The documents that you create in this exercise contain the data that you back up and restore in later exercises.



1. Copy the sample text to a data file named bulkcreate.dat to create all five documents.

{
"docs":
[
{
"_id": "doc1",
"firstname": "Sally",
"lastname": "Brown",
"age": 16,
"location": "New York City, NY"
},
{
"_id": "doc2",
"firstname": "John",
"lastname": "Brown",
"age": 21,
"location": "New York City, NY"
},
{
(https://cloud.ibm.com/docs/satellite?topic=satellite-locations)[Add storage Plan and add highly available persistent storage for your Satellite clusters.](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-template-ov)

 Learn more 

[Architecture Center<br><br>Discover the architecture references available for this product.<br><br>![190-Application-Platform.svg](https://cloud.ibm.com/media/docs/images/homepage/190-Application-Platform.svg)](https://www.ibm.com/cloud/architecture/architectures/kubernetes-infrastructure-with-ibm-cloud)[IBM Training<br><br>Build your skills with IBM Cloud training.<br><br>![83-Elements-of-the-cloud.svg](https://cloud.ibm.com/media/docs/images/homepage/83-Elements-of-the-cloud.svg)](https://www.ibm.com/training/search?query=Satellite)[Community<br><br>Join the IBM Cloud community and collaborate with others.<br><br>![35-Connectivity.svg](https://cloud.ibm.com/media/docs/images/homepage/35-Connectivity.svg)](https://community.ibm.com/community/user/publiccloud/home)
Adding New Image into Image Pool 



1.  When created a new image (not updated image), if this image require virtual machine with less 4 CPU cores and 8 GB memory size, you can add this image to your institute image pool. This image will be available to all your institute users.
2.  Select Edit Grouping & Mapping from Manage Images.



![group1](https://cloud.ibm.com/docs-content/v1/content/b6c5dbb443b797203b2824b05472cac5ae8635da/cloud-for-education/images/addImage.png)



1.  Choose Group by Image, then choose Your-Image for Image, click Get Groups. Available groups should be shown on Groups Your-Image is not in. Select Your institution name-Images, then click Add button. Then you should be able to reserve your new image.



![group2](https://cloud.ibm.com/docs-content/v1/content/b6c5dbb443b797203b2824b05472cac5ae8635da/cloud-for-education/images/addGroup.png)
For more information about avoiding and resolving conflicts, see the [Document versioning and MVCC guide](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-document-versioning-and-mvccdocument-versioning-and-mvcc).

You can customize this topic for the programming language that you want to use by selecting the language in the code examples.

See an example of updating a document by using HTTP:

POST /$DATABASE HTTP/1.1

See examples of updating a document:



* Curl
* Java
* Python
* Go
* Node



curl -H "Authorization: Bearer $API_BEARER_TOKEN" -X POST "$SERVICE_URL/products" -H "Content-Type: application/json" --data '{ "_id": "small-appliances:1000042", "_rev": "1-967a00dff5e02add41819138abb3284d", "type": "product", "productid": "1000042", "brand": "Salter", "name": "Digital Kitchen Scales", "description": "Slim Colourful Design Electronic Cooking Appliance for Home / Kitchen, Weigh up to 5kg + Aquatronic for Liquids ml + fl. oz. 15Yr Guarantee - Green", "price: 14.99, "image": "assets/img/0gmsnghhew.jpg" }'

import com.ibm.cloud.cloudant.v1.Cloudant;
import com.ibm.cloud.cloudant.v1.model.Document;
import com.ibm.cloud.cloudant.v1.model.DocumentResult;
import com.ibm.cloud.cloudant.v1.model.PostDocumentOptions;

Cloudant service = Cloudant.newInstance();

Document productsDocument = new Document();
productsDocument.setId("small-appliances:1000042");
Preparing and importing images 

You use the Image Templates screen in the IBM Cloud® console to import an image from an [IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage) service instance. You can import images to classic infrastructure that are in Virtual Hard Disk (VHD), Virtual Machine Disk (VMDK) or custom ISO 9660 format. After an image is uploaded to a bucket in an IBM Cloud Object Storage service instance, you can import it to the image templates repository in the IBM Cloud console. VMDK images are converted to VHD after the import.

You must have an upgraded account to import images from IBM Cloud Object Storage. For more information, see [Switching to IBMid and linking accounts](https://cloud.ibm.com/docs/account?topic=account-account-getting-started).

These instructions are specific to importing images to the image templates repository for classic infrastructure. These instructions do not apply to IBM Cloud VPC infrastructure.

You must have an [IBM Cloud Object Storage instance](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-provisionprovision-account) that was ordered through the IBM Cloud console to use this import feature. IBM Cloud Object Storage from control.softlayer.com is not supported.

After images are imported as an image template, they can be used to provision or start an existing virtual server. VHD and VMDK image imports are restricted to the following 64-bit operating systems:



* CentOS 7 and 8
* Debian 9 and 10
* Windows Server Standard 2012, 2012 R2, 2016, and 2019
* RedHat Enterprise Linux 7 and 8
* Ubuntu 18.04 and Ubuntu 20.04



Imports are limited to 100 GB disks. Only the boot volume is imported, not secondary disks. Imported images must be named according to the following example: filename.vhd-0.vhd or filename.vmdk-0.vmdk



 ISO Templates
If you don't want to transfer data manually, you can create a script for this action by using the [ibmcloud cr image-tag](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_image_tag) command. For example, you can use the following script, where <old_namespace> is the existing namespace and <new_namespace> is the namespace that you created:

IMAGES=$(icr images --restrict <old_namespace> --format "{{ .Repository }}:{{ .Tag }}")

for i in $IMAGES ; do
new=$(echo $i | sed "s|/<old_namespace>/|/<new_namespace>/|1")
ibmcloud cr image-tag $i $new
done
* Do images in the trash count toward my quota?

 Do images in the trash count toward my quota? 

Images that are in the trash don't count toward your quota.
* How do I find the image digest?

 How do I find the image digest? 

You can find the long format of the image [digest](https://cloud.ibm.com/docs/Registry?topic=Registry-registry_overviewoverview_elements_digest) by running one of the following commands. The digest is displayed in the Digest column of the CLI.

When you are using the digest to identify an image, always use the long format.



* Run the [ibmcloud cr image-digests](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_image_digests) command:

ibmcloud cr image-digests
* Run the [ibmcloud cr image-list](https://cloud.ibm.com/docs/Registry?topic=Registry-containerregclibx_cr_image_list) command:

ibmcloud cr image-list --no-trunc

If you run the ibmcloud cr image-list command without the --no-trunc option, you see the truncated format of the digest.
service.deleteDocument(documentOptions).execute()
.getResult();

System.out.println(response);

from ibmcloudant.cloudant_v1 import CloudantV1

service = CloudantV1.new_instance()

response = service.delete_document(
db='events',
doc_id='0007241142412418284',
rev='2-9a0d1cd9f40472509e9aac6461837367'
).get_result()

print(response)

deleteDocumentOptions := service.NewDeleteDocumentOptions(
"events",
"0007241142412418284",
)
deleteDocumentOptions.SetRev("2-9a0d1cd9f40472509e9aac6461837367")

documentResult, response, err := service.DeleteDocument(deleteDocumentOptions)
if err != nil {
panic(err)
}

b, _ := json.MarshalIndent(documentResult, "", " ")
fmt.Println(string(b))

const { CloudantV1 } = require('@ibm-cloud/cloudant');
const service = CloudantV1.newInstance({});

service.deleteDocument({
db: 'events',
docId: '0007241142412418284',
rev: '2-9a0d1cd9f40472509e9aac6461837367'
}).then(response => {
console.log(response.result);
});

The previous Go example requires the following import block:

import (
"encoding/json"
"fmt"
"github.com/IBM/cloudant-go-sdk/cloudantv1"