diff --git a/ci-operator/config/openshift/ols-load-generator/openshift-ols-load-generator-main.yaml b/ci-operator/config/openshift/ols-load-generator/openshift-ols-load-generator-main.yaml index 9c4e71e232b0..77ff86962b13 100644 --- a/ci-operator/config/openshift/ols-load-generator/openshift-ols-load-generator-main.yaml +++ b/ci-operator/config/openshift/ols-load-generator/openshift-ols-load-generator-main.yaml @@ -1,20 +1,112 @@ build_root: image_stream_tag: - name: release - namespace: openshift - tag: golang-1.21 + name: ci-tools-build-root + namespace: ci + tag: latest +images: +- dockerfile_path: prow/Dockerfile + to: ols-load-generator-ci +promotion: + to: + - namespace: ci + tag: latest +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "4.18" resources: '*': - limits: - memory: 4Gi requests: cpu: 100m memory: 200Mi tests: -- as: unit - commands: "echo \"no test commands\" \n" - container: - from: src +- as: ols-load-test-10workers + cron: 0 0 1-7,15-21 * 1 + steps: + allow_skip_on_success: true + cluster_profile: aws-perfscale + env: + BASE_DOMAIN: perfscale.devcluster.openshift.com + COMPUTE_NODE_REPLICAS: "3" + COMPUTE_NODE_TYPE: m6i.xlarge + OLS_TEST_DURATIONS: 5m,10m,20m + OLS_TEST_WORKERS: "10" + OPENSHIFT_INFRA_NODE_INSTANCE_TYPE: r5.xlarge + ZONES_COUNT: "3" + test: + - ref: ols-load-generator-tests + workflow: openshift-qe-installer-aws + timeout: 8h0m0s +- as: ols-load-test-25workers + cron: 0 6 1-7,15-21 * 1 + steps: + allow_skip_on_success: true + cluster_profile: aws-perfscale + env: + BASE_DOMAIN: perfscale.devcluster.openshift.com + COMPUTE_NODE_REPLICAS: "3" + COMPUTE_NODE_TYPE: m6i.xlarge + OLS_TEST_DURATIONS: 5m,10m,20m + OLS_TEST_WORKERS: "25" + OPENSHIFT_INFRA_NODE_INSTANCE_TYPE: r5.xlarge + ZONES_COUNT: "3" + test: + - ref: ols-load-generator-tests + workflow: openshift-qe-installer-aws + timeout: 8h0m0s +- as: ols-load-test-50workers + cron: 0 12 1-7,15-21 * 1 + steps: + allow_skip_on_success: true + cluster_profile: aws-perfscale + env: + BASE_DOMAIN: perfscale.devcluster.openshift.com + COMPUTE_NODE_REPLICAS: "3" + COMPUTE_NODE_TYPE: m6i.xlarge + OLS_TEST_DURATIONS: 5m,10m,20m + OLS_TEST_WORKERS: "50" + OPENSHIFT_INFRA_NODE_INSTANCE_TYPE: r5.xlarge + ZONES_COUNT: "3" + test: + - ref: ols-load-generator-tests + workflow: openshift-qe-installer-aws + timeout: 8h0m0s +- as: ols-load-test-100workers + cron: 0 18 1-7,15-21 * 1 + steps: + allow_skip_on_success: true + cluster_profile: aws-perfscale + env: + BASE_DOMAIN: perfscale.devcluster.openshift.com + COMPUTE_NODE_REPLICAS: "3" + COMPUTE_NODE_TYPE: m6i.xlarge + OLS_TEST_DURATIONS: 5m,10m,20m + OLS_TEST_WORKERS: "100" + OPENSHIFT_INFRA_NODE_INSTANCE_TYPE: r5.xlarge + ZONES_COUNT: "3" + test: + - ref: ols-load-generator-tests + workflow: openshift-qe-installer-aws + timeout: 8h0m0s +- always_run: false + as: ols-load-test-1000workers + steps: + allow_skip_on_success: true + cluster_profile: aws-perfscale + env: + BASE_DOMAIN: perfscale.devcluster.openshift.com + COMPUTE_NODE_REPLICAS: "3" + COMPUTE_NODE_TYPE: m6i.xlarge + OLS_TEST_DURATIONS: 5m + OLS_TEST_WORKERS: "1000" + OPENSHIFT_INFRA_NODE_INSTANCE_TYPE: r5.xlarge + ZONES_COUNT: "3" + test: + - ref: ols-load-generator-tests + workflow: openshift-qe-installer-aws + timeout: 8h0m0s zz_generated_metadata: branch: main org: openshift diff --git a/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-periodics.yaml b/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-periodics.yaml new file mode 100644 index 000000000000..ccff13a39df9 --- /dev/null +++ b/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-periodics.yaml @@ -0,0 +1,297 @@ +periodics: +- agent: kubernetes + cluster: build01 + cron: 0 18 1-7,15-21 * 1 + decorate: true + decoration_config: + skip_cloning: true + timeout: 8h0m0s + extra_refs: + - base_ref: main + org: openshift + repo: ols-load-generator + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws-perfscale + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-ols-load-generator-main-ols-load-test-100workers + 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 + - --target=ols-load-test-100workers + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator +- agent: kubernetes + cluster: build01 + cron: 0 0 1-7,15-21 * 1 + decorate: true + decoration_config: + skip_cloning: true + timeout: 8h0m0s + extra_refs: + - base_ref: main + org: openshift + repo: ols-load-generator + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws-perfscale + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-ols-load-generator-main-ols-load-test-10workers + 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 + - --target=ols-load-test-10workers + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator +- agent: kubernetes + cluster: build01 + cron: 0 6 1-7,15-21 * 1 + decorate: true + decoration_config: + skip_cloning: true + timeout: 8h0m0s + extra_refs: + - base_ref: main + org: openshift + repo: ols-load-generator + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws-perfscale + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-ols-load-generator-main-ols-load-test-25workers + 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 + - --target=ols-load-test-25workers + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator +- agent: kubernetes + cluster: build01 + cron: 0 12 1-7,15-21 * 1 + decorate: true + decoration_config: + skip_cloning: true + timeout: 8h0m0s + extra_refs: + - base_ref: main + org: openshift + repo: ols-load-generator + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws-perfscale + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-openshift-ols-load-generator-main-ols-load-test-50workers + 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 + - --target=ols-load-test-50workers + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator diff --git a/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-postsubmits.yaml b/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-postsubmits.yaml new file mode 100644 index 000000000000..be36921ea535 --- /dev/null +++ b/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-postsubmits.yaml @@ -0,0 +1,63 @@ +postsubmits: + openshift/ols-load-generator: + - agent: kubernetes + always_run: true + branches: + - ^main$ + cluster: build03 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/is-promotion: "true" + ci.openshift.io/generator: prowgen + job-release: "4.18" + max_concurrency: 1 + name: branch-ci-openshift-ols-load-generator-main-images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --image-mirror-push-secret=/etc/push-secret/.dockerconfigjson + - --promote + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/push-secret + name: push-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: push-secret + secret: + secretName: registry-push-credentials-ci-central + - name: result-aggregator + secret: + secretName: result-aggregator diff --git a/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-presubmits.yaml b/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-presubmits.yaml index 8d22cb448257..6ecb31776dce 100644 --- a/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/ols-load-generator/openshift-ols-load-generator-main-presubmits.yaml @@ -6,22 +6,23 @@ presubmits: - ^main$ - ^main- cluster: build01 - context: ci/prow/unit + context: ci/prow/images decorate: true decoration_config: skip_cloning: true labels: ci.openshift.io/generator: prowgen + job-release: "4.18" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-ols-load-generator-main-unit - rerun_command: /test unit + name: pull-ci-openshift-ols-load-generator-main-images + rerun_command: /test images spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - - --target=unit + - --target=[images] command: - ci-operator image: ci-operator:latest @@ -54,4 +55,80 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )unit,?($|\s.*) + trigger: (?m)^/test( | .* )images,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build03 + context: ci/prow/ols-load-test-1000workers + decorate: true + decoration_config: + skip_cloning: true + timeout: 8h0m0s + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: aws-perfscale + ci.openshift.io/generator: prowgen + job-release: "4.18" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-ols-load-generator-main-ols-load-test-1000workers + rerun_command: /test ols-load-test-1000workers + 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 + - --target=ols-load-test-1000workers + command: + - ci-operator + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )(ols-load-test-1000workers|remaining-required),?($|\s.*) diff --git a/ci-operator/step-registry/ols-load-generator/OWNERS b/ci-operator/step-registry/ols-load-generator/OWNERS new file mode 100644 index 000000000000..add055dc122d --- /dev/null +++ b/ci-operator/step-registry/ols-load-generator/OWNERS @@ -0,0 +1,14 @@ +approvers: + - bparees + - tisnik + - xrajesh + - eparis + - raptorsun + - vishnuchalla +reviewers: + - bparees + - tisnik + - xrajesh + - eparis + - raptorsun + - vishnuchalla diff --git a/ci-operator/step-registry/ols-load-generator/tests/OWNERS b/ci-operator/step-registry/ols-load-generator/tests/OWNERS new file mode 100644 index 000000000000..add055dc122d --- /dev/null +++ b/ci-operator/step-registry/ols-load-generator/tests/OWNERS @@ -0,0 +1,14 @@ +approvers: + - bparees + - tisnik + - xrajesh + - eparis + - raptorsun + - vishnuchalla +reviewers: + - bparees + - tisnik + - xrajesh + - eparis + - raptorsun + - vishnuchalla diff --git a/ci-operator/step-registry/ols-load-generator/tests/ols-load-generator-tests-commands.sh b/ci-operator/step-registry/ols-load-generator/tests/ols-load-generator-tests-commands.sh new file mode 100644 index 000000000000..6da323281010 --- /dev/null +++ b/ci-operator/step-registry/ols-load-generator/tests/ols-load-generator-tests-commands.sh @@ -0,0 +1,184 @@ +#!/bin/bash +set -o errexit +set -o nounset +set -o pipefail +set -x +cat /etc/os-release +oc config view +oc projects +pushd /tmp + +ES_PASSWORD=$(cat "/secret/password") +ES_USERNAME=$(cat "/secret/username") + +# shellcheck disable=SC2153 +IFS=',' read -ra test_durations <<< "$OLS_TEST_DURATIONS" + +for OLS_TEST_DURATION in "${test_durations[@]}"; do + # Create namespace and set monitoring labels + oc create namespace openshift-lightspeed || true + oc label namespaces openshift-lightspeed openshift.io/cluster-monitoring=true --overwrite=true + + # Deploy fake secret + oc create secret generic fake-secret \ + --from-literal=apitoken="fake-api-key" \ + -n openshift-lightspeed + + # Get the controller manager running + git clone https://github.com/openshift/lightspeed-operator.git --branch main --depth 1 || true + pushd lightspeed-operator + make deploy + oc wait --for=condition=Available -n openshift-lightspeed deployment lightspeed-operator-controller-manager --timeout=300s + popd + + # Deploy olsconfig with fake values + cat <- + This step runs the ols load testing workload in the deployed cluster \ No newline at end of file