From 803bafa8876eb8f6761d6a39ecfe3e5fec598c96 Mon Sep 17 00:00:00 2001 From: Omer Tuchfeld Date: Fri, 22 Jan 2021 22:14:38 +0200 Subject: [PATCH] Add CLUSTER_VARIANT="single-node" configuration to ipi install --- .../installer/openshift-installer-master.yaml | 4 ++ ...openshift-installer-master-presubmits.yaml | 17 +-------- .../openshift/e2e/aws/single-node/OWNERS | 7 ++++ ...e2e-aws-single-node-workflow.metadata.json | 13 +++++++ ...penshift-e2e-aws-single-node-workflow.yaml | 15 ++++++++ ci-operator/step-registry/single-node/OWNERS | 7 ++++ .../step-registry/single-node/conf/OWNERS | 7 ++++ .../conf/single-node-conf-commands.sh | 38 +++++++++++++++++++ .../conf/single-node-conf-ref.metadata.json | 13 +++++++ .../conf/single-node-conf-ref.yaml | 10 +++++ .../template-deprecation/_allowlist.yaml | 3 -- 11 files changed, 115 insertions(+), 19 deletions(-) create mode 100644 ci-operator/step-registry/openshift/e2e/aws/single-node/OWNERS create mode 100644 ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.yaml create mode 100644 ci-operator/step-registry/single-node/OWNERS create mode 100644 ci-operator/step-registry/single-node/conf/OWNERS create mode 100644 ci-operator/step-registry/single-node/conf/single-node-conf-commands.sh create mode 100644 ci-operator/step-registry/single-node/conf/single-node-conf-ref.metadata.json create mode 100644 ci-operator/step-registry/single-node/conf/single-node-conf-ref.yaml diff --git a/ci-operator/config/openshift/installer/openshift-installer-master.yaml b/ci-operator/config/openshift/installer/openshift-installer-master.yaml index 20784971115bd..a96385b13f71d 100644 --- a/ci-operator/config/openshift/installer/openshift-installer-master.yaml +++ b/ci-operator/config/openshift/installer/openshift-installer-master.yaml @@ -331,6 +331,10 @@ tests: steps: cluster_profile: kubevirt workflow: openshift-e2e-kubevirt +- as: e2e-aws-single-node + steps: + cluster_profile: aws + workflow: openshift-e2e-aws-single-node zz_generated_metadata: branch: master org: openshift diff --git a/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml b/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml index 78f347230458b..db185b6da4fa9 100644 --- a/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/installer/openshift-installer-master-presubmits.yaml @@ -517,6 +517,7 @@ presubmits: 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-installer-master-e2e-aws-single-node optional: true @@ -531,18 +532,8 @@ presubmits: - --report-username=ci - --secret-dir=/usr/local/e2e-aws-single-node-cluster-profile - --target=e2e-aws-single-node - - --template=/usr/local/e2e-aws-single-node command: - ci-operator - env: - - name: CLUSTER_TYPE - value: aws - - name: CLUSTER_VARIANT - value: single-node - - name: JOB_NAME_SAFE - value: e2e-aws-single-node - - name: TEST_COMMAND - value: TEST_SUITE=openshift/conformance/parallel run-tests image: ci-operator:latest imagePullPolicy: Always name: "" @@ -558,9 +549,6 @@ presubmits: - mountPath: /secrets/gcs name: gcs-credentials readOnly: true - - mountPath: /usr/local/e2e-aws-single-node - name: job-definition - subPath: cluster-launch-installer-e2e.yaml - mountPath: /etc/pull-secret name: pull-secret readOnly: true @@ -580,9 +568,6 @@ presubmits: sources: - secret: name: cluster-secrets-aws - - configMap: - name: prow-job-cluster-launch-installer-e2e - name: job-definition - name: pull-secret secret: secretName: registry-pull-credentials diff --git a/ci-operator/step-registry/openshift/e2e/aws/single-node/OWNERS b/ci-operator/step-registry/openshift/e2e/aws/single-node/OWNERS new file mode 100644 index 0000000000000..99fde41d0c99f --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/aws/single-node/OWNERS @@ -0,0 +1,7 @@ +approvers: +- romfreiman +- eranco74 +- tsorya +- osherdp +- yuvigold +- omertuc diff --git a/ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.metadata.json b/ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.metadata.json new file mode 100644 index 0000000000000..fd674ce6241bd --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.metadata.json @@ -0,0 +1,13 @@ +{ + "path": "openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.yaml", + "owners": { + "approvers": [ + "romfreiman", + "eranco74", + "tsorya", + "osherdp", + "yuvigold", + "omertuc" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.yaml b/ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.yaml new file mode 100644 index 0000000000000..c8035f30b6fb3 --- /dev/null +++ b/ci-operator/step-registry/openshift/e2e/aws/single-node/openshift-e2e-aws-single-node-workflow.yaml @@ -0,0 +1,15 @@ +workflow: + as: openshift-e2e-aws-single-node + steps: + pre: + - chain: ipi-conf-aws + - ref: single-node-conf + - chain: ipi-install + test: + - ref: openshift-e2e-test + post: + - chain: gather-network + - chain: gather-core-dump + - chain: ipi-deprovision + documentation: |- + The Openshift E2E Single Node workflow executes the common end-to-end test suite with the a single node cluster. diff --git a/ci-operator/step-registry/single-node/OWNERS b/ci-operator/step-registry/single-node/OWNERS new file mode 100644 index 0000000000000..99fde41d0c99f --- /dev/null +++ b/ci-operator/step-registry/single-node/OWNERS @@ -0,0 +1,7 @@ +approvers: +- romfreiman +- eranco74 +- tsorya +- osherdp +- yuvigold +- omertuc diff --git a/ci-operator/step-registry/single-node/conf/OWNERS b/ci-operator/step-registry/single-node/conf/OWNERS new file mode 100644 index 0000000000000..99fde41d0c99f --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/OWNERS @@ -0,0 +1,7 @@ +approvers: +- romfreiman +- eranco74 +- tsorya +- osherdp +- yuvigold +- omertuc diff --git a/ci-operator/step-registry/single-node/conf/single-node-conf-commands.sh b/ci-operator/step-registry/single-node/conf/single-node-conf-commands.sh new file mode 100644 index 0000000000000..4bdc113552fc7 --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/single-node-conf-commands.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail + +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 + +# 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/single-node-conf-ref.metadata.json b/ci-operator/step-registry/single-node/conf/single-node-conf-ref.metadata.json new file mode 100644 index 0000000000000..d25c7d10ee1cc --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/single-node-conf-ref.metadata.json @@ -0,0 +1,13 @@ +{ + "path": "single-node/conf/single-node-conf-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/single-node-conf-ref.yaml b/ci-operator/step-registry/single-node/conf/single-node-conf-ref.yaml new file mode 100644 index 0000000000000..b0d449906a0c3 --- /dev/null +++ b/ci-operator/step-registry/single-node/conf/single-node-conf-ref.yaml @@ -0,0 +1,10 @@ +ref: + as: single-node-conf + from: installer + commands: single-node-conf-commands.sh + resources: + requests: + cpu: 10m + memory: 100Mi + documentation: |- + Modifies install-config.yaml to use a single control-plane node and without any workers. diff --git a/core-services/template-deprecation/_allowlist.yaml b/core-services/template-deprecation/_allowlist.yaml index eaff327231112..b30f5f04bd8ad 100644 --- a/core-services/template-deprecation/_allowlist.yaml +++ b/core-services/template-deprecation/_allowlist.yaml @@ -595,9 +595,6 @@ templates: pull-ci-openshift-installer-master-e2e-aws-rhel8: generated: false kind: presubmit - pull-ci-openshift-installer-master-e2e-aws-single-node: - generated: false - kind: presubmit pull-ci-openshift-installer-release-4.4-e2e-aws-rhel8: generated: false kind: presubmit