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.
-
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 clickingDownload CodeReady Containers
. You will also need to download your pull secret, and keep that in a safe place. -
Extract the downloaded file into a directory of your choice.
You may also wish to add this directory to your path so that you can run the
crc
command from anywhere. -
Enable Cluster Monitoring, which is required for tests to pass by running the following command:
crc config set enable-cluster-monitoring true
-
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
-
Set the
QUAY_NAMESPACE
environment variable to your quay username:export QUAY_NAMESPACE=<quay-username>
-
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:
Click on the repository name, then click on the settings icon:
Scroll down to the Repository Visibility section, and ensure the repository is set to public:
-
Start the CRC container by executing
crc start
. This will take a few minutes to complete, and the output should look something like this:
Take note of the oc login…
command shown in the output.
-
Execute the following command to set up the necessary environment variables:
eval $(crc oc-env)
-
Log into the cluster by executing the
oc login
command as shown in the resulting output from runningcrc start
in the previous step. The output should look something like this: -
Check out the CodeReady Toolchain
host-operator
andmember-operator
repositories and ensure that they are located at the same directory level as thetoolchain-e2e
repository. -
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
: