diff --git a/ci-operator/config/openshift/multiarch/openshift-multiarch-master__nightly-4.15.yaml b/ci-operator/config/openshift/multiarch/openshift-multiarch-master__nightly-4.15.yaml index 67595a8db43d0..98c54cc57dd81 100644 --- a/ci-operator/config/openshift/multiarch/openshift-multiarch-master__nightly-4.15.yaml +++ b/ci-operator/config/openshift/multiarch/openshift-multiarch-master__nightly-4.15.yaml @@ -416,6 +416,19 @@ tests: NODE_TUNING: "true" TEST_TYPE: conformance-parallel workflow: openshift-e2e-libvirt +- as: ocp-e2e-ovn-remote-libvirt-s390x-heterogeneous + cluster: build01 + cron: 0 4,16 * * 1-5 + steps: + cluster_profile: libvirt-s390x-amd64 + dependencies: + OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: release:multi-latest + env: + ARCH: s390x + BRANCH: "4.15" + TEST_TYPE: conformance-parallel + USE_RAMFS: "true" + workflow: openshift-e2e-libvirt-upi-heterogeneous - as: ocp-heavy-build-ovn-remote-libvirt-s390x cluster: build01 cron: 0 12 * * 1-5 diff --git a/ci-operator/jobs/openshift/multiarch/openshift-multiarch-master-periodics.yaml b/ci-operator/jobs/openshift/multiarch/openshift-multiarch-master-periodics.yaml index 744b2afa85957..fcf32d05f5e5a 100644 --- a/ci-operator/jobs/openshift/multiarch/openshift-multiarch-master-periodics.yaml +++ b/ci-operator/jobs/openshift/multiarch/openshift-multiarch-master-periodics.yaml @@ -15778,6 +15778,88 @@ periodics: - name: result-aggregator secret: secretName: result-aggregator +- agent: kubernetes + cluster: build01 + cron: 0 4,16 * * 1-5 + decorate: true + decoration_config: + skip_cloning: true + extra_refs: + - base_ref: master + org: openshift + repo: multiarch + labels: + ci-operator.openshift.io/cloud: libvirt-s390x-amd64 + ci-operator.openshift.io/cloud-cluster-profile: libvirt-s390x-amd64 + ci-operator.openshift.io/cluster: build01 + ci-operator.openshift.io/variant: nightly-4.15 + ci.openshift.io/generator: prowgen + job-release: "4.15" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-multiarch-master-nightly-4.15-ocp-e2e-ovn-remote-libvirt-s390x-heterogeneous + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --secret-dir=/usr/local/ocp-e2e-ovn-remote-libvirt-s390x-heterogeneous-cluster-profile + - --target=ocp-e2e-ovn-remote-libvirt-s390x-heterogeneous + - --variant=nightly-4.15 + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /usr/local/ocp-e2e-ovn-remote-libvirt-s390x-heterogeneous-cluster-profile + name: cluster-profile + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: cluster-profile + secret: + secretName: cluster-secrets-libvirt-s390x-amd64 + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator - agent: kubernetes cluster: build04 decorate: true diff --git a/ci-operator/step-registry/openshift/e2e/libvirt/test/openshift-e2e-libvirt-test-commands.sh b/ci-operator/step-registry/openshift/e2e/libvirt/test/openshift-e2e-libvirt-test-commands.sh index 0f0b9e11307e2..4fa5d2cf135a7 100644 --- a/ci-operator/step-registry/openshift/e2e/libvirt/test/openshift-e2e-libvirt-test-commands.sh +++ b/ci-operator/step-registry/openshift/e2e/libvirt/test/openshift-e2e-libvirt-test-commands.sh @@ -8,7 +8,7 @@ export PATH=/usr/libexec/origin:$PATH # Initial check case "${CLUSTER_TYPE}" in -libvirt-ppc64le|libvirt-s390x|powervs*) +libvirt-ppc64le|libvirt-s390x*|powervs*) ;; *) >&2 echo "Unsupported cluster type '${CLUSTER_TYPE}'" diff --git a/ci-operator/step-registry/openshift/e2e/libvirt/upi/OWNERS b/ci-operator/step-registry/openshift/e2e/libvirt/upi/OWNERS new file mode 100644 index 0000000000000..68eeddf0cd187 --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/libvirt/upi/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers diff --git a/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/OWNERS b/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/OWNERS new file mode 100644 index 0000000000000..68eeddf0cd187 --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers diff --git a/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/openshift-e2e-libvirt-upi-heterogeneous-workflow.metadata.json b/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/openshift-e2e-libvirt-upi-heterogeneous-workflow.metadata.json new file mode 100644 index 0000000000000..e4f7fa6ad1997 --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/openshift-e2e-libvirt-upi-heterogeneous-workflow.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "openshift/e2e/libvirt/upi/heterogeneous/openshift-e2e-libvirt-upi-heterogeneous-workflow.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/openshift-e2e-libvirt-upi-heterogeneous-workflow.yaml b/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/openshift-e2e-libvirt-upi-heterogeneous-workflow.yaml new file mode 100644 index 0000000000000..fbe49dc535a2d --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/libvirt/upi/heterogeneous/openshift-e2e-libvirt-upi-heterogeneous-workflow.yaml @@ -0,0 +1,13 @@ +workflow: + as: openshift-e2e-libvirt-upi-heterogeneous + steps: + pre: + - chain: upi-libvirt-pre + - ref: upi-libvirt-install-heterogeneous + test: + - chain: openshift-e2e-libvirt-test + post: + - chain: upi-libvirt-post + documentation: |- + The UPI workflow provides pre- and post- steps that provision and + deprovision a multi-architecture compute OpenShift cluster on libvirt. \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/OWNERS b/ci-operator/step-registry/upi/libvirt/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/conf/OWNERS b/ci-operator/step-registry/upi/libvirt/conf/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/conf/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-commands.sh b/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-commands.sh new file mode 100755 index 0000000000000..2cd6c7a2bf631 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-commands.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + + +echo "Installing from initial release ${RELEASE_IMAGE_LATEST}" + +openshift-install version + +CONFIG="${SHARED_DIR}/install-config.yaml" + +CLUSTER_NAME="libvirt-s390x-amd64-0-0" +BASE_DOMAIN="ci" + +cat >> "${CONFIG}" << EOF +apiVersion: v1 +baseDomain: ${BASE_DOMAIN} +metadata: + name: ${CLUSTER_NAME} +controlPlane: + architecture: ${ARCH} + hyperthreading: Enabled + name: master + replicas: ${MASTER_REPLICAS} +compute: +- architecture: ${ARCH} + hyperthreading: Enabled + name: worker + replicas: 0 +networking: + clusterNetwork: + - cidr: 10.128.0.0/14 + hostPrefix: 23 + networkType: OVNKubernetes + serviceNetwork: + - 172.30.0.0/16 +platform: + none: {} +fips: false +pullSecret: > + $(<"${CLUSTER_PROFILE_DIR}/pull-secret") +sshKey: | + $(<"${CLUSTER_PROFILE_DIR}/ssh-publickey") +EOF \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-ref.metadata.json b/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-ref.metadata.json new file mode 100644 index 0000000000000..ed7bb0aefa57b --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-ref.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "upi/libvirt/conf/upi-libvirt-conf-ref.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-ref.yaml b/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-ref.yaml new file mode 100644 index 0000000000000..d5589e9100fb7 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/conf/upi-libvirt-conf-ref.yaml @@ -0,0 +1,27 @@ +ref: + as: upi-libvirt-conf + from: libvirt-installer + commands: upi-libvirt-conf-commands.sh + env: + - name: ARCH + - name: BRANCH + - name: MASTER_REPLICAS + default: "3" + resources: + requests: + cpu: 10m + memory: 100Mi + dependencies: + - name: "release:latest" + env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE + - name: "release:latest" + env: RELEASE_IMAGE_LATEST + dnsConfig: + nameservers: + - 172.30.38.188 + searches: + - "bastion-z.svc.cluster.local" + - "bastion-ppc64le-libvirt.svc.cluster.local" + documentation: >- + Generates the install-config.yaml file for a UPI installation with platform: none + and compute replicas: 0. diff --git a/ci-operator/step-registry/upi/libvirt/deprovision/OWNERS b/ci-operator/step-registry/upi/libvirt/deprovision/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/deprovision/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-commands.sh b/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-commands.sh new file mode 100644 index 0000000000000..285e05f36fe19 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-commands.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + +LIBVIRT_DOMAIN_NAME_SUFFIX="libvirt-s390x-amd64-0-0-ci" + +export LIBVIRT_DEFAULT_URI="qemu+tcp://lnxocp10:16509/system" + +DOMAINS_TO_DESTROY=$(virsh list --all --name | grep ${LIBVIRT_DOMAIN_NAME_SUFFIX}) +for domain in $DOMAINS_TO_DESTROY; do + virsh undefine "${domain}" + virsh destroy "${domain}" + virsh vol-delete --pool images "${domain}".qcow2 +done + +export LIBVIRT_DEFAULT_URI="qemu+tcp://xkvmocp04:16510/system" + +DOMAINS_TO_DESTROY=$(virsh list --all --name | grep ${LIBVIRT_DOMAIN_NAME_SUFFIX}) +for domain in $DOMAINS_TO_DESTROY; do + virsh undefine "${domain}" + virsh destroy "${domain}" + virsh vol-delete --pool default "${domain}".qcow2 +done \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-ref.metadata.json b/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-ref.metadata.json new file mode 100644 index 0000000000000..83065c18a3d91 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-ref.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "upi/libvirt/deprovision/upi-libvirt-deprovision-ref.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-ref.yaml b/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-ref.yaml new file mode 100644 index 0000000000000..3247849126b3f --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/deprovision/upi-libvirt-deprovision-ref.yaml @@ -0,0 +1,18 @@ +ref: + as: upi-libvirt-deprovision + from: libvirt-installer + grace_period: 10m + commands: upi-libvirt-deprovision-commands.sh + resources: + requests: + cpu: 1000m + memory: 300Mi + dnsConfig: + nameservers: + - 172.30.38.188 + searches: + - "bastion-z.svc.cluster.local" + - "bastion-ppc64le-libvirt.svc.cluster.local" + documentation: |- + Deprovisions the libvirt guests created by upi-libvirt-install and + upi-libvirt-install-heterogeneous. \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/OWNERS b/ci-operator/step-registry/upi/libvirt/install/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/heterogeneous/OWNERS b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-commands.sh b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-commands.sh new file mode 100755 index 0000000000000..eb333f48330e9 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-commands.sh @@ -0,0 +1,346 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + +if [ "${ADDITIONAL_WORKER_ARCHITECTURE}" != "x86_64" ]; then + echo "upi-libvirt-install-heterogeneous currently only supports x86_64 as additional multi-architecture compute node architecture" + exit 1 +fi + +CLUSTER_DOMAIN="libvirt-s390x-amd64-0-0.ci" +LIBVIRT_DOMAIN_NAME_SUFFIX="libvirt-s390x-amd64-0-0-ci" + +mkdir /tmp/bin +curl -o /tmp/bin/yq -L "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64" && chmod u+x /tmp/bin/yq +curl -o /tmp/bin/jq -L "https://github.com/jqlang/jq/releases/download/jq-${JQ_VERSION}/jq-linux-amd64" && chmod u+x /tmp/bin/jq + +echo "Downloading openshift client ${OPENSHIFT_CLIENT_VERSION}" +curl -o /tmp/openshift-client-linux.tar.gz -L https://mirror.openshift.com/pub/openshift-v4/multi/clients/ocp/${OPENSHIFT_CLIENT_VERSION}/amd64/openshift-client-linux.tar.gz +tar -xzvf /tmp/openshift-client-linux.tar.gz -C /tmp/bin oc && chmod u+x /tmp/bin/oc + +export PATH=/tmp/bin:$PATH + +function wait_for_domain_deletion() { + wait_until=$(($(date +%s) + 600)) + + echo "[$(date -Is)] waiting for domain $1 to be deleted, waiting until $(date -Is --date="@$wait_until")" + + until [ $((wait_until - $(date +%s))) -le 0 ] || ! (mock-nss.sh virsh domid "$1" > /dev/null 2>&1); do + sleep 5 + done + if [ $((wait_until - $(date +%s))) -le 0 ]; then + echo "Error, domain $1 was not deleted before timeout." + return 1 + fi + echo "Domain $1 was successfully deleted." + return 0 +} + +function approve_csrs() { + oc version --client + while true; do + if [[ ! -f /tmp/install-complete ]]; then + # even if oc get csr fails continue + oc get csr -ojson | jq -r '.items[] | select(.status == {} ) | .metadata.name' | xargs --no-run-if-empty oc adm certificate approve || true + sleep 15 & wait + continue + else + break + fi + done +} + +VOLUME_TEMPLATE_XML=$(cat < + + + + + + + 0644 + 0 + 0 + + + +EOF +) + +# Check if pool $1 contains file with name $2 +function check_exists_in_pool { + # check if file exists by checking if we can get vol-info without error + mock-nss.sh virsh vol-info --pool "$1" "$2" > /dev/null 2>&1 +} + +# Upload a local file to a libvirt pool +# $1 is the pool to upload to +# $2 is the path to the local file to upload +# $3 is the path the file should be placed on the remote server +# does not overwrite file if it already exists +function upload_to_pool { + local pool + local filepath + local filename + local targetPath + + pool="$1" + filepath="$2" + filename="$(basename "$2")" + targetPath="$3" + + if check_exists_in_pool "$pool" "$filename"; then + echo "${filepath} already exists on pool ${pool}, skipping upload" + return + fi + + echo "Uploading ${filepath} to ${pool}" + + # to get correct rights, we create the volume via an XML file instead of + # `virsh vol-create-as` + volume_xml_path=$(mktemp --tmpdir "$filename".xml.XXXXX) + <<<"$VOLUME_TEMPLATE_XML" yq -p=xml -o=xml \ + ".volume.name=\"$filename\" | \ + .volume.capacity=\"$(stat -c %s "$filepath")\" | \ + .volume.target.path=\"$targetPath\"" \ + > "$volume_xml_path" + + mock-nss.sh virsh vol-create --pool "$pool" --file "$volume_xml_path" + mock-nss.sh virsh vol-upload --pool "$pool" --vol "$filename" --file "$filepath" +} + +# Deletes file $2 from pool $1, if it exists. +function delete_from_pool_if_exists { + if check_exists_in_pool "$1" "$2"; then + echo "Volume $2 exists in pool $1, deleting" + mock-nss.sh virsh vol-delete --pool "$1" --vol "$2" + fi +} + +DOMAIN_TEMPLATE_XML=$(cat < + + + + + + + + + + hvm + + + + + + + + + + + + + + + + + /usr/libexec/qemu-kvm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /dev/urandom + + + +EOF +) + +HTTPD_BASE_URL="http://172.16.41.20:8080/" + + +# Prepare boot artifacts: +# +# We only upload the rootfs, which is the largest required image, +# to the httpd before calling virt-install and only once per RHCOS version. +# +# virt-install then downloads the initramfs and kernel and uploads them +# as temporary boot artifacts via libvirt for each machine that is booted. +KERNEL_URL=$(oc -n openshift-machine-config-operator get configmap/coreos-bootimages -o jsonpath='{.data.stream}' | jq -r ".architectures.$ADDITIONAL_WORKER_ARCHITECTURE.artifacts.metal.formats.pxe.kernel.location") +INITRAMFS_URL=$(oc -n openshift-machine-config-operator get configmap/coreos-bootimages -o jsonpath='{.data.stream}' | jq -r ".architectures.$ADDITIONAL_WORKER_ARCHITECTURE.artifacts.metal.formats.pxe.initramfs.location") +ROOTFS_URL=$(oc -n openshift-machine-config-operator get configmap/coreos-bootimages -o jsonpath='{.data.stream}' | jq -r ".architectures.$ADDITIONAL_WORKER_ARCHITECTURE.artifacts.metal.formats.pxe.rootfs.location") + +# TODO: fail if this goes wrong + +KERNEL_FILENAME=$(basename "$KERNEL_URL") +INITRAMFS_FILENAME=$(basename "$INITRAMFS_URL") +ROOTFS_FILENAME=$(basename "$ROOTFS_URL") + +if [[ $(dirname "$KERNEL_URL") != $(dirname "$INITRAMFS_URL") ]]; then + echo "Error, expected kernel and initramfs to have same base url, found:" + echo " $(dirname "$KERNEL_URL")" + echo " $(dirname "$INITRAMFS_URL")" + echo "Aborting" + exit 1 +fi + +export LIBVIRT_DEFAULT_URI="qemu+tcp://lnxocp10:16509/system" +# only download and transfer rootfs if it doesn't already exist on httpd +if check_exists_in_pool httpd "$ROOTFS_FILENAME"; then + echo "rootfs ($ROOTFS_FILENAME) already exists on httpd, skipping transfer" +else + echo "Downloading rootfs from $ROOTFS_URL" + curl -L "$ROOTFS_URL" -o "/tmp/$ROOTFS_FILENAME" + upload_to_pool httpd "/tmp/$ROOTFS_FILENAME" "/var/www/html/$ROOTFS_FILENAME" +fi + + +export LIBVIRT_DEFAULT_URI="qemu+tcp://xkvmocp04:16510/system" +HOST_BOOT_ARTIFACT_BASE=/var/lib/libvirt/boot/ +HOST_PATH_KERNEL=${HOST_BOOT_ARTIFACT_BASE}${KERNEL_FILENAME} +HOST_PATH_INITRAMFS=${HOST_BOOT_ARTIFACT_BASE}${INITRAMFS_FILENAME} + + +if check_exists_in_pool boot-scratch "$KERNEL_FILENAME"; then + echo "kernel ($KERNEL_FILENAME) already exists in boot-scratch, skipping transfer" +else + echo "Downloading kernel from $KERNEL_URL" + curl -o "/tmp/$KERNEL_FILENAME" -L "$KERNEL_URL" + upload_to_pool boot-scratch "/tmp/$KERNEL_FILENAME" "$HOST_PATH_KERNEL" +fi + +if check_exists_in_pool boot-scratch "$INITRAMFS_FILENAME"; then + echo "initramfs ($INITRAMFS_FILENAME) already exists in boot-scratch, skipping transfer" +else + echo "Downloading initramfs from $INITRAMFS_URL" + curl -o "/tmp/$INITRAMFS_FILENAME" -L "$INITRAMFS_URL" + upload_to_pool boot-scratch "/tmp/$INITRAMFS_FILENAME" "$HOST_PATH_INITRAMFS" +fi + +# Boot the cluster nodes + +# Define nodes to create +# if sleep_before_next_node is set, sleep for the specified time (see `man sleep`) +# before continuing to the next node +NODE_DEFINITIONS=$(cat < "$domain_xml_path" + + + echo "Creating domain" + mock-nss.sh virsh create "$domain_xml_path" --validate + + wait_for_domain_deletion "$node_name" + + echo "Domain was deleted, creating new domain ${node_name} that boots from disk" + domain_xml_path=$(mktemp --tmpdir domain-"${node_name}".xml.XXXXX) + <<<"$DOMAIN_TEMPLATE_XML" yq -p=xml -o=xml \ + ".domain.name=\"${node_name}\" | + .domain.memory=\"${DOMAIN_MEMORY}\" | + .domain.vcpu=\"${DOMAIN_VCPUS}\" | + .domain.os.boot.+@dev=\"hd\" | + .domain.devices.disk.source.+@file=\"${domain_qcow2_image_host_path}\" | + .domain.devices.interface.mac.+@address=\"${node_mac}\"" \ + > "$domain_xml_path" + + echo "Creating domain" + mock-nss.sh virsh define "$domain_xml_path" --validate + mock-nss.sh virsh start "$node_name" +done + +date "+%F %X" > "${SHARED_DIR}/CLUSTER_HETEROGENEOUS_INSTALL_START_TIME" + +echo "Approving pending CSRs" +export KUBECONFIG=${SHARED_DIR}/kubeconfig +approve_csrs & + +set +x +echo "Waiting for cluster operators to become ready." +oc adm wait-for-stable-cluster + +oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"managementState":"Managed","storage":{"emptyDir":{}}}}' +oc adm wait-for-stable-cluster + +oc config refresh-ca-bundle + +date "+%F %X" > "${SHARED_DIR}/CLUSTER_HETEROGENEOUS_INSTALL_END_TIME" + +touch /tmp/install-complete \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-ref.metadata.json b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-ref.metadata.json new file mode 100644 index 0000000000000..331b77202bde0 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-ref.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-ref.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-ref.yaml b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-ref.yaml new file mode 100644 index 0000000000000..ebe1d7b8bb241 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/heterogeneous/upi-libvirt-install-heterogeneous-ref.yaml @@ -0,0 +1,41 @@ +ref: + as: upi-libvirt-install-heterogeneous + from: libvirt-installer + commands: upi-libvirt-install-heterogeneous-commands.sh + env: + - name: ARCH + - name: BRANCH + - name: ADDITIONAL_WORKER_ARCHITECTURE + default: "x86_64" + documentation: "Heterogeneous worker architecture" + - name: OPENSHIFT_CLIENT_VERSION + default: 'candidate-4.15' + - name: YQ_VERSION + default: '4.40.2' + - name: JQ_VERSION + default: '1.7.1' + - name: DOMAIN_MEMORY + documentation: The memory to allocate for each guest, in KiB + default: '25156824' + - name: DOMAIN_DISK_SIZE + documentation: The disk size to allocate for each guest, in B + default: '107374182400' + - name: DOMAIN_VCPUS + documentation: Number of VCPUs to allocate for each guest + default: '6' + resources: + requests: + cpu: 10m + memory: 100Mi + dependencies: + - name: "release:latest" + env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE + - name: "release:latest" + env: RELEASE_IMAGE_LATEST + dnsConfig: + nameservers: + - 172.30.38.188 + searches: + - "bastion-z.svc.cluster.local" + - "bastion-ppc64le-libvirt.svc.cluster.local" + documentation: >- diff --git a/ci-operator/step-registry/upi/libvirt/install/install/OWNERS b/ci-operator/step-registry/upi/libvirt/install/install/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/install/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-commands.sh b/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-commands.sh new file mode 100755 index 0000000000000..8177b094cee8d --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-commands.sh @@ -0,0 +1,388 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + +if [ "${ARCH}" != "s390x" ]; then + echo "upi-libvirt-install-install currently only supports s390x as node architecture" + exit 1 +fi + +INSTALL_DIR="/tmp/installer" +mkdir -p $INSTALL_DIR +cp "${SHARED_DIR}/install-config.yaml" "${INSTALL_DIR}/" + +CLUSTER_DOMAIN="libvirt-s390x-amd64-0-0.ci" +LIBVIRT_DOMAIN_NAME_SUFFIX="libvirt-s390x-amd64-0-0-ci" + +mkdir /tmp/bin +curl -o /tmp/bin/yq -L "https://github.com/mikefarah/yq/releases/download/v${YQ_VERSION}/yq_linux_amd64" && chmod u+x /tmp/bin/yq +curl -o /tmp/bin/jq -L "https://github.com/jqlang/jq/releases/download/jq-${JQ_VERSION}/jq-linux-amd64" && chmod u+x /tmp/bin/jq + +echo "Downloading openshift client ${OPENSHIFT_CLIENT_VERSION}" +curl -o /tmp/openshift-client-linux.tar.gz -L https://mirror.openshift.com/pub/openshift-v4/multi/clients/ocp/${OPENSHIFT_CLIENT_VERSION}/amd64/openshift-client-linux.tar.gz +tar -xzvf /tmp/openshift-client-linux.tar.gz -C /tmp/bin oc && chmod u+x /tmp/bin/oc + +OCPINSTALL=openshift-install + +export PATH=/tmp/bin:$PATH + +function wait_for_domain_deletion() { + wait_until=$(($(date +%s) + 600)) + + echo "[$(date -Is)] waiting for domain $1 to be deleted, waiting until $(date -Is --date="@$wait_until")" + + until [ $((wait_until - $(date +%s))) -le 0 ] || ! (mock-nss.sh virsh domid "$1" > /dev/null 2>&1); do + sleep 5 + done + if [ $((wait_until - $(date +%s))) -le 0 ]; then + echo "Error, domain $1 was not deleted before timeout." + return 1 + fi + echo "Domain $1 was successfully deleted." + return 0 +} + +function approve_csrs() { + oc version --client + while true; do + if [[ ! -f /tmp/install-complete ]]; then + # even if oc get csr fails continue + oc get csr -ojson | jq -r '.items[] | select(.status == {} ) | .metadata.name' | xargs --no-run-if-empty oc adm certificate approve || true + sleep 15 & wait + continue + else + break + fi + done +} + +VOLUME_TEMPLATE_XML=$(cat < + + + + + + + 0644 + 0 + 0 + + + +EOF +) + +# Check if pool $1 contains file with name $2 +function check_exists_in_pool { + # check if file exists by checking if we can get vol-info without error + mock-nss.sh virsh vol-info --pool "$1" "$2" > /dev/null 2>&1 +} + +# Upload a local file to a libvirt pool +# $1 is the pool to upload to +# $2 is the path to the local file to upload +# $3 is the path the file should be placed on the remote server +# does not overwrite file if it already exists +function upload_to_pool { + local pool + local filepath + local filename + local targetPath + + pool="$1" + filepath="$2" + filename="$(basename "$2")" + targetPath="$3" + + if check_exists_in_pool "$pool" "$filename"; then + echo "${filepath} already exists on pool ${pool}, skipping upload" + return + fi + + echo "Uploading ${filepath} to ${pool}" + + # to get correct rights, we create the volume via an XML file instead of + # `virsh vol-create-as` + volume_xml_path=$(mktemp --tmpdir "$filename".xml.XXXXX) + <<<"$VOLUME_TEMPLATE_XML" yq -p=xml -o=xml \ + ".volume.name=\"$filename\" | \ + .volume.capacity=\"$(stat -c %s "$filepath")\" | \ + .volume.target.path=\"$targetPath\"" \ + > "$volume_xml_path" + + mock-nss.sh virsh vol-create --pool "$pool" --file "$volume_xml_path" + mock-nss.sh virsh vol-upload --pool "$pool" --vol "$filename" --file "$filepath" +} + +# Deletes file $2 from pool $1, if it exists. +function delete_from_pool_if_exists { + if check_exists_in_pool "$1" "$2"; then + echo "Volume $2 exists in pool $1, deleting" + mock-nss.sh virsh vol-delete --pool "$1" --vol "$2" + fi +} + +DOMAIN_TEMPLATE_XML=$(cat < + + + + + + + + + + hvm + + + + /usr/libexec/qemu-kvm + + + + + + + + + + + + + + + + + + + + /dev/urandom + + + +EOF +) + +HTTPD_BASE_URL="http://172.16.41.20:8080/" + + +echo "Creating manifests." +$OCPINSTALL create manifests --dir "${INSTALL_DIR}" + +echo "Setting mastersSchedulable to false in manifests/cluster-scheduler-02-config.yml" +yq -i '.spec.mastersSchedulable = false' "${INSTALL_DIR}"/manifests/cluster-scheduler-02-config.yml + +cp "${SHARED_DIR}/manifest_etcd-on-ramfs-mc.yml" "${INSTALL_DIR}/manifests/manifest_etcd-on-ramfs-mc.yml" + +echo "Creating and uploading ignition files." + +export LIBVIRT_DEFAULT_URI="qemu+tcp://lnxocp10:16509/system" +$OCPINSTALL create ignition-configs --dir "${INSTALL_DIR}" + +delete_from_pool_if_exists httpd "bootstrap.ign" +upload_to_pool httpd "${INSTALL_DIR}/bootstrap.ign" "/var/www/html/bootstrap.ign" + +delete_from_pool_if_exists httpd "master.ign" +upload_to_pool httpd "${INSTALL_DIR}/master.ign" "/var/www/html/master.ign" + +delete_from_pool_if_exists httpd "worker.ign" +upload_to_pool httpd "${INSTALL_DIR}/worker.ign" "/var/www/html/worker.ign" + +# Prepare boot artifacts: +# +# We only upload the rootfs, which is the largest required image, +# to the httpd before calling virt-install and only once per RHCOS version. +# +# virt-install then downloads the initramfs and kernel and uploads them +# as temporary boot artifacts via libvirt for each machine that is booted. +KERNEL_URL=$($OCPINSTALL coreos print-stream-json | jq -r ".architectures.$ARCH.artifacts.metal.formats.pxe.kernel.location") +INITRAMFS_URL=$($OCPINSTALL coreos print-stream-json | jq -r ".architectures.$ARCH.artifacts.metal.formats.pxe.initramfs.location") +ROOTFS_URL=$($OCPINSTALL coreos print-stream-json | jq -r ".architectures.$ARCH.artifacts.metal.formats.pxe.rootfs.location") + +KERNEL_FILENAME=$(basename "$KERNEL_URL") +INITRAMFS_FILENAME=$(basename "$INITRAMFS_URL") +ROOTFS_FILENAME=$(basename "$ROOTFS_URL") + +if [[ $(dirname "$KERNEL_URL") != $(dirname "$INITRAMFS_URL") ]]; then + echo "Error, expected kernel and initramfs to have same base url, found:" + echo " $(dirname "$KERNEL_URL")" + echo " $(dirname "$INITRAMFS_URL")" + echo "Aborting" + exit 1 +fi + +# only download and transfer rootfs if it doesn't already exist on httpd +if check_exists_in_pool httpd "$ROOTFS_FILENAME"; then + echo "rootfs ($ROOTFS_FILENAME) already exists on httpd, skipping transfer" +else + echo "Downloading rootfs from $ROOTFS_URL" + curl -L "$ROOTFS_URL" -o "/tmp/$ROOTFS_FILENAME" + upload_to_pool httpd "/tmp/$ROOTFS_FILENAME" "/var/www/html/$ROOTFS_FILENAME" +fi + +HOST_BOOT_ARTIFACT_BASE=/var/lib/libvirt/boot/ +HOST_PATH_KERNEL=${HOST_BOOT_ARTIFACT_BASE}${KERNEL_FILENAME} +HOST_PATH_INITRAMFS=${HOST_BOOT_ARTIFACT_BASE}${INITRAMFS_FILENAME} + + +if check_exists_in_pool boot-scratch "$KERNEL_FILENAME"; then + echo "kernel ($KERNEL_FILENAME) already exists in boot-scratch, skipping transfer" +else + echo "Downloading kernel from $KERNEL_URL" + curl -o "/tmp/$KERNEL_FILENAME" -L "$KERNEL_URL" + upload_to_pool boot-scratch "/tmp/$KERNEL_FILENAME" "$HOST_PATH_KERNEL" +fi + +if check_exists_in_pool boot-scratch "$INITRAMFS_FILENAME"; then + echo "initramfs ($INITRAMFS_FILENAME) already exists in boot-scratch, skipping transfer" +else + echo "Downloading initramfs from $INITRAMFS_URL" + curl -o "/tmp/$INITRAMFS_FILENAME" -L "$INITRAMFS_URL" + upload_to_pool boot-scratch "/tmp/$INITRAMFS_FILENAME" "$HOST_PATH_INITRAMFS" +fi + + + +# Boot the cluster nodes + +# Define nodes to create +NODE_DEFINITIONS=$(cat < "$domain_xml_path" + + + echo "Creating domain" + mock-nss.sh virsh create "$domain_xml_path" --validate +done + +for c in $(seq "$(<<<"$NODE_DEFINITIONS" yq 'length')"); do + node_definition=$(<<<"$NODE_DEFINITIONS" yq ".[$((c-1))]") + node_name=$(<<<"$node_definition" yq .name) + node_mac=$(<<<"$node_definition" yq .mac) + + domain_cmdline="rd.neednet=1 coreos.inst.install_dev=/dev/vda coreos.live.rootfs_url=$HTTPD_BASE_URL/$ROOTFS_FILENAME " + domain_cmdline+=$(<<<"$node_definition" yq '.extra-args | join(" ")') + + domain_qcow2_image_host_path=/var/lib/libvirt/images/${node_name}.qcow2 + + wait_for_domain_deletion "$node_name" + + echo "Domain was deleted, creating new domain ${node_name} that boots from disk" + domain_xml_path=$(mktemp --tmpdir domain-"${node_name}".xml.XXXXX) + <<<"$DOMAIN_TEMPLATE_XML" yq -p=xml -o=xml \ + ".domain.name=\"${node_name}\" | + .domain.memory=\"${DOMAIN_MEMORY}\" | + .domain.vcpu=\"${DOMAIN_VCPUS}\" | + .domain.os.boot.+@dev=\"hd\" | + .domain.devices.disk.source.+@file=\"${domain_qcow2_image_host_path}\" | + .domain.devices.interface.mac.+@address=\"${node_mac}\"" \ + > "$domain_xml_path" + + echo "Creating domain" + mock-nss.sh virsh define "$domain_xml_path" --validate + mock-nss.sh virsh start "$node_name" +done + +date "+%F %X" > "${SHARED_DIR}/CLUSTER_INSTALL_START_TIME" + +$OCPINSTALL --dir "${INSTALL_DIR}" wait-for bootstrap-complete & +# TODO: collect logs in case of failure +wait "$!" + +echo "Approving pending CSRs" +export KUBECONFIG=${INSTALL_DIR}/auth/kubeconfig +approve_csrs & + +sleep 15m + +set +x +echo "Completing UPI setup" +$OCPINSTALL --dir="${INSTALL_DIR}" wait-for install-complete 2>&1 | grep --line-buffered -v password & +wait "$!" + +oc config refresh-ca-bundle + +echo "Saving authentication files for next steps." +cp "${INSTALL_DIR}/metadata.json" "${SHARED_DIR}/" +cp "${INSTALL_DIR}/auth/kubeconfig" "${SHARED_DIR}/" +cp "${INSTALL_DIR}/auth/kubeadmin-password" "${SHARED_DIR}/" + +date "+%F %X" > "${SHARED_DIR}/CLUSTER_INSTALL_END_TIME" + +# Password for the cluster gets leaked in the installer logs and hence removing them. +sed -i 's/password: .*/password: REDACTED"/g' "${INSTALL_DIR}"/.openshift_install.log +cp "${INSTALL_DIR}"/.openshift_install.log "${SHARED_DIR}"/.openshift_install.log + +touch /tmp/install-complete \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-ref.metadata.json b/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-ref.metadata.json new file mode 100644 index 0000000000000..258e7f110f28e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-ref.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "upi/libvirt/install/install/upi-libvirt-install-install-ref.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-ref.yaml b/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-ref.yaml new file mode 100644 index 0000000000000..414235538d523 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/install/upi-libvirt-install-install-ref.yaml @@ -0,0 +1,39 @@ +ref: + as: upi-libvirt-install-install + from: libvirt-installer + commands: upi-libvirt-install-install-commands.sh + env: + - name: ARCH + - name: BRANCH + - name: OPENSHIFT_CLIENT_VERSION + default: 'candidate-4.15' + - name: YQ_VERSION + default: '4.40.2' + - name: JQ_VERSION + default: '1.7.1' + - name: DOMAIN_MEMORY + documentation: The memory to allocate for each guest, in KiB + default: '25156824' + - name: DOMAIN_DISK_SIZE + documentation: The disk size to allocate for each guest, in B + default: '107374182400' + - name: DOMAIN_VCPUS + documentation: Number of VCPUs to allocate for each guest + default: '6' + resources: + requests: + cpu: 10m + memory: 100Mi + dependencies: + - name: "release:latest" + env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE + - name: "release:latest" + env: RELEASE_IMAGE_LATEST + dnsConfig: + nameservers: + - 172.30.38.188 + searches: + - "bastion-z.svc.cluster.local" + - "bastion-ppc64le-libvirt.svc.cluster.local" + documentation: >- + The UPI libvirt install step runs the openshift-install in order to bring up an OpenShift cluster via a remote libvirt configuration with a fixed load balancer. \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/upi-libvirt-install-chain.metadata.json b/ci-operator/step-registry/upi/libvirt/install/upi-libvirt-install-chain.metadata.json new file mode 100644 index 0000000000000..908ceff70a5f6 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/upi-libvirt-install-chain.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "upi/libvirt/install/upi-libvirt-install-chain.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/install/upi-libvirt-install-chain.yaml b/ci-operator/step-registry/upi/libvirt/install/upi-libvirt-install-chain.yaml new file mode 100644 index 0000000000000..96a50a7a9be04 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/install/upi-libvirt-install-chain.yaml @@ -0,0 +1,10 @@ +chain: + as: upi-libvirt-install + steps: + - ref: ipi-install-rbac + - ref: upi-libvirt-install-install + env: + - name: ARCH + - name: BRANCH + documentation: |- + The UPI libvirt install chain prepares an UPI installation by setting up privileges for the cluster against the build farm and then runs the actuall cluster installation via remote libvirt tunnel. \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/post/OWNERS b/ci-operator/step-registry/upi/libvirt/post/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/post/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/post/upi-libvirt-post-chain.metadata.json b/ci-operator/step-registry/upi/libvirt/post/upi-libvirt-post-chain.metadata.json new file mode 100644 index 0000000000000..f93c64447d697 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/post/upi-libvirt-post-chain.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "upi/libvirt/post/upi-libvirt-post-chain.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/post/upi-libvirt-post-chain.yaml b/ci-operator/step-registry/upi/libvirt/post/upi-libvirt-post-chain.yaml new file mode 100644 index 0000000000000..760ebbc385cc6 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/post/upi-libvirt-post-chain.yaml @@ -0,0 +1,7 @@ +chain: + as: upi-libvirt-post + steps: + - ref: gather-libvirt + - ref: upi-libvirt-deprovision + documentation: |- + The UPI cleanup step contains all steps that gather and deprovision an Openshift cluster on multi-arch. \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/pre/OWNERS b/ci-operator/step-registry/upi/libvirt/pre/OWNERS new file mode 100644 index 0000000000000..9be81fbc9266e --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/pre/OWNERS @@ -0,0 +1,4 @@ +approvers: +- multiarch-approvers +reviewers: +- multiarch-reviewers \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/pre/upi-libvirt-pre-chain.metadata.json b/ci-operator/step-registry/upi/libvirt/pre/upi-libvirt-pre-chain.metadata.json new file mode 100644 index 0000000000000..194f399a4c75a --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/pre/upi-libvirt-pre-chain.metadata.json @@ -0,0 +1,11 @@ +{ + "path": "upi/libvirt/pre/upi-libvirt-pre-chain.yaml", + "owners": { + "approvers": [ + "multiarch-approvers" + ], + "reviewers": [ + "multiarch-reviewers" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/upi/libvirt/pre/upi-libvirt-pre-chain.yaml b/ci-operator/step-registry/upi/libvirt/pre/upi-libvirt-pre-chain.yaml new file mode 100644 index 0000000000000..daa8a31908e71 --- /dev/null +++ b/ci-operator/step-registry/upi/libvirt/pre/upi-libvirt-pre-chain.yaml @@ -0,0 +1,12 @@ +chain: + as: upi-libvirt-pre + steps: + - ref: upi-libvirt-conf + - ref: ipi-conf-etcd-on-ramfs + - chain: upi-libvirt-install + env: + - name: ARCH + - name: BRANCH + documentation: |- + The UPI setup step contains all steps that provision an OpenShift cluster + with a default configuration on libvirt multi-arch (s390x) diff --git a/core-services/ci-secret-bootstrap/_config.yaml b/core-services/ci-secret-bootstrap/_config.yaml index 675702233c233..7382570237932 100644 --- a/core-services/ci-secret-bootstrap/_config.yaml +++ b/core-services/ci-secret-bootstrap/_config.yaml @@ -1756,6 +1756,10 @@ secret_configs: - non_app_ci name: cluster-secrets-libvirt-s390x namespace: ci + - cluster_groups: + - non_app_ci + name: cluster-secrets-libvirt-s390x-amd64 + namespace: ci - from: insights-live.yaml: field: insights-live.yaml