vania-janet/multiturn-rag-retrieval-data huggingface dataset:
To use the global functionality, you can use the ibmcloud oc init command again to target the global endpoint: https://containers.cloud.ibm.com

ibmcloud oc init [--host HOST] [--insecure] [-p] [-u] [-q]

Minimum required permissions
: None

Command options:

--host HOST
: Optional: The IBM Cloud Kubernetes Service API endpoint to use.

--insecure
: Allow an insecure HTTP connection.

-p
: Your IBM Cloud password.

-u
: Your IBM Cloud username.

-q
: Optional: Do not show the message of the day or update reminders.

Examples:



* Example to target the US South regional endpoint:

ibmcloud oc init --host https://us-south.containers.cloud.ibm.com
* Example to target the global endpoint again:

ibmcloud oc init --host https://containers.cloud.ibm.com







 script commands 



 ibmcloud oc script update 

Virtual Private Cloud

Classic infrastructure

Rewrite scripts that call kubernetes-service commands. Legacy-structured commands are replaced with beta-structured commands. For a list of all changes between the legacy and beta formats, see the comparison table in [Using the beta Red Hat OpenShift on IBM Cloud plug-in](https://cloud.ibm.com/docs/openshift?topic=openshift-cs_cli_changelogchangelog_beta).

Most command behavior and syntax changes in version 1.0. These changes are not compatible with earlier versions. After you update your scripts, you must continue to use version 1.0 of the plug-in within the script or the environment where the script is run. Do not change the IKS_BETA_VERSION environment variable to a different version.

ibmcloud oc script update [--in-place] FILE [FILE ...]

Minimum required permissions
: None

Command options:

--in-place
To set up an [OpenShift Container Platform Elasticsearch, Fluentd, and Kibana EFK stack](https://docs.openshift.com/container-platform/4.11/logging/cluster-logging.html), see [installing the cluster logging operator](https://cloud.ibm.com/docs/openshift?topic=openshift-healthoc_logging_operator). Keep in mind that your worker nodes must have at least 4 cores and GB memory to run the cluster logging stack.

Service logs: IBM Cloud® Activity Tracker
: Use IBM Cloud Activity Tracker to view cluster management events that are generated by the Red Hat OpenShift on IBM Cloud API. To access these logs, [provision an instance of IBM Cloud Activity Tracker](https://cloud.ibm.com/docs/activity-tracker?topic=activity-tracker-getting-started). For more information about the types of IBM Cloud Kubernetes Service events that you can track, see [Activity Tracker events](https://cloud.ibm.com/docs/openshift?topic=openshift-at_events).

API server logs: IBM Log Analysis
: Customizable user interface for live streaming of log tailing, real-time troubleshooting issue alerts, and log archiving.



* Quick integration with the cluster via a script.
* Aggregated logs across clusters and cloud providers.
* Historical access to logs that is based on the plan you choose.
* Highly available, scalable, and compliant with industry security standards.
* Integrated with IBM Cloud IAM for user access management.
* Flexible plans, including a free Lite option.



Built-in Red Hat OpenShift audit logging tools
: API audit logging to monitor user-initiated activities is currently not supported.





 Forwarding cluster and app logs to IBM Log Analysis 

Use the Red Hat OpenShift on IBM Cloud observability plug-in to create a logging configuration for IBM Log Analysis in your cluster, and use this logging configuration to automatically collect and forward pod logs to IBM Log Analysis.

Considerations for using the Red Hat OpenShift on IBM Cloud observability plug-in:
Before you begin, [create a worker pool](https://cloud.ibm.com/docs/openshift?topic=openshift-add_workersadd_pool) with SGX-capable worker nodes. To work with Intel SGX, you must use one of the following machine types: me4c.4x32 and me4c.4x32.1.9tb.ssd.



1. [Access your Red Hat OpenShift cluster](https://cloud.ibm.com/docs/openshift?topic=openshift-access_cluster).
2. Create an sgx-admin project with a privileged security context constraint that is added to the project service account so that the drivers and platform software can pull and run the required images.

curl -fssl https://raw.githubusercontent.com/ibm-cloud-security/data-shield-reference-apps/master/scripts/sgx-driver-psw/config_openshift/create_openshift_config.sh | bash
3. Create a daemon set to install the drivers and platform software on your SGX-capable worker nodes.

oc create -f https://raw.githubusercontent.com/ibm-cloud-security/data-shield-reference-apps/master/scripts/sgx-driver-psw/install_sgx/deployment_install_sgx_openshift.yaml
4. Verify that the drivers and platform software were installed by running the following command to check for a pod that begins with sgx-installer.

oc get pods
5. Get the logs for your sgx-installer pod to verify that you see the messages SGX driver installed and PSW installed.

oc logs <name_of_SGX_installer_pod>
6. Now that the drivers and platform software are installed, remove the daemon set.

oc delete daemonset sgx-installer
7. Delete the security context and service account that you created.

oc delete scc sgx-admin
Deploying your application on a target 

You can deploy your application on one of three targets: single cluster, multiple clusters, or a custom target.



 Deploying to a single cluster 

You can select Single Cluster as the deployment target when you want to deploy your application on Red Hat® OpenShift® on IBM Cloud.

DevSecOpsprovides scripts to deploy your application on the cluster. You might need to customize these scripts according to your application and cluster requirements.

These scripts are located in the deployment repo and are specified in the pipeline-config.yml file.

deploy:
image: icr.io/continuous-delivery/pipeline/pipeline-base-image:2.12@sha256:ff4053b0bca784d6d105fee1d008cfb20db206011453071e86b69ca3fde706a4
script: 
!/usr/bin/env bash

if [ "$PIPELINE_DEBUG" == 1 ]]; then
trap env EXIT
env
set -x
fi

source scripts/deploy_setup.sh
source scripts/deploy.sh
export DEPLOY_EXIT=$?
source scripts/doi-publish-deploy.sh
Show more





 Deploying to multiple clusters 

DevSecOps provides an option to deploy your application to multiple clusters using IBM Cloud Satellite Config.

[IBM Cloud Satellite](https://www.ibm.com/cloud/satellite) is an extension of the IBM Cloud Public that can run inside the customer's data center or out at the edge. Each IBM Cloud Satellite location is connected by using IBM Cloud Satellite Link, which provides the connection to the IBM Cloud® control plane. It provides audit, packet capture, and visibility to the security team, while a configuration utility provides a global view of applications and services. IBM Cloud Satellite Link provides a simple way to manage the connection between IBM Cloud and the Satellite location with visibility into all the traffic that goes back and forth with control of the endpoints on both sides of the link.
It builds a docker image for each of the services you need. The producer, consumers and web application are all in different folders. Each folder has its own simple Dockerfile file that is used by the script to create a container image, which is then uploaded to the IBM Container Registry.
2. It creates a bunch of kubernetes secrets with all the credentials that are going to be needed to access the different IBM services (IBM Cloudant, Redis and Event Streams).
3. It deploys the application code (and the secretes) to the Red Hat OpenShift on IBM Cloud cluster using the instructions contained in the deployment.yml script.







 The deployment.yml script 

This script tells Openshift what to deploy to the machines in the Openshift cluster. In our case this is:



1. Data producers (trucktrackerproducer).
2. Data consumers (trucktrackerredisconsumer and trucktrackercloudantconsumer)
3. Web application (trucktrackerweb)



In all cases, they pull an image from the container registry and get fed some environment variables with the credentials they require to access external services.





 The Truck Tracker system 

The Truck Tracker system is a set of simple Node.js scripts that use four main packages:



1. [@ibm-cloud/cloudant](https://github.com/IBM/cloudant-node-sdk) to connect to IBM Cloudant and read/write data.
2. [Redis](https://www.npmjs.com/package/redis) to connect to the Redis instance and read/write data.
3. [kafkajs](https://www.npmjs.com/package/kafkajs) to connect to the Event Streams instance.
4. [Express](https://expressjs.com/) to enable a simple web server that allows interaction with the data.



There are five main files:



1. server.js: This runs the web server and communicates with Redis.
* This toolchain uses [Satellite Config](https://cloud.ibm.com/docs/satellite?topic=satellite-cluster-config) to deploy an application to a group of clusters.
* This toolchain assumes that you have a [Satellite cluster group](https://cloud.ibm.com/docs/satellite?topic=satellite-setup-clusters-satconfig) with the required clusters.
* This toolchain supports a Satellite cluster group that contains only one type of cluster (Red Hat® OpenShift®).







 Deployment 

DevSecOps provides out of the box scripts to deploy your application on the group of clusters. You might need to customize these scripts according to your application and cluster group requirements.

These scripts are located in the deployment repository and are specified in the pipeline-config.yml file.

deploy:
image: icr.io/continuous-delivery/pipeline/pipeline-base-image:2.12@sha256:ff4053b0bca784d6d105fee1d008cfb20db206011453071e86b69ca3fde706a4
script: 
!/usr/bin/env bash

if [ "$PIPELINE_DEBUG" == 1 ]]; then
trap env EXIT
env
set -x
fi

source scripts/deploy_setup.sh
source scripts/deploy.sh
export DEPLOY_EXIT=$?
source scripts/doi-publish-deploy.sh
Show more







 Deploying to a custom target 

Deploy to a custom target if you want to:



* Deploy your application on your own choice of infrastructure, such as Virtual Server Instances (VSI).
* Perform custom tasks, such as updating some configurations in a Red Hat® OpenShift® cluster.



In these cases, select "custom" as a deployment target.



 Performing a custom deployment 



* DevSecOps templates are fully customizable. You can provide your own stages and steps in the pipeline-config.yml file of the deployment repository.
Using a CLI that has access to your cluster, create the open-cluster-management namespace by running the following command: oc create namespace open-cluster-management
2. Download your Openshift Container Platform pull secret file from https://cloud.redhat.com/openshift/install/pull-secret by selecting Download pull secret; save the pull secret to a filepath you have read and write access to, like /root/rhacm-pull-secret.
3. Run the following command to create your secret, substituting in the filepath to the pull-secret: oc create secret generic rhacm-pull-secret -n open-cluster-management --from-file=.dockerconfigjson=/root/rhacm-pull-secret --type=kubernetes.io/dockerconfigjson

For additional information, see the Red Hat Advanced Cluster Management documention [here](https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.2/html/install/installinginstalling-red-hat-advanced-cluster-management-from-the-cli).





 Step 4. Complete the pre-installation check 

A Red Hat OpenShift cluster administrator must complete this step.



* If you are not an administrator, use the Share link to share the script with your cluster administrator.
* If you are a cluster administrator, click Run script to run the pre-installation check. Confirm that the script completes successfully.







 Step 5. Install IBM Cloud Pak for Multicloud Management 



1. Ensure that you assigned a license for IBM Cloud Pak for Multicloud Management to the deployment.
2. Confirm that you read and agree to the license agreements.
3. Click Install.









 Next steps 

When the installation completes, you can access your IBM Cloud Pak for Multicloud Management deployment with the provided URL.



1. Log in the IBM Cloud Pak for Multicloud Management management console by using the administrator username and password which were generated when the workspace was created.
Single-Truck View







 What you just did 



 The build.sh script 

The build.sh script does a number of things:



1. It builds a docker image for each of the services you need. The producer, consumers and web application are all in different folders. Each folder has its own simple Dockerfile file that is used by the script to create a container image, which is then uploaded to the IBM Container Registry.
2. It creates a bunch of kubernetes secrets with all the credentials that are going to be needed to access the different IBM services (IBM Cloudant, Redis and Event Streams).
3. It deploys the application code (and the secretes) to the Red Hat OpenShift on IBM Cloud cluster using the instructions contained in the deployment.yml script.







 The deployment.yml script 

This script tells Openshift what to deploy to the machines in the Openshift cluster. In our case this is:



1. Data producers (trucktrackerproducer).
2. Data consumers (trucktrackerredisconsumer and trucktrackercloudantconsumer)
3. Web application (trucktrackerweb)



In all cases, they pull an image from the container registry and get fed some environment variables with the credentials they require to access external services.





 The Truck Tracker system 

The Truck Tracker system is a set of simple Node.js scripts that use four main packages:



1. [@ibm-cloud/cloudant](https://github.com/IBM/cloudant-node-sdk) to connect to IBM Cloudant and read/write data.
2. [Redis](https://www.npmjs.com/package/redis) to connect to the Redis instance and read/write data.
3. [kafkajs](https://www.npmjs.com/package/kafkajs) to connect to the Event Streams instance.
4. [Express](https://expressjs.com/) to enable a simple web server that allows interaction with the data.
[Operators](https://cloud.ibm.com/docs-content/v1/content/ba89e173287b28d1453d2a327d8a1f74ae2f1662/schematics/images/operator.png) [OpenShift Operators](https://www.redhat.com/en/technologies/cloud-computing/openshift/what-are-openshift-operators) are a convenient way to add and run community, Third party, and other services in a Red Hat OpenShift on IBM Cloud cluster. ![Check mark](https://cloud.ibm.com/docs-content/v1/content/ba89e173287b28d1453d2a327d8a1f74ae2f1662/schematics/images/checkmark.svg) 
 ![Terraform](https://cloud.ibm.com/docs-content/v1/content/ba89e173287b28d1453d2a327d8a1f74ae2f1662/schematics/images/terraform.png) [Terraform](https://www.terraform.io/) is an Open Source project that specifies your cloud infrastructure resources and services using a high-level scripting language. ![Check mark](https://cloud.ibm.com/docs-content/v1/content/ba89e173287b28d1453d2a327d8a1f74ae2f1662/schematics/images/checkmark.svg) ![Check mark](https://cloud.ibm.com/docs-content/v1/content/ba89e173287b28d1453d2a327d8a1f74ae2f1662/schematics/images/checkmark.svg) !
* [Host latency](https://cloud.ibm.com/docs/satellite?topic=satellite-host-latency-test)



You can validate your host set up by running the satellite-host-check script. For more information, see [Checking your host set up](https://cloud.ibm.com/docs/satellite?topic=satellite-host-network-check).







 I created a Satellite location, what comes next? 

Now that your Satellite location is set up, you are ready to start using IBM Cloud services.



1. Add compute capacity to your location by [attaching more hosts to the location](https://cloud.ibm.com/docs/satellite?topic=satellite-attach-hosts) so that you can run [Satellite-enabled IBM Cloud service](https://cloud.ibm.com/docs/satellite?topic=satellite-managed-services).
2. Create a [Satellite-enabled IBM Cloud service](https://cloud.ibm.com/docs/satellite?topic=satellite-managed-services), such as a [Red Hat OpenShift cluster](https://cloud.ibm.com/docs/openshift?topic=openshift-satellite-clusters). You assign the additional hosts that you previously attached as worker nodes to provide the compute power for the cluster. You can even [register existing Red Hat OpenShift clusters to your location](https://cloud.ibm.com/docs/satellite?topic=satellite-register-openshift-clusters) to use as deployment targets.
3. [Manage your applications](https://cloud.ibm.com/docs/satellite?topic=satellite-cluster-config) with Satellite Config.
4. Create [Satellite cluster storage templates](https://cloud.ibm.com/docs/satellite?topic=satellite-storage-template-ov).
5.
* Spread hosts across physical locations





 Your workloads in Red Hat OpenShift on IBM Cloud 

After you have your underlying infrastructure in place, begin deploying your workloads in your on-premises Red Hat OpenShift on IBM Cloud workload clusters. You can use the cluster-autoscaler add-on to scale the worker pools in your cluster automatically to increase or decrease the number of worker nodes in the worker pool based on the sizing needs of your scheduled workloads. The cluster-autoscaler add-on is based on the [Kubernetes Cluster-Autoscaler project](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler). For more information, see [Autoscaling clusters](https://cloud.ibm.com/docs/openshift?topic=openshift-ca).

In addition, it is possible to autoscale your pods. For more information, see [Scaling apps](https://cloud.ibm.com/docs/openshift?topic=openshift-update_appapp_scaling).







 HA for IBM Cloud services 

Your high availability strategy needs to consider all of the IBM Cloud services in your deployment, including the services that run in IBM Cloud outside of your Satellite location. For more information, see [High availability for IBM Cloud services](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-shared-high-availabilityibm-cloud-services).





 Related controls in IBM Cloud Framework for Financial Services 

For more information, see [related controls for high availability](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-shared-high-availabilityrelated-controls).





 Next steps 



* [Development processes and software integrity](https://cloud.ibm.com/docs/framework-financial-services?topic=framework-financial-services-shared-development-processes)
For more information, see [Region and data center location for resource deployment](https://cloud.ibm.com/docs/overview?topic=overview-locations). 
 cluster_prefix Prefix that is used to name the IBM Cloud resources that are provisioned to build the Red Hat OpenShift cluster. You cannot create more than one instance of the Red Hat OpenShift cluster with the same name. Make sure that the name is unique. Enter a prefix name, for example, 'my-openshift'. The length of the prefix should be fewer than 13 characters. 
 worker_nodes_per_zone The number of worker nodes per zone in the default worker pool. Minimum is one node, and 1,000 is the maximum for each zone. For more information, see [Planning your worker node setup](https://cloud.ibm.com/docs/openshift?topic=openshift-planning_worker_nodes). 







 Generating a plan using the UI 



1. In the IBM Cloud console, after the workspace is created, you can review the properties and the variables that are associated with that workspace by using the Settings tab. Make sure to update the following required parameters: api_key, region, and ssh_key_name. In addition, review the cluster_prefix and worker_nodes_per_zone values to make sure that they are correct according to your specifications and requirements.
2. After you review all of the values, make any applicable changes, click Generate plan.
3. When you click Generate plan, a new log is generated that can be viewed in the Jobs tab by clicking Jobs.
4. Review the log file for any errors, fix the properties, and regenerate the plan by clicking Generate plan again.







 Applying a plan using the UI 



1. After you generate a plan in the IBM Cloud console, click Apply plan. This action generates a new log that can be viewed in the Jobs tab.
2. Review the log file for any errors, fix the errors, and then click Apply plan again.
3. After you successfully apply a plan, you can review all of the resources that are deployed in this workspace by clicking the Resources tab.
The Information button provides field-specific information on how to use a field.



1. Log in to [IBM Cloud console](https://cloud.ibm.com/kubernetes/clusters?platformType=openshift) and click Create cluster +.
2. Select your setup - Leave the value set to Manual Setup.
3. Select Classic for Infrastructure.
4. Leave the value Default for Resource group.
5. Select the Geography and the Worker zone based on your geographic location and select Single zone for Availability.
6. Leave the default Private VLAN and Public VLAN settings that are based on your previous location selections.

You can change these values if necessary, but make sure that your cluster, VLAN, and jump host are in the same worker zone, i.e. data center.
7. Check you Worker pool and select at least 8 vCPUs, 32 GB RAM for Flavor and 3 Worker nodes per data center for the test environment.
8. Leave the values set to Worker pool name, Encrypt local disk and the Master service endpoint
9. Review the Orchestration service and Red Hat OpenShift on IBM Cloud version details and select Red Hat OpenShift on IBM Cloud 4.8.x.

Please remember that SAP supports Red Hat OpenShift on IBM Cloud version 4.8.x only!
10. Check your OCP entitlement - Leave the value set to Purchase additional licenses for this worker pool.
11. Enter a Cluster name, for example sap-di32-cluster, and optionally Tags.
12. Check if you want to connect none, one or more of the available integrations, like Activity tracking, Logging and Monitoring
13. In the Summary pane on the left, review the order summary and then click Create.



For many more additional information on the fields, see [Creating a classic standard cluster in the console](https://cloud.ibm.com/docs/openshift?topic=openshift-clusters&interface=uiclusters_standard).





 Provisioning your jump host
[Another widget](https://cloud.ibm.com/docs-content/v1/content/f84e2238288b7f0355715a4c355609ce7ac48fb0/solution-tutorials/images/solution55-openshift-microservices/screen-img-15.png)

Another widget
7. Save the screen. Select Save Screen.

If you do not save the screen, you lose all your widgets.



Find more about Log Analysis in the [IBM Cloud documentation](https://cloud.ibm.com/docs/log-analysis/index.htmlgetting-started).







 Step 9: Configure Monitoring 

IBM Cloud provides a fully managed monitoring service. Let's create a monitoring instance and then integrate it with your Red Hat OpenShift on IBM Cloud cluster using a script that creates a project and privileged service account for the Monitoring agent.



 Verify that the Monitoring agent is deployed successfully 

Verify that the sysdig-agent pods on each node have a Running status.

Run the following command:

oc get pods -n ibm-observe

Example output:

NAME READY STATUS RESTARTS AGE
sysdig-agent-qrbcq 1/1 Running 0 1m
sysdig-agent-rhrgz 1/1 Running 0 1m







 Step 10: Monitor your Cluster 

IBM Cloud Monitoring is a cloud-native, and container- intelligence management system that you can include as part of your IBM Cloud architecture. Use it to gain operational visibility into the performance and health of your applications, services, and platforms. It offers administrators, DevOps teams, and developers full stack telemetry with advanced features to monitor and troubleshoot performance issues, define alerts, and design custom dashboards. [Learn more](https://cloud.ibm.com/docs/monitoring?topic=monitoring-getting-started).

In the next steps, you will learn how to use dashboards and metrics to monitor the health of your application.



 View pre-defined monitoring views and dashboards 

Use views and dashboards to monitor your infrastructure, applications, and services.