Insights: How to prepare VMs for OpenShift Deployment in a Cloud Environment


Deploying OpenShift to the cloud as opposed to bare metal, is an ideal way to get up and going quickly, being particularly well suited to development and test environments where instant resource availability and flexibility is key. A great way to smooth the path to a successful OpenShift deployment is by using automation.

A great way to smooth the path to a successful OpenShift deployment is by using automation. You can use your favourite automation tool such as Ansible, Puppet, Chef or Terraform/Vagrant along with your cloud’s API e.g. CloudStack API or vCloud API to create ready-to-go node VMs with the correct sizing and storage, in a reproducible manner. Or, you can use your cloud’s templating facility (e.g. a vApp in VMware) to save a node VM and roll out copies as required.

As Alexander Graham Bell once said, “Before anything else, preparation is the key to success”.   This certainly applies when preparing node VMs for an OpenShift deployment. Let’s say you’ve created your deployer VM with the OpenShift Ansible package installed and you’re ready to roll out a cluster with two masters and four nodes. You could manually create your nodes, but this is prone to error with all the fiddly steps involved. A poorly setup VM can cause all sorts of problems at various points during the OpenShift installation, which can be very difficult to debug and can require a tear-down and a fresh start.  The official Red Hat documentation devotes quite some space to node preparation including SSH keys, DNS, Docker and much more.

One automation method we have created at Safe Swiss Cloud is actually a combination of cloud templating and Ansible playbooks. The template is a copy of a VM which was prepared in line with the Red Hat host preparation requirements. The playbook creates and launches the VMs according to user defined node definitions (masters, nodes) in the standard Ansible hosts inventory file. Once the node VMs are up and running, the standard ‘play’

ansible-playbook -i /path/to/hosts /path/to/openshift-ansible/playbooks/byo/config.yml

deploys the OpenShift cluster.

At Safe Swiss Cloud, we aim to make life easier by providing deployer and node templates together with automation scripts. Naturally, when performance maximization is key, the same automation tools can also be used to deploy OpenShift onto bare metal. I’m looking forward to be covering this in a future blog post.

Until next time,

David Poole, Safe Swiss Cloud

About the Author

David Poole

David Poole

CTO / CSO | Chief Technical Officer / Chief Security Officer

David has nearly 30 years experience in the IT industry principally in banking and mobile technology. David’s motto is “get the job done”. David gained a Ph.D in Physics (solid state) from Cambridge University in 1982. He also has a Master’s in electronics from Birmingham University.

Other interests: Art, karate and weight training

Connect on LinkedIn

CONTACT»

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please Note:
You may use one of these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>