How does docker compare to openshift?

The primary difference is that Docker as a project is focused on the runtime container only, whereas OpenShift (as a system) includes both the runtime container as well as the REST API, coordination, and web interfaces to deploy and manage individual containers. Comparing just the runtime containers, OpenShift and Docker both use kernel isolation features … Read more

OpenShift rhc setup using multiple accounts

The rhc command-line tools come with the global option -l, –rhlogin LOGIN. You have two options: Use the -l flag with every command to specify the login name: rhc app create <appname> <cartridge> [-l <login1/login2>] Run rhc setup -l LOGIN between the sessions. Once done managing apps from one account you can end the session … Read more

What is the difference between persistent volume (PV) and persistent volume claim (PVC) in simple terms?

From the docs PVs are resources in the cluster. PVCs are requests for those resources and also act as claim checks to the resource. So a persistent volume (PV) is the “physical” volume on the host machine that stores your persistent data. A persistent volume claim (PVC) is a request for the platform to create … Read more

How can I debug “ImagePullBackOff”?

You can use the ‘describe pod‘ syntax For OpenShift use: oc describe pod <pod-id> For vanilla Kubernetes: kubectl describe pod <pod-id> Examine the events of the output. In my case it shows Back-off pulling image unreachableserver/nginx:1.14.22222 In this case the image unreachableserver/nginx:1.14.22222 can not be pulled from the Internet because there is no Docker registry … Read more

Using env variable in Spring Boot’s application.properties

You don’t need to use java variables. To include system env variables add the following to your application.properties file: spring.datasource.url = ${OPENSHIFT_MYSQL_DB_HOST}:${OPENSHIFT_MYSQL_DB_PORT}/”nameofDB” spring.datasource.username = ${OPENSHIFT_MYSQL_DB_USERNAME} spring.datasource.password = ${OPENSHIFT_MYSQL_DB_PASSWORD} But the way suggested by @Stefan Isele is more preferable, because in this case you have to declare just one env variable: spring.profiles.active. Spring will read the … Read more