Menu

Deploying MicroProfile based Apps to IBM Cloud private

Eclipse MicroProfile is an open source project to optimize Enterprise Java for microservices architectures. MicroProfile based applications can be deployed to Kubernetes. This article describes how to deploy a sample application to IBM Cloud private.

IBM Cloud private is a Kubernetes based platform to run cloud-native applications on-premises. It also comes with a Docker image registry. For developers there is a community edition available to run everything in one virtual machine.

The example I’m using is a simple conference application originally provided by the MicroProfile developers and slightly changed by the IBM team to showcase IBM technologies like WebSphere Liberty which has been open sourced this week. My colleagues Animesh Singh and Ishan Gulhane have documented how to deploy this sample to Kubernetes on Bluemix public.

There are different approaches to deploy applications to IBM Cloud private. I’d like to blog later about the approach to use delivery pipelines. Below I describe how to deploy from a development machine via command line.

Most of the steps to deploy the sample to Bluemix public or IBM Cloud private are identical. So I only document the differences below.

The Microservice Builder Fabric can be installed via helm commands as documented or from the IBM Cloud private admin interface.

Before building the images some configuration needs to be done. The hosts file of the development machine needs to be changed to define the IP of the cluster. Additionally Docker needs to be configured to be able to access the Docker host on the virtual machine. This process is a little tricky, especially on Mac. In one terminal invoke these commands:

There is also a script to build and push all six images. If you want to use it run “./scripts/build_and_push_docker_images.sh mycluster:8500/admin”.

After the images have been pushed you can see them also in the IBM Cloud private admin interface.

Before the sample can be deployed, Kubernetes needs to be configured. Open the admin interface (e.g. https://192.168.178.36:8443) and choose ‘Configure Client’. Copy and paste these commands in your terminal. For example: