{"id":16144316,"url":"https://github.com/ryanj/packer-openshift","last_synced_at":"2026-01-20T05:01:52.486Z","repository":{"id":66461870,"uuid":"395103807","full_name":"ryanj/packer-openshift","owner":"ryanj","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-30T18:21:21.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T20:15:13.931Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-11T20:03:17.000Z","updated_at":"2021-08-30T18:21:24.000Z","dependencies_parsed_at":"2023-03-08T15:00:53.506Z","dependency_job_id":null,"html_url":"https://github.com/ryanj/packer-openshift","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryanj/packer-openshift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fpacker-openshift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fpacker-openshift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fpacker-openshift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fpacker-openshift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanj","download_url":"https://codeload.github.com/ryanj/packer-openshift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanj%2Fpacker-openshift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28596087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T00:12:33.995Z","updated_at":"2026-01-20T05:01:52.469Z","avatar_url":"https://github.com/ryanj.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenShift images for Instruqt\n\nThis is a work-in-progress doc where we are sharing our own experiences of building a CRC/OpenShift image for the Instruqt platform using Packer/GCE.\n\n## Extracting qcow2 and generating a vmdk image\n\nOnce you download [CRC](https://developers.redhat.com/products/codeready-containers/overview) on your machine and do a `crc setup`, the binary extracts a qcow2 image on your machine (refer to the exact path in the command below). Google Compute Engine expects a vmdk image rather than a qcow2 image so use the following command for conversion:\n\n```\n$ qemu-img convert -f qcow2 -O vmdk -o subformat=streamOptimized,compat6 ~/.crc/cache/crc_libvirt_4.8.4/crc.qcow2 crc-1.31.vmdk\n```\n\n## Getting the local vmdk image to GCE images\n\nIn order to upload the resulting image to google cloud storage, from your Google project, navigate to **Storage** --\u003e **Cloud Storage** --\u003e **Browser**\n\nFollowing the default settings, create a bucket. \n\nOnce inside the bucket, you can upload files and select the vmdk image from the previous step.\n\nOnce the vmdk file is uploaded, from Google Compute Engine --\u003e Storage --\u003e Images --\u003e Create Image and follow the screenshot below to import the image from the bucket.\n\n![Importing image from the Google Cloud bucket](assets/gcloud-bucket.png)\n\nOnce the image is successfully import, you'll be able to view it from the following command:\n\n```\ngcloud compute images list\n```\n\n:costruction: It is important to set the image family name. In the packer file, image family name can be used instead of the exact image name. For example, if Packer cannot find an image called *crc-13120build2* under your GCE images, it can search from all the images that match a family name *crc*. \n\n## Google Cloud and Packer setup\n\nInstruqt runs their VMs on [GCE](https://cloud.google.com/compute) and they use [Packer](https://www.packer.io/) If you haven't already, create a Google Cloud account and download/install Packer.\n\nThis guide assumes that you're executing the commands from your own terminal and not the Google Cloud console terminal (which already authenticates you). \n\nGCloud Pre-requisites:\n\n1. python3.8 or newer is required. reboot after installing python3\n2. install the gcloud client (brew or rpm)\n3. Create a new project for this work in Google Cloud\n4. run `gcloud init` to authenticate and select your project id\n5. Check to make sure you have the following services enabled:\n  * https://console.cloud.google.com/marketplace/product/google/compute.googleapis.com\n  * https://console.cloud.google.com/marketplace/product/google/cloudbuild.googleapis.com\n6. Create a custom service account for Packer and assign it 'Compute Instance Admin (v1)' \u0026 'Service Account User' roles. Name: packer-svc-account\n\n## Configuring a GCloud serviceaccount\n\nCreate a new service account? (packer-svc-account)\n\n```\n$ export PROJECT=YOUR_PROJECT_ID\n\n$ gcloud iam service-accounts create packer-svc-account \\\n  --project $PROJECT \\\n  --description=\"Packer Service Account\" \\\n  --display-name=\"Packer Service Account\"\n\n$ gcloud projects add-iam-policy-binding $PROJECT \\\n    --member=serviceAccount:packer-svc-account@$PROJECT.iam.gserviceaccount.com \\\n    --role=roles/compute.instanceAdmin.v1\n\n$ gcloud projects add-iam-policy-binding $PROJECT \\\n    --member=serviceAccount:packer-svc-account@$PROJECT.iam.gserviceaccount.com \\\n    --role=roles/iam.serviceAccountUser\n\n$ gcloud projects add-iam-policy-binding $PROJECT \\\n    --member=serviceAccount:packer-svc-account@$PROJECT.iam.gserviceaccount.com \\\n    --role=roles/iap.tunnelResourceAccessor\n\n$ gcloud iam service-accounts keys create packer-svc-account-instruqt-keys.json --iam-account=packer-svc-account@$PROJECT.iam.gserviceaccount.com\n\n$ export GOOGLE_APPLICATION_CREDENTIALS=packer-svc-account-instruqt-keys.json\n```\n\n---\n\nThe latest build preview available here: https://storage.googleapis.com/crc-vm/crc-1.31.vmdk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Fpacker-openshift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanj%2Fpacker-openshift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanj%2Fpacker-openshift/lists"}