From d11bca700764f0dc23693530c3a7508ed1e91a3f Mon Sep 17 00:00:00 2001 From: Jacob Tanenbaum Date: Wed, 1 Apr 2020 13:35:18 -0400 Subject: [PATCH] create a hybrid cluster and run the e2e tests on it --- ...shift-cluster-network-operator-master.yaml | 5 ++++ .../install/ipi-install-install-commands.sh | 10 ++++++++ .../install/ipi-install-install-ref.yaml | 2 +- .../origin/e2e-aws-ovn-hybrid/OWNERS | 17 +++++++++++++ .../origin-e2e-aws-ovn-hybrid-workflow.yaml | 14 +++++++++++ .../ovn/conf/hybrid-manifest/OWNERS | 17 +++++++++++++ .../ovn-conf-hybrid-manifest-commands.sh | 24 +++++++++++++++++++ .../ovn-conf-hybrid-manifest-ref.yaml | 10 ++++++++ 8 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/OWNERS create mode 100644 ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/origin-e2e-aws-ovn-hybrid-workflow.yaml create mode 100644 ci-operator/step-registry/ovn/conf/hybrid-manifest/OWNERS create mode 100644 ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-commands.sh create mode 100644 ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-ref.yaml diff --git a/ci-operator/config/openshift/cluster-network-operator/openshift-cluster-network-operator-master.yaml b/ci-operator/config/openshift/cluster-network-operator/openshift-cluster-network-operator-master.yaml index 4ace0361de84..b167af82aa1a 100644 --- a/ci-operator/config/openshift/cluster-network-operator/openshift-cluster-network-operator-master.yaml +++ b/ci-operator/config/openshift/cluster-network-operator/openshift-cluster-network-operator-master.yaml @@ -60,3 +60,8 @@ tests: steps: cluster_profile: aws workflow: origin-e2e-aws-ovn +- as: e2e-ovn-hybrid-step-registry + commands: "" + steps: + cluster_profile: aws + workflow: origin-e2e-aws-ovn-hybrid 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 888414ff27b3..e52efb8be2ac 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 @@ -35,6 +35,16 @@ cp "${SHARED_DIR}/install-config.yaml" "${dir}/" mkdir -p ~/.ssh cp "${SSH_PRIV_KEY_PATH}" ~/.ssh/ + +TF_LOG=debug openshift-install --dir="${dir}" create manifests + +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 diff --git a/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml b/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml index 8080c1e134ad..e7af1749dacc 100644 --- a/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml +++ b/ci-operator/step-registry/ipi/install/install/ipi-install-install-ref.yaml @@ -7,4 +7,4 @@ ref: cpu: 1000m memory: 2Gi documentation: |- - 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. + 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. diff --git a/ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/OWNERS b/ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/OWNERS new file mode 100644 index 000000000000..f2edc7e03d9d --- /dev/null +++ b/ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/OWNERS @@ -0,0 +1,17 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- danwinship +- dcbw +- knobunc +- pecameron +- squeed +reviewers: +- alexanderconstantinescu +- danwinship +- dcbw +- jacobtanenbaum +- pecameron +- rcarrillocruz +- squeed diff --git a/ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/origin-e2e-aws-ovn-hybrid-workflow.yaml b/ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/origin-e2e-aws-ovn-hybrid-workflow.yaml new file mode 100644 index 000000000000..545471c2c2ed --- /dev/null +++ b/ci-operator/step-registry/origin/e2e-aws-ovn-hybrid/origin-e2e-aws-ovn-hybrid-workflow.yaml @@ -0,0 +1,14 @@ +workflow: + as: origin-e2e-aws-ovn-hybrid + steps: + pre: + - chain: ipi-conf-aws + - ref: ovn-conf + - ref: ovn-conf-hybrid-manifest + - chain: ipi-install + test: + - ref: origin-e2e-test + post: + - chain: ipi-deprovision + documentation: |- + The Origin E2E OVN workflow executes the common end-to-end test suite with the OVNKubernetes network plugin with a configured hybrid network. diff --git a/ci-operator/step-registry/ovn/conf/hybrid-manifest/OWNERS b/ci-operator/step-registry/ovn/conf/hybrid-manifest/OWNERS new file mode 100644 index 000000000000..f2edc7e03d9d --- /dev/null +++ b/ci-operator/step-registry/ovn/conf/hybrid-manifest/OWNERS @@ -0,0 +1,17 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- danwinship +- dcbw +- knobunc +- pecameron +- squeed +reviewers: +- alexanderconstantinescu +- danwinship +- dcbw +- jacobtanenbaum +- pecameron +- rcarrillocruz +- squeed diff --git a/ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-commands.sh b/ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-commands.sh new file mode 100644 index 000000000000..42608555965b --- /dev/null +++ b/ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-commands.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail + +cat >> "${SHARED_DIR}/manifest_cluster-network-03-config.yml" << EOF +apiVersion: config.openshift.io/v1 +kind: Network +metadata: + name: cluster +spec: + clusterNetwork: + - cidr: 10.128.0.0/14 + hostPrefix: 23 + defaultNetwork: + ovnKubernetesConfig: + hybridOverlayConfig: + hybridClusterNetwork: + - cidr: 10.132.0.0/14 + hostPrefix: 23 + networkType: OVNKubernetes + serviceNetwork: + - 172.30.0.0/16 +EOF diff --git a/ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-ref.yaml b/ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-ref.yaml new file mode 100644 index 000000000000..f3fee8d74206 --- /dev/null +++ b/ci-operator/step-registry/ovn/conf/hybrid-manifest/ovn-conf-hybrid-manifest-ref.yaml @@ -0,0 +1,10 @@ +ref: + as: ovn-conf-hybrid-manifest + from: base + commands: ovn-conf-hybrid-manifest-commands.sh + resources: + requests: + cpu: 10m + memory: 100Mi + documentation: |- + The ovn hybrid manifest step adds the configuration for the hybrid networking to set of manifests for installation