Running Openshift Console locally with CodeReady Containers is really nice and fast! It is very useful for developers/designers looking to test and create new components.
- Openshift Console - Theres a good chance you already have it! :)
- Red Hat Account, Sudo rights
Download CRC - https://cloud.redhat.com/openshift/install/crc/installer-provisioned
Navigate to the link above and login with your Red Hat account.
On the bottom of the page you will see the following section, make sure you save your pull secret.
# Open a terminal in the extracted archive folder and run the following
sudo mv crc /usr/local/bin/
# setup will ask you for the pull secret and your sudo password
crc setup
# initiate the cluster
crc start
# change this according to the latest STABLE version
export KUBEVIRT_VERSION=v0.35.0
export CDI_VERSION=$(curl -s https://github.com/kubevirt/containerized-data-importer/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*")
# Create openshift-cnv namespace for Integration Tests
oc create namespace openshift-cnv
# Deploy Kubevirt, Storage, CDI Pods
oc create -f https://github.com/kubevirt/kubevirt/releases/download/$KUBEVIRT_VERSION/kubevirt-operator.yaml
oc create -f https://github.com/kubevirt/kubevirt/releases/download/$KUBEVIRT_VERSION/kubevirt-cr.yaml
oc create -f https://raw.githubusercontent.com/kubevirt/kubevirt.github.io/master/labs/manifests/storage-setup.yml
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator.yaml
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-cr.yaml
# Deploy Common Templates
oc project openshift
oc create -f https://raw.githubusercontent.com/MarSik/kubevirt-ssp-operator/master/roles/KubevirtCommonTemplatesBundle/files/common-templates-v0.8.1.yaml
oc project default
This part is required only for working on Integration Tests. Create a YAML file
apiVersion: v1
kind: ConfigMap
metadata:
name: kubevirt-storage-class-defaults
namespace: openshift-cnv
data:
accessMode: ReadWriteOnce
volumeMode: Filesystem
Import it
kubectl create -f file.yaml
# if needed, after reboot or crc stop, run crc start again.
# get credentials
crc console --credentials
oc login -u kubeadmin -p # use the provided credentials from the last cmd.
Once all pods are deployed we can initiate our bridge connection
yarn dev # inside frontend/
source ./contrib/oc-environment.sh && ./bin/bridge --k8s-mode-off-cluster-thanos=$(oc -n openshift-monitoring get configmap sharing-config -o jsonpath='{.data.prometheusURL}')