Java

How to setup Openshift in my local Machine ?

“We all love to read the documentation, Nah just kidding .”

No worries, I did go through the openshift documentation (which is not user friendly) and hopefully I have made things easier for you on how to setup OpenShift locally.

I have attached Screenshots and commands and explained the process involved in it in very simpler terms for an absolute beginner to understand .

Note : (I am showing this in Windows Platform, will add Linux in future but process should remain similar).

Step 1: Will my computer satisfy the basic needed requirements ?

Before you Download and learn that you do not meet minimum requirements, let me save you some time.

Minimum Requirements:

a. At least 9 GB RAM

b. At least 40 GB disk space for the virtual disk

c. At least 4 vCPUs (How to check this ?) The easiest way for Windows user to find would be: Open Task Manager and under Performance Tab click on CPU. Then on the bottom right you will see this:

d. Install or activate Hyper-V on Windows 10 so that you can create virtual machines as needed.

How do I do this ? : Open a PowerShell console as Administrator.Run the following command: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Step 2 : Download

Don’t just google “download openshift” as this leads you all over the place. Let’s keep in mind that the process and terms used here are different.

Before you download lets understand a Term called :

CRC aka CodeReady Containers : This helps you up and running with an OpenShift cluster (Group of servers or nodes) on your local machine.

Now search this in your search engine : “download codeready containers“. This should lead you to this page: https://developers.redhat.com/products/codeready-containers/overview

Then click on “Install OpenShift On you Laptop “. Which will have you (Red Hat) sign up. Once that is done you should be at least on this page.

Once here, click on “Download Code-Ready Containers”. Don’t forget to download or Copy Pull Secret which you will need.

For this demo I have downloaded and unzipped on this folder: “D:\Local Openshift – CRC”

Congratulations you are making progress.

Step 3: Install and Setup

a. Go to that folder location and open up the unzipped folder. Open Command Prompt or Windows PowerShell and run this command: crc setup or .\crc setup for Powershell

You will feel like nothing is happening but it is checking the prerequisites and confuringing drivers and network so stay tight. Have some patience.

Oh Snap !!!! Not really, just restart and re-run crc setup again and should be good to move further. (Above).

b. Don’t just run crc start yet just because it said so (Above) . As this will ask for pull secret and just confuses the setup process (Below) . But if you want to run both at same time that is fine as well: crc.exe start -p pull-secret.txt

Instead first config the crc.

crc config set pull-secret-file “your file path”

Now run crc start (Below) :

Once done run this command as shown : crc oc-env

And you should see the suggested command (Below) to set the path run that SET PATH command as shown:

c. Verifying : This should be the last step to verify that OpenShift has successfully been installed locally.

Run crc version as above and you should see the version.

Open your Hyper-V Manager and check if that says running as well.

Now let’s run this final command to start the OpenShift Console via crc command :

This is how your openshift console should look like.

Congratulations, now you have installed OpenShift on your computer.

Keep in mind that creating, updating projects etc will be done using oc (OpenShift CLI) command tool which was installed during this process.

There are a whole lot of features provided by oc (OpenShift CLI) like below :

This should be an absolute begineer setup. Rest you could follow other online documentations.

Hope this works for you, if not let me know on comments below or DM me on Twitter, as not all systems or networking or proxy setup work the same setup as I have in this demo.

Happy Learning.

Leave a Reply

Your email address will not be published. Required fields are marked *