OpenShift installation in fifteen minutes*


19-04-2021
Openshift

A series of articles by Tier 2 Consulting will help you install and configure an OpenShift cluster on Amazon Web Services (AWS). 

* Well, fifteen minutes' work, plus around three quarters of an hour drinking coffee and watching log messages.

The team says:

We will take you through a number of useful steps that you are likely to want to carry out on an OpenShift cluster, to make it more efficient, more secure, easier to manage, etc. Obviously the first thing to do will be to get OpenShift installed, which is what this post is all about.

Note that some of the AWS prerequisites can take some time to propagate (particularly the DNS entries), so you might want to do those up front. Also, the OpenShift installer is only available for Linux or macOS. However, once you've installed OpenShift you can then manage the cluster with the command-line interface on Linux, macOS, or Windows. This post assumes the use of a Linux machine – the commands and output may differ slightly for macOS.

The Preamble

If you're new to OpenShift, it is "an enterprise-ready Kubernetes container platform with full-stack automated operations to manage hybrid cloud and multi-cloud deployments. Red Hat OpenShift is optimized to improve developer productivity and promote innovation". I've put that in quotes because it's copied straight off our web page: https://www.tier2consulting.com/technology/red-hat-container-platform. In practical terms that means you can run containerised workloads on OpenShift more easily and securely than if you were to try and create your own cluster from the open-source Kubernetes and associated projects.

In this series of articles we will help you install and configure an OpenShift cluster on Amazon Web Services (AWS). We will take you through a number of useful steps that you are likely to want to carry out on an OpenShift cluster, to make it more efficient, more secure, easier to manage, etc. Obviously the first thing to do will be to get OpenShift installed, which is what this post is all about.

Although these articles will focus on using AWS as the underlying infrastructure for OpenShift (mainly because it's fairly cheap and easy to use!), there are many other options available to you. These include Google Cloud Services (GCS), Microsoft Azure, Red Hat OpenStack Platform (RHOSP), Red Hat Virtualisation (RHV), IBM Z, IBM LinuxONE, IBM Power Systems, VMware vSphere, bare metal, or combinations of the above! We'll try to point out any major differences that you might encounter when using other kinds of infrastructure.

The Prerequisites

There are a few requirements that we need in advance of the actual OpenShift installation. As mentioned above, some of these can take a little time to happen (in particular the domain name registration), so it's probably best to get them sorted in advance.

Accounts

The first things you will need are an AWS account and a Red Hat account. If you don't already have both accounts they are free to create, but you need to be aware that:

  • The OpenShift cluster uses bigger compute nodes than are available in the AWS "Free Tier", so you will definitely end up with charges on your account! Also, the account could theoretically take up to 24 hours to activate, although in practice it's usually a few minutes. Read more about creating an account on the Amazon web site: https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account.

  • A trial Red Hat account lasts for 60 days and will be "self-supported" - you won't have access to Red Hat's support teams, but you will be able to use their support documentation. You can read about OpenShift and register for a trial account on the Red Hat web site: https://www.redhat.com/en/technologies/cloud-computing/openshift.

AWS Network

So that requests can be routed from the internet to your applications in OpenShift you will need to set up a couple of things:

  • Register a domain name, such as "yourcompany.com", in Amazon's Route 53 Domain Name System (DNS). You can register a new domain, transfer an existing domain, register subdomains of an existing parent domain such as "test.yourcompany.com" and transfer subdomains. The prices vary from a few dollars annually to a few hundred, so be careful what type of domain you register! Details of how to register a new domain can be found in the AWS documentation: 

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar.html.

  • A public hosted zone, which is responsible for routing traffic to a domain or subdomain. A public hosted zone is created automatically if you register a new domain as above, but you may need to create it manually if you migrate an existing domain. There is also a small monthly charge for this hosted zone. There's lots of information about hosted zones in the AWS documentation: 

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/AboutHZWorkingWith.html.

The rest of the network configuration that is required for the OpenShift cluster itself is created by the OpenShift installer.

AWS User

The OpenShift installer application uses the AWS API to create all the underlying infrastructure components for the cluster, such as machines, networking, etc. In order to do this you will need a user with "Programmatic access" and the "AdministratorAccess" policy. You can create a user in AWS here: https://console.aws.amazon.com/iam/home#/users$new. The steps are:

  • Enter a sensible user name, such as "openshift-cluster-installer".

  • Tick the "Programmatic access" checkbox, as this will allow access via the API.

  • Click "Next" to take you to the permissions page.

  • Click "Attach existing policies directly" and select the "AdministratorAccess" policy. This will give the user sufficient rights to create all the required objects. Alternatively create a group with this policy and add the user to the group.

  • Nothing else is required, so click "Next" a couple of times then "Create User".

  • On the next page you will see the Access key ID and Secret access key. Either copy these somewhere, or download the CSV file, as you will need them during the install. Note that for added security you cannot retrieve the Secret access key after you navigate away from this page.

The Actual Installation

Visit our website for the full news story, and for information and guided instructions on how to install:

https://www.tier2consulting.com/news/openshift-installation-in-fifteen-minutes/

 

Tier 2 Consulting is a team of expert software developers, who deliver custom software using an agile, cloud-native approach. Tier 2 works in partnership with customers to understand their business challenges, and deliver solutions using modern, open-source technology.

Tier 2 is the UK & Ireland’s first Red Hat Premier Middleware Partner, an award based solely on accredited skills and experience. We are also one of the first partners in the UK to be awarded the Container Platform Specialism, recognising our expertise in RedHat’s OpenShift.

Tier 2 Consulting