Get your Java Microservice up and running!

In this blog post I want to highlight the hands-on workshop “Get your Java Microservice up and running!“, now available in GitBook . That workshop demonstrates how to build a Microservice with Java and how to deploy the Microservice Kubernetes on the IBM Cloud. The Microservice in this workshop 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, OpenLiberty and Eclipse MicroProfile.

The workshop is a part of the open source project Cloud Native Starter, which contains sample code that demonstrates how to get started with cloud-native applications and Microservice based architectures.
The Workshop has a related badge called Cloud Native Starter Level 1. This badge is available at Acclaim. In the related quiz you can verify your knowledge you achieved in the workshop.

The gif below show some major steps in the hands-on workshop. You will develop locally a Java Microservice and deploy that Microservice to a free Kubernetes Cluster on IBM Cloud.

microservice docker java kubernetes deployment

I hope this was useful for you and let’s see what’s next?



#microprofile, #java, #ibmcloud, #openliberty, #microservices, #kubernetes

Getting started to secure a simple Java Microservice with Keycloak, MicroProfile and OpenLiberty

Write and execute a JUnit test for a Java microservice based on MicroProfile and run both in the OpenLiberty development mode

This blog post has the focus on: how to develop a JUnit test for the Authors microservice from the Cloud Native Starter example and run both the Authors microservice and the JUnit test on OpenLiberty in the development mode.

That blog post hasn’t the objective to be a blueprint or a ‘how to guide’ for writing JUnit tests,  JUnit test organization, test strategy and so on. The objective is to get technically started along one concrete microservice example from the Cloud Native Starter project. Here is the GitHub project with the source code for this blog post.

The Authors microservice has one RESTful api endpoint called getAuthor. The endpoint provides one parameter for the Author name. The endpoint returns Author data in a JSON format.

Keep the end in mind: The gif shows a sample JUnit test execution for the Author microservice using OpenLiberty in the Visual Studio Code editor:


Note: As an alternative or in addition, you can also visit the OpenLiberty tutorial “MicroProfile or Jakarta EE application” to start with that topic.

Let’s start with: What do we need and how do we realize the implementation?

We need to ..

    •  invoke the REST endpoint of the Authors microservice with a REST Client.
    •  transform the JSON response of the REST endpoint to an Author data class
    •  handle different values to invoke the REST Endpoint parameter for the Author name to run tests with variations of the Author name.
    • compare the actual response value with an expected value and document the result.

Continue reading

Be aware of “opentracinqZipkin”, when you update to “MicroProfile 3.0” using “OpenTracing” with “OpenLiberty”

Today, just a very short note. You should be aware of opentracinqZipkin when you use  MicroProfile OpenTracing with OpenLiberty, because I noticed with the update to MicroProfile 3.0 I had a problem with usr:opentracinqZipkin-0.31. I created an issue on OpenLiberty

“MicroProfile 2.1 includes mpOpenTracing-1.2. MicroProfile 3.0 includes mpOpenTracing-1.3. Please make sure you are using the Zipkin sample built for mpOpenTracing-1.3. It can be downloaded at

I got that solution from Felix Wong.

But inside the server.xml will not reflect the version change, it will remaining the same feature name usr:opentracingZipkin-0.31.

<server description=”OpenLiberty Server”>

I hope this was useful for you and let’s see what’s next?



PS: You can try out Cloud Foundry Apps or Kubernetes on IBM Cloud. By the way, you can use the IBM Cloud for free, if you simply create an IBM Lite account. Here you only need an e-mail address.

#ibmdeveloper, #MicroProfile, #Java, #OpenTracing

A small source code update, when you use MicroProfile Health

I just want to highlight a small change for the MicroProfile Health, because I noticed with the update to MicroProfile 3.0 that the annotation @Health is deprecated.


It took me a little bit, because it was still listed in the MicroProfile documentation .


But I figured out in the blog post from Philip Riecks , when you replace the annotation @Health with @Readiness and import that it will work:


I hope this was useful for you and let’s see what’s next?



PS: You can try out Cloud Foundry Apps or Kubernetes on IBM Cloud. By the way, you can use the IBM Cloud for free, if you simply create an IBM Lite account. Here you only need an e-mail address.

#ibmdeveloper, #MicroProfile, #Java, #Health, #Readiness

Create one Java Microservice with OpenLiberty and MicroProfile – made for beginners

Today I created a YouTube video, where I developed one Microservice. The level of content of that video is for beginners. The video was “live” recorded and I made some minimal editing and the video takes 18 min.
The recoding is related to Java Microservices with MicroProfile and OpenLiberty in Visual Studio Code . The source code is available in the open sourced Cloud Native Starter GitHub project.

Check it out:

Maybe you are interested, how did I setup the IDE and the Project? … here are the basics.

Continue reading

Fast setup of a Java microservice project with MicroProfileStarter

In this blog post I want to show the easy setup of an own MicroProfile/OpenLiberty project with MicroProfileStarter . From my perspective that is  very useful for new Java developers, who want to build microservices. The prerequisite is, you have installed maven and Java on your local machine.

You can use for more information the MicroProfileStarter it self and the OpenLiberty getting started documentation.

That’s fits perfect to the topic Cloud-Native. Maybe you already know, we (Niklas, Harald and I) working on the open sourced Cloud Native Starter project. That project contains sample code that demonstrates, how to get started with Cloud-Native applications and microservices based architectures. Here we use also MicroProfile/OpenLiberty.

We created a new 60 -90 min hands-on workshop with the focus on Java microservice development with MicroProfile/OpenLiberty and the deployment to Kubernetes on IBM Cloud. This workshop is perfect to get a basic understanding of the Cloud-Native and Java development topics and the combination with MicroProfileStarter is awesome for newer Java Developers.

Continue reading