This tutorial is part of the Learning path: Deploying Red Hat OpenShift Container Platform 4.x on IBM Power Systems Virtual Servers.
|Topics in “Getting started”||Type|
|Setting up IBM Power Systems Virtual Server for Red Hat OpenShift Container Platform||Tutorial|
|Creating OVA images for Red Hat OpenShift Container Platform on IBM Power Systems Virtual Servers||Tutorial|
|Creating OVA images using a CentOS instance in IBM Power Systems Virtual Servers||Tutorial|
|Installing Red Hat OpenShift Container Platform 4.x on IBM Power Systems Virtual Servers||Tutorial|
|Use container images to install Red Hat OpenShift Container Platform 4.x on IBM Power Systems Virtual Servers||Tutorial|
A container image with the installation helper script and its dependencies provides additional flexibility and enables additional use cases like deploying a cluster as part of a CI/CD workflow.
A container image has the following constituents:
- Installation helper script
- Executable files such as terraform, ibmcloud, and oc binaries that are required to successfully deploy a cluster
- Terraform code
This tutorial shows how to use the installation helper container image on both Intel and IBM Power platforms for Red Hat OpenShift deployment on IBM Power Systems Virtual Server.
As a prerequisite to use the installation helper container image, you should have either Docker or Podman installed on your system.
The container image with the installation helper script might take around 60 to 80 minutes to complete deployment.
The openshift-install-powervs image
To use the container image to deploy a Red Hat OpenShift Container Platform on IBM Power Systems Virtual Server, use the images present in the Quay repository (https://quay.io/repository/powercloud/openshift-install-powervs?tab=tags). This repository contains platform-specific (Power and Intel) as well as multi-arch images.
Figure 1. Images present in the Quay repository
Steps to use the image
Create a directory to store the installation artifacts. Place the OpenShift pull secret file in the installer directory and name it as pull-secret.txt, or you can paste the content when prompted by the helper script.
You can either place a var.tfvars file in the installation directory with the required parameters set, or directly run the
create command to check for the var.tfvars file, and if not present, it automatically runs the
variables command first followed by the
With the image downloaded earlier from the Quay repository, run the following command to create the cluster.
podmanin case Podman is installed on your system.
$ docker run -it -e IBMCLOUD_API_KEY="<key>" -v $(pwd):/data <openshift-install-powervs-image>:<tag> create Example: $ docker run -it -e IBMCLOUD_API_KEY="<key>" -v $(pwd):/data quay.io/powercloud/openshift-install-powervs:ocp4.7 create [setup_tools] Verifying the latest packages and tools [powervs_login] Trying to login with the provided IBMCLOUD_API_KEY... Targeting service crn:v1:bluemix:public:power-iaas:tor01:a/65b64c1f1c29XXXXXXXXXc:4a7700b1-e318-476b-9bf6-5a88XXXXXXX981::... [init_terraform] Initializing Terraform plugins... [init_terraform] Validating Terraform code... [apply] Running terraform apply... please wait Attempt: 1/5 [retry_terraform] Completed running the terraform command. Login to bastion: 'ssh -i automation/data/id_rsa email@example.com' and start using the 'oc' command. To access the cluster on local system when using 'oc' run: 'export KUBECONFIG=/root/ocp-install-dir/automation/kubeconfig' Access the OpenShift web-console here: https://console-openshift-console.apps.test-ocp-6f2c.ibm.com Login to the console with user: "kubeadmin", and password: "MHvmI-z5nY8-CBFKF-hmCDJ" Add the line on local system 'hosts' file: 18.104.22.168 api.test-ocp-6f2c.ibm.com console-openshift-console.apps.test-ocp-6f2c.ibm.com integrated-oauth-server-openshift-authentication.apps.test-ocp-6f2c.ibm.com oauth-openshift.apps.test-ocp-6f2c.ibm.com prometheus-k8s-openshift-monitoring.apps.test-ocp-6f2c.ibm.com grafana-openshift-monitoring.apps.test-ocp-6f2c.ibm.com example.apps.test-ocp-6f2c.ibm.com [cluster_access_info] SUCCESS: Congratulations! create command completed
If required, to destroy the cluster, run the following command.
$ docker run -it -e IBMCLOUD_API_KEY="<key>" -v $(pwd):/data <openshift-install-powervs-image>:<tag> destroy Example: $ docker run -it -e IBMCLOUD_API_KEY="<key>" -v $(pwd):/data quay.io/powercloud/openshift-install-powervs:ocp4.7 destroy [question] > Are you sure you want to proceed with destroy? 1) yes 2) no #? 1 - You have answered: yes [verify_data] Found id_rsa & id_rsa.pub in current directory [destroy] Runing terraform destroy... please wait [is terraform running] WARN: Last run was less than a min ago... please wait a minute Attempt: 1/5 [retry_terraform] Completed running the terraform command. [destroy] SUCCESS: Done! destroy comannd completed
This tutorial described how to use an installer script container image to deploy a Red Hat OpenShift cluster on IBM Power Systems Virtual Server.
For more information, check out the other tutorials in the Learning path: Deploying Red Hat OpenShift Container Platform 4.x on IBM Power Systems Virtual Servers.