Recently I resumed exploring and learning Red Hat OpenShift. A lot changed since I wrote my last blog on the topic of installing minishift in local system. Now, the OpenShift has released a complete different product called CodeReady Container that lets us install and run OpenShift version 4.1 (or newer) cluster in our local machine. However, it requires quite high configuration machine that is not always available with the developers. The kind people at Red Hat realized it and provided us another mechanism to explore Red Hat OpenShift using developer sandbox. It provides a hosted private OpenShift environment in a shared, multi-tenant OpenShift cluster that is pre-configured with a set of developer tools. Without having to install anything on your local, it lets you discover the rich capabilities of the full developer experience on OpenShift with the sandbox. You don’t need to provide credit card. It’s totally free and available with you for 30 days. You just need to have a red hat account. In this blog, I’ll share with you my experience on setting up Red Hat OpenShift developer sandbox for my learning purpose.
Time needed: 15 minutes
Let’s get started
- Head to https://developers.redhat.com/developer-sandbox.
- Click on the “Get Started in the Sandbox” button.
- In the next page, Click on the “Launch your Developer Sandbox for Red Hat OpenShift” button
- It’ll redirect to a log in page. Enter your credential and log in. [Register yourself if you already don’t have a Red Hat account and restart the process]
- It may ask you key in your registered mobile number to confirm your account. Key in your registered mobile number and enter the SMS sent by OpenShift.
- Once verified, click on “Start using your sandbox” button
- In the next step, click on “DevSandbox” button
- In the next page, agree to Red Hat OpenShift Online Service Agreement (after reading through it), check/uncheck relevant boxes and click submit.
- It’ll take few moments to setup developer sandbox and thereafter present OpenShift Web console for you
You can use this web console to manage your application, project etc.
- OpenShift Command Line
Well, thus far we have created a sandbox. But, the fun part of OpenShift is its power command line utility. It’s where the automation happens. In order to be comfortable with OpenShift, we must learn to use the OpenShift command line utility. In the following steps, we’ll learn how to set this up.,
- In the OpenShift dashboard, click on the question mark icon and click on the Command Line Tools. Please refer to the highlighted section of the screen.
- Download the command line utilties
Once the Command Line tools page loads, download the oc and odo CLI utilities. Save both the .exe files in a folder. I have saved these in c:\osu (abbreviation of OpenShift Utility) folder. Next, we will add this folder path in the PATH environment variable to ensure these commands are accessible from command line without any hassle
- Copy Login Command
From the above page, click on the Copy Login Command. It’ll redirect you to another page. Click on the login with DevSandbox.
- Obtain the token
It’ll open up a new web page; click on Display Token. This action will give you the complete details of your token and also the command to be used to login to the Developer Sandbox using oc utility.
- Use the token to login
Let’s copy the command from above and run it in the command line. I typically use gitbash as my command line utility. The successful execution of this command will log you in the sandbox
Well, it was pretty seamless experience for me in setting up the developer sandbox. I am now excited to explore this wonderful platform and I’ll definitely share it with you as usual.
I have used following links. Do visit them to learn more: