Skip to content

OlGe404/codereadycontainers

Repository files navigation

CodeReadyContainers

This repo can be used to setup a local code ready containers (CRC) installation (openshift 4 equivalent) on Ubuntu/Debian.

Requirements

To install CRC with this repo, you need:

The cluster monitoring is disabled by default, because it increases resource consumption by ~50%. To enable it, provide the -e crc_cluster_monitoring=true arg when calling the playbook. The CPU/memory settings can be overwritten by providing -e crc_cluster_cpus=<cpu_count> or -e crc_cluster_memory=<memory_in_gib> when calling the playbook.

Install

When you've created a redhat account and downloaded the pullsecret file, run:

  • python3 -m venv .venv && source .venv/bin/activate
  • pip install --upgrade pip setuptools wheel
  • pip install -r requirements.txt
  • ansible-playbook install.yaml

NOTE: If passwordless sudo is disabled, force ansible to ask for your sudo password by appending -K or --ask-become-pass to the ansible-playbook install.yaml command.

Known Issues

If the installation fails, it can get stuck and prevent new installations to run succesfully. If you have trouble running the playbook consecutively after an installation failed, or if the crc VM doesn't come up, see crc-org/crc#1027 for more information on how to resolve this.

# TL;DR
crc delete --force
sudo virsh list --all
sudo virsh destroy crc
sudo virsh undefine crc

Deinstall

To deinstall CRC, run ansible-playbook deinstall.yaml. If passwordless sudo is disabled, run ansible-playbook deinstall.yaml -K instead.

Update

If you want to update an existing CRC installation to a new release, set the new version in the vars.yaml file and run ansible-playbook update.yaml. You can find the available versions at https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/crc/.

WARNING: By the time of writing, there is no way to update an existing CRC installation in place, so we have to deinstall/install the current CRC installation. This will delete the CRC instance including all data and deployments in it.

Work with CRC

The CRC installation will be up and running after the installation, but is not added to your systems autostart. You can use the following commands to start/stop/interact with it.

Command Description
crc status Display the status of the current CRC installation
crc start Start a stopped CRC installation
crc stop Stop a started CRC installation
crc console Open thh webconsole in browser

About

Install and setup a local code ready containers installation (openshift 4 equivalent) on ubuntu.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •