Containers, Kubernetes, OpenShift on Power

 View Only

Import Pre-Built Red Hat CoreOS OVAs into PowerVS

By Christy Norman posted Tue August 06, 2024 03:00 PM

  
Power Virtual Server Logo

Quick blog post today that will hopefully save some folks some time and headaches. If you're installing an OpenShift cluster using UPI, you'll need to import the OS images into your workspace first. Thankfully, Red Hat builds images specifically for PowerVS, and even uploads them into regional COS buckets in IBM Cloud. All you have you do, then, is run an import command. You don't need to build one yourself. Here's the process!

Pre-Reqs:

  1. Identify the OpenShift release you're installing (e.g. 4.16)
  2. Identify the region into which you're installing (IOW, where your workspace will be).
    1. Note: PowerVS region & zone names are not identical to IBM Cloud VPC names. The COS buckets containing the OVAs have the VPC names. The table here lists them side-by-side:  https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-ibm-cloud-reg
  3. Install the openshift-install program from Red Hat using instructions for your desired release: https://docs.openshift.com/container-platform/4.16/installing/installing_platform_agnostic/installing-platform-agnostic.html#installation-obtaining-installer_installing-platform-agnostic
    1. Note: You'll be downloading from the "Run it Yourself" section: IBM PowerVS (ppc64le).
    2. Note: Be sure to download the correct architecture. If you're these commands on a Power system, select ppc64le from the drop-down after selecting IBM PowerVS (ppc64le).
      Detail to differentiate the power binary vs the x86 binary when installing OpenShift on Power
      Detail to differentiate the power binary vs the x86 binary when installing OpenShift on Power
  4. Install the ibmcloud CLI using instructions found here: https://cloud.ibm.com/docs/cli?topic=cli-getting-started
  5. Install the  pi plugin using instructions found here: https://cloud.ibm.com/docs/power-iaas-cli-plugin?topic=power-iaas-cli-plugin-ibmcloud-pi

Image Import Procedure:

  1. Run the following to get a list of all available images in all the regional COS buckets: openshift-install coreos print-stream-json | grep '\.ova.gz[^.]'
  2. Find the URL that corresponds to the regional bucket you want to use. Any will work, but for faster downloads, use the closest bucket to your PowerVS workspace region.
    1. For example: "url": "https://s3.au-syd.cloud-object-storage.appdomain.cloud/rhcos-powervs-images-au-syd/rhcos-416-94-202406251923-0-ppc64le-powervs.ova.gz" 
      1. rhcos-powervs-images-au-syd - bucket name (ending in region-name, au-syd)
      2. rhcos-416-94-202406251923-0-ppc64le-powervs.ova.gz - image file name
  3. Run the following to import the image into your workspace:
    1. ibmcloud pi ws target <workspace_crn>
    2. ibmcloud pi image-import --bucket rhcos-powervs-images-eu-de --image-file-name rhcos-416-94-202406251923-0-ppc64le-powervs.ova.gz --region au-syd --bucket-access public --job --os-type rhel --disk-type tier1 rhcos-416-94-202406251923-0-ppc64le-powervs

      You can set affinity instead of a disk type, and use a different bucket and region, but you have to use these flags as-is:
      --bucket-access public --job --os-type rhel

That's it! After about 10 minutes your image should have been download and imported into your workspace. You can verify by using the UI and viewing images in your workspace, or by using the CLI: ibmcloud pi image ls .

Permalink