diff --git a/install/roles/automation-hub/tasks/main.yml b/install/roles/automation-hub/tasks/main.yml index 1bb2fe91..71199f4e 100644 --- a/install/roles/automation-hub/tasks/main.yml +++ b/install/roles/automation-hub/tasks/main.yml @@ -125,9 +125,6 @@ - import_tasks: scenario-deployment/tekton/odh-tkn-pipelines.yaml tags: [tekton-pipelines, odh, never] -- import_tasks: scenario-deployment/tekton/chaos-tkn-pipelines.yaml - tags: [tekton-pipelines, chaos, never] - - import_tasks: scenario-deployment/workflows/infra-argo-workflows.yaml tags: [workflow, infra, never] diff --git a/install/roles/automation-hub/tasks/scenario-deployment/tekton/chaos-tkn-pipelines.yaml b/install/roles/automation-hub/tasks/scenario-deployment/tekton/chaos-tkn-pipelines.yaml deleted file mode 100644 index 25fd38b8..00000000 --- a/install/roles/automation-hub/tasks/scenario-deployment/tekton/chaos-tkn-pipelines.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- name: Deploy chaos engineering resources for Tekton from Jinja2 templates - kubernetes.core.k8s: - kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}" - namespace: "{{ infra_ci_namespace }}" - state: present - template: "{{ item }}" - verify_ssl: no - apply: true - with_fileglob: 'templates/tekton/pipelines/chaos/*.j2' - -- name: Deploy non-template chaos engineering cron-jobs for Tekton - kubernetes.core.k8s: - kubeconfig: "{{ kubeconfig_path }}/{{ infra_context_name }}" - namespace: "{{ infra_ci_namespace }}" - state: present - template: "{{ item }}" - verify_ssl: no - apply: true - with_fileglob: 'templates/tekton/pipelines/chaos/cron-jobs/*.yaml' diff --git a/install/roles/automation-hub/templates/argo-workflows/workflows/infra/automation-hub-install.yaml.j2 b/install/roles/automation-hub/templates/argo-workflows/workflows/infra/automation-hub-install.yaml.j2 index 6a858fab..6ad9db7e 100644 --- a/install/roles/automation-hub/templates/argo-workflows/workflows/infra/automation-hub-install.yaml.j2 +++ b/install/roles/automation-hub/templates/argo-workflows/workflows/infra/automation-hub-install.yaml.j2 @@ -39,7 +39,7 @@ spec: git clone https://github.com/skodjob/automation-hub.git $CURRENT_DIR echo $GIT_CRYPT_SECRET | base64 -d > "$CURRENT_DIR/crypt-key" cd $CURRENT_DIR && git crypt unlock crypt-key - cd $CURRENT_DIR && ansible-playbook install/automation-hub-play.yaml --tags="infra,strimzi-infra,odh,chaos" -v + cd $CURRENT_DIR && ansible-playbook install/automation-hub-play.yaml --tags="infra,strimzi-infra,odh" -v env: - name: GIT_CRYPT_SECRET valueFrom: diff --git a/install/roles/automation-hub/templates/tekton/pipelines/chaos/chaos-trigger.yaml.j2 b/install/roles/automation-hub/templates/tekton/pipelines/chaos/chaos-trigger.yaml.j2 deleted file mode 100644 index 582e63ab..00000000 --- a/install/roles/automation-hub/templates/tekton/pipelines/chaos/chaos-trigger.yaml.j2 +++ /dev/null @@ -1,146 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - annotations: - argocd.argoproj.io/hook: PreSync - name: chaos-smoke-pipeline-worker-01 - namespace: tealc-pipelines - labels: - project: skodjob -spec: - workspaces: - - name: pipeline-ws - tasks: - - name: chaos-smoke-pipeline - workspaces: - - name: pipeline-ws - workspace: pipeline-ws - taskSpec: - workspaces: - - name: pipeline-ws - params: - - name: chaosCommand - type: string - default: "--help" # Default value for the chaosCommand parameter - steps: - - name: execute-tests - image: quay.io/mk-ci-cd/mas-ci-tools:latest - env: - - name: WORKER_01_OCP_TOKEN - valueFrom: - secretKeyRef: - key: token - name: worker-01-access - - name: WORKER_01_URL - valueFrom: - secretKeyRef: - key: server - name: worker-01-access - - name: WORKER_02_OCP_TOKEN - valueFrom: - secretKeyRef: - key: token - name: worker-02-access - - name: WORKER_02_URL - valueFrom: - secretKeyRef: - key: server - name: worker-02-access - - name: WORKER_03_OCP_TOKEN - valueFrom: - secretKeyRef: - key: token - name: worker-03-access - - name: WORKER_03_URL - valueFrom: - secretKeyRef: - key: server - name: worker-03-access - script: | - cd $(workspaces.pipeline-ws.path) - - # point to worker-01 cluster - oc login --token $WORKER_01_OCP_TOKEN $WORKER_01_URL --insecure-skip-tls-verify=true - - # PROMETHEUS URL - PROMETHEUS_URL=$(oc get route thanos-querier -n openshift-monitoring | awk '/thanos-querier/ {print $2}') - PROMETHEUS_URL=https://$PROMETHEUS_URL/api - export PROMETHEUS_URL=$PROMETHEUS_URL - - git clone https://github.com/see-quick/StrimKKhaos.git - - cd StrimKKhaos - - # debug output - ./strimkkhaos.sh $(params.chaosCommand) - finally: - - name: notify-slack - when: - - input: $(tasks.status) - operator: in - values: ["Failed"] - taskRef: - name: send-to-webhook-slack - params: - - name: webhook-secret - value: webhook-secret - - name: message - value: "PipelineRun `$(context.pipelineRun.name)` has status: `$(tasks.status)!`" - - name: title - value: "$(context.pipeline.name)" - - name: status - value: "$(tasks.status)" - - name: button_url - value: "{{ infra_console_url }}/k8s/ns/{{ infra_ci_namespace }}/tekton.dev~v1~PipelineRun/$(context.pipelineRun.name)" - - name: button_text - value: "Pipeline :tekton:" ---- - -apiVersion: triggers.tekton.dev/v1alpha1 -kind: EventListener -metadata: - name: chaos-event-listener - namespace: tealc-pipelines -spec: - triggers: - - name: chaos-pipeline-trigger - bindings: - - ref: chaos-command-binding # Reference of TriggerBinding - template: - ref: chaos-smoke-pipeline-template-worker-01 # Reference of TriggerTemplate ---- - -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerBinding -metadata: - name: chaos-command-binding - namespace: tealc-pipelines -spec: - params: - - name: chaosCommand - value: $(body.chaosCommand) # Assuming the payload has a field named 'chaosCommand' ---- - -apiVersion: triggers.tekton.dev/v1alpha1 -kind: TriggerTemplate -metadata: - name: chaos-smoke-pipeline-template-worker-01 - namespace: tealc-pipelines -spec: - params: - - name: chaosCommand # make sure that this matches TriggerBinding parameter! - description: Command for chaos testing - resourcetemplates: - - apiVersion: tekton.dev/v1beta1 - kind: PipelineRun - metadata: - generateName: chaos-smoke-pipeline-run- - spec: - pipelineRef: - name: chaos-smoke-pipeline-worker-01 - workspaces: - - name: pipeline-ws - emptyDir: {} - params: - - name: chaosCommand - value: "$(tt.params.chaosCommand)" diff --git a/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/chaos-cron-job.yaml b/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/chaos-cron-job.yaml deleted file mode 100644 index cc170618..00000000 --- a/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/chaos-cron-job.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: chaos-smoke-pipeline-cron-worker-01 - namespace: tealc-pipelines -spec: - schedule: "0 */4 * * *" # Runs every 4 hours - jobTemplate: - spec: - template: - spec: - containers: - - name: trigger - image: appropriate/curl - command: - - /bin/sh - - -c - - > - curl -X POST - -H 'Content-Type: application/json' - -d '{"chaosCommand": "--pod-chaos kafka-3-pods-failure --sut-namespace strimzi-kafka --metrics-selector anubis-pool-.* --strimzi-pod-sets anubis-pool-big,anubis-pool-small,anubis-zookeeper --enable-probes"}' - http://el-chaos-event-listener.tealc-pipelines.svc.cluster.local:8080 - restartPolicy: OnFailure diff --git a/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/network-chaos-producers-cron-job.yaml b/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/network-chaos-producers-cron-job.yaml deleted file mode 100644 index 5b701d24..00000000 --- a/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/network-chaos-producers-cron-job.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: chaos-network-producers-worker-01 - namespace: tealc-pipelines -spec: - schedule: "0 */8 * * *" # Runs every 8 hours - jobTemplate: - spec: - template: - spec: - containers: - - name: trigger - image: appropriate/curl - command: - - /bin/sh - - -c - - > - curl -X POST - -H 'Content-Type: application/json' - -d '{"chaosCommand": "--network-chaos kafka-producers-fast-internal-network-delay-all --sut-namespace strimzi-kafka --clients-namespace strimzi-clients --metrics-selector anubis-pool-.* --enable-probes" }' - http://el-chaos-event-listener.tealc-pipelines.svc.cluster.local:8080 - restartPolicy: OnFailure \ No newline at end of file diff --git a/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/workflow-chaos-bridge-kafka-cron-job.yaml b/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/workflow-chaos-bridge-kafka-cron-job.yaml deleted file mode 100644 index 18af3b9f..00000000 --- a/install/roles/automation-hub/templates/tekton/pipelines/chaos/cron-jobs/workflow-chaos-bridge-kafka-cron-job.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: chaos-worflow-bridge-kafka-worker-01 - namespace: tealc-pipelines -spec: - schedule: "0 13 * * *" # Runs every day at 13:00 - jobTemplate: - spec: - template: - spec: - containers: - - name: trigger - image: appropriate/curl - command: - - /bin/sh - - -c - - > - curl -X POST - -H 'Content-Type: application/json' - -d '{"chaosCommand": "--workflow-chaos http-chaos-bridge-and-kafka-stress --sut-namespace strimzi-kafka --metrics-selector anubis-pool-.* --strimzi-bridge-namespace strimzi-bridge --target-kafka-namespace strimzi-kafka-kraft --target-metrics-selector horus-broker-.* --strimzi-pod-sets anubis-pool-big,anubis-pool-small,anubis-zookeeper,horus-broker,horus-broker-big,horus-controller --enable-probes" }' - http://el-chaos-event-listener.tealc-pipelines.svc.cluster.local:8080 - restartPolicy: OnFailure \ No newline at end of file diff --git a/install/roles/automation-hub/templates/tekton/pipelines/open-data-hub/run/pipeline-runs.yaml b/install/roles/automation-hub/templates/tekton/pipelines/open-data-hub/run/pipeline-runs.yaml index b52010b1..e69de29b 100644 --- a/install/roles/automation-hub/templates/tekton/pipelines/open-data-hub/run/pipeline-runs.yaml +++ b/install/roles/automation-hub/templates/tekton/pipelines/open-data-hub/run/pipeline-runs.yaml @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: open-data-hub-files-update-start - labels: - app: skodjob - project: skodjob -spec: - pipelineRef: - name: open-data-hub-files-update-pipeline - workspaces: - - name: pipeline-ws - volumeClaimTemplate: - metadata: - name: odh-pvc - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1000Mi