ocp-power-automation/ocp4-upi-powervs

Use 4.11 RHCOS image from the http or respective regions for the image import

mkumatag opened this issue · 11 comments

Now RHCOS images are published via RHCOS pipeline, so we need to use them instead of convert/import from qcow2

ref: https://github.com/openshift/installer/blob/046469ced964f4a70722a77ca271ea6d948998e7/data/data/coreos/rhcos.json#L247:L304

Following details should be provided by the user through var.tfvars
import_image - true/false (default=false). If this is true, image will be imported from cloud oject storage to PVS and below parameters should be provided by user.
bucket_region
bucket_name
bucket_access - public/private (default=public). If this is private, access_key and secret_key should be provided.
image_filename
image_access_key
image_secret_key
image_storage_pool - tier1/tier3 (default=tier1)

We just need to update docs/ocp_prereqs_powervs.md to point the RHCOS .ova location, so it can be directly downloaded, no convert steps required. Is that right, @mkumatag ?

We just need to update docs/ocp_prereqs_powervs.md to point the RHCOS .ova location, so it can be directly downloaded, no convert steps required. Is that right, @mkumatag ?

yes, you are right.. the steps like convert, upload not required. We can directly import from the bucket now.

Following details should be provided by the user through var.tfvars
import_image - true/false (default=false). If this is true, image will be imported from cloud oject storage to PVS and below parameters should be provided by user.
bucket_region
bucket_name
bucket_access - public/private (default=public). If this is private, access_key and secret_key should be provided.
image_filename
image_access_key
image_secret_key
image_storage_pool - tier1/tier3 (default=tier1)

What are these variables? do we have these somewhere already defined and handled?

These are the parameters needed by terraform provider to create an image from .owa.gz file available in Cloud Object storage.
So user has to provide these details and respective changes needs to be implemented. We do not have these variables readily available in this repo.

These are the parameters needed by terraform provider to create an image from .owa.gz file available in Cloud Object storage.
So user has to provide these details and respective changes needs to be implemented. We do not have these variables readily available in this repo.

I see, we need to explore a way to get this added into the current flow, also possible to this information from the release image itself.

only two additional variables needed to import the ova.gz image:

  1. ova.gz file name: rhcos_ova_file = "rhcos-410-84-202110131403-0-ppc64le-powervs.ova"
  2. disk type: rhcos_disk_type = "tier1" or "tier3"
    the local.vpc_region can be derived from var.ibmcloud_region

resource "ibm_pi_image" "boot_image" {
pi_image_name = "${var.name_prefix}rhcos-image"
pi_cloud_instance_id = var.service_instance_id
pi_image_bucket_name = "rhcos-powervs-images-${local.vpc_region}"
pi_image_bucket_access = "public"
pi_image_bucket_region = local.vpc_region
pi_image_bucket_file_name = var.rhcos_ova_file
pi_image_storage_type = var..rhcos_disk_type
}

/assign

There is an issue opened regarding the import of COS images from publicly accessible buckets.
PowerVS issue: https://jsw.ibm.com/browse/POWERIAAS-5698

Due to this, facing issue while downloading image from object storage through terraform provider.

Fixed with PR #412