Lab 1 - Install Prerequisites
Access to the IBM Cloud
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.
Tools - Option 1: Prebuilt Image with local Code
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.
Step 1: Run these commands in a terminal
$ 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
Step 2: Inside your running Docker image you can access your the local project
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.
Tools - Option 2: Prebuilt Image with Code in Container
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.
Step 1: Run this command in a terminal
$ 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.
Tools - Option 3: Install Tools on your Notebook
This approach works only for Mac and Linux (see this article for more).
Step 1: Install the following tools:
Step 2: Get the code:
$ git clone https://github.com/nheidloff/openshift-on-ibm-cloud-workshops.git $ cd openshift-on-ibm-cloud-workshops $ ROOT_FOLDER=$(pwd)
Verify Access to OpenShift on the IBM Cloud
Step 1: After you've created a new cluster, open the OpenShift console.
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
Step 2: Get our access token for the 'oc' CLI.
- 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
Continue with Lab 2 - Running the Java Microservice locally