OpenShift Quick Start

David Pitt Docker, Microservices, OpenShift Leave a Comment

Applying a Microservices style architecture is a popular option for achieving scalability, agility and longevity. As experienced practitioners will tell you, one of the hardest and most important element for success is implementing a platform that automates the acquisition of computing resources, deployment, scaling, and recovery (i.e DevOps).

Conceptually, the target platform characteristics should resemble features of cloud-based platforms on the market, like the following:

IBM BlueMix (now IBM Cloud) – Amazon ECS (Amazon EC2) – Heroku (Salesforce) – Azure Service Fabric

All of these examples are slightly different in technology features, but the bottom line is they provide a way to manage computing resources, build and deployment, in an automated fashion. These can all be categorized as a PaaS (Platform As A Service) solutions.

Our previous blog in the series introduced RedHat’s OpenShift solution that provides a way for enterprise teams to implement their own PaaS. Essentially, it sits atop the Docker-based Kubernetes platform to provide a ready-to-use DevOps platform.

This blog introduces two hands-on exercises (taken from our OpenShift Course), that work to walk you through the following tasks:

  • Installing OpenShift locally
  • Adding a Container with an API service to a Pod

Unfortunately, it will take more than this quick start blog to get OpenShift installed and enabled in an enterprise. That said, developers, system admins, and any party that may be working on or responsible for the platform, will benefit from understanding how to get OpenShift up and running on a local machine as shown in this blog.

Basic Elements

Here are some basic elements you should know:

  • Cluster – Represents and manages Nodes. Nodes are physical or virtual server(s).
  • Node – A node is a worker machine in Kubernetes, previously known as a minion. A node may be a VM or physical machine, depending on the cluster.
  • Pod – A Pod is the basic building block of Kubernetes, the smallest and simplest unit in the Kubernetes object model that you create or deploy. A Pod represents a running process on your cluster.
  • Service – A Kubernetes Service is an abstraction that defines a logical set of Pods and a policy by which to access them, which is sometimes called a micro-service. The set of Pods targeted by a Service is (usually) determined by a Label Selector. (See below for why you might want a Service without a selector).
  • Controllers – Abstract elements that interact with basic elements (Jobs, Deployment, etc.)

Detailed Kubernetes Concept Documentation –

Installing Locally

1. Install OpenShift Origin locally. Follow the link below for installation instructions for your operating system.

2. Start the cluster from a command window with the following command:

    	$ oc cluster up

3. Access the web admin from a browser with You can access the unsecured HTTPS connection and proceed.

A login screen should appear; log in with user ID: developer password: < anything >

4. The Admin Console will appear:

You are now ready to add, build, and run a container to the platform. You can upload a Docker/OpenShift configured Image (which will be the subject of our next blog), or use some predefined Source-to-Docker Image (STI) templates.

The next Step will walk through how a Node.js API can be added and managed by the platform.

Spinning Up an API Service Project in a Pod

The following steps will create an OpenShift project from a pre-defined Node.js Source-to-Image project. In this exercise you create a project connected to a Git repository. OpenShift will build and create and deploy an image using the predefined Node-based source to image mechanism.

1. With the WebAdmin open, select the My Project project and click Add to Project.

2. Select the JavaScript project, the Node JS option, and “V6 – Latest” from the drop down and click Select.

3. Input name khs-example-node-api and repo ( as shown below.

Click Create then go to back to the overview.

4. From the Overview tab, expanding it will display the Pod’s status. It might take a bit for the build to complete. When the Blue Status Circle appears, the container instance is up and ready for requests.

5. Execute the deployed container instance clicking with the following URL from a Browser:

You now have an OpenShift platform installed locally. Play around with the admin Console and with scaling up Pods. Peruse the console capabilities.

Series Details

We will continue this OpenShift training blog series next with the following blogs:

  1. Introduction to Managing Docker Containers with OpenShift and Kubernetes
  2. This Post –> OpenShift Quick Start – Installing OpenShift locally & adding a Container with an API service to a Pod
  3. Scaling Pods and Managing Cluster with the Command Line Interface
  4. Continuous Build and Deploy with Jenkins 2 Pipelines
  5. Using a STI (Source to Image) Utility to Create and Deploy Spring Boot Java Image

Stay tuned!

About the Author
David Pitt

David Pitt


David Pitt is a Sr. Solutions Architect and Managing Partner of Keyhole Software with nearly 25 years IT experience. Recent projects involve speaking, writing, and training developers in enterprise JavaScript​/single-page application​ development best practices​, as well as the development of GrokOla, the Q&A-based wiki software​ for development teams.​

Share this Post

Leave a Reply