vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Figure 1. Standard dashboard

If the Plan tab indicates that you're on the Standard plan, you don't need to read any further. You're already on a paid SLA-backed IBM Cloudant service. No further action is required.







 Step 2: Finding your legacy Enterprise plan 

You can find your Enterprise plan in the IBM Cloudant Dashboard by following these steps.



1. Open the IBM Cloudant Dashboard. For more information, see the [Getting started](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-navigate-the-dashboard) tutorial.
2. If you're using a legacy Enterprise cloudant.com account, click Account.
3. Review your cloudant.com Enterprise account on a dedicated cluster. The view doesn't include a Usage tab and looks like the following example:

Zoom

![Review the information about the Enterprise plan in the IBM Cloudant Dashboard under Account.](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/images/cloudantcom_enterpriseplan_account.png)

Figure 2. Enterprise plan
(https://cloud.ibm.com/docs/cli?topic=cli-getting-startedstep4-configure-idt-env))
* The [IBM CLI](https://www.ibm.com/cloud/cli) - the command line interface to interact with the IBM API. You will need to make sure it has the following [plug-ins](https://cloud.ibm.com/docs/cli?topic=cli-plug-ins):



* openshift (oc)
* container registry (cr)



* Make sure you have access to a Mac or Linux terminal.
* [The Kubernetes CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/) - a command line interface for running commands against Kubernetes clusters.
* [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli) - automates your resource provisioning
* [Docker](https://docs.docker.com/engine/install/) We will be using Docker to create the images that will run your code inside your cluster — make sure you are logged into your Docker account
* [jq](https://stedolan.github.io/jq/) - a lightweight and flexible command-line JSON processor
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - a free and open source distributed version control system
* [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)







 Step-by-step instructions 



 Step 1: Obtain an API key to deploy infrastructure to your account 

Follow the steps [in this document](https://cloud.ibm.com/docs/account?topic=account-userapikey&interface=uicreate_user_key) to create an API key and make a note of it for Step 2.
2. From the IBM Cloudant events package (called cloudant-events, if you accepted the default name), select Manage Action from the process change action.
3. Click Change input and enter a valid JSON entry for name and color, similar to the following example.

{
"name": "Tarball",
"color": "Black"
}
4. Click Apply.
5. Click Invoke. In the Activation pane, find output similar to the following example.

Activation ID:
528414375ae544bc8414375ae5d4bcc9

Results:
{
"change": "A Black cat named Tarball was added"
}

Logs:
[
"2019-11-01T18:14:52.056570Z stdout: A Black cat named Tarball was added"
]







 1. Testing the trigger 

While you can test the action, you cannot test the trigger without making an entry to the IBM Cloudant database. Try that next.



1. From the command line, run the [activation poll](https://cloud.ibm.com/docs/openwhisk?topic=cloud-functions-cli-plugin-functions-clicli_activation_poll) command to view a streaming, live list of activations for your namespace.

ibmcloud fn activation poll
2. From the [IBM Cloud resource](https://cloud.ibm.com/resources) list, select your IBM Cloudant instance and click Launch Cloudant Dashboard. Note that you might be prompted for your IBM Cloudant user name and password. You can find them on the service credentials for your IBM Cloudant instance.
3. Select your cats database.
4. Click Create Document.
5. Enter valid JSON and click Create Document.

{
"name": "Tarball",
"color": "Black"
}
6. Check the activation poll to see whether the trigger fired.
Using a Dedicated Hardware plan instance 

This tutorial shows you how to create an IBM® Cloudant® for IBM Cloud® Dedicated Hardware plan instance that uses the IBM Cloud® Dashboard.

After that exercise, you learn how to provision one or more Standard plan instances to run on the IBM Cloudant Dedicated Hardware plan instance by using either the IBM Cloud catalog or the IBM Cloud CLI.

When you create an IBM Cloudant Dedicated Hardware plan instance, an IBM Cloudant environment on dedicated hardware is created for your sole use. A service instance for the Dedicated Hardware plan environment is also created in the IBM Cloud Dashboard. You can't access the Dedicated Hardware plan instance directly, or have any Service Credentials for it. Instead, you use your IBM Cloudant Dedicated Hardware plan instance by creating one or more Standard plan instances on it, and managing the Standard plan instances directly.



 Objectives 



1. Create a Dedicated Hardware plan instance.
2. Provision a Standard plan instance on a Dedicated Hardware environment.
3. Provision a Dedicated Hardware plan instance with the IBM Cloud CLI.
4. Provision a Standard plan instance on a Dedicated Hardware environment with the IBM Cloud CLI.
5. Create the credentials for your IBM Cloudant service.
6. List the service credentials for your IBM Cloudant service.







 Step 1: Creating an IBM Cloudant Dedicated Hardware plan instance 



1. Log in to your IBM Cloud account.

The IBM Cloud Dashboard can be found by using the following website: [https://cloud.ibm.com/](https://cloud.ibm.com/). After you authenticate with your username and password, the IBM Cloud Dashboard opens.
2. Click Create resource.
3. Type Cloudant in the Search bar and open it.
4. Select the Cloudant offering.
5. Select an environment.

For Dedicated Hardware provisioned instances, you can select from the major IBM Cloud regions in the IBM Cloud Dashboard. However, the actual physical location of the Dedicated Hardware instance is dictated by the location parameter in a later step.



1. Click Dedicated.
2. Click Create Host.

Zoom

!
IBM Cloudant CLI 

The IBM Cloud® Command Line Interface (CLI) provides extra capabilities for service offerings. You can use IBM Cloudant CLI plug-in to manage throughput details and event types that are being sent from your IBM Cloudant account to the IBM Cloud® Activity Tracker service.



 Prerequisites 



* Install the [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started).
* Install the IBM Cloudant CLI by running the following command:



ibmcloud plugin install cloudant



* Use [ibmcloud login command](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_cliibmcloud_login) for logging in to your IBM Cloud account.
* Set IBM Cloudant service URL. For more information, see [Service configuration](https://cloud.ibm.com/docs/cli?topic=cli-cloudant-cliservice-configuration).



You're notified on the command line when updates to the IBM Cloud CLI and plug-ins are available. Be sure to keep your CLI up to date so that you can use the latest commands. You can view the current version of all installed plug-ins by running ibmcloud plugin list.



 Service configuration 

When you make a server resource request, the IBM Cloudant account URL from the service credentials (for example, https://account.appdomain.cloud) is not available automatically in the plug-in. You need to set the CLOUDANT_URL environment variable.

You can define this variable two ways:



1. Export them as environment variables, for example,export CLOUDANT_URL=....
2. Store them in a [credentials file](https://cloud.ibm.com/apidocs/cloudant?code=goauthentication-with-external-configuration).



As an alternative to ibmcloud login, you can set the environment variable CLOUDANT_APIKEY to an IAM API key.







 Other information
Getting started with IBM MQ on Cloud 

IBM MQ on Cloud enables you to quickly and easily deploy queue managers in the cloud and connect your applications to them, for reliable data transfer between different parts of your enterprise application landscape.

This document describes two approaches to get started with IBM MQ on Cloud:



* Getting started using the Guided Tour - this describes how to start the embedded tutorial, which will guide you through the process of creating and using your first IBM MQ on Cloud queue manager.
* Manually creating and using an IBM MQ on Cloud queue manager - this provides documented steps describing how to create and use your first IBM MQ on Cloud queue manager.





 Before you begin 



* You need an [IBM Cloud®](https://cloud.ibm.com/registration/) account.
* Permissions to create a IBM MQ on Cloud service instance in the account.







 Launching an IBM MQ on Cloud service Instance 

To create an MQ on Cloud service instance:



1. Go to the [IBM Cloud Catalog](https://cloud.ibm.com/catalog?category=integration)
2. Select MQ
3. Select your desired region.
4. Type in a service name.
5. Select a plan, for example Lite.
6. Click Create.



You are now presented with a view of your service instance from where you will be able to view and manage your queue managers. This is also the page from which you can launch the Guided Tour.





 Getting started using the Guided Tour 

The MQ on Cloud service comes with a Guided Tour, which provides step by step guidance through the following steps:



* creating a queue manager
* registering an application to put and get messages on a queue
* administering a queue manager



You can launch the Guided Tour by clicking on the 'Take the tour' button at the bottom left of the page.

!
* [Creating a web-based To-Do list](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-web-based-todo-list)
* [Creating an instance with CLI](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-an-ibm-cloudant-instance-on-ibm-cloud-by-using-the-ibm-cloud-cli)
* [Using a Dedicated Hardware plan instance](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-and-leveraging-an-ibm-cloudant-dedicated-hardware-plan-instance-on-ibm-cloud)
* [Creating and populating a database](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-and-populating-a-simple-ibm-cloudant-database-on-ibm-cloud)
* [Using IBM Cloudant Query](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-an-ibm-cloudant-query)
* [Creating a backup](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-a-backup)
* [Locating your Db2 Warehouse on Cloud credentials](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-locating-db2-warehouse-credentials)



* How to



* [Using IBM Cloudant](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloudant-basics)
* Managing your accounts



* [Working with your IBM Cloudant account](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-work-with-your-account)
* [Working with curl](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-working-with-curl)
Take note of your Service Credentials and access the IBM Cloudant Dashboard as you do for a multi-tenant IBM Cloudant instance.

For more information, see [how to locate your service credentials](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-locating-your-service-credentials).







 Step 3: Provisioning a Dedicated Hardware plan instance with the IBM Cloud CLI 



1. Log in to IBM Cloud to use IBM Cloud CLI.
For more information, see [log in to your IBM Cloud account](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-creating-an-ibm-cloudant-instance-on-ibm-cloud-by-using-the-ibm-cloud-clilogging-in-to-your-ibm-cloud-account) to learn about how to log in and set a target resource group.
2. Use the following basic command format to create an IBM Cloudant Dedicated Hardware plan instance by using IBM Cloud CLI.

ibmcloud resource service-instance-create $NAME $SERVICE_NAME $PLAN_NAME $REGION [-p, --parameters @JSON_FILE | JSON_STRING ]





Table 1. Basic command format

 Field Description 

 NAME An arbitrary name that you assign the instance. 
 SERVICE_NAME cloudantnosqldb 
 PLAN_NAME dedicated-hardware 
 REGION The major region where you want to deploy, for example, us-south, us-east, or eu-gb. 



IBM Cloudant Dedicated Hardware plan instances take four more parameters.



Table 2. Parameters

 Parameter Description 

 location The actual physical location of the Dedicated Hardware plan instance, which might differ from the REGION. The location can be in any IBM Cloud location, including major regions and locations outside the major regions. For more information, see [IBM® global data centers](https://www.ibm.com/cloud/data-centers/). 
 hipaa Either true or false. 
 kms_instance_crn An optional parameter that must be set to the CRN of the Key Protect instance housing the encryption key for BYOK. All IBM Cloudant environments are encrypted.
To restart your app, use the ibmcloud cf restart command.
3. Use the service instance.

In this scenario, the <VCAP_SERVICES> environment variable includes information, such as the following items, that an app can use to connect to this instance of IBM Cloudant:

username: d72837bb-b341-4038-9c8e-7f7232916197-bluemix

password: secret

url: https://d72837bb-b341-4038-9c8e-7f7232916197-bluemix:b6fc4708942b70a88853177ee52a528d07a43fa8575a69abeb8e044a7b0a7424@d72837bb-b341-4038-9c8e-7f7232916197-bluemix.cloudant.com

For example, your Node.js app might access this information as follows:

if (process.env.VCAP_SERVICES) {
var env = JSON.parse(process.env.VCAP_SERVICES);
var cloudant = env['cloudantNoSQLDB'].credentials;
} else {
var cloudant = {
"username" : "user1",
"password" : "secret",
"url" : "https://user1:secret@localhost:25002"
}
};

As the sample code shows, to connect to an IBM Cloudant service instance, you can check whether the <VCAP_SERVICES> environment variable exists first. If it exists, the app can use the IBM Cloudant variable's properties to access the database. However, if the <VCAP_SERVICES> environment variable is not present, the local IBM Cloudant service instance is used with the provided default values.
4. Interact with the service instance.

You can interact with the service instance by using the credential information. The actions that you can take include read, write, and update.
If your organization uses single sign on, use ibmcloud cf login -sso.
5. After you are logged in to IBM Cloud, you are ready to deploy your app back to IBM Cloud. From your app directory, enter the following command:

ibmcloud cf push <your_appname>

For more information, see the [Pushing an app](https://docs.cloudfoundry.org/devguide/deploy-apps/deploy-app.html).
6. Now, you can access the app by entering the following app URL in a browser:

http://<your_app>.us-south.cf.appdomain.cloud



You can also choose other tools to build your app, such as Eclipse tools. For more information, see the Getting started page of your app in the IBM Cloud console.



 Binding a service by using the ibmcloud cf cli 

You can also bind a service by using the ibmcloud cf command line interface. This example assumes that you want to add the IBM Cloudant service to your app with the ibmcloud cf command line interface.

To use the IBM Cloudant service within your app, create an IBM Cloudant service instance, bind your app to the service instance, and then use the service instance. The same procedure applies to all the other services.



1. Create an IBM Cloudant NoSQL DB service instance.

Use the ibmcloud cf create-service command to create a new instance of a service. In this example, <Lite> is the name of the plan. For example:

ibmcloud cf create-service cloudantNoSQLDB <Lite> <your_name_for_your_cloudant_service>

You can also use the ibmcloud cf services command to see the list of service instances that you created.

ibmcloud cf services

After a service instance is created, it is available for any of your apps to bind and use.
2. Bind the service instance to your app.

To use a service instance, you must bind it to your app.
* [cloudant-java-sdk](https://github.com/IBM/cloudant-java-sdk/releases)



For an example that uses IBM Cloudant SDK for Java, see the [API and SDK documentation](https://cloud.ibm.com/apidocs/cloudant?code=javaauthentication).





 Node.js 

The following link provides the latest supported version of the IBM Cloudant Node.js library:



* [cloudant-node-sdk](https://github.com/IBM/cloudant-node-sdk/releases)



For an example that uses IBM Cloudant SDK for Node, see the [API and SDK documentation](https://cloud.ibm.com/apidocs/cloudant?code=nodeauthentication).





 Python 

The following link provides the latest supported version of the IBM Cloudant Python library:



* [cloudant-python-sdk](https://github.com/IBM/cloudant-python-sdk/releases)



For an example that uses IBM Cloudant SDK for Python, see the [API and SDK documentation](https://cloud.ibm.com/apidocs/cloudant?code=pythonauthentication).





 Go 

The following link provides the latest supported version of the IBM Cloudant Go library:



* [go-sdk](https://github.com/IBM/cloudant-go-sdk/releases)



For an example that uses IBM Cloudant SDK for Go, see the [API and SDK documentation](https://cloud.ibm.com/apidocs/cloudant?code=goauthentication).







 Access by using HTTP client 

IBM Cloud IAM requires that an IAM API key is exchanged for a time-limited access token before you make a request to a resource or service. The access token is then included in the Authorization HTTP header to the service. When the access token expires, the client must handle getting a new one from the IAM token service.
* [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)
* [Getting started with toolchains](https://cloud.ibm.com/devops/getting-started)
* [Getting started with Continuous Delivery](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-getting-started)







 Looking for help? 

Get help fast directly from the IBM Cloud Continuous Delivery development teams by joining us on [Slack](https://ic-devops-slack-invite.us-south.devops.cloud.ibm.com/).

For more support options, see [Getting help and support for Continuous Delivery](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-gettinghelp).





 Next steps 

When you have your prerequisites in place, continue to the next tutorial in the series:

[Part 2: Set up a CI toolchain for Infrastructure as Code](https://cloud.ibm.com/docs/devsecops?topic=devsecops-devsecops-tutorial-iac-ci).

This tutorial uses an example Terraform configuration to create a KeyProtect service instance and a root key.
If you already have a Lite plan in your account, select another service plan.
6. Click Create.



2. Back in the [IBM Cloud Resource List](https://cloud.ibm.com/resources/), under Services, click on the IBM Cloudant instance you created to open the instance full details page. Note: You may be required to wait until the status of the service changes to Active.
3. Click on Launch Dashboard to open the dashboard in a new browser tab.
4. In the upper right, click on Create Database. Enter guestbook as name and select Non-Partioned under Partitioning. Click Create to create the database.







 Step 2: Create serverless backend 

In this section, you will create the serverless backend app with Code Engine. Serverless apps only incur charges for the execution time which is ideal for infrequently accessed solutions like a guestbook.



 Create a Code Engine project 



1. Navigate to [IBM Cloud Code Engine Overview](https://cloud.ibm.com/codeengine/overview) page.
2. On the left pane, click on Projects and then click Create,



* Select a location.
* Use <yourinitials>-guestbook as project name and select the same resource group as before.
* Click on Create.
* Wait until the project status changes to Active.



3. Click on the project name to enter the project dashboard.







 Create and deploy backend app 



1. Within the project dashboard, click on Applications, then Create.
2. In the new dialog, enter guestbook-backend as name.
3. Leave Container image selected and use icr.io/solution-tutorials/tutorial-serverless-api-webapp:latest as Image reference. It uses an already existing container image.
4. Go to and expand the section Runtime settings. Increase the Min number of instances to 1 and reduce Max number of instances to 2. The minimum of one makes the app more responsive during the initial tests. You could reduce it later to zero again.
5.
Accessing your Cloudant database through CIS 

Follow these steps to access your Cloudant database through IBM Cloud® Internet Services (CIS).



  Before you begin 

These instructions assume you have already added a domain to CIS as outlined in the [Getting started](https://cloud.ibm.com/docs/cis?topic=cis-getting-startedgetting-started) page.





  Step 1: Add your CIS domain to the Cross-Origin Resource Sharing (CORS) 



*  Navigate to your Cloudant database and open the Account > CORS page.
*  Add your CIS domain to the origin domains input field. For example, https://cloudant.test.foo.com.







  Step 2. Configure CIS to point to your Cloudant database 



*  Navigate to the CIS dashboard and create a load balancer or DNS record that points to your Cloudant database hostname. For example, https://cloudant.test.foo.com -> 111-222-333-444-555-test.cloudant.com.
*  Enable proxy for the DNS record or load balancer.







  Step 3. Create a page rule to set the Host Header Override 



*  In the CIS dashboard, navigate to Performance > Page rules.
*  Create a page rule for the URL you want, for example, https://cloudant.test.foo.com/.
*  Select the Rule Behavior setting Host Header Override.
*  Set as the Cloudant database hostname, for example, 111-222-333-444-555-test.cloudant.com.



To learn more about Cloudant, see the [Cloudant documentation](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudantgetting-started-with-cloudant).
For more information, see [Working with curl](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-working-with-curl). Working with curl provides details on supplying a username and password to access the IBM Cloudant API with curl.

If you use IBM Cloud IAM authentication, you must first get an IBM Cloud IAM token by using an API key. You pass the IAM token to the IBM Cloudant instance to authenticate. For more information, see [Passing an IBM Cloud IAM token to authenticate with a service's API](https://cloud.ibm.com/docs/account?topic=account-iamapikeysforservicestoken_auth) tutorial.

You can't use an IAM API key directly to authenticate against IBM Cloudant.





 Client libraries 

IBM Cloudant has official, supported client libraries for Java™, Node.js, Python, Swift, Go, and Mobile. For more information, see the [client libraries documentation](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-client-librariesclient-libraries) to access the libraries, and see examples for connecting to an IBM Cloudant instance from each.