From a9772be7da0c6fb374ae4445b5712f8a383aec7c Mon Sep 17 00:00:00 2001 From: Yashashree Suresh Date: Mon, 31 Aug 2020 10:21:26 +0530 Subject: [PATCH] Updating Kraken workload --- README.md | 2 +- jjb/dynamic/scale-ci_kraken.yml | 14 ++++++++++++-- pipeline-scripts/kraken.groovy | 4 ++++ properties-files/kraken.properties | 2 ++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0843b0df..8eb8d407 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ $ cp scale-ci-pipeline/properties-files/nodevertical.properties scale-ci-pipelin $ # step 4: add the new workload to the Jenkinsfile to load the pipeline-build script ( Applicable only in the case of a new workload, this is not needed for a existing workload ) $ vi scale-ci-pipeline/Jenkinsfile $ # step 5: add the workoad to the scale-ci-pipeline ( workload option and properties file path vars, applicable only in the case of a new workload ) -$ vi scale-ci-pipeline/jjb/dynamic/scale-ci-pipeline +$ vi scale-ci-pipeline/jjb/static/scale-ci-pipeline $ # step 6: update the Scale-CI jobs section in the readme. ``` #### NOTE: Modifying the existing workload just needs changes to the existing template, build script and properties file. diff --git a/jjb/dynamic/scale-ci_kraken.yml b/jjb/dynamic/scale-ci_kraken.yml index f49d42f6..cef96ce2 100644 --- a/jjb/dynamic/scale-ci_kraken.yml +++ b/jjb/dynamic/scale-ci_kraken.yml @@ -54,7 +54,7 @@ name: KRAKEN_CONFIG trim: 'false' - string: - default: "https://github.com/yashashreesuresh/kraken.git" + default: "https://github.com/openshift-scale/kraken.git" description: Kraken repository location. name: KRAKEN_REPOSITORY trim: 'false' @@ -65,9 +65,19 @@ trim: 'false' - string: default: "[[scenarios/etcd.yml, scenarios/post_action_etcd_example.sh], [scenarios/openshift-apiserver.yml, scenarios/post_action_openshift-kube-apiserver.yml], [scenarios/openshift-kube-apiserver.yml, scenarios/post_action_openshift-apiserver.yml], [scenarios/regex_openshift_pod_kill.yml, scenarios/post_action_regex.py]]" - description: Chaos scenarios to inject. + description: Pod chaos scenarios to inject. name: SCENARIOS trim: 'false' + - string: + default: "[scenarios/node_scenarios_example.yml]" + description: Node chaos scenarios to inject. + name: NODE_SCENARIOS + trim: 'false' + - string: + default: "[scenarios/cluster_shut_down_scenario.yml]" + description: Cluster shutdown chaos scenarios to inject. + name: CLUSTER_SHUT_DOWN_SCENARIO + trim: 'false' - bool: default: false description: Exit when a post action scenario fails. diff --git a/pipeline-scripts/kraken.groovy b/pipeline-scripts/kraken.groovy index e64d75fb..8d33cee6 100644 --- a/pipeline-scripts/kraken.groovy +++ b/pipeline-scripts/kraken.groovy @@ -30,6 +30,8 @@ stage ('kraken') { def kraken_repository = kraken_properties['KRAKEN_REPOSITORY'] def scenarios_folder_path = kraken_properties['SCENARIOS_FOLDER_PATH'] def scenarios = kraken_properties['SCENARIOS'] + def node_scenarios = kraken_properties['NODE_SCENARIOS'] + def cluster_shut_down_scenario = kraken_properties['CLUSTER_SHUT_DOWN_SCENARIO'] def exit_on_failure = kraken_properties['EXIT_ON_FAILURE'] def cerberus_enabled = kraken_properties['CERBERUS_ENABLED'] def cerberus_url = kraken_properties['CERBERUS_URL'] @@ -50,6 +52,8 @@ stage ('kraken') { [$class: 'StringParameterValue', name: 'KRAKEN_REPOSITORY', value: kraken_repository ], [$class: 'StringParameterValue', name: 'SCENARIOS_FOLDER_PATH', value: scenarios_folder_path ], [$class: 'StringParameterValue', name: 'SCENARIOS', value: scenarios ], + [$class: 'StringParameterValue', name: 'NODE_SCENARIOS', value: node_scenarios ], + [$class: 'StringParameterValue', name: 'CLUSTER_SHUT_DOWN_SCENARIO', value: cluster_shut_down_scenario ], [$class: 'BooleanParameterValue', name: 'EXIT_ON_FAILURE', value: Boolean.valueOf(exit_on_failure) ], [$class: 'BooleanParameterValue', name: 'CERBERUS_ENABLED', value: Boolean.valueOf(cerberus_enabled) ], [$class: 'StringParameterValue', name: 'CERBERUS_URL', value: cerberus_url ], diff --git a/properties-files/kraken.properties b/properties-files/kraken.properties index 3bd691d4..44b914bb 100644 --- a/properties-files/kraken.properties +++ b/properties-files/kraken.properties @@ -7,6 +7,8 @@ KRAKEN_CONFIG=/root/kraken/config/config.yaml KRAKEN_REPOSITORY=https://github.com/openshift-scale/kraken.git SCENARIOS_FOLDER_PATH=CI/scenarios/ SCENARIOS=[[scenarios/etcd.yml, scenarios/post_action_etcd_example.sh], [scenarios/openshift-apiserver.yml, scenarios/post_action_openshift-kube-apiserver.yml], [scenarios/openshift-kube-apiserver.yml, scenarios/post_action_openshift-apiserver.yml], [scenarios/regex_openshift_pod_kill.yml, scenarios/post_action_regex.py]] +NODE_SCENARIOS=[scenarios/node_scenarios_example.yml] +CLUSTER_SHUT_DOWN_SCENARIO=[scenarios/cluster_shut_down_scenario.yml] EXIT_ON_FAILURE=false CERBERUS_ENABLED=false CERBERUS_URL=