From 684aacdd1af0c90bac2821c47c6589c82e0c3282 Mon Sep 17 00:00:00 2001 From: Omer Tuchfeld Date: Thu, 25 Feb 2021 16:30:22 +0200 Subject: [PATCH 1/4] Add SNO upgrade workflow This setups SNO cluster on AWS from `release:initial` and upgrades it to `release:latest`. Disruption tests are skipped, as they are not expected to pass in SNO configuration. As a test this adds periodic job to be testing 4.8 CI images every 24 hours --- .../openshift-release-master__ci-4.8.yaml | 5 ++ .../openshift-release-master-periodics.yaml | 75 +++++++++++++++++++ .../openshift/upgrade/aws/single-node/OWNERS | 9 +++ ...ade-aws-single-node-workflow.metadata.json | 15 ++++ ...hift-upgrade-aws-single-node-workflow.yaml | 25 +++++++ 5 files changed, 129 insertions(+) create mode 100644 ci-operator/step-registry/openshift/upgrade/aws/single-node/OWNERS create mode 100644 ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml diff --git a/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml b/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml index 495da5f177bb6..a39bf055f9d90 100644 --- a/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml +++ b/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml @@ -151,6 +151,11 @@ tests: TEST_TYPE: upgrade-conformance TEST_UPGRADE_OPTIONS: abort-at=random workflow: openshift-upgrade-aws +- as: e2e-aws-upgrade-sno + interval: 24h + steps: + cluster_profile: aws + workflow: openshift-upgrade-aws-single-node zz_generated_metadata: branch: master org: openshift diff --git a/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml b/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml index 2ed7a0fc3ebb8..b86ab8d34d262 100644 --- a/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml +++ b/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml @@ -5887,6 +5887,81 @@ periodics: - name: result-aggregator secret: secretName: result-aggregator +- agent: kubernetes + cluster: build02 + decorate: true + decoration_config: + skip_cloning: true + extra_refs: + - base_ref: master + org: openshift + repo: release + interval: 24h + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + ci-operator.openshift.io/variant: ci-4.8 + job-release: "4.8" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-release-master-ci-4.8-e2e-aws-upgrade-sno + 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/e2e-aws-upgrade-sno-cluster-profile + - --target=e2e-aws-upgrade-sno + - --variant=ci-4.8 + 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/e2e-aws-upgrade-sno-cluster-profile + name: cluster-profile + - mountPath: /secrets/gcs + name: gcs-credentials + 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 + projected: + sources: + - secret: + name: cluster-secrets-aws + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator - agent: kubernetes cluster: build02 decorate: true diff --git a/ci-operator/step-registry/openshift/upgrade/aws/single-node/OWNERS b/ci-operator/step-registry/openshift/upgrade/aws/single-node/OWNERS new file mode 100644 index 0000000000000..8fac573da2a52 --- /dev/null +++ b/ci-operator/step-registry/openshift/upgrade/aws/single-node/OWNERS @@ -0,0 +1,9 @@ +approvers: +- romfreiman +- eranco74 +- tsorya +- osherdp +- yuvigold +- omertuc +- vrutkovs +- wking diff --git a/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.metadata.json b/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.metadata.json new file mode 100644 index 0000000000000..99d2f30c79776 --- /dev/null +++ b/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.metadata.json @@ -0,0 +1,15 @@ +{ + "path": "openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml", + "owners": { + "approvers": [ + "romfreiman", + "eranco74", + "tsorya", + "osherdp", + "yuvigold", + "omertuc", + "vrutkovs", + "wking" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml b/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml new file mode 100644 index 0000000000000..500feae5817a2 --- /dev/null +++ b/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml @@ -0,0 +1,25 @@ +workflow: + as: openshift-upgrade-aws-single-node + steps: + allow_best_effort_post_steps: true + pre: + - ref: ipi-install-hosted-loki + - chain: ipi-conf-aws + - ref: single-node-conf-aws + - chain: ipi-install-stableinitial + test: + - ref: openshift-e2e-test + post: + - chain: gather-network + - chain: gather-core-dump + - chain: ipi-aws-post + dependencies: + OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: "release:initial" + OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE: "release:latest" + env: + TEST_TYPE: upgrade + TEST_SUITE: "" + TEST_UPGRADE_OPTIONS: "" + TEST_SKIPS: "disruption_tests" + documentation: |- + The Openshift E2E AWS single node workflow executes the upgrade end-to-end test suite on AWS with a default single-node cluster configuration and Loki as log collector, exercising an upgrade during the process. From ca8fed95b12dce8b0bde2f26a54fbda465f2d88d Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Tue, 13 Apr 2021 11:53:46 +0200 Subject: [PATCH 2/4] single node conf: support azure --- .../single-node/conf/azure/OWNERS | 7 +++ .../azure/single-node-conf-azure-commands.sh | 49 +++++++++++++++++++ .../single-node-conf-azure-ref.metadata.json | 13 +++++ .../azure/single-node-conf-azure-ref.yaml | 10 ++++ 4 files changed, 79 insertions(+) create mode 100644 ci-operator/step-registry/single-node/conf/azure/OWNERS create mode 100644 ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-commands.sh create mode 100644 ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.metadata.json create mode 100644 ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.yaml diff --git a/ci-operator/step-registry/single-node/conf/azure/OWNERS b/ci-operator/step-registry/single-node/conf/azure/OWNERS new file mode 100644 index 0000000000000..99fde41d0c99f --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/azure/OWNERS @@ -0,0 +1,7 @@ +approvers: +- romfreiman +- eranco74 +- tsorya +- osherdp +- yuvigold +- omertuc diff --git a/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-commands.sh b/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-commands.sh new file mode 100644 index 0000000000000..611b40fca0c46 --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-commands.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail + +SINGLE_NODE_AZURE_INSTANCE_TYPE="Standard_D32s_v3" + +echo "Updating install-config.yaml to a single ${SINGLE_NODE_AZURE_INSTANCE_TYPE} control plane node and 0 workers" + +pip3 install pyyaml --user +python3 -c ' +import yaml +import sys + +input_file = sys.argv[1] +output_file = sys.argv[2] if len(sys.argv) == 3 else sys.argv[1] # Output in-place if destination not given + +with open(input_file) as f: + cfg = yaml.safe_load(f) + +# Some workflows do not define controlPlane in install-config.yaml +if not "controlPlane" in cfg: + cfg["controlPlane"] = {} + +cfg["controlPlane"]["replicas"] = 1 + +# Single Node Openshift requires extra memory and compute resources +platform = cfg["controlPlane"]["platform"] +if "azure" in platform: + platform["azure"]["type"] = "'${SINGLE_NODE_AZURE_INSTANCE_TYPE}'" +else: + raise ValueError("This step only applies to Azure, please use the correct step for your platform") + +# Some workflows do not define any compute machine pools in install-config.yaml +if not "compute" in cfg: + cfg["compute"] = [ + { + "name": "worker", + "platform": {}, + } + ] + +for machine_pool in cfg["compute"]: + machine_pool["replicas"] = 0 + +with open(output_file, "w") as f: + yaml.safe_dump(cfg, f) +' "${SHARED_DIR}/install-config.yaml" diff --git a/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.metadata.json b/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.metadata.json new file mode 100644 index 0000000000000..73c80b885b3c5 --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.metadata.json @@ -0,0 +1,13 @@ +{ + "path": "single-node/conf/azure/single-node-conf-azure-ref.yaml", + "owners": { + "approvers": [ + "romfreiman", + "eranco74", + "tsorya", + "osherdp", + "yuvigold", + "omertuc" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.yaml b/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.yaml new file mode 100644 index 0000000000000..d9b23bb8a692d --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/azure/single-node-conf-azure-ref.yaml @@ -0,0 +1,10 @@ +ref: + as: single-node-conf-azure + from: installer + commands: single-node-conf-azure-commands.sh + resources: + requests: + cpu: 10m + memory: 100Mi + documentation: |- + Modifies install-config.yaml to use a single control-plane node and without any workers. From 21f3ea061edd9ce7a2e8cf4185e852a3d3a372f6 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Tue, 13 Apr 2021 11:55:24 +0200 Subject: [PATCH 3/4] Add Azure SNO upgrade workflows and a periodic jobs --- .../openshift-release-master__ci-4.8.yaml | 7 +- .../openshift-release-master-periodics.yaml | 83 ++++++++++++++++++- .../upgrade/azure/single-node/OWNERS | 1 + ...e-azure-single-node-workflow.metadata.json | 17 ++++ ...ft-upgrade-azure-single-node-workflow.yaml | 25 ++++++ 5 files changed, 128 insertions(+), 5 deletions(-) create mode 120000 ci-operator/step-registry/openshift/upgrade/azure/single-node/OWNERS create mode 100644 ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml diff --git a/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml b/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml index a39bf055f9d90..814f354a79418 100644 --- a/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml +++ b/ci-operator/config/openshift/release/openshift-release-master__ci-4.8.yaml @@ -151,11 +151,16 @@ tests: TEST_TYPE: upgrade-conformance TEST_UPGRADE_OPTIONS: abort-at=random workflow: openshift-upgrade-aws -- as: e2e-aws-upgrade-sno +- as: e2e-aws-upgrade-single-node interval: 24h steps: cluster_profile: aws workflow: openshift-upgrade-aws-single-node +- as: e2e-azure-upgrade-single-node + interval: 24h + steps: + cluster_profile: azure4 + workflow: openshift-upgrade-azure-single-node zz_generated_metadata: branch: master org: openshift diff --git a/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml b/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml index b86ab8d34d262..ec40b3e4cda34 100644 --- a/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml +++ b/ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml @@ -5902,7 +5902,7 @@ periodics: ci-operator.openshift.io/variant: ci-4.8 job-release: "4.8" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: periodic-ci-openshift-release-master-ci-4.8-e2e-aws-upgrade-sno + name: periodic-ci-openshift-release-master-ci-4.8-e2e-aws-upgrade-single-node spec: containers: - args: @@ -5911,8 +5911,8 @@ periodics: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-aws-upgrade-sno-cluster-profile - - --target=e2e-aws-upgrade-sno + - --secret-dir=/usr/local/e2e-aws-upgrade-single-node-cluster-profile + - --target=e2e-aws-upgrade-single-node - --variant=ci-4.8 command: - ci-operator @@ -5929,7 +5929,7 @@ periodics: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-aws-upgrade-sno-cluster-profile + - mountPath: /usr/local/e2e-aws-upgrade-single-node-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -6487,6 +6487,81 @@ periodics: - name: result-aggregator secret: secretName: result-aggregator +- agent: kubernetes + cluster: build02 + decorate: true + decoration_config: + skip_cloning: true + extra_refs: + - base_ref: master + org: openshift + repo: release + interval: 24h + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + ci-operator.openshift.io/variant: ci-4.8 + job-release: "4.8" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-release-master-ci-4.8-e2e-azure-upgrade-single-node + 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/e2e-azure-upgrade-single-node-cluster-profile + - --target=e2e-azure-upgrade-single-node + - --variant=ci-4.8 + 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/e2e-azure-upgrade-single-node-cluster-profile + name: cluster-profile + - mountPath: /secrets/gcs + name: gcs-credentials + 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 + projected: + sources: + - secret: + name: cluster-secrets-azure4 + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator - agent: kubernetes cluster: build02 decorate: true diff --git a/ci-operator/step-registry/openshift/upgrade/azure/single-node/OWNERS b/ci-operator/step-registry/openshift/upgrade/azure/single-node/OWNERS new file mode 120000 index 0000000000000..ec405d65a79df --- /dev/null +++ b/ci-operator/step-registry/openshift/upgrade/azure/single-node/OWNERS @@ -0,0 +1 @@ +../OWNERS \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.metadata.json b/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.metadata.json new file mode 100644 index 0000000000000..eb413a92a730d --- /dev/null +++ b/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.metadata.json @@ -0,0 +1,17 @@ +{ + "path": "openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml", + "owners": { + "approvers": [ + "smarterclayton", + "wking", + "stevekuznetsov", + "vrutkovs", + "abhinavdahiya", + "deads2k", + "crawford", + "ewolinetz", + "csrwng", + "staebler" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml b/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml new file mode 100644 index 0000000000000..b77f2d6979063 --- /dev/null +++ b/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml @@ -0,0 +1,25 @@ +workflow: + as: openshift-upgrade-azure-single-node + steps: + allow_best_effort_post_steps: true + pre: + - ref: ipi-install-hosted-loki + - chain: ipi-conf-azure + - ref: single-node-conf-azure + - chain: ipi-install-stableinitial + test: + - ref: openshift-e2e-test + post: + - chain: gather-network + - chain: gather-core-dump + - chain: ipi-azure-post + dependencies: + OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE: "release:initial" + OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE: "release:latest" + env: + TEST_TYPE: upgrade + TEST_SUITE: "" + TEST_UPGRADE_OPTIONS: "" + TEST_SKIPS: "" + documentation: |- + The Openshift E2E Azure single node workflow executes the upgrade end-to-end test suite on Azure with a default single-node cluster configuration and Loki as log collector, exercising an upgrade during the process. From ad04803701c93923d04b72d2045ce73717929278 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Tue, 13 Apr 2021 09:38:38 +0200 Subject: [PATCH 4/4] SNO upgrade: run "none" testsuite during upgrades This test suite won't run disruption tests --- .../single-node/openshift-upgrade-aws-single-node-workflow.yaml | 1 + .../openshift-upgrade-azure-single-node-workflow.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml b/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml index 500feae5817a2..ea3c6160739de 100644 --- a/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml +++ b/ci-operator/step-registry/openshift/upgrade/aws/single-node/openshift-upgrade-aws-single-node-workflow.yaml @@ -19,6 +19,7 @@ workflow: env: TEST_TYPE: upgrade TEST_SUITE: "" + TEST_UPGRADE_SUITE: "" TEST_UPGRADE_OPTIONS: "" TEST_SKIPS: "disruption_tests" documentation: |- diff --git a/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml b/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml index b77f2d6979063..6781b1d713fa5 100644 --- a/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml +++ b/ci-operator/step-registry/openshift/upgrade/azure/single-node/openshift-upgrade-azure-single-node-workflow.yaml @@ -19,6 +19,7 @@ workflow: env: TEST_TYPE: upgrade TEST_SUITE: "" + TEST_UPGRADE_SUITE: none TEST_UPGRADE_OPTIONS: "" TEST_SKIPS: "" documentation: |-