An IBM Cloud account is needed.
Note: In order to run this workshop an IBM Cloud Lite account is not sufficient. This tutorial may incur costs. Use the Pricing Calculator to generate a cost estimate based on your projected usage.
We will use the OpenShift on IBM Cloud service on IBM Cloud in this hands-on workshop.
Follow the instructions from the first workshop to set up an OpenShift cluster.
In order to complete the workshop, you need to install Docker Desktop. Docker Desktop is available for Mac and Windows and the Docker Engine can be run natively on Linux.
Several other tools are needed. There are different options to install these tools.
There is an image on DockerHub with all required tools. In order to use local IDEs and editors to modify code and configuraton files a Docker volume is used. This option works only for Mac and Linux.
$ git clone https://github.com/nheidloff/openshift-on-ibm-cloud-workshops.git
$ cd openshift-on-ibm-cloud-workshops
$ ROOT_FOLDER=$(pwd)
$ docker run -v $ROOT_FOLDER/:/cloud-native-starter -it --rm nheidloff/openshift-workshop-tools:v1
root@3f46c41f7303:/usr/local/bin# cd /cloud-native-starter/
root@3f46c41f7303:/cloud-native-starter# ls
root@3f46c41f7303:/cloud-native-starter# ROOT_FOLDER=$(pwd)
Note: With the --rm
option in the docker run command the container is deleted once you exit. This is intended.
Step 3: Move on with Verify Access to OpenShift on the IBM Cloud
There is an image on DockerHub with all required tools. This option works for Mac, Linux and Windows. To get started as quickly as possible, use this image.
$ docker run -ti nheidloff/openshift-workshop-tools:v1
Step 2: After the container has been started, run these commands inside your running Docker image to get the lastest version of the workshop:
root@3f46c41f7303:/usr/local/bin# cd /
root@3f46c41f7303:/usr/local/bin# git clone https://github.com/nheidloff/root@3f46c41f7303:/usr/local/bin# openshift-on-ibm-cloud-workshops.git
root@3f46c41f7303:/usr/local/bin# cd openshift-on-ibm-cloud-workshops
root@3f46c41f7303:/usr/local/bin# ROOT_FOLDER=$(pwd)
Note: If you using Windows you also need to download or clone the project to your local workstation for the upcoming Docker and Java lab, because you can't use Docker in the 'openshift-workshop-tools' Docker image.
Step 3: Move on with Verify Access to OpenShift on the IBM Cloud
This approach works only for Mac and Linux (see this article for more).
- oc
- kubectl
- git
- curl
- Optional: IBM Cloud CLI
- Optional: Editor, for example Visual Studio Code
$ git clone https://github.com/nheidloff/openshift-on-ibm-cloud-workshops.git
$ cd openshift-on-ibm-cloud-workshops
$ ROOT_FOLDER=$(pwd)
Step 3: Move on with Verify Access to OpenShift on the IBM Cloud
-
Logon to the IBM Cloud web console
-
Select OpenShift in the menu
- Chose Clusters and click on your OpenShift cluster
- Open the OpenShift web console
- From the dropdown menu in the upper right of the page, click 'Copy Login Command'. Paste the copied command into your terminal.
- Verify 'oc' CLI
$ oc login https://c1-e.us-east.containers.cloud.ibm.com:23967 --token=xxxxxx'
$ oc get istag
- Verify 'kubectl' CLI
$ kubectl get pods
Note: Back to lab 4 '1. Build and Save the container image' in 'Step 1'
Continue with Lab 2 - Running the Java Microservice locally