Invoke reactive Endpoints with Quarkus and MicroProfile

In this blog post I want to point out that I just created a 15 min YouTube video related to the great Hands-on workshop: Reactive Endpoints with Quarkus on OpenShift. In this video you can watch and follow the steps of the exercise 3 “Invoke Endpoints reactively”. Niklas wrote a great blog post about the topic of that exercise. This is the name and link of his blog post Invoking REST APIs asynchronously with Quarkus.

Continue reading

Develop reactive Endpoints with Quarkus

In this blog post I want to point out that I just created a 12 min YouTube video related to the great Hands-on workshop: Reactive Endpoints with Quarkus on OpenShift. In this video you can watch and follow the steps of the exercise 2 “Develop reactive Endpoints”. Niklas wrote a great blog post about the topic of that exercise. This is the name and link of his blog post Developing reactive REST APIs with Quarkus.

Continue reading

How to setup the reactive Cloud Native Starter sample application on OpenShift in IBM Cloud

In this blog post I want to point out that I just created a 5 min YouTube video related to the great Hands-on workshop: Reactive Endpoints with Quarkus on OpenShift. In that short video I show the setup of the example application to show reactive programming.

The image below shows the major architecture of the reactive programming example. There are three Java Microservices, one Vue.js UI application and two infrastructure components running on OpenShift (Kubernetes).

reactive-architecture

 


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

Greetings,

Thomas

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, #IBMCloud, #OpenShift, #Kafka, #Postgres, #MicroProfile, #Java #reactive

 

 

A small, but useful change in the IBM Cloud CLI for Kubernetes

This blog post is about a very small, but useful change in the IBM Cloud CLI for Kubernetes clusters.

You no longer need to export and set the KUBECONFIG environment variable to access your Kubernetes cluster on IBM Cloud in a terminal session. ( IBM Cloud documentation ).

You just can execute following IBM Cloud CLI command,

ibmcloud ks cluster config --cluster YOURCLUSTER

and verify the config settings.

kubectl config current-context

These images are showing the guides for your IBM Kubernetes cluster before and now.
Before Now
before now

That’s all.


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

Greetings,

Thomas

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.

#IBMCloud, #Kubernetes

error: no matches forkind “Deployment”in version “apps/v1beta1”

This is a short blog post about changes in the new Kubernetes deployment definition.
In my older blog posts related to Kubernetes you will find older deployment definitions, these definitions will cause errors during the Kubernetes deployment. Here are the two major problems you maybe will notice:

1. If you get the following error

error: unable to recognize "deployment.yaml": 
no matches forkind "Deployment"in version "apps/v1beta1"
Please change the entry apps/v1beta1 to apps/v1 in the deployment.yaml file, the newer `deployment definition` for Kubernetes v1.16.8 (v1.18).

Note: Additional useful blog post here.


2. If you get this error

error: error validating "deployment.yaml": 
error validating data: ValidationError(Deployment.spec): 
missing required field "selector"in io.k8s.api.apps.v1.DeploymentSpec; 
#if you choose to ignore these errors, 
turn validation off with --validate=false
You need to insert in the deployment specification the statement selector:matchLabels:name:authors, as you see in the table below.
The table contains an example of the major changes in the deployment specification, the left hand side contains the new Kubernetes deployment definition and right hand side includes the older definition. The `selector` is now required.

kind: Deployment
apiVersion: apps/v1
metadata:
   name: authors
   labels:
     app: authors
spec:
   selector:
     matchLabels:
       app: authors
       version: v1
  replicas: 1
  template:
    metadata:
     labels:
        app: authors
        version: v1
     spec:
       containers:
       - name: authors
         image: authors:1
         ports:
          - containerPort: 3000
 ...
kind: Deployment
apiVersion: apps/v1beta1
metadata:
  name: authors
  labels:
    app: authors
spec: 
  ...
  ...
  ...
  ...
  replicas: 1
  template:
  metadata:
    labels:
      app: authors
        version: v1
    spec:
      containers:
      - name: authors
        image: authors:1
        ports:
        - containerPort: 3000
...

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

Greetings,

Thomas

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.

#Kubernetes, #Deployment, #yaml

 

Automated deployment of a microservice to Kubernetes on IBM Cloud

