You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extract the CRC installation tarball tar xvf ~/Downloads/crc-linux-amd64.tar.xz
Establish a $PATH-accessible folder for your local binaries: mkdir -p ~/.local/bin
Export CRC_RELEASE export CRC_RELEASE=2.10.1 and OS_RELEASE export OPENSHIFT_RELEASE=4.11.7
Move the CRC executable to a PATH accessible location: mv ~/Downloads/crc-linux-${CRC_RELEASE}-amd64/crc ~/.local/bin
Run crc setup to download the latest CRC qcow2 VM image to your local machine
The extracted VM disk image should be visible here: cd ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/ && ls -alh
Convert the image to RAW format: qemu-img convert -O raw ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/crc.qcow2 ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/disk.raw
Tar the raw disk image tar cvf crc.tar disk.raw
Compress the tarball: gzip crc.tar
Check to make sure the tarball includes a single file named disk.raw: tar tfz crc.tar.gz
Import the raw CRC disk image to GCP
Try listing images from the command line. This step should give you an opportunity to enable the Compute API for your project: gcloud compute images list --no-standard-images | grep openshift.
export CRC_DASH_RELEASE=2-10-1
export OPENSHIFT_DASH_RELEASE=4-11-7
Use Google Cloud Storage to create a new storage bucket for the raw image: gsutil mb -l europe-west1 gs://openshift-${OPENSHIFT_DASH_RELEASE}
Upload the raw image to the new cloud storage bucket gsutil cp ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/crc.tar.gz gs://openshift-${OPENSHIFT_DASH_RELEASE}
Review what you've uploaded to the bucket: gcloud alpha storage ls gs://openshift-${OPENSHIFT_DASH_RELEASE}
After the upload has completed, create a new Image in region europe-west1 by selecting it from the bucket gs://openshift-${OPENSHIFT_DASH_RELEASE}: gcloud compute images create --storage-location europe-west1 openshift-${OPENSHIFT_DASH_RELEASE}-disk --source-uri gs://openshift-${OPENSHIFT_DASH_RELEASE}/crc.tar.gz
Confirm that the new image is available in GCP: gcloud compute images list --no-standard-images | grep openshift
GCP Image Build
Establish a build script and automation for converting the image ending with "-disk" into a pre-booted image with a name that ends with "-GUID" (use GCP cloud build, packer, or ssh?). The "-GUID" version will be booted by instruqt
Launch a GCE instace using the new image: gcloud compute instances create openshift-${OPENSHIFT_DASH_RELEASE}-build --image openshift-${OPENSHIFT_DASH_RELEASE}-disk --zone=europe-west1-c --machine-type n1-standard-8
Wait for the VM to shut down, then generate a new image from the updated VM disk gcloud compute images create openshift-${OPENSHIFT_DASH_RELEASE}-GUID --project=rhd-devx-instruqt --source-disk=openshift-${OPENSHIFT_DASH_RELEASE}-build --source-disk-zone=europe-west1-c --storage-location=europe-west1
About CRC VM image extraction step I think you don't need the vpn to download the bundle because after crc release it is publicly available and if you want some different bundle then only use vpn and get the linux bundle from internal server http://cdk-builds.usersys.redhat.com/builds/crc/bundles/openshift/ location.
Downloading bundle for a latest crc release should be simply.
Document the image build process (#88)
CRC tarball -> crc binary -> crc.qcow2 -> disk.raw -> crc.tar.gz -> GCP Image (build) -> GCP Image (GUID) -> GCP instance (launched via instruqt) -> GCP instance (READY)
Solution Outline:
GCP setup
gcloud auth login
gcloud config set project rhd-devx-instruqt
CRC VM image extraction
Image Extraction workflow (tested on Fedora35):
tar xvf ~/Downloads/crc-linux-amd64.tar.xz
$PATH
-accessible folder for your local binaries:mkdir -p ~/.local/bin
export CRC_RELEASE=2.10.1
and OS_RELEASEexport OPENSHIFT_RELEASE=4.11.7
mv ~/Downloads/crc-linux-${CRC_RELEASE}-amd64/crc ~/.local/bin
crc setup
to download the latest CRC qcow2 VM image to your local machinecd ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/ && ls -alh
qemu-img convert -O raw ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/crc.qcow2 ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/disk.raw
tar cvf crc.tar disk.raw
gzip crc.tar
disk.raw
:tar tfz crc.tar.gz
Import the raw CRC disk image to GCP
Try listing images from the command line. This step should give you an opportunity to enable the Compute API for your project:
gcloud compute images list --no-standard-images | grep openshift
.export CRC_DASH_RELEASE=2-10-1
export OPENSHIFT_DASH_RELEASE=4-11-7
Use Google Cloud Storage to create a new storage bucket for the raw image:
gsutil mb -l europe-west1 gs://openshift-${OPENSHIFT_DASH_RELEASE}
Upload the raw image to the new cloud storage bucket
gsutil cp ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/crc.tar.gz gs://openshift-${OPENSHIFT_DASH_RELEASE}
Review what you've uploaded to the bucket:
gcloud alpha storage ls gs://openshift-${OPENSHIFT_DASH_RELEASE}
After the upload has completed, create a new Image in region
europe-west1
by selecting it from the bucketgs://openshift-${OPENSHIFT_DASH_RELEASE}
:gcloud compute images create --storage-location europe-west1 openshift-${OPENSHIFT_DASH_RELEASE}-disk --source-uri gs://openshift-${OPENSHIFT_DASH_RELEASE}/crc.tar.gz
Confirm that the new image is available in GCP:
gcloud compute images list --no-standard-images | grep openshift
GCP Image Build
Establish a build script and automation for converting the image ending with "-disk" into a pre-booted image with a name that ends with "-GUID" (use GCP cloud build, packer, or ssh?). The "-GUID" version will be booted by instruqt
gcloud compute instances create openshift-${OPENSHIFT_DASH_RELEASE}-build --image openshift-${OPENSHIFT_DASH_RELEASE}-disk --zone=europe-west1-c --machine-type n1-standard-8
ssh -i ~/.crc/cache/crc_libvirt_${OPENSHIFT_RELEASE}_amd64/id_ecdsa_crc core@EXTERNAL_IP
sudo su -
then run the following script: https://github.com/openshift-labs/learn-instruqt/blob/main/scripts/build/setup.shsystemctl reset-failed
exit
openshift-config
namespace:https://github.com/openshift-labs/learn-instruqt/blob/main/scripts/pullsecret.json
sudo chown core.core /var/lib/kubelet/config.json
export KUBECONFIG=/opt/kubeconfig
oc delete secret pull-secret -n openshift-config && oc create secret generic pull-secret --from-file=.dockerconfigjson=/var/lib/kubelet/config.json --type=kubernetes.io/dockerconfigjson -n openshift-config
admin
,developer
, anduser1
accounts: https://github.com/openshift-instruqt/instruqt/pull/117/files#diff-e438bfd9dad2f72ff1626b329d6d466d2afc779b8209f3866498f64fd1742dc0R42-R68history -c
sudo shutdown -h now
gcloud compute images create openshift-${OPENSHIFT_DASH_RELEASE}-GUID --project=rhd-devx-instruqt --source-disk=openshift-${OPENSHIFT_DASH_RELEASE}-build --source-disk-zone=europe-west1-c --storage-location=europe-west1
Optimization goals
Client Image Build
Image startup optimizations
The text was updated successfully, but these errors were encountered: