Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 3.62 KB

CRC.adoc

File metadata and controls

80 lines (52 loc) · 3.62 KB

Step by Step Guide - CRC (CodeReady Containers)

Important
CodeReady Containers includes an embedded system bundle that contains certificates which expire 30 days after the release. Because of this it is very important to always run the latest release of CRC.

CodeReady Containers is a distribution of OpenShift designed to be run on a development PC, and while some features have been disabled by default it is still quite demanding in terms of system resources, and for this reason it is recommended that it be installed on a machine that has at least 32GB of memory.

This guide will walk through the steps of downloading and install CRC, and running the e2e tests against local Codeready Toolchain host-operator and member-operator repositories.

  1. Download CodeReady Containers from developers.redhat.com. You will need to login using your Red Hat SSO account, after which you may click on the Install OpenShift on your laptop button which will take you to the download page for CRC. From here, select your OS before clicking Download CodeReady Containers. You will also need to download your pull secret, and keep that in a safe place.

    download
  2. Extract the downloaded file into a directory of your choice.

    extract crc

    You may also wish to add this directory to your path so that you can run the crc command from anywhere.

  3. Enable Cluster Monitoring, which is required for tests to pass by running the following command:

    crc config set enable-cluster-monitoring true

  4. Since cluster monitoring requires at least 14GB of virtual machine memory, you also need to increase the default by running the following command - the value here is sufficient but you may make it higher if desired:

    crc config set memory 14500

  5. Set the QUAY_NAMESPACE environment variable to your quay username:

    export QUAY_NAMESPACE=<quay-username>

  6. Ensure that the following Quay repositories are set to public:

    • host-operator

    • member-operator

    • member-operator-webhook

    • registration-service

You can find these on the Repository page at quay.io:

quay repo

Click on the repository name, then click on the settings icon:

quay repo detail

Scroll down to the Repository Visibility section, and ensure the repository is set to public:

quay repo visibility
  1. Start the CRC container by executing crc start. This will take a few minutes to complete, and the output should look something like this:

crc start output

Take note of the oc login…​ command shown in the output.

  1. Execute the following command to set up the necessary environment variables:

eval $(crc oc-env)

  1. Log into the cluster by executing the oc login command as shown in the resulting output from running crc start in the previous step. The output should look something like this:

    crc oc login
  2. Check out the CodeReady Toolchain host-operator and member-operator repositories and ensure that they are located at the same directory level as the toolchain-e2e repository.

  3. Change into the toolchain-e2e directory, and execute the tests. It is recommended that you direct console output to a text file, as the test output is of significant length and is likely to be longer than your console buffer:

    make test-e2e-local >testoutput.txt: