Run a PostgreSQL container as a non-root user in OpenShift

In this blog post I want to point out a simple topic: How to run a simple PostgreSQL Docker image as a non-productive container in OpenShift? As you maybe know, OpenShift doesn’t allow by default to run container images as root.

The image below shows the result of the simply deployed postgreSQL image from dockerhub.

postgres-root-user

It’s possible to enable images to run as root on OpenShift, that’s documented in the OpenShift documentation here, by adding a service account.

But, in this blog post we choose an alternative way, where we don’t change the security in OpenShift, here we will customize the postgreSQL Docker image a bit. We will follow the steps to create a postgreSQL database on OpenShift, along the creation of the database called postgreSQL database-articles for the Cloud Native Starter reactive example .

These are the major steps:

  1. Write the specifications and configurations  for:
    1. … the Dockerfile
    2. … the  yaml with a Kubernetes Deployment and a Kubernetes Service specification
  2. Execute the oc CLI commands to:
    1. … create a OpenShift project
    2. … create a OpenShift build configuration
    3. … start the build
    4. … apply the Deployment and Service specification
    5. … expose the Service

Continue reading

Setup a MongoDB in less than 4 min on a free IBM Cloud Kubernetes cluster at a Hackathon

In this blog post I want to highlight that I just created a GitHub project and a 10 min YouTube video to “How to setup mongoDB in less than 4 min on a free IBM Cloud Kubernetes cluster at a Hackathon”.

My objective is to provide a small guide, how to setup a MongoDB server and Mongo UI (Mongo-Express)  on a free IBM Cloud Kubernetes cluster and when you don’t want to use the existing MongoDB service on IBM Cloud.

On the free IBM Cloud Kubernetes cluster:  No persistent volume claims are used. So, keep in mind, if your Pod in Kubernetes crashes the data of the database is lost.

Based on the “security feature” of the MongoDB default port 27017, you need to run the application to access the MongoDB server in the Kubernetes cluster .

In other words, your UI application has to access the database with a server application, which also runs on the free Kubernetes cluster (like the Mongo UI (Mongo-Express)  in that example here). You should implement a backend for frontend architecture.

The YouTube video shows the setup and a description how it works.

Continue reading

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

Create a python application instance in less than 5 min on IBM Cloud

In that blog post I want to highlight the cool topic: How to create a python application instance in minutes on IBM Cloud, using public Cloud Foundry. This could be useful in a Hackathon with Hackers who are new to IBM Cloud. Therefore I made a short 5 min YouTube video.

Here is the link where you can create your own python instance: https://cloud.ibm.com/catalog/starters/cloud-foundry?runtime=python

Just create your own free IBM Cloud Lite Account and try it out, therefore you only need an e-mail address and no credit card.

These are my related blog posts to the topic Hackathon:


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

Greetings,

Thomas

PS:  You can also try out Kubernetes on IBM Cloud.

#IBMDeveloper, #IBMCloud, #python, #hackathon, #cloudfoundry

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

Run a Docker image as a Cloud Foundry App on IBM Cloud

In that blog post I want to point out an awesome topic: “Run a Docker container image as a Cloud Foundry App on IBM Cloud”

Rainer Hochecker, Simon Moser and I had an interesting exchange about running a Docker image as a Cloud Foundry App on IBM Cloud.

The advantage with that approach is: you don’t need to instantiate a Kubernetes or OpenShift cluster. You can just run a single Docker image with your single application on IBM Cloud. That can be useful in different situations where you need to control the contents of your application, and the cloud foundry build-pack mechanism maybe restricts you.

IBM offers to run Cloud Foundry Apps on IBM Cloud and supports a set of build packsBut, by the fact IBM uses Cloud Foundry, you can also upload a Docker image as a Cloud Foundry application, it’s an officially supported feature. Yes there is no documentation related to that topic in the IBM Cloud documentation, but you can apply the Cloud Foundry documentation.

One impact of that situation is, you don’t see the VCAP variables and you can’t use the out of the box binding for IBM Cloud services. You have to manage the bindings to your IBM Cloud services by yourself.  

Let’s start with a short guide: How to setup a Cloud Foundry application using a Docker image.

Continue reading