DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Openshift Sandbox/Kata Containers
  • OpenShift Container Platform 3.11 Cost Optimization on Public Cloud Platforms
  • Pulling Images from External Container Registry to OpenShift Cluster via ImageStream
  • A Guide to Container Runtimes

Trending

  • The Role of AI in Identity and Access Management for Organizations
  • Developers Beware: Slopsquatting and Vibe Coding Can Increase Risk of AI-Powered Attacks
  • Exploring Intercooler.js: Simplify AJAX With HTML Attributes
  • Supervised Fine-Tuning (SFT) on VLMs: From Pre-trained Checkpoints To Tuned Models
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. How to setup OpenShift Container Platform 4.5 on your local machine in minutes

How to setup OpenShift Container Platform 4.5 on your local machine in minutes

Are you looking to develop a few projects on your local machine and push them on to a real OpenShift Container Platform without having to worry about cloud h...

By 
Eric D.  Schabell user avatar
Eric D. Schabell
DZone Core CORE ·
Sep. 28, 20 · Tutorial
Likes (4)
Comment
Save
Tweet
Share
5.8K Views

Join the DZone community and get the full member experience.

Join For Free

Are you looking to develop a few projects on your local machine and push them on to a real OpenShift Container Platform without having to worry about cloud hosting of your container platform?

Would you like to do that on one of the newer versions of OpenShift Container Platform such as version 4.5?

Look no further as CodeReady Containers puts it all at your fingertips. Experience the joys of cloud native development and automated rolling deployments. Since I started pulling together ways to easily experience this with OpenShift Container Platform, back with version 3.3 believe it or not, we've come a long ways.

The idea was to make this as streamlined of an experience as possible by using the same CodeReady Containers Easy Install project. Let's take a look at what this looks like.

Below is a walk through step by step, but first you can skip all that and just watch a video of how to install on your local machine:

Now let's take it step by step:

Linux or Mac installation

This installation requires the following (all freely available):

1. HyperKit for OSX, Hyper-V for Windows, or Libvirt for Linux
2. Code Ready Containers (OCP 4.5)
3. OpenShift Client (oc) v4.5


First you need to ensure your virtualization tooling is installed for your platform, just search online for how to do that or your specific platform. Second you need to download the CodeReady Containers. Finally, you need the OpenShift client. Normally you'd expect to have to track these last two down but we've made this all easy by just including checks during the installation. If you have something installed, it checks the version, if good then it moves on with next steps. If anything is missing or wrong version, the installation stops and notifies you where to find that component for your platform (including URL).

Let's get started by downloading the CodeReady Containers Easy Install project and unzipping in some directory. This gives you a file called ocp-install-demo-master.zip,just unzip and run the as follows:

Follow the instructions as each of the dependencies is checked and you're provided with pointers to getting the versions you need for your platform.

Note: Each CodeReady Container download is tied to an embedded secret. This secret you need to download (link will be provided) as a file and you'll be asked to point to that secret to start your container platform.

Once you've gotten all the dependencies sorted out, the install runs like this:


A little ASCII art and then it's checking for my platforms virtualization (Hyperkit), then looking for the OpenShift client version 4.5 (oc client), then running a setup (crc setup).


The next steps are providing the pull-secret-file, you can set this in the variables at the top of the installation script. Now the moment of truth, the CodeReady Containers cluster starts, which takes some time depending on your network (crc start). With a good networks it's about a five minute wait.


This is the logging you'll see as the OpenShift cluster starts on your local machine. The warning is normal, just some of the features have been trimmed to speed up deployment.


At the end we'll retrieve the admin password for logging in to the cluster's console, pick up the host URL, test the deployment by logging in with our client (oc login), and finally you're given all the details in a nice box. You have the option to stop, start it again, or delete the OpenShift Container Platform cluster as shown in the dialog.

Next open the web console using URL and login 'kubeadmin' with the corresponding password. In our case it's the URL: https://console-openshift-console.apps-crc.testing


Log in with user: kubeadmin
Password in our case: duduw-yPT9Z-hsUpq-f3pre

That opens the main dashboard:


Verify the version you are running by clicking on the top right question mark and then About option:


Close the version window by clicking on the X. As we are interested in developing using the tooling and container images provided by CodeReady Containers, let's change the view from Administrator to Developer in the left top menu selecting Topology and then via Project drop down menu at the top choose Default:


You can browse the offerings in the provided container catalog by selecting From Catalog and then for example, Middleware to view the offerings available:


Looking to get started with an example usage, try the Red Hat Process Automation Manager or Red Hat Decision Manager examples that leverage the provided developer catalog container images. You can also explore how an existing project is setup using one of the developer catalog container images with a human resources employee rewards project.

This concludes the installation and tour of an OpenShift Container Platform on our local machine using CodeReady Containers.

What about Windows?

If you are a sharp observer, you'll notice there is a file called for windows platforms to install with. The problem is I've not been able to test this yet on a windows machine, so I'd love to call out to the readers out there that might have some time to contribute to test this script and help us complete the installation. You'll notice a few TODO's marked in the scripts code, as they are untested areas in the installation.

You can raise new issues here and help us complete the windows based installation and get your name added to the contributors list. We'd be really thankful!

Stay tuned for more on cloud-native development using other Red Hat technologies on your new OpenShift Container Platform installed locally on your own machine!

Container OpenShift Machine

Published at DZone with permission of Eric D. Schabell, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Openshift Sandbox/Kata Containers
  • OpenShift Container Platform 3.11 Cost Optimization on Public Cloud Platforms
  • Pulling Images from External Container Registry to OpenShift Cluster via ImageStream
  • A Guide to Container Runtimes

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!