Red Hat OpenShift on IBM Cloud is an extension of the IBM Cloud Kubernetes Service where IBM manages OpenShift Container Platform for you.
With Red Hat OpenShift on IBM Cloud developers have a fast and secure way to containerize and deploy enterprise workloads in Kubernetes clusters. OpenShift clusters build on Kubernetes container orchestration that offers consistency and flexibility for your development lifecycle operations.
Note: In order to run this workshop, you need an IBM Cloud account.
This workshop demonstrates how to build a microservice with Java and how to deploy it to OpenShift on the IBM Cloud.
The microservice is kept as simple as possible, so that it can be used as a starting point for other microservices. The microservice has been developed with Java EE and Eclipse MicroProfile.
There are various ways to deploy applications to OpenShift. The options have different advantages and disadvantages which are explained in the following labs.
This workshop has 7 labs and should take between 60 and 90 minutues to complete. Here is an Overview video (1:41 mins) on Youtube.
The first lab describes how to install all required prerequisites. In the easiest case this means accessing the IBM Cloud Shell.
<OPTIONAL>Lab 2 and 3 describe how to develop a microservice with Java EE and Eclipse MicroProfile and are useful if you are interested in coding.</OPTIONAL>
The next four labs show four different ways to deploy applications to OpenShift with their pros and cons in this specific scenario:
Option | Dockerfile | yaml Files | Java Build | Docker Build |
---|---|---|---|---|
Lab 4: Kubernetes-like | required | required | OpenShift | OpenShift |
Lab 6: Existing Image | not required | not required | N/A | N/A |
Lab 7: Git Repo | required | not required | OpenShift | OpenShift |
Lab 8: Source to Image | not required | not required | Desktop | OpenShift |
To continue with the workshop follow these steps:
- >> Prerequisites <<
- OPTIONAL: Running the Java microservice locally
- OPTIONAL: Understanding the Java implementation
- Deploying to OpenShift via 'oc' CLI
- Distributed logging with LogDNA and OpenShift on IBM Cloud
- Deploying existing images to OpenShift
- Deployments of code in GitHub repos
- Source to Image deployments