vania-janet/multiturn-rag-retrieval-data huggingface dataset:
Go ahead and visit your new web application in the cloud!





 Step 2: Creating the Web Gallery app 

Let's recall the prerequisites that you needed for developing a Node.js app on IBM Cloud Platform. You already created your IBM Cloud Platform account as well as installed the Developer Tools, which installed Docker. Then, you installed Node.js. The last item listed as a prerequisite for this tutorial was Git, which we dive into now.

We're going to start the specifics of working on the image gallery in Node.js. For now, we use GitHub Desktop for this scenario, but you might also use the Git command-line client to complete the same tasks. To get started, let's clone a starter template for your new web application.

Follow this process:



1. Download the sample here: [download](https://cloud.ibm.com/docs/images/image-gallery-tutorial.zip). Download the template for your app to your local development environment using your browser. Rather than cloning the sample app from IBM Cloud Platform, use the command in the example to obtain the starter template for the IBM Cloud Object Storage Web Gallery app. After cloning the repo you will find the starter app in the COS-WebGalleryStart directory. Open a Git CMD window and change to a directory where you want to clone Github repo. Once there, use the command shown in the first example of this tutorial to start adding your new files.

curl images/image-gallery-tutorial.zip -o image-gallery-tutorial.zip
2. Run the app locally. Open your terminal and change your working directory to the COS-WebGalleryStart directory. Note the Node.js dependencies that are listed in the package.json file. Download them into place by using the command shown next.

npm install
3. Run the app by using the command shown.



npm start

Open a browser and view your app on the address and port that is output to the console, http://localhost:3000.
Open the service instance that you created in the prerequisite section.
3. Open the database that you created.
4. Go to the Query tab.
5. Paste the query JSON from the previous section into the Cloudant Query window.
6. Click Run Query. See the results in the following screen capture:

Zoom

![Run the query, and the results show the _id, author, pages, publisher, and year.](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/images/indexingdashboard1.png)

Figure 1. Window for running queries



IBM Cloudant matches the documents that meet your criteria and it seems to do it quickly, but there's a catch. IBM Cloudant isn't using an index to service this query, meaning that the database has to scan every document in the database to get your answer. This scan is fine for small data sets. But if you're running a production application where the data set is expanding all the time, you definitely don't want to rely on unindexed queries.





 Creating an index 

To create an index, we can tell IBM Cloudant to create an index on the publisher and year fields that we are using in our query.



1. From the IBM Cloudant Dashboard, select the books database.
2. Select the Design Documents tab.
3. Select New Indexes from the Design Documents menu.
4. Copy and paste the following index definition:

{
"index": {
"fields": [
"publisher", "year"
]
},
"name": "publisher-year-index",indexingdashboard5
"type": "json"
}

See an example in the following screen capture:

Zoom

![Click Create index to create an index.]
If you created triggers that use this parameter, you must re-create them without the includeDoc parameter.





 Binding the /whisk.system/cloudant package to your IBM Cloudant database. 

If you're using IBM Cloud® Functions from the IBM Cloud, you can use the IBM Cloud® Functions CLI plug-in to bind a service to an action or package. If you do not bind your service, you must pass your credentials each time you use the action or package.

Before you begin

You must have an instance of IBM Cloudant. To create an instance, see [Getting started with IBM Cloudant](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant).



1. Create a /whisk.system/cloudant package binding that is configured for your IBM Cloudant account. In this example, the package name is myCloudant.

ibmcloud fn package bind /whisk.system/cloudant myCloudant
2. Verify that the package binding exists.

ibmcloud fn package list

The following example shows possible output for the package list command.

packages
/<namespace_ID>/myCloudant private
3. Get the name of the service instance that you want to bind to an action or package.

ibmcloud resource service-instances

The following example shows possible output for the resource service-instances command.

Name Location State Type
Cloudant-gm us-south active service_instance
4. Get the name of the credentials that are defined for the service instance you got in the previous step.

ibmcloud resource service-keys --instance-name Cloudant-gm

The following example shows possible output for the esource service-keys command.

Name State Created At
Service credentials-1 active Sat Oct 27 03:26:52 UTC 2018
Service credentials-2 active Sun Jan 27 22:14:58 UTC 2019
5. Bind the service to the package you created in step one.
macOS may prompt you to install the developer tools. These tools include the git command line.



Proceed to the configuration [common to all operating systems](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorialsgetting-started-common).







 Ubuntu Linux 

The following sections assume you are running Ubuntu Linux as non-root user with access to root privileges. Once you're done with the specific sections, proceed to the configuration [common to all operating systems](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorialsgetting-started-common). If you are using the Linux-based Cloud Shell, proceed to [the section on Cloud Shell](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-tutorialsgetting-started-cloud-shell).



 IBM Cloud CLI 



1. Download and install the IBM Cloud CLI from [https://github.com/IBM-Cloud/ibm-cloud-cli-release/releases/latest](https://github.com/IBM-Cloud/ibm-cloud-cli-release/releases/latest).
2. Verify the installation with:

ibmcloud version







 Docker 



1. If you don't have one, sign up for a free account at [https://hub.docker.com/signup](https://hub.docker.com/signup).
2. Install Docker Engine - Community for Ubuntu following the instructions from [https://docs.docker.com/install/linux/docker-ce/ubuntu/](https://docs.docker.com/install/linux/docker-ce/ubuntu/).
3. Verify the installation with:

docker --version
sudo docker run hello-world
Getting started with CloudForms in IBM Cloud 

CloudForms delivers the insight, control, and automation enterprises need to address the challenges of managing virtual environments. CloudForms enables enterprises with existing virtual infrastructures to improve visibility and control, and those just starting virtualization deployments to build and operate a well-managed virtual infrastructure. For more information, see the [CloudForms product documentation](https://access.redhat.com/documentation/en-us/red_hat_cloudforms/5.0/). You can install CloudForms as a virtual appliance in IBM Cloud.



 Before you begin 



* You must have IBM Cloud Pak for Multicloud Management V1.3 installed. For more information, see [Getting started with IBM Cloud Pak for Multicloud Management](https://test.cloud.ibm.com/docs/cloud-pak-multicloud-management?topic=cloud-pak-multicloud-management-getting-started)
* Before you can install CloudForms, you must download the images from [IBM Passport Advantage](https://www.ibm.com/software/passportadvantage/index.html). Download these two part numbers:





 Description File name Passport Advantage part number 

 Red Hat CloudForms 5 for Red Hat OpenStack Platform cfme-rhos-5.11.4.x86_64.qcow2 CC5W9EN 
 Automation navigation for IBM Cloud Pak® for Multicloud Management 1.3 automation-navigation-updates.sh CC66KEN 





* For the list of all part numbers, see [Passport Advantage part numbers](https://www.ibm.com/support/knowledgecenter/en/SSFC4F_1.3.0/about/part_numbers.html).
* 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)
You are responsible for costs that you incur on IBM Cloud or AWS.



 Before you begin 



* To complete this tutorial, use a [Pay-As-You-Go or Subscription IBM Cloud account](https://cloud.ibm.com/docs/account?topic=account-upgrading-account) where you are the owner or have [full Administrator access](https://cloud.ibm.com/docs/account?topic=account-assign-access-resources). If you already have an IBM Cloud account and need to upgrade it, see [Upgrading your account](https://cloud.ibm.com/docs/account?topic=account-upgrading-account). Your Satellite location is managed from this account.
* [Install the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cloud-cli-getting-started) if you want to interact with elements of the toolchain or infrastructure after they are created.
* Install [GNU Make](https://www.gnu.org/software/make/). If you have a Linux system, it is likely that you already have this tool. If you have MacOS, ensure that [Homebrew](https://brew.sh/) is installed, and then install GNU Make by using the brew install make command. You must run make by using gmake, not make). If you have WSL, you probably have GNU Make already.
* You must have a GitHub account.
* Clone this [try-sat-aws Git repository](https://github.com/ibm-garage/try-sat-aws) somewhere locally. Then, inside the repository directory, run make install (or gmake install on MacOS) to ensure that the necessary IBM Cloud CLI plug-ins are installed.
* You must have an AWS account. This is where the virtual machines for your Satellite location are created and where they run.
* Optional. Install [direnv](https://direnv.net/). This makes it easier to use .envrc.
* Optional.
With this tutorial, you can learn how to subscribe to Kafka events by using the IBM Cloud® Code Engine CLI.

Code Engine



* 20 minutes
* 2023-03-17



[Building applications that store information in IBM Cloudant ](https://cloud.ibm.com/docs/codeengine?topic=codeengine-tutorial-cloudant-local)Building applications that store information in IBM Cloudant

Learn how to build your Code Engine application from source code that is stored on your local workstation. This tutorial uses sample source that is used to build the app. This application connects to an IBM Cloudant database and stores input from that app.

Code Engine



* 10 minutes
* 2022-11-21



[Modern web application using MEAN stack](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-mean-stack)Modern web application using MEAN stack

This tutorial walks you through the creation of a web application using the popular MEAN stack. It is composed of a MongoDB, Express web framework, Angular front end framework and a Node.js runtime. You will learn how to run a MEAN sample app locally, create and use a managed database-as-a-service (DBasS), deploy the app to IBM Cloud and scale both the runtime and database resources.

Code Engine Databases For MongoDB



* 1 hour
* 2023-05-05



[Serverless web app and eventing for data retrieval and analytics](https://cloud.ibm.com/docs/solution-tutorials?topic=solution-tutorials-serverless-github-traffic-analytics)Serverless web app and eventing for data retrieval and analytics

In this tutorial, you create an application to automatically collect GitHub traffic statistics for repositories and provide the foundation for traffic analytics. GitHub only provides access to the traffic data for the last 14 days. If you want to analyze statistics over a longer period of time, you need to download and store that data yourself. In this tutorial, you deploy a serverless app in a IBM Cloud Code Engine project.
Then, visit the URL specified in the credentials JSON - what do you see?

To summarize, credentials are generated from the IBM Cloud Dashboard. You can have IAM or both IAM + legacy credentials. Both authentication methods involve exchanging your credentials for a time-limited token (authentication) - the token is then updated periodically as you use the service. The official libraries handle all of these tasks for you.

That's the end of this part. The next part is called The Dashboard.







 The Dashboard video 

Learn about the IBM Cloudant Dashboard and what it has to offer, as well as an introduction into how to use it.



* The Dashboard video script

Welcome to the Introduction to IBM Cloudant course, an 17-part video series that gives you an overview of the IBM Cloudant database-as-a-service.

This video is part 6 - The Dashboard.

The easiest way to get started, create databases, and add documents is to use the IBM Cloudant Dashboard.

The IBM Cloudant Dashboard is a web-app that is built into the service. It allows basic data manipulation to be performed through a graphical user interface: Databases can be created and deleted. Documents added, updated, deleted, and replication jobs managed. It is also a handy place to perform one-time queries and to set-up secondary indexes (as we see later).

It also contains some simple monitoring tools that visualize request rates.

It's important to note that any task that is achievable in the IBM Cloudant Dashboard is also possible with the IBM Cloudant HTTP API. Indeed, the IBM Cloudant Dashboard is simply making standard API calls itself.

To open an IBM Cloudant service's Dashboard, log in to IBM Cloud, find your IBM Cloudant service, and click Launch IBM Cloudant Dashboard button. A new window opens, logging you into your IBM Cloudant Dashboard.

If you leave the dashboard window unattended for a length of time, you find yourself logged out (for security purposes) and must click Launch again.

The dashboard has a number of tabs. Its default tab, Databases, lists the databases that you created in groups of 20.
Install the command line (CLI) tools by [following these steps](https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli)





 Provision virtual server instances and install software 

The CLI has a [plugin for all VPC-related functionality](https://cloud.ibm.com/docs/cli?topic=cli-vpc-reference), including compute and network resources.



1. Before working with VPC resources, set the current resource group and region:

ibmcloud target -g $TF_VAR_resource_group_name -r $TF_VAR_region
2. To provision a virtual server instance, run the ibmcloud is create-instance CLI command. In [shared/install.sh](https://github.com/IBM-Cloud/vpc-tutorials/blob/master/vpc-app-deploy/shared/install.sh) is the cloud-init file used to initialize the frontend and the backend servers. You can pass the script with the --user-data parameter like this:

ibmcloud is instance-create ... --user-data @shared/install.sh
3. With the frontend and backend VSIs deployed and in maintenance mode, you could send a script to, e.g., the frontend server, then run the script to install software from the Internet. Send a script to the frontend server:

scp -F ../scripts/ssh.notstrict.config -o ProxyJump=root@$BASTION_IP_ADDRESS shared/uploaded.sh root@$FRONT_NIC_IP:/uploaded.sh

Then execute this script:

ssh -F ../scripts/ssh.notstrict.config -o ProxyJump=root@$BASTION_IP_ADDRESS root@$FRONT_NIC_IP sh /uploaded.sh

It can take a few minutes for the ssh service on the server to be initialized, and it will take a few more minutes for the cloud-init script to complete.
Locating your service credentials 

You can find the credentials for any service that is associated with your account.



 Objectives 



1. Locate your service credentials in IBM Cloud.
2. Understand your service credentials.







 Before you begin 

Create a service instance in the IBM Cloud Dashboard by following the [Getting started with IBM Cloudant](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant) tutorial.





 Step 1: How to find your service credentials 



1. Go to [IBM Cloud](https://cloud.ibm.com/) and log in.
2. Find the service instance called Cloudant-o7 and open it.

This instance is the one you created as in the [Before you begin](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-locating-your-service-credentialsprereqs-locate-credentials) section.

Zoom

![This Resource list is a list of all the instances in your service. Cloudant-07 is the instance we use in this tutorial.](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/tutorials/images/img0011.png)

Figure 1. Selecting the IBM Cloudant service
3. Click Service credentials.
4. Click the chevron next to the service credentials to see the credentials that are required to access the service.

Zoom

![Viewing the service credentials.](https://cloud.ibm.com/docs-content/v1/content/522c6f62358b063f921283400a601c3f9bc66f08/Cloudant/tutorials/images/img0052.png)

Figure 2. Viewing the IBM Cloudant service credentials

Now, you can see the service credentials:

Zoom

!
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.

Activation: 'process-change' (874b327c6d2841ca8b327c6d28d1ca17)
[
"2019-11-01T18:47:16.966276Z stdout: A Black cat named Tarball was added"
]

Activation: 'read' (375f8e39b5c445f39f8e39b5c415f36e)
[
"2019-11-01T18:47:16.915421Z stdout: success { _id: '48ef87b2e1905a488606960b8368f835',",
"2019-11-01T18:47:16.915453Z stdout: _rev: '1-39df67b063efa068a7b869e81e017596',",
"2019-11-01T18:47:16.915458Z stdout: name: 'Tarball',",
"2019-11-01T18:47:16.915480Z stdout: color: 'Black' }"
]

Activation: 'process-change-cloudant-sequence' (68a7083b088f4be9a7083b088f0be9b4)
[
"375f8e39b5c445f39f8e39b5c415f36e",
"874b327c6d2841ca8b327c6d28d1ca17"
]
* Install the [latest Terraform on IBM Cloud](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-setup_clitf_installation) and the latest [IBM Cloud Provider plug-in for Terraform on IBM Cloud](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-setup_cliinstall_provider).
* Retrieve your [IBM Cloud credentials, upload an SSH key, and configure the IBM Cloud Provider plug-in](https://cloud.ibm.com/docs/ssh-keys?topic=ssh-keys-getting-started-tutorialgetting-started-tutorial).







 Step 1: Create the Terraform configuration files 



1. Make sure that you have the [required permissions](https://cloud.ibm.com/docs/vpc?topic=vpc-resource-authorizations-required-for-api-and-cli-calls) to create and work with VPC infrastructure.
2. In the Terraform directory, create a configuration file names versions.tf file as specified in the code block. For more information, about versions.tf, refer to [sample Terraform version file](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-getting-startedinstall_provider).

terraform {
required_version = ">=1.0.0, <2.0"
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
}
}
}
3. From your Terraform directory, export IC_API_Key variable to set environment variable in your local machine. For more information, about how to setup the environment variables?
[Learn more](https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli).
2. Log in to the IBM Cloud by using an API key. Run the following command: [ibmcloud login --apikey](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_cliibmcloud_login). The API key is forwarded to the IAM Identity Service.

The API key includes information about the account.
3. After the credentials are validated and the API key is authenticated to work in the account, the IAM Identity Service generates an Activity Tracker Event Routing event with action iam-identity.user-apikey.login. This event is available in the account that is associated with the API key.







 User logs in from the CLI by using a one-time passcode. 

When a user successfully logs in to your account through the IBM Cloud CLI by using a one-time passcode, the following steps are taken:



1. To initiate log in request using the CLI, the IBM Cloud CLI must be installed. [Learn more](https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli).
2. Log in to the IBM Cloud by using a one-time passcode. Run the following command: [ibmcloud login --sso](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_cliibmcloud_login)
3. After the credentials are validated and the user is authenticated, a token is returned.

The token has the information to allow the user to choose an account where he is a member or owner.

The token does not include information about the account.
4. Next, the user selects an account. An access token and a refresh token are generated and returned to the user. These tokens are bound to the selected account. The tokens contain an identity, an account, and some rights.
* An IBM Cloud [billable account](https://cloud.ibm.com/docs/account?topic=account-accounts),
* Check for user permissions. Be sure that your user account has sufficient permissions [to create and manage VMware as a Service resources](https://cloud.ibm.com/docs/vmware-service?topic=vmware-service-getting-started).
* [A pre-provisioned IBM Cloud® for VMware as a Service - single tenant instance](https://cloud.ibm.com/docs/vmware-service?topic=vmware-service-tenant-ordering), and
* [A pre-provisioned virtual data center on the IBM Cloud® for VMware as a Service - single tenant instance](https://cloud.ibm.com/docs/vmware-service?topic=vmware-service-vdc-adding).







 Step 1: Log in to the instance and deploy the initial network 

The first step is to log in to your IBM Cloud® for VMware as a Service – single tenant instance's VMware Cloud Director Console and deploy the initial networks that will be used for testing.

Log in to the IBM Cloud® for VMware as a Service – single tenant instance's VMware Cloud Director Console:



1. In the VMware as a Service table, click a VMware as a Service instance name.
2. On the Summary tab, review the information.
3. If this is the first time that you access the VMware Cloud Director console for the VDC region, you must set the admin credentials to generate an initial, complex, and random password.
4. On the VDC details page, click VMware Cloud Director Console to access the console.
5. Use the admin username and password to log in to the VMware Cloud Director Console for the first time.
6. After the admin is logged in to the VMware Cloud Director Console, you can create extra users who have roles that allow them to access the VMware Cloud Director Console.



Next, you will create the following virtual data center networks: