vania-janet/multiturn-rag-retrieval-data huggingface dataset:
When running in IBM Cloud, the credentials will be read from the VCAP_SERVICES environment variable.



1. Create a file called vcap-local.json in the get-started-python directory with the following content:

{
"services": {
"cloudantNoSQLDB": [
{
"credentials": {
"username":"CLOUDANT_DATABASE_USERNAME",
"password":"CLOUDANT_DATABASE_PASSWORD",
"host":"CLOUDANT_DATABASE_HOST"
},
"label": "cloudantNoSQLDB"
}
]
}
}
2. Find your app in the IBM Cloud [resource list](https://cloud.ibm.com/resources). On the Service Details page for your app, click Connections in the sidebar. Click the IBM Cloudant menu icon (…) and select View credentials.
3. Copy and paste the username, password, and host from the credentials to the same fields of the vcap-local.json file replacing CLOUDANT_DATABASE_USERNAME, CLOUDANT_DATABASE_PASSWORD, and CLOUDANT_DATABASE_HOST.
4. Run your app locally.

python hello.py



View your app at: http://localhost:8000. Any names you enter into the app will now get added to the database.

Your local app and the IBM Cloud app are sharing the database. View your IBM Cloud app at the URL listed in the output of the push command from above. Names you add from either app should appear in both when you refresh the browsers.

Remember, if you don't need your app live, stop it so you don't incur any unexpected charges.





 Next steps 



* [Samples](https://ibm-cloud.github.io)
* [Architecture Center](https://www.ibm.com/cloud/architecture/architectures)
Check to be sure that you have the [IBM Cloud prerequisites](https://cloud.ibm.com/docs/overview?topic=overview-prereqs-platform).
2. In the IBM Cloud catalog, select App ID. The service configuration screen opens.
3. Give your service instance a name, or use the preset name.
4. Select your pricing plan and click Create.



That's it! You're ready to start configuring your application settings.





 Step 2: Configure a sample app 

You can use one of the preconfigured sample apps to get familiar with working with the service.

Out of the box, the sample apps are configured with two identity providers and the ability to review authentication. Sample apps are offered in iOS Swift, Android, Node.js, Java and Single-page application. If you don't see a language in which you feel comfortable working, don't worry! You can integrate App ID into your own application by using the provided APIs.

To build a sample app:



1. Click Download Sample.
2. Click on the language of your choice to download the sample. Don't see the language you're looking for? Don't worry! You can take advantage of App ID through the APIs.
3. Be sure that you have the prerequisites installed or completed.
4. Follow the Build & Run steps to set up your sample with App ID.
5. Click Review Activity to see any authentication events that occurred. Any type of sign in creates an event that is visible on this page.
6. Customize the sign in widget.



1. Add an image such as a brand logo by clicking Select and browsing your local system for an image to upload.
2. Choose a color scheme by either selecting one of the color options or specifying in a hex value.
3. Change between web and mobile to see how the color scheme looks on each type of device.
4. When you're happy with your choices, click Save Changes.
See [Setting up your source code repository](https://cloud.ibm.com/docs/sell?topic=sell-source-repo-setup).
* For containerized apps:



* Create your [Kubernetes cluster](https://cloud.ibm.com/docs/containers?topic=containers-getting-started) or [Red Hat OpenShift cluster](https://cloud.ibm.com/docs/openshift?topic=openshift-getting-started).
* For deployments to IBM Cloud Kubernetes Service, [set up your Helm chart](https://cloud.ibm.com/docs/containers?topic=containers-helm).
* For deployments to Red Hat OpenShift, set up your [Helm chart](https://cloud.ibm.com/docs/openshift?topic=openshift-helm) or [Operator](https://cloud.ibm.com/docs/openshift?topic=openshift-operators).



* For virtual server images:



* Review the list of [supported images](https://cloud.ibm.com/docs/vpc?topic=vpc-about-images).
* If required, create your [Terraform template](https://cloud.ibm.com/docs/schematics?topic=schematics-getting-started). Virtual server images for VPC do not require a Terraform template.
* Create an instance of [IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage) and add your image to a bucket.









 Importing a version to your private catalog 

Complete the following steps to import a version of your software to your private catalog. Your private catalog was created for you as part of [Getting set up to sell software](https://cloud.ibm.com/docs/sell?topic=sell-sw-getting-started).



1. In the IBM Cloud console, click the Navigation Menu icon !
Getting started with the Event Streams CLI 

To install and set up the Event Streams CLI on the Lite, Standard, and Enterprise plans, complete the following steps:



 Step 1. Install the IBM Cloud CLI 

For more information about how to install the CLI, see [Getting started with the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cloud-cli-getting-started).





 Step 2. Log in to IBM Cloud 

Run the following command to log in to IBM Cloud:

ibmcloud login -a cloud.ibm.com





 Step 3. Create an Event Streams instance 

Create an Event Streams instance on IBM Cloud by using the Lite, Standard, or Enterprise plans.

Select one of the following methods:



* To create an instance from the IBM Cloud console, go to the Event Streams entry in the [catalog](https://cloud.ibm.com/catalog/event-streams).
* To create an instance from the CLI on the Enterprise plan, run the following command:

ibmcloud resource service-instance-create <INSTANCE_NAME> messagehub enterprise <REGION>

Because Enterprise has its own dedicated resources for each cluster, it requires more time for provisioning so a new Enterprise instance might take up to 3 hours.
* To create an instance from the CLI on the Standard plan, run the following command:

ibmcloud resource service-instance-create <INSTANCE_NAME> messagehub standard <REGION>

Provisioning a new Standard instance is instantaneous because the underlying resources are already set up.







 Step 4. Optional: Create a service API key for this instance 

Optionally, you can create a service API key. Valid values for ROLE_NAME are Manager, Writer, and Reader. Their permissions are described in [Managing access to your Event Streams resources](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-securitysecurity).



* To create an API key from the IBM Cloud console, enter the Service credentials from the instance page, and click New Credentials.
* To create an API key from the CLI, run this command:
For more information about IBM Cloud accounts, see [Setting up your IBM Cloud account](https://cloud.ibm.com/docs/account?topic=account-account-getting-started) and [Upgrading your account](https://cloud.ibm.com/docs/account?topic=account-upgrading-account).
* A [Code Engine Project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-getting-started) and an API Key. You can create these resources by using either the UI or the CLI. For more information about Code Engine Projects, see [Code Engine Projects](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-projectcreate-a-project).
* An instance of the [Continuous Delivery](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-getting-started) service.
* Optional. Secrets that are stored in a secrets management vault and managed centrally from a single location. For more information about choosing from the various secrets management and data protection offerings, see [Managing IBM Cloud secrets](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-manage-secrets-ibm-cloud). If you don't already have an instance of the secrets management vault provider of your choice, create one.
* Optional. A namespace that is created by using the container registry command line. To create a namespace, type the following command from the command line:

ibmcloud cr namespace-add <my namespace>

Alternatively, you can create a namespace on the [Container Registry](https://cloud.ibm.com/registry/namespaces) page. For more information about creating a namespace in this location, see [IBM Cloud Container Registry](https://cloud.ibm.com/docs/Registry?topic=Registry-getting-startedgetting-started) service.





 Related content
If you need to migrate hundreds of databases, then couchreplicate can help coordinate the replication jobs.

Your browser does not support the video tag.
3. Verify that all your data replicates to the new service and that indexes are built.







 Step 5: Test your application 



1. Conduct load and functional testing on your application.
2. Ensure that no issues exist before you migrate to production.







 Step 6: Move to the new instance 



1. Update your application to use the new account URL and credentials for the IBM Cloudant instance.
2. (Optional) Go to the [Getting started tutorial](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudantcreating-service-credentials) to obtain the service credentials for your IBM Cloudant instance.







 Step 7: Turn off the old service 



1. Verify that your application is fully migrated to the Lite or Standard instance.
2. Delete the old Enterprise plan instance from your IBM Cloud console to ensure that you're no longer charged for the service.
Getting started with IBM Cloud Object Storage 

IBM Cloud® Object Storage stores encrypted and dispersed data across multiple geographic locations. This getting started tutorial walks through the steps that are needed to use IBM Cloud Object Storage to create buckets, upload objects, and set up access policies to allow other users to work with your data.



 Before you begin 

You need the following to get started with IBM Cloud Object Storage:



* An [IBM Cloud® Platform account](https://cloud.ibm.com)
* An [instance of IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage/basics?topic=cloud-object-storage-provision)
* Some files on your local computer to upload to Object Storage.



This tutorial takes a new user through the first steps with the IBM Cloud Platform console. Developers who want to get started with the API, see the [Developer's Guide](https://cloud.ibm.com/docs/cloud-object-storage/basics?topic=cloud-object-storage-gs-dev) or [API overview](https://cloud.ibm.com/docs/cloud-object-storage/api-reference?topic=cloud-object-storage-compatibility-api).





 Create some buckets to store your data 



1. [Ordering IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage/basics?topic=cloud-object-storage-provision) creates a service instance. IBM Cloud Object Storage is a multi-tenant system, and all instances of Object Storage share physical infrastructure. You will be automatically redirected to the service instance upon its creation. Your Object Storage instances are listed under Storage in [the resource list](https://cloud.ibm.com/resources).

The terms 'resource instance' and 'service instance' refer to the same concept, and can be used interchangeably.
2. You will need a bucket before you can store data in your new service instance. To Create a bucket, start by choosing a unique name. All buckets in all regions across the globe share a single namespace.
For more information about IBM Cloud accounts, see [Setting up your IBM Cloud account](https://cloud.ibm.com/docs/account?topic=account-account-getting-started) and [Upgrading your account](https://cloud.ibm.com/docs/account?topic=account-upgrading-account).
* A [Kubernetes cluster](https://cloud.ibm.com/docs/containers?topic=containers-getting-started) and an API key. You can create these resources by using either the UI or the CLI. The cluster might take some time to provision. As the cluster is created, it progresses through the Deploying, Pending, and Ready stages. For more information about Kubernetes clusters, see [Kubernetes clusters](https://cloud.ibm.com/docs/containers?topic=containers-clusters). Although you can use Rolling and Blue-Green deployments for Lite plans, you must create a Kubernetes cluster for Standard plans.
* An instance of the [Continuous Delivery](https://cloud.ibm.com/docs/ContinuousDelivery?topic=ContinuousDelivery-getting-started) service.
* Optional. Secrets that are stored in a secrets management vault and managed centrally from a single location. For more information about choosing from the various secrets management and data protection offerings, see [Managing IBM Cloud secrets](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-manage-secrets-ibm-cloud). If you don't already have an instance of the secrets management vault provider of your choice, create one.
* Optional. A namespace that is created by using the container registry command line. To create a namespace, type the following command from the command line:

ibmcloud cr namespace-add <my namespace>

Alternatively, you can create a namespace on the [Container Registry](https://cloud.ibm.com/registry/namespaces) page.
* [Accessing your Cloudant database through CIS](https://cloud.ibm.com/docs/cis?topic=cis-access-cloudant-through-cis)
* [Edge functions use cases](https://cloud.ibm.com/docs/cis?topic=cis-edge-functions-use-cases)



* [Understanding your responsibilities when using CIS](https://cloud.ibm.com/docs/cis?topic=cis-responsibilities-cis)
* [Plan comparison](https://cloud.ibm.com/docs/cis?topic=cis-cis-plan-comparison)
* [Transitioning to updated plans](https://cloud.ibm.com/docs/cis?topic=cis-transition-plans)
* [CIS allowlisted IP addresses](https://cloud.ibm.com/docs/cis?topic=cis-cis-allowlisted-ip-addresses)
* [Helpful tools for managing your CIS deployment](https://cloud.ibm.com/docs/cis?topic=cis-helpful-tools-for-managing-your-cis-deployment)
* [HIPAA advisory](https://cloud.ibm.com/docs/cis?topic=cis-hipaa-advisory)



* Help



* [FAQs for IBM Cloud Internet Services](https://cloud.ibm.com/docs/cis?topic=cis-faq)
* [Known limitations](https://cloud.ibm.com/docs/cis?topic=cis-known-limitations)
* Troubleshooting CIS



* [Troubleshooting your CIS network connection](https://cloud.ibm.com/docs/cis?topic=cis-troubleshoot-your-cis-network-connection)
* [What do I do if I use the Cloudflare Origin root certificate, and it's expiring?](https://cloud.ibm.com/docs/cis?topic=cis-update-origin-root-ca)
* [Why is my website offline?]
If you have a federated user ID, instead use the following command to log in with your single sign-on ID. See [Logging in with a federated ID](https://cloud.ibm.com/docs/account?topic=account-federated_id) to learn more.

ibmcloud login --sso
2. Target a Cloud Foundry org and space:

ibmcloud target --cf

If you don't have an org or a space set up, see [Adding orgs and spaces](https://cloud.ibm.com/docs/account?topic=account-orgsspacesusers).
3. Be sure you are in the main directory, get-started-aspnet-core, for your app then push your app to IBM Cloud:

ibmcloud cf push

This can take a minute. If there is an error in the deployment process, you can use the command ibmcloud cf logs <Your-App-Name> --recent to troubleshoot.



When deployment completes, you should see a message indicating that your app is running. View your app at the URL listed in the output of the push command. You can also issue the following command to view your app's status and to see the URL.

ibmcloud cf apps

You can also go to the IBM Cloud [Resource List](https://cloud.ibm.com/resources) to view your app.





 Step 5: Add a database 

Next, we'll add an IBM Cloudant NoSQL database to this app and set up the app so that it can run locally and on IBM Cloud.



1. In your browser, log in to IBM Cloud and go to the Dashboard. Select Create resource.
2. Search for IBM Cloudant, and select the service.
3. For Available authentication methods, select Use both legacy credentials and IAM. You can leave the default settings for the other fields. Click Create to create the service.
4. In the navigation, go to Connections, then click Create connection. Select your app, and click Connect.
5.
git clone https://github.com/IBM-Cloud/get-started-python

cd get-started-python

Peruse the files in the get-started-python directory to familiarize yourself with the contents.





 Step 2: Run the app locally 

See [!The Hitchhiker’s Guide to Python](http://docs.python-guide.org/en/latest/) for help setting up Python on your system.

Install the dependencies listed in the [requirements.txt](https://pip.pypa.io/en/stable/user_guide/requirements-files) file to be able to run the app locally.

You can optionally use a [virtual environment](https://packaging.python.org/tutorials/installing-packages/creating-and-using-virtual-environments) to avoid having these dependencies clash with those of other Python projects or your operating system.

pip install -r requirements.txt

Alternatively with Python3 you can issue

python3 -m pip install -r requirements.txt

Run the app.

python hello.py

View your app at: http://localhost:8000





 Step 3: Prepare the app for deployment 

To deploy to IBM Cloud, it can be helpful to set up a manifest.yml file. The manifest.yml includes basic information about your app, such as the name, how much memory to allocate for each instance and the route. We've provided a sample manifest.yml file in the get-started-python directory.

Open the manifest.yml file, and change the name from GetStartedPython to your app name, app_name.

apps:
- name: GetStartedPython
random-route: true
memory: 128M

In this manifest.yml file, random-route: true generates a random route for your app to prevent your route from colliding with others. If you choose to, you can replace random-route: true with host: <myChosenHostName>, supplying a host name of your choice.





 Step 4: Deploy the app 

You can use the IBM Cloud CLI to deploy apps.
* Install the [IBM Cloud CLI](https://cloud.ibm.com/docs/schematics?topic=schematics-setup-cliinstall-schematics-cli) and the [Schematics CLI plug-in](https://cloud.ibm.com/docs/schematics?topic=schematics-setup-cliinstall-schematics-plugin). For more information about command-line setup, see [Schematics command-line setup](https://cloud.ibm.com/docs/schematics?topic=schematics-setup-cli).
* Ensure you are assigned the needed permissions in IBM Cloud® Identity and Access Management to create and work with IBM Cloud Schematics Workspace. see [Schematics access](https://cloud.ibm.com/docs/schematics?topic=schematics-accessaccess-roles) and to create an IBM Cloud Object Storage service instance.
* Follow the instructions to ensure you are assigned the needed permissions in Cloud Identity and Access Management to create resources. For more information about create IBM Cloud Object Storage, see [IBM Cloud Object Storage](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-provision).







 Step 1: Accessing the IBM Cloud and GitHub 

Complete these steps to access the IBM Cloud and the Terraform templates from the GitHub:



1. If you do not have one, create an [IBM Cloud Pay-As-You-Go or Subscription IBM Cloud account](https://cloud.ibm.com/registration).
2. Log in to your [GitHub](https://github.com/) account.
3. Open the Terraform template to [create an IBM Cloud Object Storage](https://github.com/IBM-Cloud/terraform-provider-ibm/tree/master/examples/ibm-cos-bucket).
4. From the right side of the GitHub page, click Fork icon to create your own fork of the shared repository.
yum install -y docker device-mapper-libs device-mapper-event-libs
 Start the docker process.
 {: pre}
systemctl enable --now docker.service
6. Verify the installation of the IBM Cloud CLI.

ibmcloud dev -v

Example output:

ibmcloud dev version 2.4.0
 Verify kubectl.
 {: pre}
kubectl version

Example output:

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.10", GitCommit: ...
 Verify docker.
 {: pre}
systemctl status docker

Example output:

● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since ...
7. Log in to IBM Cloud.

ibmcloud login [--sso]

a. If you're logging in to IBM Cloud for the first time, create an [IBM Cloud API key file](https://cloud.ibm.com/docs/account?topic=account-userapikeycreate_user_key).

The command is ibmcloud iam api-key-create <APIKeyName> -d <description> --file <APIKeyFilename>. The API key file will be stored in your current directory.

ibmcloud iam api-key-create myAK4sdh -d "This is your API Key for SAP Data Hub" 
--file myAK4sdh_file

b. For all subsequent logins use the API Key file that you created earlier during step a. The command is ibmcloud login --apikey @<APIKeyFilename>.

ibmcloud login --apikey @myAK4sdh_file







 Access the Red Hat OpenShift on IBM Cloud cluster
* Create your new folder in your local machine or [Git repository](https://cloud.ibm.com/docs/sell?topic=sell-source-repo-setup) to configure the Terraform configuration files.
* If you do not have one, create an [IBM Cloud Pay-As-You-Go or Subscription IBM Cloud account](https://cloud.ibm.com/registration).
* Install the [IBM Cloud command line](https://cloud.ibm.com/docs/cli?topic=cli-getting-started) and the Terraform installation and configuration. For more information, see [installation and testing the configuration](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-getting-startedtf_installation).
* Setup the environment variable such as IC_API_KEY, IAAS_CLASSIC_USERNAME, and IAAS_CLASS_API_KEY on your local machine. For more information, about how to setup the environment variables? see [Using environment variable](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-provider-referenceenv-vars).







 Step 1: Configure the resource file 



1. Create a configuration file that is named classic-vsi.tf with the following content. Store this file in your folder or Git repository that you created earlier.

resource "ibm_compute_vm_instance" "vm1" {
hostname = "vm1"
domain = "example.com"
os_reference_code = "DEBIAN_8_64"
datacenter = "dal10"
network_speed = 10
hourly_billing = true
private_network_only = false
cores = 1
memory = 1024
disks = [25]
local_disk = false
}
Getting started with Event Streams for IBM Cloud 

IBM® Event Streams for IBM Cloud® is a high-throughput message bus that is built with Apache Kafka. To get started with Event Streams and start sending and receiving messages, you can use the Java™ sample. The sample shows how a producer sends messages to a consumer by using a topic. The same sample program is used to consume messages and produce messages.

To understand more about how Event Streams works, see [Event Streams overview](https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-about). Event Streams was previously called Message Hub.

To access Event Streams samples, see our primary sample repository at [Event Streams samples](https://github.com/IBM/eventstreams-samples). Other Event Streams samples, including samples for Node.js and Python, are available at the previous [Event Streams repository](https://github.com/ibm-messaging/event-streams-samples).



 Prerequisites 



1. If you don't already have one, create an Event Streams service instance.

a. Log in to the IBM Cloud console.

b. Click the [Event Streams service](https://cloud.ibm.com/catalog/event-streams) in the Catalog.

c. Select the Lite plan on the service instance page.

d. Enter a name for your service. You can use the default value.

e. Click Create. The Event Streams Getting started page opens.
2. If you don't already have them, install the following prerequisites:



* [Git](https://git-scm.com/)
* Java™ 8 or higher









 Tutorial steps 



1. In the IBM Cloud console (UI), go to your Resource list, select your Event Streams resource, and click the Get started with a sample application tile.
2. Complete the Configure and run starter application steps:

a. Click the Download .JAR from GitHub button to download the latest .JAR release.

b.