What is Code Ready Container(CRC)?
CodeReady Containers (CRC) is a tool developed by Red Hat that allows developers to easily set up a local, preconfigured OpenShift 4.x cluster on their personal computers. The primary purpose of CodeReady Containers is to provide developers with a consistent and easy-to-use environment for testing, development, and learning purposes without needing to access a remote OpenShift cluster.
OpenShift is a Kubernetes-based platform developed by Red Hat, offering a powerful container orchestration solution for deploying, managing, and scaling containerized applications. CodeReady Containers brings the OpenShift experience to your local machine, enabling you to work with the platform without needing a dedicated server or cloud resources.
CodeReady Containers is available for Windows, macOS, and Linux operating systems, and it comes bundled with a minimal version of OpenShift that includes the essentials needed for development and testing. By using CRC, developers can quickly create and test containerized applications, experiment with the OpenShift platform, and learn its features in a local and controlled environment.
How is CRC different from OpenShift?
CodeReady Containers (CRC) and OpenShift are related but serve different purposes. CRC is a tool designed to bring OpenShift to developers’ local machines, while OpenShift itself is a full-fledged container orchestration platform. Let’s explore the differences between the two:
Purpose:
OpenShift: It is a Kubernetes-based container platform for deploying, managing, and scaling containerized applications in a production environment. OpenShift extends Kubernetes with additional features like an integrated developer experience, built-in CI/CD pipelines, and advanced security features.
CRC: It is a tool for running a minimal, preconfigured OpenShift cluster on a local machine, primarily for development and testing purposes. CRC allows developers to work with OpenShift without needing a dedicated server or cloud resources.
Scope and scale:
OpenShift: Designed for large-scale, production deployments, OpenShift can manage complex applications with numerous microservices, running on multiple nodes and clusters. It provides advanced features and robust support for enterprises.
CRC: CRC is focused on single-node, local environments, making it suitable for individual developers and small teams. It is not designed to handle large-scale, production deployments.
Resource consumption:
OpenShift: As a container orchestration platform, OpenShift requires significant resources to run, often necessitating dedicated servers or cloud resources.
CRC: Since it is a local development tool, CRC is optimized for lower resource consumption, making it more suitable for running on personal computers.
Installation and setup:
OpenShift: Setting up an OpenShift cluster requires more time and effort, as it involves configuring and deploying multiple components, networking, and storage resources. It can be installed on-premises or on various cloud platforms.
CRC: CRC simplifies the installation and setup process by providing a preconfigured single-node OpenShift cluster. It is easy to install on Windows, macOS, and Linux and requires minimal configuration.
So, CRC is a lightweight tool designed to bring the OpenShift experience to local machines for development and testing purposes. In contrast, OpenShift itself is a comprehensive container orchestration platform suitable for large-scale, production environments. CRC is a part of the OpenShift ecosystem, allowing developers to work with OpenShift locally before deploying their applications to a full OpenShift cluster.
To install CodeReady Containers on Windows 10 Pro, follow the steps below:
Check system requirements:
Windows 10 (Pro, Enterprise, or Education) with Hyper-V enabled
A minimum of 4 virtual CPUs (vCPUs), 9 GB of free memory, and 35 GB of free disk space
A reliable internet connection
2. Download CodeReady Containers:
Go to the CodeReady Containers release page at https://github.com/code-ready/crc/releases.
Find the latest release and download the Windows executable (crc-windows-amd64.zip).
3. Extract the downloaded file:
Unzip the crc-windows-amd64.zip file.
Move the extracted folder to a convenient location on your computer. For example, you can place it in the C:\Program Files directory.
4. Add the crc executable to the PATH environment variable:
Open the “Environment Variables” window by searching for “Environment Variables” in the Start menu.
In the “System Variables” section, find and select the “Path” variable, then click on “Edit.”
Click on “New” and add the path to the crc executable, which should be in the folder you extracted in step 3. For example, if you placed the folder in C:\Program Files, the path would be C:\Program Files\crc-windows-amd64\.
5. Open a new Command Prompt or PowerShell window:
To apply the changes to the PATH environment variable, you need to open a new Command Prompt or PowerShell window.
6. Set up CodeReady Containers:
In the Command Prompt or PowerShell window, run the following command to set up the virtual machine and configure networking:
crc setup
7.Download the Pull Secret:
Visit the Red Hat CodeReady Containers page at https://cloud.redhat.com/openshift/install/crc/installer-provisioned.
Log in with your Red Hat account or create a new one if you don’t have one.
Click on the “Download Pull Secret” button to get your personalized pull secret in a JSON file.
8.Start the CodeReady Containers cluster:
In the Command Prompt or PowerShell window, run the following command:
crc start --pull-secret-file <path-to-your-pull-secret-file>
Replace <path-to-your-pull-secret-file> with the path to the JSON file you downloaded in step 7.
Wait for the command to finish. The process may take a while as it downloads the required images and sets up the cluster.
9.Access the OpenShift web console:
When the cluster is up and running, you can access the OpenShift web console using the URL and credentials provided in the command output.
That’s it! You have now successfully installed CodeReady Containers on your Windows 10 machine and can start working with your local OpenShift cluster.
If you have any questions or would like to learn more about related topics, feel free to reach out or follow me on my social media channels:
Connect with me on LinkedIn
Follow me on Twitter
Stay tuned for more insightful articles on Kubernetes, OpenShift, containerization technologies, Automation and DevOps.
Comments