Setting up a Local Development Environment
You can use Red Hat CodeReady Containers (CRC) to set up a local development environment suitable for running this quickstart.
About CodeReady Containers
Red Hat CodeReady Containers (CRC) is the quickest way to get started building OpenShift clusters. It is designed to run on a local computer to simplify setup and testing, and emulate the cloud development environment locally with all of the tools needed to develop container-based applications.
Prerequisites
- A Red Hat Developer account.
- Hardware - at least 8 cpu cores and 32 GiB RAM.
Instructions
- Install CRC
crc setup
- Do step this BEFORE you run crc start. Configure CRC with enough resources to run the quickstart:
crc config set memory 24576
crc config set cpus 7
crc start
- This can take 10 minutes or more depending on your environment.- Login to OpenShift as kubeadmin using the
oc
cli. Refer to the output ofcrc console --credentials
- (Optional) Follow the instructions in the section below to create a default StorageClass.
- Run
crc console
to open the OpenShift web console. - Login to the web console as kubeadmin (see the
crc console --credentials
output for the password). - You can now proceed with the Getting Started section of the quickstart README.
Creating a Default Storage Class
A fresh installation of CodeReady Workspaces does not include any StorageClass resource objects. You can still create PVs and PVCs, but any applications that look specifically for StorageClasses will not find them. This is a minor problem for OpenShift Pipelines. Unless you fix it, any pipeline that you start manually from the Developer Console will fail hang because the first Pod that uses a PersistentVolume will not start, because it has been assigned a StorageClass that does not exist, because the console was not able to failed StorageClasses using the k8s API and defaulted to trying one that does not exist in CRC.
To create a default StorageClass and fix the issue:
- Clone this git repository.
git clone https://github.com/ploigos/argocd-tekton-reference.git
- In the terminal, change directories to the root of the cloned repository.
cd argocd-tekton-reference/
- Login to OpenShift as kubeadmin using the
oc
cli. Refer to the output ofcrc console --credentials
- Create a StorageClass, with an annotation that makes it the default
oc create -f hack/default-storageclass.yml