From 9d6a1baddafbe5bc786bbcf8532b1db4d084e702 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Tue, 27 Oct 2020 12:31:27 +0200 Subject: [PATCH 1/9] Adding e2e-kubevirt --- .../ipi/kubevirt/post/ipi-kubevirt-post-chain.yaml | 1 - .../step-registry/openshift/e2e/kubevirt/OWNERS | 6 ++++++ .../openshift-e2e-kubevirt-workflow.metadata.json | 12 ++++++++++++ .../kubevirt/openshift-e2e-kubevirt-workflow.yaml | 12 ++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 ci-operator/step-registry/openshift/e2e/kubevirt/OWNERS create mode 100644 ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.yaml 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 index 8544a680c0097..402a621fad8b6 100644 --- 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 @@ -1,7 +1,6 @@ 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 diff --git a/ci-operator/step-registry/openshift/e2e/kubevirt/OWNERS b/ci-operator/step-registry/openshift/e2e/kubevirt/OWNERS new file mode 100644 index 0000000000000..5392ab32be812 --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/kubevirt/OWNERS @@ -0,0 +1,6 @@ +approvers: + - bardielle + - ravidbro + - nirarg + - rgolangh + - chenyosef \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.metadata.json b/ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.metadata.json new file mode 100644 index 0000000000000..1094d622710be --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.yaml b/ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.yaml new file mode 100644 index 0000000000000..8e707dd636dd9 --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/kubevirt/openshift-e2e-kubevirt-workflow.yaml @@ -0,0 +1,12 @@ +workflow: + as: openshift-e2e-kubevirt + steps: + pre: + - chain: ipi-kubevirt-pre + test: + - ref: openshift-e2e-test + post: + - chain: gather-core-dump + - chain: ipi-kubevirt-post + documentation: |- + The Openshift E2E KubeVirt workflow executes the common end-to-end test suite on KubeVirt with a default cluster configuration. \ No newline at end of file From 8bd20708f33eadff65480363d133883a8b14b895 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Tue, 27 Oct 2020 18:11:23 +0200 Subject: [PATCH 2/9] Adding test e2e-kubevirt --- ...-cluster-api-provider-kubevirt-master.yaml | 4 ++ ...i-provider-kubevirt-master-presubmits.yaml | 65 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml index 3b2184a5d0600..1e95747da8291 100644 --- a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml +++ b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml @@ -53,6 +53,10 @@ tests: commands: IS_CONTAINER=TRUE make fmt container: from: src +- as: e2e-kubevirt + steps: + cluster_profile: gcp + workflow: openshift-e2e-kubevirt zz_generated_metadata: branch: master org: openshift diff --git a/ci-operator/jobs/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master-presubmits.yaml b/ci-operator/jobs/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master-presubmits.yaml index 79fe4a887d9ee..3c45c6ab981e8 100644 --- a/ci-operator/jobs/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master-presubmits.yaml @@ -1,5 +1,70 @@ presubmits: openshift/cluster-api-provider-kubevirt: + - agent: kubernetes + always_run: true + branches: + - master + cluster: build01 + context: ci/prow/e2e-kubevirt + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-cluster-api-provider-kubevirt-master-e2e-kubevirt + rerun_command: /test e2e-kubevirt + spec: + containers: + - args: + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-password-file=/etc/boskos/password + - --report-password-file=/etc/report/password.txt + - --report-username=ci + - --secret-dir=/usr/local/e2e-kubevirt-cluster-profile + - --target=e2e-kubevirt + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /usr/local/e2e-kubevirt-cluster-profile + name: cluster-profile + - 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: password + path: password + secretName: boskos-credentials + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets-gcp + - configMap: + name: cluster-profile-gcp + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-kubevirt,?($|\s.*) - agent: kubernetes always_run: true branches: From 73113c9cdbb9a862b19657cd7d0e91c01290c2b9 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Wed, 28 Oct 2020 08:19:29 +0200 Subject: [PATCH 3/9] Adding logs --- .../conf/kubevirt/ipi-conf-kubevirt-commands.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 index 5d1ef6ab8ed64..2ae7d0da81fd2 100755 --- 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 @@ -18,6 +18,22 @@ KUBEVIRT_VOLUME_ACCESS_MODE=ReadWriteMany cat >> "${CONFIG}" << EOF baseDomain: ${KUBEVIRT_BASE_DOMAIN} +controlPlane: +- name: master + platform: + kubevirt: + cpu: 8 + memory: 16G + storageSize: 35Gi + replicas: 3 +compute: +- name: worker + platform: + kubevirt: + cpu: 4 + memory: 10G + storageSize: 35Gi + replicas: 3 platform: kubevirt: # TODO this section is WIP - see the installer PR @@ -30,3 +46,4 @@ platform: persistentVolumeAccessMode: ${KUBEVIRT_VOLUME_ACCESS_MODE} EOF +cat ${CONFIG} \ No newline at end of file From e52432cac3338e214a270d2f0e476b18b7330dc7 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Wed, 28 Oct 2020 09:36:03 +0200 Subject: [PATCH 4/9] Adding new ipi-conf for kubevirt --- .../ipi/conf/kubevirt/env/OWNERS | 6 ++++ .../env/ipi-conf-kubevirt-env-commands.sh | 29 +++++++++++++++++++ .../ipi-conf-kubevirt-env-ref.metadata.json | 12 ++++++++ .../env/ipi-conf-kubevirt-env-ref.yaml | 16 ++++++++++ .../kubevirt/ipi-conf-kubevirt-chain.yaml | 2 +- 5 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/env/OWNERS create mode 100755 ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-commands.sh create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.metadata.json create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/env/OWNERS b/ci-operator/step-registry/ipi/conf/kubevirt/env/OWNERS new file mode 100644 index 0000000000000..86c772e13fcac --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/env/OWNERS @@ -0,0 +1,6 @@ +approvers: + - bardielle + - ravidbro + - nirarg + - rgolangh + - chenyosef diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-commands.sh b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-commands.sh new file mode 100755 index 0000000000000..95d353145d53f --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-commands.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + +cluster_name=${NAMESPACE}-${JOB_NAME_HASH} + +out=${SHARED_DIR}/install-config.yaml + +if [[ -z "$RELEASE_IMAGE_LATEST" ]]; then + echo "RELEASE_IMAGE_LATEST is an empty string, exiting" + exit 1 +fi + +echo "Installing from release ${RELEASE_IMAGE_LATEST}" + +ssh_pub_key=$(<"${CLUSTER_PROFILE_DIR}/ssh-publickey") +pull_secret=$(<"${CLUSTER_PROFILE_DIR}/pull-secret") + +cat > "${out}" << EOF +apiVersion: v1 +metadata: + name: ${cluster_name} +pullSecret: > + ${pull_secret} +sshKey: | + ${ssh_pub_key} +EOF diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.metadata.json b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.metadata.json new file mode 100644 index 0000000000000..21e7d4ecde822 --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-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/env/ipi-conf-kubevirt-env-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml new file mode 100644 index 0000000000000..44161605d0474 --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml @@ -0,0 +1,16 @@ +ref: + as: ipi-conf-kubevirt-env + from_image: + namespace: origin + name: centos + tag: '8' + commands: ipi-conf-kubevirt-env-commands.sh + resources: + requests: + cpu: 10m + memory: 100Mi + env: + - name: RELEASE_IMAGE_LATEST + default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" + documentation: |- + The IPI configure step generates the generic portions of the install-config.yaml file based on optional input files. 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 index c0001ee9c7c8b..24b8fb1984c91 100644 --- 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 @@ -1,7 +1,7 @@ chain: as: ipi-conf-kubevirt steps: - - ref: ipi-conf + - ref: ipi-conf-kubevirt-env - ref: ipi-conf-kubevirt documentation: >- This chain generates an install-config.yaml file configured to run clusters in the Kubevirt CI project. From d1523876b6b81608295b48be21e199d330d0aace Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Wed, 28 Oct 2020 11:04:42 +0200 Subject: [PATCH 5/9] Adding new install-kubevirt chain --- .../env/ipi-conf-kubevirt-env-ref.yaml | 6 +- .../ipi/conf/kubevirt/install/OWNERS | 6 ++ .../ipi-conf-kubevirt-install-commands.sh | 72 +++++++++++++++++++ ...pi-conf-kubevirt-install-ref.metadata.json | 12 ++++ .../ipi-conf-kubevirt-install-ref.yaml | 24 +++++++ .../step-registry/ipi/install/kubevirt/OWNERS | 6 ++ .../ipi-install-kubevirt-chain.metadata.json | 12 ++++ .../kubevirt/ipi-install-kubevirt-chain.yaml | 7 ++ .../kubevirt/pre/ipi-kubevirt-pre-chain.yaml | 2 +- 9 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/install/OWNERS create mode 100755 ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.metadata.json create mode 100644 ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml create mode 100644 ci-operator/step-registry/ipi/install/kubevirt/OWNERS create mode 100644 ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.metadata.json create mode 100644 ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.yaml diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml index 44161605d0474..47dd6a3059888 100644 --- a/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml @@ -9,8 +9,8 @@ ref: requests: cpu: 10m memory: 100Mi - env: - - name: RELEASE_IMAGE_LATEST - default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" +# env: +# - name: RELEASE_IMAGE_LATEST +# default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" documentation: |- The IPI configure step generates the generic portions of the install-config.yaml file based on optional input files. diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/OWNERS b/ci-operator/step-registry/ipi/conf/kubevirt/install/OWNERS new file mode 100644 index 0000000000000..86c772e13fcac --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/OWNERS @@ -0,0 +1,6 @@ +approvers: + - bardielle + - ravidbro + - nirarg + - rgolangh + - chenyosef diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh new file mode 100755 index 0000000000000..013e577a83e6a --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh @@ -0,0 +1,72 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + +trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM + +if [[ -z "$OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE" ]]; then + echo "OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE is an empty string, exiting" + exit 1 +fi + +echo "**** 1 Installing from release ${OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE}" +export SSH_PRIV_KEY_PATH=${CLUSTER_PROFILE_DIR}/ssh-privatekey +export PULL_SECRET_PATH=${CLUSTER_PROFILE_DIR}/pull-secret +export OPENSHIFT_INSTALL_INVOKER=openshift-internal-ci/${JOB_NAME}/${BUILD_ID} +export HOME=/tmp + +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 ;; +*) echo >&2 "Unsupported cluster type '${CLUSTER_TYPE}'" +esac + +echo "**** 2 " $PWD + +dir=/tmp/installer +mkdir "${dir}/" +cp "${SHARED_DIR}/install-config.yaml" "${dir}/" + +# move private key to ~/.ssh/ so that installer can use it to gather logs on +# bootstrap failure +mkdir -p ~/.ssh +cp "${SSH_PRIV_KEY_PATH}" ~/.ssh/ + +echo "**** 3 " +ls + +sleep 2h + +openshift-install --dir="${dir}" create manifests & +wait "$!" + +sed -i '/^ channel:/d' "${dir}/manifests/cvo-overrides.yaml" + +while IFS= read -r -d '' item +do + manifest="$( basename "${item}" )" + cp "${item}" "${dir}/manifests/${manifest##manifest_}" +done < <( find "${SHARED_DIR}" -name "manifest_*.yml" -print0) + +TF_LOG=debug openshift-install --dir="${dir}" create cluster 2>&1 | grep --line-buffered -v password & + +set +e +wait "$!" +ret="$?" +cp "${dir}"/log-bundle-*.tar.gz "${ARTIFACT_DIR}/" 2>/dev/null +set -e + +sed 's/password: .*/password: REDACTED/' "${dir}/.openshift_install.log" >"${ARTIFACT_DIR}/.openshift_install.log" +cp \ + -t "${SHARED_DIR}" \ + "${dir}/auth/kubeconfig" \ + "${dir}/auth/kubeadmin-password" \ + "${dir}/metadata.json" +exit "$ret" diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.metadata.json b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.metadata.json new file mode 100644 index 0000000000000..69138c88955b0 --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-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/install/ipi-conf-kubevirt-install-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml new file mode 100644 index 0000000000000..4cbaf262fc00d --- /dev/null +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml @@ -0,0 +1,24 @@ +ref: + as: ipi-conf-kubevirt-install + from_image: + namespace: origin + name: centos + tag: '8' + commands: ipi-conf-kubevirt-install-commands.sh + resources: + requests: + cpu: 10m + memory: 100Mi + dependencies: + - name: "release:latest" + env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE + - name: "release:latest" + env: RELEASE_IMAGE_LATEST +# env: +# - name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE +# default: "" +# default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" +# - name: CLUSTER_TYPE +# default: "kubevirt" + documentation: |- + The IPI configure step generates the generic portions of the install-config.yaml file based on optional input files. diff --git a/ci-operator/step-registry/ipi/install/kubevirt/OWNERS b/ci-operator/step-registry/ipi/install/kubevirt/OWNERS new file mode 100644 index 0000000000000..86c772e13fcac --- /dev/null +++ b/ci-operator/step-registry/ipi/install/kubevirt/OWNERS @@ -0,0 +1,6 @@ +approvers: + - bardielle + - ravidbro + - nirarg + - rgolangh + - chenyosef diff --git a/ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.metadata.json b/ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.metadata.json new file mode 100644 index 0000000000000..1d1c2079e4b95 --- /dev/null +++ b/ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.metadata.json @@ -0,0 +1,12 @@ +{ + "path": "ipi/install/kubevirt/ipi-install-kubevirt-chain.yaml", + "owners": { + "approvers": [ + "bardielle", + "ravidbro", + "nirarg", + "rgolangh", + "chenyosef" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.yaml b/ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.yaml new file mode 100644 index 0000000000000..d78e5b3e9163a --- /dev/null +++ b/ci-operator/step-registry/ipi/install/kubevirt/ipi-install-kubevirt-chain.yaml @@ -0,0 +1,7 @@ +chain: + as: ipi-install-kubevirt + steps: + - ref: ipi-install-rbac + - ref: ipi-conf-kubevirt-install + documentation: |- + The IPI install step chain contains all the individual steps necessary to install an OpenShift cluster. \ 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 index 428d1e85c978b..01c9f992d9a8d 100644 --- 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 @@ -2,7 +2,7 @@ chain: as: ipi-kubevirt-pre steps: - chain: ipi-conf-kubevirt - - chain: ipi-install + - chain: ipi-install-kubevirt documentation: |- The IPI setup step contains all steps that provision an OpenShift cluster with a default configuration on Kubevirt. From bb08988947e08af46fc5358638319904f46e8b51 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Thu, 29 Oct 2020 11:59:37 +0200 Subject: [PATCH 6/9] Debugging --- .../ipi-conf-kubevirt-install-commands.sh | 2 +- .../ipi-conf-kubevirt-install-ref.yaml | 22 ++++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh index 013e577a83e6a..efb225070206a 100755 --- a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh @@ -42,7 +42,7 @@ cp "${SSH_PRIV_KEY_PATH}" ~/.ssh/ echo "**** 3 " ls -sleep 2h +#sleep 2h openshift-install --dir="${dir}" create manifests & wait "$!" diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml index 4cbaf262fc00d..769df9f00b53f 100644 --- a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml @@ -1,24 +1,20 @@ ref: as: ipi-conf-kubevirt-install - from_image: - namespace: origin - name: centos - tag: '8' + from: installer commands: ipi-conf-kubevirt-install-commands.sh resources: requests: - cpu: 10m - memory: 100Mi + cpu: 1000m + memory: 2Gi dependencies: - name: "release:latest" env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE - name: "release:latest" env: RELEASE_IMAGE_LATEST -# env: -# - name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE -# default: "" -# default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" -# - name: CLUSTER_TYPE -# default: "kubevirt" + env: + - name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE + default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" + - name: CLUSTER_TYPE + default: "kubevirt" documentation: |- - The IPI configure step generates the generic portions of the install-config.yaml file based on optional input files. + The IPI install step runs the OpenShift Installer in order to bring up an OpenShift cluster, using the provided cluster profile to choose a target IaaS platform. Anything that needs to be configured using manifests should generate them before this step and put them in the SHARED_DIR with the filename manifest_(manifest_name).yml so that this step can pull in the manifest in. From 849af0f7705b2a82ee3f5d36255d4c6d22ab428d Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Thu, 29 Oct 2020 18:49:54 +0200 Subject: [PATCH 7/9] Removing parts from install config --- ...ift-cluster-api-provider-kubevirt-master.yaml | 1 + .../conf/kubevirt/ipi-conf-kubevirt-commands.sh | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml index 1e95747da8291..082b0ab52193e 100644 --- a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml +++ b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml @@ -1,5 +1,6 @@ base_images: base: + from: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" name: "4.7" namespace: ocp tag: base 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 index 2ae7d0da81fd2..d444e6510d8e5 100755 --- 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 @@ -18,22 +18,6 @@ KUBEVIRT_VOLUME_ACCESS_MODE=ReadWriteMany cat >> "${CONFIG}" << EOF baseDomain: ${KUBEVIRT_BASE_DOMAIN} -controlPlane: -- name: master - platform: - kubevirt: - cpu: 8 - memory: 16G - storageSize: 35Gi - replicas: 3 -compute: -- name: worker - platform: - kubevirt: - cpu: 4 - memory: 10G - storageSize: 35Gi - replicas: 3 platform: kubevirt: # TODO this section is WIP - see the installer PR From 172660a69d3dba6109bb416385c62be8bd4ae323 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Sun, 1 Nov 2020 15:28:33 +0200 Subject: [PATCH 8/9] Changing the installer --- ...t-cluster-api-provider-kubevirt-master.yaml | 7 ++++++- .../env/ipi-conf-kubevirt-env-ref.yaml | 5 +++-- .../install/ipi-conf-kubevirt-install-ref.yaml | 18 +++++++++++------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml index 082b0ab52193e..e9e2b03c5b836 100644 --- a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml +++ b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml @@ -4,6 +4,11 @@ base_images: name: "4.7" namespace: ocp tag: base + test_installer: + from: "docker.io/kubevirtplatformipi/installer:dbarda" + name: test_installer + namespace: ocp + tag: test_installer ocp_builder_rhel-8-golang-1.15-openshift-4.6: name: builder namespace: ocp @@ -28,7 +33,7 @@ images: inputs: ocp_builder_rhel-8-golang-1.15-openshift-4.6: as: - - registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6 + - docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1 to: kubevirt-machine-controllers promotion: name: "4.7" diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml index 47dd6a3059888..6250f6444e295 100644 --- a/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/kubevirt/env/ipi-conf-kubevirt-env-ref.yaml @@ -9,8 +9,9 @@ ref: requests: cpu: 10m memory: 100Mi -# env: -# - name: RELEASE_IMAGE_LATEST + env: + - name: RELEASE_IMAGE_LATEST + default: "docker.io/kubevirtplatformipi/installer:dbarda" # default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" documentation: |- The IPI configure step generates the generic portions of the install-config.yaml file based on optional input files. diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml index 769df9f00b53f..c7f99e6c462dc 100644 --- a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml @@ -1,19 +1,23 @@ ref: as: ipi-conf-kubevirt-install - from: installer +# from: test_installer + from_image: + name: test_installer + namespace: ocp + tag: test_installer commands: ipi-conf-kubevirt-install-commands.sh resources: requests: cpu: 1000m memory: 2Gi - dependencies: - - name: "release:latest" - env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE - - name: "release:latest" - env: RELEASE_IMAGE_LATEST +# dependencies: +# - name: "release:latest" +# env: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE +# - name: "release:latest" +# env: RELEASE_IMAGE_LATEST env: - name: OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE - default: "docker.io/kubevirtplatformipi/ocp-release-dev:kubevirt-provider-tag-4.7-1" + default: "docker.io/kubevirtplatformipi/installer:dbarda" - name: CLUSTER_TYPE default: "kubevirt" documentation: |- From b0b4f1b2ad7b04eb143ffad66bfee7924a853e52 Mon Sep 17 00:00:00 2001 From: Danielle Barda Date: Wed, 4 Nov 2020 16:35:15 +0200 Subject: [PATCH 9/9] Using new binary --- ...hift-cluster-api-provider-kubevirt-master.yaml | 10 +++++----- .../install/ipi-conf-kubevirt-install-commands.sh | 15 ++++++++++++--- .../install/ipi-conf-kubevirt-install-ref.yaml | 10 +++++----- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml index e9e2b03c5b836..1605ecbc6202c 100644 --- a/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml +++ b/ci-operator/config/openshift/cluster-api-provider-kubevirt/openshift-cluster-api-provider-kubevirt-master.yaml @@ -4,11 +4,11 @@ base_images: name: "4.7" namespace: ocp tag: base - test_installer: - from: "docker.io/kubevirtplatformipi/installer:dbarda" - name: test_installer - namespace: ocp - tag: test_installer +# test_installer: +# from: "docker.io/kubevirtplatformipi/installer:dbarda" +# name: test_installer +# namespace: ocp +# tag: test_installer ocp_builder_rhel-8-golang-1.15-openshift-4.6: name: builder namespace: ocp diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh index efb225070206a..ba553a304db3a 100755 --- a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-commands.sh @@ -1,5 +1,4 @@ -#!/bin/bash - +#!/bin/bash -x set -o nounset set -o errexit set -o pipefail @@ -43,8 +42,18 @@ echo "**** 3 " ls #sleep 2h +echo "curl from dropbox" +curl -k -L https://www.dropbox.com/s/vwkw15z7a47pwlt/openshift-install?dl=0 -o openshift-install-binary +#OPENSHIFT_INSTALL_BINARY=$(curl -k -L https://www.dropbox.com/s/vwkw15z7a47pwlt/openshift-install?dl=0) + + +echo "chmod" +chmod +x openshift-install-binary + +echo "run create manifest" +openshift-install-binary --dir="${dir}" create manifests & +#openshift-install --dir="${dir}" create manifests & -openshift-install --dir="${dir}" create manifests & wait "$!" sed -i '/^ channel:/d' "${dir}/manifests/cvo-overrides.yaml" diff --git a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml index c7f99e6c462dc..288a6e9d2951d 100644 --- a/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml +++ b/ci-operator/step-registry/ipi/conf/kubevirt/install/ipi-conf-kubevirt-install-ref.yaml @@ -1,10 +1,10 @@ ref: as: ipi-conf-kubevirt-install -# from: test_installer - from_image: - name: test_installer - namespace: ocp - tag: test_installer + from: installer +# from_image: +# name: test_installer +# namespace: ocp +# tag: test_installer commands: ipi-conf-kubevirt-install-commands.sh resources: requests: