From 3f559c3c1ea2979d3770fa8a76ce1fe95b8b525e Mon Sep 17 00:00:00 2001 From: Andrii Ostapenko Date: Fri, 19 Feb 2021 14:14:37 -0600 Subject: [PATCH] Implements custom QCOW delivery With this commit QCOW images are pulled as a docker image to new qcow-bundle container within ironic pod and copy them to shared ironic volume to be served to hosts. Also squashed with [0], manifests are adjusted to consume new QCOWs and old QCOW related funtionality is removed. [0] https://review.opendev.org/c/airship/airshipctl/+/776270 Co-Authored-By: Alexey Odinokov Co-Authored-By: Craig Anderson Change-Id: I958184b34ae94206bc5e87993e9287587b6a11d9 Signed-off-by: Andrii Ostapenko --- .../function/baremetal-operator/ironic.yaml | 10 ++++ .../function/k8scontrol/controlplane.yaml | 31 ++--------- .../test-site/target/catalogues/hosts.yaml | 6 +-- .../catalogues/versions-airshipctl.yaml | 4 +- .../provision/kubeadmconfigtemplate.yaml | 53 ++++--------------- .../provision/metal3machinetemplate.yaml | 4 +- .../replacements/workers-env-vars.yaml | 12 +++-- playbooks/airship-airshipctl-build-gate.yaml | 6 +-- tools/deployment/30_deploy_controlplane.sh | 18 ------- 9 files changed, 42 insertions(+), 102 deletions(-) diff --git a/manifests/function/baremetal-operator/ironic.yaml b/manifests/function/baremetal-operator/ironic.yaml index cef93433f..ebdeb5f91 100644 --- a/manifests/function/baremetal-operator/ironic.yaml +++ b/manifests/function/baremetal-operator/ironic.yaml @@ -59,6 +59,16 @@ spec: - name: ironic-entrypoints mountPath: /bin/init-images subPath: init-images + - name: qcow-bundle + command: + - sh + - -c + - "cp /qcows/*.qcow2 /qcows/*.qcow2.md5sum /shared/html/images/" + image: "quay.io/airshipit/qcow-bundle:latest-ubuntu_focal" + imagePullPolicy: Always + volumeMounts: + - mountPath: "/shared" + name: ironic-storage containers: - name: dnsmasq image: "quay.io/metal3-io/ironic:latest" diff --git a/manifests/function/k8scontrol/controlplane.yaml b/manifests/function/k8scontrol/controlplane.yaml index c5fd4d1ac..71d4d264d 100644 --- a/manifests/function/k8scontrol/controlplane.yaml +++ b/manifests/function/k8scontrol/controlplane.yaml @@ -22,34 +22,9 @@ spec: Environment="NO_PROXY=REPLACEMENT_NO_PROXY" # TODO: add download sources to the versions catalogue preKubeadmCommands: - - echo 'root:r00tme' | chpasswd - - echo 'ubuntu:r00tme' | chpasswd - - | - cat < ${TARGET_IMAGE_DIR}/target-image.qcow2.md5sum - echo "Create target k8s cluster resources" airshipctl phase run controlplane-ephemeral --debug