From e29ec40789dc5a8a3682af5c4f144f372e07059a Mon Sep 17 00:00:00 2001 From: Roy Golan Date: Thu, 1 Oct 2020 13:32:04 +0300 Subject: [PATCH] add kubevirt-ipi workflow Signed-off-by: Roy Golan changing rgolang to be rgolangh --- .../step-registry/ipi/conf/kubevirt/OWNERS | 6 ++++ .../ipi-conf-kubevirt-chain.metadata.json | 12 +++++++ .../kubevirt/ipi-conf-kubevirt-chain.yaml | 9 ++++++ .../kubevirt/ipi-conf-kubevirt-commands.sh | 32 +++++++++++++++++++ .../ipi-conf-kubevirt-ref.metadata.json | 12 +++++++ .../conf/kubevirt/ipi-conf-kubevirt-ref.yaml | 13 ++++++++ .../install/ipi-install-install-commands.sh | 1 + ci-operator/step-registry/ipi/kubevirt/OWNERS | 6 ++++ .../ipi-kubevirt-workflow.metadata.json | 12 +++++++ .../ipi/kubevirt/ipi-kubevirt-workflow.yaml | 15 +++++++++ .../step-registry/ipi/kubevirt/post/OWNERS | 6 ++++ .../ipi-kubevirt-post-chain.metadata.json | 12 +++++++ .../post/ipi-kubevirt-post-chain.yaml | 8 +++++ .../step-registry/ipi/kubevirt/pre/OWNERS | 1 + .../pre/ipi-kubevirt-pre-chain.metadata.json | 12 +++++++ .../kubevirt/pre/ipi-kubevirt-pre-chain.yaml | 8 +++++ .../ipi/kubevirt/pre/stableinitial/OWNERS | 1 + ...virt-pre-stableinitial-chain.metadata.json | 12 +++++++ .../ipi-kubevirt-pre-stableinitial-chain.yaml | 8 +++++ 19 files changed, 186 insertions(+) create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/OWNERS create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.metadata.json create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.yaml create mode 100755 ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-commands.sh create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.metadata.json create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.yaml create mode 100644 ci-operator/step-registry/ipi/kubevirt/OWNERS create mode 100644 ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.metadata.json create mode 100644 ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.yaml create mode 100644 ci-operator/step-registry/ipi/kubevirt/post/OWNERS create mode 100644 ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.metadata.json create mode 100644 ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.yaml create mode 120000 ci-operator/step-registry/ipi/kubevirt/pre/OWNERS create mode 100644 ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.metadata.json create mode 100644 ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.yaml create mode 120000 ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/OWNERS create mode 100644 ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.metadata.json create mode 100644 ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.yaml diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/OWNERS b/ci-operator/step-registry/ipi/conf/kubevirt/OWNERS new file mode 100644 index 0000000000000..86c772e13fcac --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/OWNERS @@ -0,0 +1,6 @@ +approvers: + - bardielle + - ravidbro + - nirarg + - rgolangh + - chenyosef diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.metadata.json b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.metadata.json new file mode 100644 index 0000000000000..9c4949e53bb0d --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/conf/kubevirt/ipi-conf-kubevirt-chain.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.yaml new file mode 100644 index 0000000000000..c0001ee9c7c8b --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-chain.yaml @@ -0,0 +1,9 @@ +chain: + as: ipi-conf-kubevirt + steps: + - ref: ipi-conf + - ref: ipi-conf-kubevirt + documentation: >- + This chain generates an install-config.yaml file configured to run clusters in the Kubevirt CI project. + The Kubevirt specific configs are added to the file generated by the ipi-conf steps. + This resulting file is stored in the shared directory for future consumption. diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-commands.sh b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-commands.sh new file mode 100755 index 0000000000000..5d1ef6ab8ed64 --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-commands.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + +CONFIG="${SHARED_DIR}/install-config.yaml" + + +KUBEVIRT_BASE_DOMAIN="tenant1.origin-on-kubevirt.dev.openshift.com" +KUBEVIRT_API_VIP=192.168.123.15 +KUBEVIRT_INGRESS_VIP=192.168.123.20 +KUBEVIRT_KUBECONFIG=${HOME}/.kube/config +KUBEVIRT_NAMESPACE=tenantcluster +KUBEVIRT_NETWORK_NAME=tenantcluster +KUBEVIRT_TENANT_STORAGE_CLASS_NAME=standard +KUBEVIRT_VOLUME_ACCESS_MODE=ReadWriteMany + +cat >> "${CONFIG}" << EOF +baseDomain: ${KUBEVIRT_BASE_DOMAIN} +platform: + kubevirt: + # TODO this section is WIP - see the installer PR + IngressVIP: ${KUBEVIRT_INGRESS_VIP} + apiVIP: ${KUBEVIRT_API_VIP} + kubeconfig: ${KUBEVIRT_KUBECONFIG} + namespace: ${KUBEVIRT_NAMESPACE} + networkName: ${KUBEVIRT_NETWORK_NAME} + storageClass: ${KUBEVIRT_TENANT_STORAGE_CLASS_NAME} + persistentVolumeAccessMode: ${KUBEVIRT_VOLUME_ACCESS_MODE} +EOF + diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.metadata.json b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.metadata.json new file mode 100644 index 0000000000000..3347ba2416107 --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/conf/kubevirt/ipi-conf-kubevirt-ref.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.yaml new file mode 100644 index 0000000000000..a28eb93f63a36 --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/ipi-conf-kubevirt-ref.yaml @@ -0,0 +1,13 @@ +ref: + as: ipi-conf-kubevirt + from: base + commands: ipi-conf-kubevirt-commands.sh + resources: + requests: + cpu: 10m + memory: 100Mi + documentation: >- + This step configures an install-config.yaml file to depoloy to the KUBEVIRT project. + An existing install-config.yaml file should already exist in the shared directory. + The file is modified to configure the cluster to run in the KUBEVIRT project. + The resulting file remains in the shared directory for future consumption. diff --git a/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh b/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh index cb1f434f36b3e..4ab8ec4ecb950 100755 --- a/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh +++ b/ci-operator/step-registry/ipi/install/install/ipi-install-install-commands.sh @@ -21,6 +21,7 @@ case "${CLUSTER_TYPE}" in aws) export AWS_SHARED_CREDENTIALS_FILE=${CLUSTER_PROFILE_DIR}/.awscred;; azure4) export AZURE_AUTH_LOCATION=${CLUSTER_PROFILE_DIR}/osServicePrincipal.json;; gcp) export GOOGLE_CLOUD_KEYFILE_JSON=${CLUSTER_PROFILE_DIR}/gce.json;; +kubevirt) export KUBEVIRT_KUBECONFIG=${HOME}/.kube/config;; vsphere) ;; openstack) export OS_CLIENT_CONFIG_FILE=${CLUSTER_PROFILE_DIR}/clouds.yaml ;; openstack-vexxhost) export OS_CLIENT_CONFIG_FILE=${CLUSTER_PROFILE_DIR}/clouds.yaml ;; diff --git a/ci-operator/step-registry/ipi/kubevirt/OWNERS b/ci-operator/step-registry/ipi/kubevirt/OWNERS new file mode 100644 index 0000000000000..86c772e13fcac --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/OWNERS @@ -0,0 +1,6 @@ +approvers: + - bardielle + - ravidbro + - nirarg + - rgolangh + - chenyosef diff --git a/ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.metadata.json b/ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.metadata.json new file mode 100644 index 0000000000000..d97b6fcf581ee --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/kubevirt/ipi-kubevirt-workflow.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.yaml b/ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.yaml new file mode 100644 index 0000000000000..511f9e6865914 --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/ipi-kubevirt-workflow.yaml @@ -0,0 +1,15 @@ +workflow: + as: ipi-kubevirt + steps: + pre: + - chain: ipi-kubevirt-pre + post: + - chain: ipi-kubevirt-post + documentation: |- + The IPI workflow provides pre- and post- steps that provision and + deprovision an OpenShift cluster with a default configuration on Kubevirt, + allowing job authors to inject their own end-to-end test logic. + + All modifications to this workflow should be done by modifying the + `ipi-kubevirt-{pre,post}` chains to allow other workflows to mimic and extend + this base workflow without a need to backport changes. diff --git a/ci-operator/step-registry/ipi/kubevirt/post/OWNERS b/ci-operator/step-registry/ipi/kubevirt/post/OWNERS new file mode 100644 index 0000000000000..86c772e13fcac --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/post/OWNERS @@ -0,0 +1,6 @@ +approvers: + - bardielle + - ravidbro + - nirarg + - rgolangh + - chenyosef diff --git a/ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.metadata.json b/ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.metadata.json new file mode 100644 index 0000000000000..84c8c7f1a17c4 --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/kubevirt/post/ipi-kubevirt-post-chain.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.yaml b/ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.yaml new file mode 100644 index 0000000000000..8544a680c0097 --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/post/ipi-kubevirt-post-chain.yaml @@ -0,0 +1,8 @@ +chain: + as: ipi-kubevirt-post + steps: + - chain: ipi-conf-kubevirt + - chain: ipi-deprovision + documentation: |- + The IPI cleanup step contains all steps that deprovision an OpenShift + cluster on KubeVirt, provisioned by the `ipi-kubevirt-pre` chain. diff --git a/ci-operator/step-registry/ipi/kubevirt/pre/OWNERS b/ci-operator/step-registry/ipi/kubevirt/pre/OWNERS new file mode 120000 index 0000000000000..ec405d65a79df --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/pre/OWNERS @@ -0,0 +1 @@ +../OWNERS \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.metadata.json b/ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.metadata.json new file mode 100644 index 0000000000000..a19dd9f2b5073 --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/kubevirt/pre/ipi-kubevirt-pre-chain.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.yaml b/ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.yaml new file mode 100644 index 0000000000000..428d1e85c978b --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/pre/ipi-kubevirt-pre-chain.yaml @@ -0,0 +1,8 @@ +chain: + as: ipi-kubevirt-pre + steps: + - chain: ipi-conf-kubevirt + - chain: ipi-install + documentation: |- + The IPI setup step contains all steps that provision an OpenShift cluster + with a default configuration on Kubevirt. diff --git a/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/OWNERS b/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/OWNERS new file mode 120000 index 0000000000000..ec405d65a79df --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/OWNERS @@ -0,0 +1 @@ +../OWNERS \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.metadata.json b/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.metadata.json new file mode 100644 index 0000000000000..9ce0c2e7e8b2a --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.yaml b/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.yaml new file mode 100644 index 0000000000000..0d80178749365 --- /dev/null +++ b/ci-operator/step-registry/ipi/kubevirt/pre/stableinitial/ipi-kubevirt-pre-stableinitial-chain.yaml @@ -0,0 +1,8 @@ +chain: + as: ipi-kubevirt-pre-stableinitial + steps: + - chain: ipi-conf-kubevirt + - chain: ipi-install-stableinitial + documentation: |- + The IPI setup step contains all steps that provision an OpenShift cluster + from stable-initial imagestream with a default configuration on KubeVirt.