Perhaps one of the challenges in learning about Red Hat OpenShift is having a good testing environment to understand the platform well, be able to deploy test applications, and be phesible with both the GUI and the command line. While a minimal cluster starting with OpenShift version 4 requires at least 6 nodes, there is an all-in-one system called Red Hat CodeReady Containers. It includes a minimum cluster of the latest OpenShift 4 version with a series of settings to work on a single virtual machine that we can deploy on our test servers, or even on your own laptop. Although it is a project aimed mainly at software developers, but that serves us perfectly, to learn how to configure and manage this platform.
What other differences exist?
What are the HW and SW requirements?
If none of this is a problem for you, you
can download the
image here. Please note that you need a Red Hat developer account (free).
You will see that in addition to selecting the operating system (there is an image for each type of “Hypervisor”), there is also a “secret”, this is still a kind of key-license, which will ask us during the creation of the virtual environment. Don’t download iton, but write down the “pull secret” in a notebook or similar.
If we are deploying the environment on Red Hat Linux, we will need to run these two commands to install and activate the NetworkManager:
$ su -c ‘yum install NetworkManager’
$ su -c ‘sytemctl start NetowrkManager’
We will also add a non-administrator user with sudo permissions, essential for everything to work properly.
$ useradd crc
$ passwd crc
$ vi /etc/sudoers
Allow root to run any commands anywhere
root ALL(ALL) ALL
crc ALL(ALL) ALL
With this user, we’ll download Code Ready Containers and launch the environment configurator.
$ su – crc
$ cd /home/crc/
$wget https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz
$ tar -xvf crc*.xz
$ mv crc-linux-1.xxx-amd64/* /home/crc/bin/
$ crc setup
The latter is a necessary trick for DNS to work properly
$ crc start -n ‘8.8.8’
After a few minutes you should see this message.
To access the cluster, first set up your environment by following ‘crc oc-env’ instructions.
Then you can access it by running ‘oc login -u developer -p developer https://api.crc.testing:6443’.
To login as an admin, run ‘oc login -u kubeadmin -p dpDFV-xamBW-kKAk3-Fi6Lg https://api.crc.testing:6443‘.
You need to set up a number of environment variables with
$ eval $(crc oc-env)
Now you can register as an administrator:
$ oc login -u kubeadmin -p dpDFV-xamBW-kKAk3-Fi6Lg https://api.crc.testing:6443
.. or as a developer:
$ oc login -u developer -p developer https://api.crc.testing:6443
If you don’t have a graphical environment installed on this server, you won’t be able to access the web environment (via crc console),but you can use Firefox on any other system where you have Linux installed.
You need to copy the contents of /etc/hosts from the server where you installed OpenShift at the end of your local /etc/hosts file
Next you’ll need to open a VPN via ssh from a desktop environment like Ubuntu to the server where you deployed OpenShift
$ sudo apt-get install sshuttle
$ sudo sshuttle -r root@remote-server-ip -x remote-server-ip 0.0.0.0/0 -vv
And now, if you open your browser and access https://console-openshift-console. crc.testing you’ll see the GUI
If you need to know more, we have hands-on courses from both Docker and kubernetes and OpenShift. Contact us without obligation.
Did you know that many AIX systems are "working fine" until they suddenly... stop working?😱…
The evolution of IBM's Power architecture has been the subject of intense debate in the…
Did you know that while you have opened the browser to read this... your computer…
Why not emulate other architectures on Power? In a recent conversation with what I like…
High availability and business continuity are crucial to keep applications and services always operational. High…
In this fast-changing and complex technological era, choosing the right suppliers is crucial. When it…