From 4e642275e0800ea8998ad5560efd638a4e0a33ee Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Fri, 28 Apr 2023 14:46:02 -0500 Subject: [PATCH 1/9] add loadbalancer-smoketest aws workflow --- .../openshift-microshift-release-4.13.yaml | 14 +-- ...ft-microshift-release-4.13-presubmits.yaml | 24 ++--- .../e2e/loadbalancer-smoke-test-aws/OWNERS | 17 ++++ ...alancer-smoke-test-aws-chain.metadata.json | 23 +++++ ...e2e-loadbalancer-smoke-test-aws-chain.yaml | 4 + ...2e-loadbalancer-smoke-test-aws-commands.sh | 98 +++++++++++++++++++ ...dbalancer-smoke-test-aws-ref.metadata.json | 23 +++++ ...t-e2e-loadbalancer-smoke-test-aws-ref.yaml | 16 +++ ...ncer-smoke-test-aws-workflow.metadata.json | 23 +++++ ...-loadbalancer-smoke-test-aws-workflow.yaml | 10 ++ 10 files changed, 229 insertions(+), 23 deletions(-) create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/OWNERS create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-commands.sh create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index 1f772d9da0d0a..c7e177c4985df 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -194,20 +194,20 @@ tests: optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test + EC2_AMI: ami-07f5ac8ddbcfbb96e + workflow: openshift-microshift-e2e-loadbalancer-smoke-test-aws - as: e2e-loadbalancer-smoke-test-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-loadbalancer-smoke-test + EC2_AMI: ami-0c231be9fb222349e + EC2_INSTANCE_TYPE: a1.2xlarge + workflow: openshift-microshift-e2e-loadbalancer-smoke-test-aws - as: nightly-conformance-parallel cron: 0 0 * * 1-5 steps: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml index 7103e430f434f..af264d25516cc 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml @@ -173,8 +173,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -230,12 +230,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials @@ -254,8 +250,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -311,12 +307,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/OWNERS b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/OWNERS new file mode 100644 index 0000000000000..982650768229f --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/OWNERS @@ -0,0 +1,17 @@ +approvers: +- chiragkyal +- copejon +- dhellmann +- eggfoobar +- ggiguash +- pacevedom +- pliurh +- pmtk +- zshi-redhat +options: {} +reviewers: +- copejon +- dhellmann +- ggiguash +- pacevedom +- pmtk diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.metadata.json new file mode 100644 index 0000000000000..14429a9521a3c --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.yaml b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.yaml new file mode 100644 index 0000000000000..b5ea4e2c9353f --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-chain.yaml @@ -0,0 +1,4 @@ +chain: + as: openshift-microshift-e2e-loadbalancer-smoke-test-aws + steps: + - ref: openshift-microshift-e2e-loadbalancer-smoke-test-aws diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-commands.sh new file mode 100644 index 0000000000000..02c0b4479db08 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-commands.sh @@ -0,0 +1,98 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' +set -x + +trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM + +IP_ADDRESS="$(cat ${SHARED_DIR}/public_address)" +HOST_USER="$(cat ${SHARED_DIR}/ssh_user)" +INSTANCE_PREFIX="${HOST_USER}@${IP_ADDRESS}" + +echo "Using Host $IP_ADDRESS" + +mkdir -p "${HOME}/.ssh" +cat <"${HOME}/.ssh/config" +Host ${IP_ADDRESS} + User ${HOST_USER} + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 +EOF +chmod 0600 "${HOME}/.ssh/config" + + + +cat <<'EOF' >"${HOME}"/deploy.sh +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' +set -x + +mkdir -p ~/.kube +sudo cat /var/lib/microshift/resources/kubeadmin/kubeconfig > ~/.kube/config + +echo ' +kind: Pod +apiVersion: v1 +metadata: + name: hello-microshift + labels: + app: hello-microshift +spec: + containers: + - name: hello-microshift + image: busybox:1.35 + command: ["/bin/sh"] + args: ["-c", "while true; do echo -ne \"HTTP/1.0 200 OK\r\nContent-Length: 16\r\n\r\nHello MicroShift\" | nc -l -p 8080 ; done"] + ports: + - containerPort: 8080 + protocol: TCP + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + runAsUser: 1001 + runAsGroup: 1001 + seccompProfile: + type: RuntimeDefault' | oc create -f - + +oc create service loadbalancer hello-microshift --tcp=5678:8080 + +oc wait pods -l app=hello-microshift --for condition=Ready --timeout=300s +EOF + +chmod +x "${HOME}/deploy.sh" + +scp "${HOME}/deploy.sh" "${INSTANCE_PREFIX}:~/deploy.sh" + +set +e +ssh "${INSTANCE_PREFIX}" "bash ~/deploy.sh" + +set +x +retries=3 +backoff=3s +for try in $(seq 1 "${retries}"); do + echo "Attempt: ${try}" + echo "Running: curl -vk ${IP_ADDRESS}:5678" + RESPONSE=$(curl -I ${IP_ADDRESS}:5678 2>&1) + RESULT=$? + echo "Exit code: ${RESULT}" + echo -e "Response: \n${RESPONSE}\n\n" + if [ $RESULT -eq 0 ] && echo "${RESPONSE}" | grep -q -E "HTTP.*200"; then + echo "Request fulfilled conditions to be successful (exit code = 0, response contains 'HTTP.*200')" + exit 0 + fi + echo -e "Waiting ${backoff} before next retry\n\n" + sleep "${backoff}" +done +set -x + +scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ +ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' +exit 1 diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.metadata.json new file mode 100644 index 0000000000000..aee1de700bb55 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.yaml b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.yaml new file mode 100644 index 0000000000000..f8bbcffb2f323 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-ref.yaml @@ -0,0 +1,16 @@ +ref: + as: openshift-microshift-e2e-loadbalancer-smoke-test-aws + from: microshift-test-payload + commands: openshift-microshift-e2e-loadbalancer-smoke-test-aws-commands.sh + resources: + requests: + cpu: 100m + memory: 90Mi + grace_period: 10m + env: + - name: HOME + default: /tmp/secret + credentials: + - namespace: test-credentials + name: microshift-rhsm-creds + mount_path: /var/run/rhsm/ diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.metadata.json new file mode 100644 index 0000000000000..038d4625db389 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.yaml b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.yaml new file mode 100644 index 0000000000000..4b98c217c7a23 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/loadbalancer-smoke-test-aws/openshift-microshift-e2e-loadbalancer-smoke-test-aws-workflow.yaml @@ -0,0 +1,10 @@ +workflow: + as: openshift-microshift-e2e-loadbalancer-smoke-test-aws + steps: + allow_best_effort_post_steps: true + pre: + - chain: openshift-microshift-infra-aws-pre + test: + - chain: openshift-microshift-e2e-loadbalancer-smoke-test-aws + post: + - chain: openshift-microshift-infra-aws-post From a5f95a48c8097acf1559c5e3910140b6cc857a29 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Fri, 28 Apr 2023 15:41:36 -0500 Subject: [PATCH 2/9] add e2e-reboot aws workflow --- .../openshift-microshift-release-4.13.yaml | 28 ++--- ...ft-microshift-release-4.13-presubmits.yaml | 48 +++----- .../microshift/e2e/reboot-tests-aws/OWNERS | 17 +++ ...t-e2e-reboot-tests-aws-chain.metadata.json | 23 ++++ ...microshift-e2e-reboot-tests-aws-chain.yaml | 7 ++ ...icroshift-e2e-reboot-tests-aws-commands.sh | 107 ++++++++++++++++++ ...ift-e2e-reboot-tests-aws-ref.metadata.json | 23 ++++ ...t-microshift-e2e-reboot-tests-aws-ref.yaml | 16 +++ ...2e-reboot-tests-aws-workflow.metadata.json | 23 ++++ ...roshift-e2e-reboot-tests-aws-workflow.yaml | 10 ++ .../e2e/reboot-tests-aws/verify/OWNERS | 17 +++ ...ft-e2e-reboot-tests-aws-verify-commands.sh | 46 ++++++++ ...-reboot-tests-aws-verify-ref.metadata.json | 23 ++++ ...shift-e2e-reboot-tests-aws-verify-ref.yaml | 17 +++ 14 files changed, 359 insertions(+), 46 deletions(-) create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/OWNERS create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-commands.sh create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-ref.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-ref.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-workflow.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/OWNERS create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-commands.sh create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index c7e177c4985df..e3a8d8fcb975d 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -115,38 +115,38 @@ tests: cluster: build02 run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-openshift-conformance-reduced + EC2_AMI: ami-07f5ac8ddbcfbb96e + workflow: openshift-microshift-e2e-openshift-conformance-reduced-aws - as: e2e-openshift-conformance-reduced-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-openshift-conformance-reduced + EC2_AMI: ami-0c231be9fb222349e + EC2_INSTANCE_TYPE: a1.2xlarge + workflow: openshift-microshift-e2e-openshift-conformance-reduced-aws - as: e2e-reboot cluster: build02 run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-reboot-tests + EC2_AMI: ami-07f5ac8ddbcfbb96e + workflow: openshift-microshift-e2e-reboot-tests-aws - as: e2e-reboot-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-reboot-tests + EC2_AMI: ami-0c231be9fb222349e + EC2_INSTANCE_TYPE: a1.2xlarge + workflow: openshift-microshift-e2e-reboot-tests-aws - as: e2e-greenboot cluster: build02 optional: true diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml index af264d25516cc..f78571145c185 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml @@ -327,8 +327,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -383,12 +383,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials @@ -407,8 +403,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -464,12 +460,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials @@ -488,8 +480,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -544,12 +536,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials @@ -568,8 +556,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -625,12 +613,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/OWNERS b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/OWNERS new file mode 100644 index 0000000000000..982650768229f --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/OWNERS @@ -0,0 +1,17 @@ +approvers: +- chiragkyal +- copejon +- dhellmann +- eggfoobar +- ggiguash +- pacevedom +- pliurh +- pmtk +- zshi-redhat +options: {} +reviewers: +- copejon +- dhellmann +- ggiguash +- pacevedom +- pmtk diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.metadata.json new file mode 100644 index 0000000000000..452421979f550 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.yaml b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.yaml new file mode 100644 index 0000000000000..0601f27dcc24c --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-chain.yaml @@ -0,0 +1,7 @@ +chain: + as: openshift-microshift-e2e-reboot-tests-aws + steps: + - ref: openshift-microshift-e2e-reboot-tests-aws + - ref: openshift-microshift-e2e-reboot-tests-aws-verify + + diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-commands.sh new file mode 100644 index 0000000000000..076058b505990 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/openshift-microshift-e2e-reboot-tests-aws-commands.sh @@ -0,0 +1,107 @@ +#!/bin/bash + +set -xeuo pipefail + +trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM + +IP_ADDRESS="$(cat ${SHARED_DIR}/public_address)" +HOST_USER="$(cat ${SHARED_DIR}/ssh_user)" +INSTANCE_PREFIX="${HOST_USER}@${IP_ADDRESS}" + +echo "Using Host $IP_ADDRESS" + +mkdir -p "${HOME}/.ssh" +cat <"${HOME}/.ssh/config" +Host ${IP_ADDRESS} + User ${HOST_USER} + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 +EOF +chmod 0600 "${HOME}/.ssh/config" + +cat >"${HOME}"/reboot-test.sh <<'EOF' +#!/bin/bash +set -xeuo pipefail +export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig +# TODO: Remove the labels again once https://issues.redhat.com/browse/OCPBUGS-1969 has been fixed upstream +oc label namespaces default "pod-security.kubernetes.io/"{enforce,audit,warn}"-version=v1.24" +oc label namespaces default "pod-security.kubernetes.io/"{enforce,audit,warn}"=privileged" +cat <"${HOME}/.ssh/config" +Host ${IP_ADDRESS} + User ${HOST_USER} + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 +EOF +chmod 0600 "${HOME}/.ssh/config" + + +# Steps may not be used more than once in a test, so this block duplicates the behavior of wait-for-ssh for reboot tests. +timeout=300 # 5 minute wait. +>&2 echo "Polling ssh connectivity before proceeding. Timeout=$timeout second" +start=$(date +"%s") +until ssh "${INSTANCE_PREFIX}" 'sudo systemctl start microshift'; +do + if (( $(date +"%s") - $start >= $timeout )); then + echo "timed out out waiting for MicroShift to start" >&2 + exit 1 + fi + echo "waiting for MicroShift to start" + sleep 5 +done +>&2 echo "It took $(( $(date +'%s') - start)) seconds to connect via ssh" + +ssh "${INSTANCE_PREFIX}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig + +if ! oc wait --kubeconfig=/tmp/kubeconfig --for=condition=Ready --timeout=120s pod/test-pod; then + scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ + ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' + exit 1 +fi diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.metadata.json new file mode 100644 index 0000000000000..9ce8483518926 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.yaml b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.yaml new file mode 100644 index 0000000000000..762e079c2aeeb --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/reboot-tests-aws/verify/openshift-microshift-e2e-reboot-tests-aws-verify-ref.yaml @@ -0,0 +1,17 @@ +ref: + as: openshift-microshift-e2e-reboot-tests-aws-verify + from: microshift-test-payload + grace_period: 10m + timeout: 30m + commands: openshift-microshift-e2e-reboot-tests-aws-verify-commands.sh + resources: + requests: + cpu: 55m + memory: 85Mi + env: + - name: HOME + default: /tmp/secret + credentials: + - namespace: test-credentials + name: microshift-rhsm-creds + mount_path: /var/run/rhsm/ From 4322006c5d9e5ba1c543519a3d992361b33746c4 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Fri, 28 Apr 2023 15:54:05 -0500 Subject: [PATCH 3/9] add e2e-greenboot-aws workflow make update e2e-greenboot --- .../openshift-microshift-release-4.13.yaml | 14 +- ...ft-microshift-release-4.13-presubmits.yaml | 24 +-- .../microshift/e2e/greenboot-aws/OWNERS | 17 ++ ...hift-e2e-greenboot-aws-chain.metadata.json | 23 +++ ...ft-microshift-e2e-greenboot-aws-chain.yaml | 4 + ...t-microshift-e2e-greenboot-aws-commands.sh | 153 ++++++++++++++++++ ...oshift-e2e-greenboot-aws-ref.metadata.json | 23 +++ ...hift-microshift-e2e-greenboot-aws-ref.yaml | 16 ++ ...t-e2e-greenboot-aws-workflow.metadata.json | 23 +++ ...microshift-e2e-greenboot-aws-workflow.yaml | 10 ++ ...2e-loadbalancer-smoke-test-aws-commands.sh | 2 - 11 files changed, 284 insertions(+), 25 deletions(-) create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/OWNERS create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-commands.sh create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-ref.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-ref.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-workflow.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index e3a8d8fcb975d..eaa812c565d68 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -152,20 +152,20 @@ tests: optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-greenboot + EC2_AMI: ami-07f5ac8ddbcfbb96e + workflow: openshift-microshift-e2e-greenboot-aws - as: e2e-greenboot-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|scripts/.*|vendor/.*|go\.sum|go\.mod|Makefile) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-greenboot + EC2_AMI: ami-0c231be9fb222349e + EC2_INSTANCE_TYPE: a1.2xlarge + workflow: openshift-microshift-e2e-greenboot-aws - as: e2e-router-smoke-test cluster: build02 optional: true diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml index f78571145c185..9b5f928b831f3 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml @@ -11,8 +11,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -68,12 +68,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials @@ -92,8 +88,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -149,12 +145,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials diff --git a/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/OWNERS b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/OWNERS new file mode 100644 index 0000000000000..982650768229f --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/OWNERS @@ -0,0 +1,17 @@ +approvers: +- chiragkyal +- copejon +- dhellmann +- eggfoobar +- ggiguash +- pacevedom +- pliurh +- pmtk +- zshi-redhat +options: {} +reviewers: +- copejon +- dhellmann +- ggiguash +- pacevedom +- pmtk diff --git a/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.metadata.json new file mode 100644 index 0000000000000..715cc04d39c2f --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.yaml b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.yaml new file mode 100644 index 0000000000000..c18e847bf631c --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-chain.yaml @@ -0,0 +1,4 @@ +chain: + as: openshift-microshift-e2e-greenboot-aws + steps: + - ref: openshift-microshift-e2e-greenboot-aws diff --git a/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-commands.sh new file mode 100644 index 0000000000000..754b248e4551e --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/greenboot-aws/openshift-microshift-e2e-greenboot-aws-commands.sh @@ -0,0 +1,153 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' +set -x + +trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM + +IP_ADDRESS="$(cat ${SHARED_DIR}/public_address)" +HOST_USER="$(cat ${SHARED_DIR}/ssh_user)" +INSTANCE_PREFIX="${HOST_USER}@${IP_ADDRESS}" + +echo "Using Host $IP_ADDRESS" + +mkdir -p "${HOME}/.ssh" +cat <"${HOME}/.ssh/config" +Host ${IP_ADDRESS} + User ${HOST_USER} + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 +EOF +chmod 0600 "${HOME}/.ssh/config" + +cat << 'EOFEOF' > "${HOME}/greenboot_check.sh" +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' +set -x + +function check_greenboot_exit_status() { + local expectedRC=$1 + local cleanup=$2 + + if [ ${cleanup} -ne 0 ] ; then + echo 1 | microshift-cleanup-data --all + systemctl enable --now microshift || true + fi + + for check_script in $(find /etc/greenboot/check/ -name \*.sh | sort) ; do + echo Running ${check_script}... + local currentRC=1 + if ${check_script} ; then + currentRC=0 + fi + + if [ ${currentRC} != ${expectedRC} ] ; then + exit 1 + fi + done +} + +# +# Initial check must succeed (set timeout of 180s to speed up the process) +# +tee /etc/greenboot/greenboot.conf &>/dev/null </dev/null </dev/null </dev/null <"${HOME}"/deploy.sh #!/usr/bin/env bash From 7fcc7f167dff13b812dfb8b2af38fceea774447e Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Fri, 28 Apr 2023 16:00:58 -0500 Subject: [PATCH 4/9] add router-smoketest aws workflow make update router-smoke-tests --- .../openshift-microshift-release-4.13.yaml | 14 +-- ...ft-microshift-release-4.13-presubmits.yaml | 24 ++--- .../e2e/router-smoke-test-aws/OWNERS | 17 ++++ ...-router-smoke-test-aws-chain.metadata.json | 23 +++++ ...shift-e2e-router-smoke-test-aws-chain.yaml | 4 + ...hift-e2e-router-smoke-test-aws-commands.sh | 97 +++++++++++++++++++ ...2e-router-smoke-test-aws-ref.metadata.json | 23 +++++ ...roshift-e2e-router-smoke-test-aws-ref.yaml | 16 +++ ...uter-smoke-test-aws-workflow.metadata.json | 23 +++++ ...ft-e2e-router-smoke-test-aws-workflow.yaml | 10 ++ 10 files changed, 228 insertions(+), 23 deletions(-) create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/OWNERS create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-commands.sh create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index eaa812c565d68..af6b45b191c46 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -171,20 +171,20 @@ tests: optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 - workflow: openshift-microshift-e2e-router-smoke-test + EC2_AMI: ami-07f5ac8ddbcfbb96e + workflow: openshift-microshift-e2e-router-smoke-test-aws - as: e2e-router-smoke-test-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-arm64-v20230306 - GOOGLE_COMPUTE_MACHINE_TYPE: t2a-standard-4 - workflow: openshift-microshift-e2e-router-smoke-test + EC2_AMI: ami-0c231be9fb222349e + EC2_INSTANCE_TYPE: a1.2xlarge + workflow: openshift-microshift-e2e-router-smoke-test-aws - as: rebase-on-nightlies cron: 0 5 * * 1-5 steps: diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml index 9b5f928b831f3..bb67b0246cdb4 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml @@ -625,8 +625,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -682,12 +682,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials @@ -706,8 +702,8 @@ presubmits: decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -763,12 +759,8 @@ presubmits: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/OWNERS b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/OWNERS new file mode 100644 index 0000000000000..982650768229f --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/OWNERS @@ -0,0 +1,17 @@ +approvers: +- chiragkyal +- copejon +- dhellmann +- eggfoobar +- ggiguash +- pacevedom +- pliurh +- pmtk +- zshi-redhat +options: {} +reviewers: +- copejon +- dhellmann +- ggiguash +- pacevedom +- pmtk diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.metadata.json new file mode 100644 index 0000000000000..ca9f5dccc7cf1 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.yaml b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.yaml new file mode 100644 index 0000000000000..50848dfe6cb5d --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-chain.yaml @@ -0,0 +1,4 @@ +chain: + as: openshift-microshift-e2e-router-smoke-test-aws + steps: + - ref: openshift-microshift-e2e-router-smoke-test-aws diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-commands.sh new file mode 100644 index 0000000000000..b3664ca2b85c5 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-commands.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' +set -x + +trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM + +IP_ADDRESS="$(cat ${SHARED_DIR}/public_address)" +HOST_USER="$(cat ${SHARED_DIR}/ssh_user)" +INSTANCE_PREFIX="${HOST_USER}@${IP_ADDRESS}" + +echo "Using Host $IP_ADDRESS" + +mkdir -p "${HOME}/.ssh" +cat <"${HOME}/.ssh/config" +Host ${IP_ADDRESS} + User ${HOST_USER} + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 +EOF +chmod 0600 "${HOME}/.ssh/config" + +cat <<'EOF' >"${HOME}"/deploy.sh +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' +set -x + +mkdir -p ~/.kube +sudo cat /var/lib/microshift/resources/kubeadmin/kubeconfig > ~/.kube/config + +echo ' +kind: Pod +apiVersion: v1 +metadata: + name: hello-microshift + labels: + app: hello-microshift +spec: + containers: + - name: hello-microshift + image: busybox:1.35 + command: ["/bin/sh"] + args: ["-c", "while true; do echo -ne \"HTTP/1.0 200 OK\r\nContent-Length: 16\r\n\r\nHello MicroShift\" | nc -l -p 8080 ; done"] + ports: + - containerPort: 8080 + protocol: TCP + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsNonRoot: true + runAsUser: 1001 + runAsGroup: 1001 + seccompProfile: + type: RuntimeDefault' | oc create -f - + +oc expose pod hello-microshift +oc expose svc hello-microshift --hostname hello-microshift.cluster.local + +oc wait pods -l app=hello-microshift --for condition=Ready --timeout=300s +EOF + +chmod +x "${HOME}/deploy.sh" + +scp "${HOME}/deploy.sh" "${INSTANCE_PREFIX}:~/deploy.sh" + +set +e +ssh "${INSTANCE_PREFIX}" "bash ~/deploy.sh" + +set +x +retries=3 +backoff=3s +for try in $(seq 1 "${retries}"); do + echo "Attempt: ${try}" + echo "Running: curl -vk http://hello-microshift.cluster.local --connect-to \"hello-microshift.cluster.local:80:${IP_ADDRESS}:80\"" + RESPONSE=$(curl -vk http://hello-microshift.cluster.local --connect-to "hello-microshift.cluster.local:80:${IP_ADDRESS}:80" 2>&1) + RESULT=$? + echo "Exit code: ${RESULT}" + echo -e "Response: \n${RESPONSE}\n\n" + if [ $RESULT -eq 0 ] && echo "${RESPONSE}" | grep -q -E "HTTP.*200 OK"; then + echo "Request fulfilled conditions to be successful (exit code = 0, response contains 'HTTP.*200 OK')" + exit 0 + fi + echo -e "Waiting ${backoff} before next retry\n\n" + sleep "${backoff}" +done +set -x + +scp /microshift/validate-microshift/cluster-debug-info.sh "${INSTANCE_PREFIX}":~ +ssh "${INSTANCE_PREFIX}" 'export KUBECONFIG=/var/lib/microshift/resources/kubeadmin/kubeconfig; sudo -E ~/cluster-debug-info.sh' +exit 1 diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.metadata.json new file mode 100644 index 0000000000000..c24ac3662f2c4 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.yaml b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.yaml new file mode 100644 index 0000000000000..2f77f971933c2 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-ref.yaml @@ -0,0 +1,16 @@ +ref: + as: openshift-microshift-e2e-router-smoke-test-aws + from: microshift-test-payload + commands: openshift-microshift-e2e-router-smoke-test-aws-commands.sh + resources: + requests: + cpu: 100m + memory: 90Mi + grace_period: 10m + env: + - name: HOME + default: /tmp/secret + credentials: + - namespace: test-credentials + name: microshift-rhsm-creds + mount_path: /var/run/rhsm/ diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.metadata.json new file mode 100644 index 0000000000000..a951ffa95c94e --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.yaml", + "owners": { + "approvers": [ + "chiragkyal", + "copejon", + "dhellmann", + "eggfoobar", + "ggiguash", + "pacevedom", + "pliurh", + "pmtk", + "zshi-redhat" + ], + "reviewers": [ + "copejon", + "dhellmann", + "ggiguash", + "pacevedom", + "pmtk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.yaml b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.yaml new file mode 100644 index 0000000000000..751c18b9d4c4f --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/router-smoke-test-aws/openshift-microshift-e2e-router-smoke-test-aws-workflow.yaml @@ -0,0 +1,10 @@ +workflow: + as: openshift-microshift-e2e-router-smoke-test-aws + steps: + allow_best_effort_post_steps: true + pre: + - chain: openshift-microshift-infra-aws-pre + test: + - chain: openshift-microshift-e2e-router-smoke-test-aws + post: + - chain: openshift-microshift-infra-aws-post From 13663340d2d8f9d4486d44a47d0810499fc29434 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Fri, 28 Apr 2023 16:07:11 -0500 Subject: [PATCH 5/9] add e2e-test aws workflow --- .../openshift-microshift-release-4.13.yaml | 12 ++++---- ...ift-microshift-release-4.13-periodics.yaml | 28 +++++++------------ .../openshift/microshift/e2e/test-aws/OWNERS | 23 +++++++++++++++ ...icroshift-e2e-test-aws-chain.metadata.json | 23 +++++++++++++++ ...enshift-microshift-e2e-test-aws-chain.yaml | 4 +++ ...nshift-microshift-e2e-test-aws-commands.sh | 26 +++++++++++++++++ ...-microshift-e2e-test-aws-ref.metadata.json | 23 +++++++++++++++ ...openshift-microshift-e2e-test-aws-ref.yaml | 18 ++++++++++++ ...oshift-e2e-test-aws-workflow.metadata.json | 23 +++++++++++++++ ...hift-microshift-e2e-test-aws-workflow.yaml | 10 +++++++ 10 files changed, 166 insertions(+), 24 deletions(-) create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/OWNERS create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.yaml create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.metadata.json create mode 100644 ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.yaml diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index af6b45b191c46..f6c496ca3583b 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -211,19 +211,19 @@ tests: - as: nightly-conformance-parallel cron: 0 0 * * 1-5 steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 + EC2_AMI: ami-07f5ac8ddbcfbb96e TEST_SUITE: openshift/conformance/parallel - workflow: openshift-microshift-e2e-test + workflow: openshift-microshift-e2e-test-aws - as: nightly-conformance-serial cron: 0 0 * * 1-5 steps: - cluster_profile: gcp + cluster_profile: aws env: - GOOGLE_COMPUTE_IMAGE_NAME: rhel-9-v20230203 + EC2_AMI: ami-07f5ac8ddbcfbb96e TEST_SUITE: openshift/conformance/serial - workflow: openshift-microshift-e2e-test + workflow: openshift-microshift-e2e-test-aws zz_generated_metadata: branch: release-4.13 org: openshift diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml index ce4c721c78aea..eb50d47da23bd 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-periodics.yaml @@ -1,6 +1,6 @@ periodics: - agent: kubernetes - cluster: build02 + cluster: build01 cron: 0 0 * * 1-5 decorate: true decoration_config: @@ -10,8 +10,8 @@ periodics: org: openshift repo: microshift labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" name: periodic-ci-openshift-microshift-release-4.13-nightly-conformance-parallel @@ -63,12 +63,8 @@ periodics: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials @@ -76,7 +72,7 @@ periodics: secret: secretName: result-aggregator - agent: kubernetes - cluster: build02 + cluster: build01 cron: 0 0 * * 1-5 decorate: true decoration_config: @@ -86,8 +82,8 @@ periodics: org: openshift repo: microshift labels: - ci-operator.openshift.io/cloud: gcp - ci-operator.openshift.io/cloud-cluster-profile: gcp + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" name: periodic-ci-openshift-microshift-release-4.13-nightly-conformance-serial @@ -139,12 +135,8 @@ periodics: secret: secretName: ci-pull-credentials - name: cluster-profile - projected: - sources: - - secret: - name: cluster-secrets-gcp - - configMap: - name: cluster-profile-gcp + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/OWNERS b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/OWNERS new file mode 100644 index 0000000000000..3571894286ee3 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/OWNERS @@ -0,0 +1,23 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# Fetched from https://github.com/openshift/microshift root OWNERS +# If the repo had OWNERS_ALIASES then the aliases were expanded +# Logins who are not members of 'openshift' organization were filtered out +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- cooktheryan +- copejon +- fzdarsky +- mangelajo +- oglok +- rootfs +- sallyom +options: {} +reviewers: +- cooktheryan +- copejon +- fzdarsky +- mangelajo +- oglok +- rootfs +- sallyom diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.metadata.json new file mode 100644 index 0000000000000..f16af2b90713b --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.yaml", + "owners": { + "approvers": [ + "cooktheryan", + "copejon", + "fzdarsky", + "mangelajo", + "oglok", + "rootfs", + "sallyom" + ], + "reviewers": [ + "cooktheryan", + "copejon", + "fzdarsky", + "mangelajo", + "oglok", + "rootfs", + "sallyom" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.yaml b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.yaml new file mode 100644 index 0000000000000..37b7c91db0872 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-chain.yaml @@ -0,0 +1,4 @@ +chain: + as: openshift-microshift-e2e-test-aws + steps: + - ref: openshift-microshift-e2e-test-aws diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh new file mode 100644 index 0000000000000..ae98bd2a44e1c --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -xeuo pipefail + +trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM + +IP_ADDRESS="$(cat ${SHARED_DIR}/public_address)" +HOST_USER="$(cat ${SHARED_DIR}/ssh_user)" + +echo "Using Host $IP_ADDRESS" + +mkdir -p "${HOME}/.ssh" +cat <"${HOME}/.ssh/config" +Host ${IP_ADDRESS} + User ${HOST_USER} + IdentityFile ${CLUSTER_PROFILE_DIR}/ssh-privatekey + StrictHostKeyChecking accept-new + ServerAliveInterval 30 + ServerAliveCountMax 1200 +EOF +chmod 0600 "${HOME}/.ssh/config" + + +ssh "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig + +KUBECONFIG=/tmp/kubeconfig openshift-tests run "${TEST_SUITE}" -v 2 --provider=none -o "${ARTIFACT_DIR}/e2e.log" --junit-dir "${ARTIFACT_DIR}/junit" diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.metadata.json new file mode 100644 index 0000000000000..5e9c6b5cbe241 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.yaml", + "owners": { + "approvers": [ + "cooktheryan", + "copejon", + "fzdarsky", + "mangelajo", + "oglok", + "rootfs", + "sallyom" + ], + "reviewers": [ + "cooktheryan", + "copejon", + "fzdarsky", + "mangelajo", + "oglok", + "rootfs", + "sallyom" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.yaml b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.yaml new file mode 100644 index 0000000000000..c5498e0adee97 --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-ref.yaml @@ -0,0 +1,18 @@ +ref: + as: openshift-microshift-e2e-test-aws + from: microshift-test-payload + commands: openshift-microshift-e2e-test-aws-commands.sh + resources: + requests: + cpu: 500m + memory: 100Mi + grace_period: 10m + env: + - name: HOME + default: /tmp/secret + - name: TEST_SUITE + default: "" + credentials: + - namespace: test-credentials + name: microshift-rhsm-creds + mount_path: /var/run/rhsm/ diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.metadata.json b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.metadata.json new file mode 100644 index 0000000000000..eab8dd035d9ca --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.metadata.json @@ -0,0 +1,23 @@ +{ + "path": "openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.yaml", + "owners": { + "approvers": [ + "cooktheryan", + "copejon", + "fzdarsky", + "mangelajo", + "oglok", + "rootfs", + "sallyom" + ], + "reviewers": [ + "cooktheryan", + "copejon", + "fzdarsky", + "mangelajo", + "oglok", + "rootfs", + "sallyom" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.yaml b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.yaml new file mode 100644 index 0000000000000..4d1275f5f789e --- /dev/null +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-workflow.yaml @@ -0,0 +1,10 @@ +workflow: + as: openshift-microshift-e2e-test-aws + steps: + allow_best_effort_post_steps: true + pre: + - chain: openshift-microshift-infra-aws-pre + test: + - chain: openshift-microshift-e2e-test-aws + post: + - chain: openshift-microshift-infra-aws-post From 150f7692c22edf763fa7fa627b3dea1a52ebb87f Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Mon, 1 May 2023 10:14:49 -0500 Subject: [PATCH 6/9] apply transition to aws --- .../openshift-microshift-release-4.13.yaml | 28 +++-- ...ft-microshift-release-4.13-presubmits.yaml | 107 ++++++++++-------- 2 files changed, 74 insertions(+), 61 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index f6c496ca3583b..22a063f916d2d 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -97,9 +97,15 @@ tag_specification: tests: - as: verify cluster: build02 - commands: make verify - container: - from: src + steps: + test: + - as: verify + commands: make verify + from: src + resources: + requests: + cpu: 100m + memory: 200Mi - as: test-unit cluster: build02 commands: make test-unit @@ -166,7 +172,7 @@ tests: EC2_AMI: ami-0c231be9fb222349e EC2_INSTANCE_TYPE: a1.2xlarge workflow: openshift-microshift-e2e-greenboot-aws -- as: e2e-router-smoke-test +- as: microshift-e2e cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -174,8 +180,8 @@ tests: cluster_profile: aws env: EC2_AMI: ami-07f5ac8ddbcfbb96e - workflow: openshift-microshift-e2e-router-smoke-test-aws -- as: e2e-router-smoke-test-arm + workflow: openshift-microshift-e2e-microshift-tests-aws +- as: microshift-e2e-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -184,11 +190,7 @@ tests: env: EC2_AMI: ami-0c231be9fb222349e EC2_INSTANCE_TYPE: a1.2xlarge - workflow: openshift-microshift-e2e-router-smoke-test-aws -- as: rebase-on-nightlies - cron: 0 5 * * 1-5 - steps: - workflow: openshift-microshift-rebase + workflow: openshift-microshift-e2e-microshift-tests-aws - as: e2e-loadbalancer-smoke-test cluster: build02 optional: true @@ -224,6 +226,10 @@ tests: EC2_AMI: ami-07f5ac8ddbcfbb96e TEST_SUITE: openshift/conformance/serial workflow: openshift-microshift-e2e-test-aws +- as: rebase-on-nightlies + cron: 0 5 * * 1-5 + steps: + workflow: openshift-microshift-rebase zz_generated_metadata: branch: release-4.13 org: openshift diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml index bb67b0246cdb4..f1c8c3d859594 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml @@ -615,35 +615,28 @@ presubmits: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-reboot-arm,?($|\s.*) - agent: kubernetes - always_run: false + always_run: true branches: - ^release-4\.13$ - ^release-4\.13- - cluster: build02 - context: ci/prow/e2e-router-smoke-test + cluster: build04 + context: ci/prow/images decorate: true decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: aws - ci-operator.openshift.io/cloud-cluster-profile: aws - ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.13-e2e-router-smoke-test - optional: true - rerun_command: /test e2e-router-smoke-test - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) + name: pull-ci-openshift-microshift-release-4.13-images + rerun_command: /test images 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-router-smoke-test-cluster-profile - - --target=e2e-router-smoke-test + - --target=[images] + - --target=[release:latest] command: - ci-operator image: ci-operator:latest @@ -653,14 +646,6 @@ presubmits: 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-router-smoke-test-cluster-profile - name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -672,32 +657,20 @@ presubmits: 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 - secret: - secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test,?($|\s.*) + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: false branches: - ^release-4\.13$ - ^release-4\.13- cluster: build02 - context: ci/prow/e2e-router-smoke-test-arm + context: ci/prow/microshift-e2e decorate: true decoration_config: skip_cloning: true @@ -707,9 +680,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.13-e2e-router-smoke-test-arm + name: pull-ci-openshift-microshift-release-4.13-microshift-e2e optional: true - rerun_command: /test e2e-router-smoke-test-arm + rerun_command: /test microshift-e2e run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -719,8 +692,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/e2e-router-smoke-test-arm-cluster-profile - - --target=e2e-router-smoke-test-arm + - --secret-dir=/usr/local/microshift-e2e-cluster-profile + - --target=microshift-e2e command: - ci-operator image: ci-operator:latest @@ -736,7 +709,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/e2e-router-smoke-test-arm-cluster-profile + - mountPath: /usr/local/microshift-e2e-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -767,30 +740,37 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )e2e-router-smoke-test-arm,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e,?($|\s.*) - agent: kubernetes - always_run: true + always_run: false branches: - ^release-4\.13$ - ^release-4\.13- - cluster: build04 - context: ci/prow/images + cluster: build02 + context: ci/prow/microshift-e2e-arm decorate: true decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws + ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.13-images - rerun_command: /test images + name: pull-ci-openshift-microshift-release-4.13-microshift-e2e-arm + optional: true + rerun_command: /test microshift-e2e-arm + run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) 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 - - --target=[images] - - --target=[release:latest] + - --secret-dir=/secrets/ci-pull-credentials + - --secret-dir=/usr/local/microshift-e2e-arm-cluster-profile + - --target=microshift-e2e-arm command: - ci-operator image: ci-operator:latest @@ -800,6 +780,14 @@ presubmits: 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/microshift-e2e-arm-cluster-profile + name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -811,13 +799,25 @@ presubmits: 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 + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )images,?($|\s.*) + trigger: (?m)^/test( | .* )microshift-e2e-arm,?($|\s.*) - agent: kubernetes always_run: false branches: @@ -941,6 +941,7 @@ presubmits: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials - --target=verify command: - ci-operator @@ -951,6 +952,9 @@ presubmits: requests: cpu: 10m volumeMounts: + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -962,6 +966,9 @@ presubmits: readOnly: true serviceAccountName: ci-operator volumes: + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials - name: pull-secret secret: secretName: registry-pull-credentials From 43af37a1d7a9e3a13b4bd4faac7ec260622d9688 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Wed, 3 May 2023 11:58:38 -0500 Subject: [PATCH 7/9] make update fix config indentation fix ssh command --- .../openshift-microshift-release-4.13.yaml | 8 +- ...ft-microshift-release-4.13-presubmits.yaml | 100 +++++++++--------- ...nshift-microshift-e2e-test-aws-commands.sh | 2 +- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index 22a063f916d2d..9907939aad893 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -172,7 +172,7 @@ tests: EC2_AMI: ami-0c231be9fb222349e EC2_INSTANCE_TYPE: a1.2xlarge workflow: openshift-microshift-e2e-greenboot-aws -- as: microshift-e2e +- as: e2e-router-smoke-test cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -180,8 +180,8 @@ tests: cluster_profile: aws env: EC2_AMI: ami-07f5ac8ddbcfbb96e - workflow: openshift-microshift-e2e-microshift-tests-aws -- as: microshift-e2e-arm + workflow: openshift-microshift-e2e-router-smoke-test-aws +- as: e2e-router-smoke-test-arm cluster: build02 optional: true run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) @@ -190,7 +190,7 @@ tests: env: EC2_AMI: ami-0c231be9fb222349e EC2_INSTANCE_TYPE: a1.2xlarge - workflow: openshift-microshift-e2e-microshift-tests-aws + workflow: openshift-microshift-e2e-router-smoke-test-aws - as: e2e-loadbalancer-smoke-test cluster: build02 optional: true diff --git a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml index f1c8c3d859594..479e2dd795ad1 100644 --- a/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml +++ b/ci-operator/jobs/openshift/microshift/openshift-microshift-release-4.13-presubmits.yaml @@ -615,28 +615,35 @@ presubmits: secretName: result-aggregator trigger: (?m)^/test( | .* )e2e-reboot-arm,?($|\s.*) - agent: kubernetes - always_run: true + always_run: false branches: - ^release-4\.13$ - ^release-4\.13- - cluster: build04 - context: ci/prow/images + cluster: build02 + context: ci/prow/e2e-router-smoke-test decorate: true decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws + ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.13-images - rerun_command: /test images + name: pull-ci-openshift-microshift-release-4.13-e2e-router-smoke-test + optional: true + rerun_command: /test e2e-router-smoke-test + run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) 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 - - --target=[images] - - --target=[release:latest] + - --secret-dir=/secrets/ci-pull-credentials + - --secret-dir=/usr/local/e2e-router-smoke-test-cluster-profile + - --target=e2e-router-smoke-test command: - ci-operator image: ci-operator:latest @@ -646,6 +653,14 @@ presubmits: 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-router-smoke-test-cluster-profile + name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -657,20 +672,32 @@ presubmits: 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 + secret: + secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )images,?($|\s.*) + trigger: (?m)^/test( | .* )e2e-router-smoke-test,?($|\s.*) - agent: kubernetes always_run: false branches: - ^release-4\.13$ - ^release-4\.13- cluster: build02 - context: ci/prow/microshift-e2e + context: ci/prow/e2e-router-smoke-test-arm decorate: true decoration_config: skip_cloning: true @@ -680,9 +707,9 @@ presubmits: ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.13-microshift-e2e + name: pull-ci-openshift-microshift-release-4.13-e2e-router-smoke-test-arm optional: true - rerun_command: /test microshift-e2e + rerun_command: /test e2e-router-smoke-test-arm run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) spec: containers: @@ -692,8 +719,8 @@ presubmits: - --lease-server-credentials-file=/etc/boskos/credentials - --report-credentials-file=/etc/report/credentials - --secret-dir=/secrets/ci-pull-credentials - - --secret-dir=/usr/local/microshift-e2e-cluster-profile - - --target=microshift-e2e + - --secret-dir=/usr/local/e2e-router-smoke-test-arm-cluster-profile + - --target=e2e-router-smoke-test-arm command: - ci-operator image: ci-operator:latest @@ -709,7 +736,7 @@ presubmits: - mountPath: /secrets/ci-pull-credentials name: ci-pull-credentials readOnly: true - - mountPath: /usr/local/microshift-e2e-cluster-profile + - mountPath: /usr/local/e2e-router-smoke-test-arm-cluster-profile name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials @@ -740,37 +767,30 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )microshift-e2e,?($|\s.*) + trigger: (?m)^/test( | .* )e2e-router-smoke-test-arm,?($|\s.*) - agent: kubernetes - always_run: false + always_run: true branches: - ^release-4\.13$ - ^release-4\.13- - cluster: build02 - context: ci/prow/microshift-e2e-arm + cluster: build04 + context: ci/prow/images decorate: true decoration_config: skip_cloning: true labels: - ci-operator.openshift.io/cloud: aws - ci-operator.openshift.io/cloud-cluster-profile: aws - ci-operator.openshift.io/cluster: build02 ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-microshift-release-4.13-microshift-e2e-arm - optional: true - rerun_command: /test microshift-e2e-arm - run_if_changed: ^(assets/.*|cmd/.*|etcd/.*|pkg/.*|packaging/.*|vendor/.*|go\.sum|go\.mod|Makefile|.*\.sh) + name: pull-ci-openshift-microshift-release-4.13-images + rerun_command: /test images 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/microshift-e2e-arm-cluster-profile - - --target=microshift-e2e-arm + - --target=[images] + - --target=[release:latest] command: - ci-operator image: ci-operator:latest @@ -780,14 +800,6 @@ presubmits: 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/microshift-e2e-arm-cluster-profile - name: cluster-profile - mountPath: /secrets/gcs name: gcs-credentials readOnly: true @@ -799,25 +811,13 @@ presubmits: 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 - secret: - secretName: cluster-secrets-aws - name: pull-secret secret: secretName: registry-pull-credentials - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )microshift-e2e-arm,?($|\s.*) + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: false branches: diff --git a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh index ae98bd2a44e1c..acc4a8abe51c6 100644 --- a/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh +++ b/ci-operator/step-registry/openshift/microshift/e2e/test-aws/openshift-microshift-e2e-test-aws-commands.sh @@ -21,6 +21,6 @@ EOF chmod 0600 "${HOME}/.ssh/config" -ssh "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig +ssh "${HOST_USER}@${IP_ADDRESS}" "sudo cat /var/lib/microshift/resources/kubeadmin/${IP_ADDRESS}/kubeconfig" >/tmp/kubeconfig KUBECONFIG=/tmp/kubeconfig openshift-tests run "${TEST_SUITE}" -v 2 --provider=none -o "${ARTIFACT_DIR}/e2e.log" --junit-dir "${ARTIFACT_DIR}/junit" From 37c75bb19c1bde27308a0d6dbe351f2e13f78032 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Wed, 3 May 2023 14:21:58 -0500 Subject: [PATCH 8/9] change CPU to c6g to workaround resource shortage --- .../microshift/openshift-microshift-release-4.13.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index 9907939aad893..49b24511cd4b1 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -133,7 +133,7 @@ tests: cluster_profile: aws env: EC2_AMI: ami-0c231be9fb222349e - EC2_INSTANCE_TYPE: a1.2xlarge + EC2_INSTANCE_TYPE: c6g.2xlarge workflow: openshift-microshift-e2e-openshift-conformance-reduced-aws - as: e2e-reboot cluster: build02 @@ -151,7 +151,7 @@ tests: cluster_profile: aws env: EC2_AMI: ami-0c231be9fb222349e - EC2_INSTANCE_TYPE: a1.2xlarge + EC2_INSTANCE_TYPE: c6g.2xlarge workflow: openshift-microshift-e2e-reboot-tests-aws - as: e2e-greenboot cluster: build02 @@ -170,7 +170,7 @@ tests: cluster_profile: aws env: EC2_AMI: ami-0c231be9fb222349e - EC2_INSTANCE_TYPE: a1.2xlarge + EC2_INSTANCE_TYPE: c6g.2xlarge workflow: openshift-microshift-e2e-greenboot-aws - as: e2e-router-smoke-test cluster: build02 @@ -189,7 +189,7 @@ tests: cluster_profile: aws env: EC2_AMI: ami-0c231be9fb222349e - EC2_INSTANCE_TYPE: a1.2xlarge + EC2_INSTANCE_TYPE: c6g.2xlarge workflow: openshift-microshift-e2e-router-smoke-test-aws - as: e2e-loadbalancer-smoke-test cluster: build02 @@ -208,7 +208,7 @@ tests: cluster_profile: aws env: EC2_AMI: ami-0c231be9fb222349e - EC2_INSTANCE_TYPE: a1.2xlarge + EC2_INSTANCE_TYPE: c6g.2xlarge workflow: openshift-microshift-e2e-loadbalancer-smoke-test-aws - as: nightly-conformance-parallel cron: 0 0 * * 1-5 From 89898d6329a9033631df7a7254935e4e7babd1f4 Mon Sep 17 00:00:00 2001 From: Jon Cope Date: Wed, 3 May 2023 16:48:19 -0500 Subject: [PATCH 9/9] minimizing the diff to be certain i'm not adding a test that wasn't there previously --- .../microshift/openshift-microshift-release-4.13.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml index 49b24511cd4b1..f14484b3550ca 100644 --- a/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml +++ b/ci-operator/config/openshift/microshift/openshift-microshift-release-4.13.yaml @@ -191,6 +191,10 @@ tests: EC2_AMI: ami-0c231be9fb222349e EC2_INSTANCE_TYPE: c6g.2xlarge workflow: openshift-microshift-e2e-router-smoke-test-aws +- as: rebase-on-nightlies + cron: 0 5 * * 1-5 + steps: + workflow: openshift-microshift-rebase - as: e2e-loadbalancer-smoke-test cluster: build02 optional: true @@ -226,10 +230,6 @@ tests: EC2_AMI: ami-07f5ac8ddbcfbb96e TEST_SUITE: openshift/conformance/serial workflow: openshift-microshift-e2e-test-aws -- as: rebase-on-nightlies - cron: 0 5 * * 1-5 - steps: - workflow: openshift-microshift-rebase zz_generated_metadata: branch: release-4.13 org: openshift