Linux

How To Setup OpenShift 4 Cluster using Red Hat CodeReady Containers

openshift

Red Hat OpenShift is the leading enterprise Kubernetes platform, built for an open hybrid cloud strategy. It is available as a fully managed cloud service on leading public clouds or as a self-managed software offering for organizations requiring more customization. OpenShift is the industry-leading hybrid cloud PaaS hosted by RedHat that allows developers to quickly build, test, deploy and scale container-based applications consistently anywhere across on-premise, public clouds, and edge environment. Kindly refer to some of my related guides: Openstack Deployment with Devstack, Deploying a load balancer from scratch and adding backend servers, how to monitor services using Zabbix, and how to set-up PowerShell on a Linux server.

Red Hat OpenShift includes an enterprise grade Linux operating system, container runtime, networking, monitoring, registry, and authentication and authorization solutions. Automate life-cycle management to get increased security, tailored operations solutions, easy-to-manage cluster operations, and application portability.

Installation using CodeReady Container

CodeReady Containers is one of the easiest ways for developers to run a minimal OpenShift cluster on a local laptop or desktop computer free of no cost. It is designed to run a single Openshift node as a virtual machine.

System Requirements
CodeReady Containers can run on Windows 10, Mac OS 10.14 Mojave or a newer version, and on Linux  it supports RHEL/CentOS 7.5 or a newer version, Ubuntu 18.04 or a newer version etc. It requires the following minimum hardware and operating system resources:
4 virtual CPUs (vCPUs)
8 GB of memory
35 GB of storage space

Installation

The following steps assume you are running on an RHEL machine and you would require the following packages.
NetworkManager
Libvirt

Step 1:
Install the required software packages

$ su -c 'yum install NetworkManager'
image-65
image-66

Step 2: Install CodeReady container by Downloading the latest binary file for CRC using the URL below and also copy your image secret with the “Copy Pull Secret” link from the page. it would be needed later

$ wget https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz

image-67

Extract the downloaded CodeReady Containers archive.

tar xvf crc-linux-amd64.tar.xz
image-68

create the ~/bin directory and copy the crc executable to it

 mkdir -p ~/bin
image-69
cp ~/Downloads/crc-linux-*-amd64/crc ~/bin
image-70

add the ~/bin directory to your PATH:

$ export PATH=$PATH:$HOME/bin
image-71
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
image-72

Step 3:Deploy CodeReady Containers virtual machine

$ crc setup

Use this command to set up your host operating system for the CodeReady Containers virtual machine.

image-73
image-74

This  would initiate a series of checks by the installer and once its done you can finally start the openshift cluster on your local machine

crc start
image-75

Copy and paste the pull secret and after a few moments, you should be given the login credentials and URL for the cluster and a message stating that CodeReady Containers is running.

image-76

Step 4:Access OpenShift cluster. After deploying your OpenShift cluster locally, you can access it from the CLI or by opening the OpenShift console on your web browser with the URL provided.

openshift

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x