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..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 @@ -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 @@ -115,76 +121,76 @@ 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: c6g.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: c6g.2xlarge + workflow: openshift-microshift-e2e-reboot-tests-aws - as: e2e-greenboot 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-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: c6g.2xlarge + workflow: openshift-microshift-e2e-greenboot-aws - as: e2e-router-smoke-test 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-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: c6g.2xlarge + workflow: openshift-microshift-e2e-router-smoke-test-aws - as: rebase-on-nightlies cron: 0 5 * * 1-5 steps: @@ -194,36 +200,36 @@ 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: c6g.2xlarge + workflow: openshift-microshift-e2e-loadbalancer-smoke-test-aws - 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/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..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 @@ -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 @@ -173,8 +165,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 +222,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 +242,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 +299,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 @@ -335,8 +319,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" @@ -391,12 +375,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 @@ -415,8 +395,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" @@ -472,12 +452,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 @@ -496,8 +472,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" @@ -552,12 +528,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 @@ -576,8 +548,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" @@ -633,12 +605,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 @@ -657,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" @@ -714,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 @@ -738,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" @@ -795,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 @@ -981,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 @@ -991,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 @@ -1002,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 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}/.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 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/ 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 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..acc4a8abe51c6 --- /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 "${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" 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