From 99cd74af76ef2aa42daf9da8e06c82d8e90b37fa Mon Sep 17 00:00:00 2001 From: Abhinav Dahiya Date: Fri, 26 Apr 2019 09:25:58 -0700 Subject: [PATCH 1/2] templates/installer/e2e-metal: fix bootstrap_ip retrieval without the state file, terraform fails with error `The module root could not be found. There is nothing to output.` --- .../openshift/installer/cluster-launch-installer-metal-e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml index 4cded456dcc62..3954ebd0ee1f1 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml @@ -375,7 +375,7 @@ objects: if [ -f /tmp/artifacts/terraform/terraform.tfstate ] then - bootstrap_ip=$(terraform output -json | jq -r '.bootstrap_ip.value') + bootstrap_ip=$(terraform output -state /tmp/artifacts/terraform/terraform.tfstate -json | jq -r '.bootstrap_ip.value') if [ -n "${bootstrap_ip}" ] then From c85599a25b2420255e2db7448d71a7603032222a Mon Sep 17 00:00:00 2001 From: Abhinav Dahiya Date: Fri, 26 Apr 2019 09:39:40 -0700 Subject: [PATCH 2/2] templates/installer/e2e-metal: use the rhcos.json from upi-installer image to pick bootimage upi-installer image now includes the static rhcos.json [1], such that we that pickup the required bootimage asset location directly from it. [1]: https://github.com/openshift/installer/pull/1673 --- .../installer/cluster-launch-installer-metal-e2e.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml index 3954ebd0ee1f1..a0ad67724413f 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-metal-e2e.yaml @@ -191,8 +191,6 @@ objects: value: /etc/openshift-installer/matchbox-client.crt - name: MATCHBOX_CLIENT_KEY value: /etc/openshift-installer/matchbox-client.key - - name: RHCOS_BUILD_ID - value: "410.8.20190401.0" - name: CLUSTER_NAME value: ${NAMESPACE}-${JOB_NAME_HASH} - name: BASE_DOMAIN @@ -261,6 +259,9 @@ objects: cp -r /var/lib/openshift-install/upi/metal/* /tmp/artifacts/terraform/ cp /bin/terraform-provider-matchbox /tmp/artifacts/terraform/ + PXE_INITRD_URL="$(jq -r '.baseURI + .images["initramfs"].path' /var/lib/openshift-install/rhcos.json)" + PXE_KERNEL_URL="$(jq -r '.baseURI + .images["kernel"].path' /var/lib/openshift-install/rhcos.json)" + PXE_OS_IMAGE_URL="$(jq -r '.baseURI + .images["metal-bios"].path' /var/lib/openshift-install/rhcos.json)" cat > /tmp/artifacts/terraform/terraform.tfvars <<-EOF cluster_id = "${CLUSTER_NAME}" bootstrap_ign_file = "/tmp/artifacts/installer/bootstrap.ign" @@ -274,9 +275,9 @@ objects: matchbox_trusted_ca_cert = "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt" packet_project_id = "${PACKET_PROJECT_ID}" public_r53_zone = "${BASE_DOMAIN}" - pxe_initrd_url = "https://releases-rhcos.svc.ci.openshift.org/storage/releases/ootpa/${RHCOS_BUILD_ID}/rhcos-${RHCOS_BUILD_ID}-installer-initramfs.img" - pxe_kernel_url = "https://releases-rhcos.svc.ci.openshift.org/storage/releases/ootpa/${RHCOS_BUILD_ID}/rhcos-${RHCOS_BUILD_ID}-installer-kernel" - pxe_os_image_url = "https://releases-rhcos.svc.ci.openshift.org/storage/releases/ootpa/${RHCOS_BUILD_ID}/rhcos-${RHCOS_BUILD_ID}-metal-bios.raw" + pxe_initrd_url = "${PXE_INITRD_URL}" + pxe_kernel_url = "${PXE_KERNEL_URL}" + pxe_os_image_url = "${PXE_OS_IMAGE_URL}" worker_count = "3" worker_ign_file = "/tmp/artifacts/installer/worker.ign" EOF