In that blog post I want to point out the awesome topic, how to automate the deployment of a Microservice using a delivery pipeline on IBM Cloud.

Maybe you already know Niklas, Harald and I made the great project called Cloud Native Starter. That project includes a Hands-on workshop that is called “Build a Java Microservice and deploy the Microservice to Kubernetes on IBM Cloud”.  In Lab 4 you have to deploy the Authors Microservice to Kubernetes on IBM Cloud. Sometimes we have limited time in workshops. The limited time is the reason why we want to reduce the manual effort for students in a workshop to a minimum, therefor we took the IBM® Cloud Continuous Delivery and I created a repeatable way with minimal human interaction. The delivery pipeline contains sequences of stages which retrieve inputs and run jobs, such as builds, and deployments.

That image shows two stages, one stage is called FETCH and the other DEPLOY_SERVICES. The FETCH stages contains a job called Fetch code and the DELOY_SERVICES has two jobs one for build and one for deployment.

Toolchain-04

With the realization of the automated setup for the creation of the toolchain, you can just press the button Create toolchain in the GitHub project and follow a guided wizard to deploy the Authors Microservice.

Visit the hands-on workshop Use a IBM Cloud toolchain to deploy a Java Microservices to Kubernetes on IBM Cloud and press the button 😉

create-toolchain-gitbook

Continue reading

Deploy the Reactive Cloud Native Starter example to IBM Cloud

The Cloud Native Starter project now contains the new great topic, the development of Reactive Microservices  with Java, quarkus, MicroProfile and Vue.js as front-end. The Reactive example implementation runs on minikube, local OpenShift and on IBM Cloud Kubernetes. Here are the instructions on GitHub.

But what does reactive mean? Here is an extract of the definition in  The Reactive Manifesto.

“Systems built as Reactive Systems are more flexible, loosely-coupled and scalable. This makes them easier to develop and amenable to change. They are significantly more tolerant of failure and when failure does occur they meet it with elegance rather than disaster. Reactive Systems are highly responsive, giving users effective interactive feedback.” 

But be aware, our example is not a full Reactive System it shows reactive programming techniques.

Note: To understand the difference between these two topics, that badge on cognitiveclass is useful Reactive Architecture: Introduction to Reactive Systems.

In our reactive programming example, you see directly changes in the database on the Web UI, without refreshing the browser.

reactive-sample

In this blog post I want to share, how you deploy that awesome Reactive example to a free IBM Cloud Kubernetes Cluster and using the free quota of the IBM Cloud Container Registry. We avoid for the setup that you have to use any paid IBM Cloud services, because you want just to see how the Reactive example works on IBM Cloud.
To create a free Cluster you need a feature code to create a Trial Account or you create a pay as you go account and you only use the free services of IBM Cloud.

That is the major architecture of the Reactive example. Three Java Microservices, one Vue UI application and two infrastructure components running on Kubernetes.

reactive-architecture

But what is reactive programming in more detail? If you want to get more details of the Reactive topic, just visit the blog post Development of Reactive Applications with Quarkus from Niklas Heidloff and if you want to explore the setup for local OpenShift take a look into the blog post Cloud Native Starter on Red Hat OpenShift 4 from Harald Uebele.

Continue reading

How to develop a customized Dockerfile using minikube

In this blog post I want to share an awesome and simple practice for beginners: How to develop a customized Dockerfile for a container image running on Kubernetes, using minikube.

Usually, when you use an existing container image to create your own customized configuration, you don’t have deep knowledge how that container image is built, and you have questions like: “What are the folder rights?”, or “What are the installation paths of applications?”, or other information you need to customize the container image to your needs.

You can learn about the existing image, when you visit the GitHub or Dockerhub project of that image (for example: links to GitHub “docker-library / repo-info” and Dockerhub “jenkins repo-info” project of Jenkins). But to ensure that your customization works, you have to run and access the running container in the commandline mode and verify your changes step by step running the image in Kubernetes.

Minikube comes with a container engine you can use. So minikube has all you need to build and run your container image on a local Kubernetes installation.

Here are the steps to customize a Jenkins container image I want to run on minikube, you can try it out:

1. Install minikube

Continue reading