Skip to content

podvm: Enable se image build for rhel with and without --no-verify #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions config/peerpods/podvm/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,22 @@ to edit policy.conf"
error_exit "Error: HKD is not present."
else
echo "$HOST_KEY_CERTS" >>"${podvm_dir}/files/HKD.crt"
if [[ "$SE_VERIFY" == "true" ]]; then
curl -o "${podvm_dir}/files/ibm-z-host-key-signing-gen2.crt" "https://www.ibm.com/support/resourcelink/api/content/public/ibm-z-host-key-signing-gen2.crt"
if [[ $? -ne 0 ]]; then
error_exit "Error: Failed to download ibm-z-host-key-signing-gen2.crt."
fi

curl -o "${podvm_dir}/files/DigiCertCA.crt" "https://www.ibm.com/support/resourcelink/api/content/public/DigiCertCA.crt"
if [[ $? -ne 0 ]]; then
error_exit "Error: Failed to download DigiCertCA.crt."
fi

curl -o "${podvm_dir}/files/ibm-z-host-key-gen2.crl" "https://www.ibm.com/support/resourcelink/api/content/public/ibm-z-host-key-gen2.crl"
if [[ $? -ne 0 ]]; then
error_exit "Error: Failed to download ibm-z-host-key-gen2.crl."
fi
fi
fi
fi

Expand Down
6 changes: 6 additions & 0 deletions config/peerpods/podvm/libvirt-podvm-image-cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ data:

# To Enable SE for IBM Z
SE_BOOT: "true"

# To enable SE verification on IBM Z
SE_VERIFY: "true"

# For Pre-built PodVM images.
PODVM_IMAGE_URI: "" # eg: oci::quay.io/openshift_sandboxed_containers/libvirt-podvm-image:latest::/image/podvm.qcow2

# Name of PodVM qcow2 to be built.
IMAGE_NAME: "podvm-image"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is IMAGE_NAME used in libvirt handler ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is being referenced in cloud-api-adaptor https://github.com/confidential-containers/cloud-api-adaptor/blob/0fb6afebc06909a2a6da62f389bb3abe5eda05f2/src/cloud-api-adaptor/podvm/Makefile.inc#L70
without this parameter the image creation jobs fails.
Makefile.inc:77: *** Failed to derive an image name. Explicitly define IMAGE_NAME. Stop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For other providers we are setting IMAGE_NAME in the handler code. You may want to check that to be sure..