Commit 6b552b21 authored by sathyaseelan's avatar sathyaseelan

Included application replica scaleup and application upgrade scripts

Signed-off-by: 's avatarsathyaseelan <sathyaseelan.n@cloudbyte.com>
parent 3932947e
......@@ -137,6 +137,25 @@ mongo-cstor-run/load/check 1:2:
script:
- ./script/apps/mongo/workload/cstor/mongo-app-workload-cstor
# CASSANDRA_CSTOR
cassandra-cstor-run/load/check 0:2:
extends: .app_deploy_template
script:
- ./script/apps/cassandra/deployer/cassandra-app-deploy-cstor
cassandra-cstor-run/load/check 1:2:
extends: .app_deploy_template
before_script:
- sleep 180
script:
- ./script/apps/cassandra/workload/cstor/cassandra-app-workload-cstor
# JENKINS_CSTOR
jenkins-cstor-run/load/check:
extends: .app_deploy_template
script:
- ./script/apps/jenkins/deployer/jenkins-app-deploy-cstor
## Define job template for func test jobs
.func_test_template:
......@@ -172,6 +191,16 @@ snapshot-clone-creation-{percona-jiva}:
script:
- ./script/apps/percona/functional/jiva/k8s-snapshot-clone
app-replica-scale-{cassandra-cstor}:
extends: .func_test_template #dependencies: cassandra-cstor
script:
- ./script/apps/cassandra/functional/cstor/app-sts-replica-scale
app-upgrade-deployment-{jenkins-cstor}:
extends: .func_test_template #dependencies: jenkins-cstor
script:
- ./script/apps/jenkins/functional/cstor/app-upgrade-deployment
## Define job template for chaos jobs
.chaos_test_template:
......
#!/bin/bash
set -x
#################
## ENVIRONMENT ##
#################
## https://github.com/openebs/litmus/blob/master/apps/cassandra/deployers/test_vars.yml
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=cassandra-deployment metadata=${run_id})
###################
## DEPENDENCIES ##
###################
${utils_path}/setup_dependencies litmus-test
## Clone the litmus repo, navigate to litmus root
git clone https://github.com/openebs/litmus.git
cd litmus
############################
## LITMUS PRECONDITIONING ##
############################
: << EOF
-------------------------------------------------------------------------------------------
| specAttribute | kind | jiva | cStor-sparse |
-------------------------------------------------------------------------------------------
| litmusJobLabel | jobSpec | cassandra-deployment-litmus | casandra-deployment-cstor|
| providerStorageClass | env | openebs-standalone | openebs-cstor-sparse |
| appNamespace | env | app-cass-ns | cassandra-cstor |
| runID | env(add) | - | cstor |
-------------------------------------------------------------------------------------------
EOF
cp apps/cassandra/deployers/run_litmus_test.yml run_test.yml
sed -i -e 's/app: cassandra-deployment-litmus/app: cassandra-deployment-cstor/g' \
-e 's/value: openebs-standalone/value: openebs-cstor-sparse/g' \
-e 's/value: app-cass-ns/value: cassandra-cstor/g' run_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_test.yml
#################
## RUNNER MAIN ##
#################
echo "Running the litmus test.."
${utils_path}/litmus_job_runner label='app:cassandra-deployment-cstor' job=run_test.yml
${utils_path}/task_delimiter;
echo "Dumping state of cluster post job run"; echo ""
${utils_path}/dump_cluster_state;
${utils_path}/task_delimiter;
#################
## GET RESULT ##
#################
## Check the test status & result from the litmus result custom resource
${utils_path}/get_litmus_result ${test_name}
#!/bin/bash
set -x
#################
## ENVIRONMENT ##
#################
## https://github.com/openebs/litmus/blob/master/apps/cassandra/functional/scale_replicas/test_vars.yml
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=scale-app-replicas metadata=${run_id})
###################
## DEPENDENCIES ##
###################
${utils_path}/setup_dependencies litmus-test
## Clone the litmus repo, navigate to litmus root
git clone https://github.com/openebs/litmus.git
cd litmus
############################
## LITMUS PRECONDITIONING ##
############################
: << EOF
--------------------------------------------------------------------------------------
| specAttribute | kind | jiva | cStor-sparse |
--------------------------------------------------------------------------------------
| litmusJobLabel | jobSpec | cassandra-scaleup-litmus | cassandra-scaleup-cstor |
| appNamespace | env | app-cass-ns | cassandra-cstor |
| runID | env(add) | - | cstor |
--------------------------------------------------------------------------------------
EOF
cp apps/cassandra/functional/scale_replicas/run_litmus_test.yml run_test.yml
sed -i -e 's/app: cassandra-scaleup-litmus/app: cassandra-scaleup-cstor/g' \
-e 's/value: app-cass-ns/value: cassandra-cstor/g' run_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_test.yml
#################
## RUNNER MAIN ##
#################
echo "Running the litmus test.."
${utils_path}/litmus_job_runner label='app:cassandra-scaleup-cstor' job=run_test.yml
${utils_path}/task_delimiter;
echo "Dumping state of cluster post job run"; echo ""
${utils_path}/dump_cluster_state;
${utils_path}/task_delimiter;
#################
## GET RESULT ##
#################
## Check the test status & result from the litmus result custom resource
${utils_path}/get_litmus_result ${test_name}
#!/bin/bash
set -x
#################
## ENVIRONMENT ##
#################
## https://github.com/openebs/litmus/blob/master/apps/cassandra/workload/test_vars.yml
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=cassandra-loadgen metadata=${run_id})
###################
## DEPENDENCIES ##
###################
${utils_path}/setup_dependencies litmus-test
## Clone the litmus repo, navigate to litmus root
git clone https://github.com/openebs/litmus.git
cd litmus
############################
## LITMUS PRECONDITIONING ##
############################
: << EOF
------------------------------------------------------------------------------------
| specAttribute | kind | jiva | cStor-sparse |
------------------------------------------------------------------------------------
| litmusJobLabel | jobSpec | cassandra-loadjob | casandra-loadjob-cstor |
| appNamespace | env | app-cass-ns | cassandra-cstor |
| runID | env(add) | - | cstor
------------------------------------------------------------------------------------
EOF
cp apps/cassandra/workload/run_litmus_test.yml run_test.yml
sed -i -e 's/loadgen: cassandra-loadjob/loadgen: cassandra-loadjob-cstor/g' \
-e 's/value: app-cass-ns/value: cassandra-cstor/g' run_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_test.yml
#################
## RUNNER MAIN ##
#################
echo "Running the litmus test.."
${utils_path}/litmus_job_runner label='loadgen:cassandra-loadjob-cstor' job=run_test.yml
${utils_path}/task_delimiter;
echo "Dumping state of cluster post job run"; echo ""
${utils_path}/dump_cluster_state;
${utils_path}/task_delimiter;
#################
## GET RESULT ##
#################
## Check the test status & result from the litmus result custom resource
${utils_path}/get_litmus_result ${test_name}
#!/bin/bash
set -x
#################
## ENVIRONMENT ##
#################
## https://github.com/openebs/litmus/blob/master/apps/percona/deployers/test_vars.yml
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=jenkins-deployment metadata=${run_id})
###################
## DEPENDENCIES ##
###################
${utils_path}/setup_dependencies litmus-test
## Clone the litmus repo, navigate to litmus root
git clone https://github.com/openebs/litmus.git
cd litmus
############################
## LITMUS PRECONDITIONING ##
############################
## TODO: Better way/logic to replace job ENV (SC, PVC, LABEL, NS) based on run instance intent (CLI)
## TODO: Add logic to add ENV for run_instance_metadata/RunID
: << EOF
------------------------------------------------------------------------------------
| specAttribute | kind | jiva | cStor-sparse |
------------------------------------------------------------------------------------
| litmusJobLabel | jobSpec | percona-deployment | percona-deployment-cstor |
| providerStorageClass | env | openebs-standard | openebs-cstor-sparse |
| appNamespace | env | app-percona-ns | percona-cstor |
| runID | env(add) | - | cstor
------------------------------------------------------------------------------------
EOF
cp apps/jenkins/deployers/run_litmus_test.yml run_test.yml
sed -i -e 's/app: jenkins-deployment-litmus/app: jenkins-deployment-cstor/g' \
-e 's/value: openebs-standard/value: openebs-cstor-sparse/g' \
-e 's/value: app-jenkins-ns/value: jenkins-cstor/g' run_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_test.yml
#################
## RUNNER MAIN ##
#################
echo "Running the litmus test.."
${utils_path}/litmus_job_runner label='app:jenkins-deployment-cstor' job=run_test.yml
${utils_path}/task_delimiter;
echo "Dumping state of cluster post job run"; echo ""
${utils_path}/dump_cluster_state;
${utils_path}/task_delimiter;
#################
## GET RESULT ##
#################
## Check the test status & result from the litmus result custom resource
${utils_path}/get_litmus_result ${test_name}
#!/bin/bash
set -x
#################
## ENVIRONMENT ##
#################
## https://github.com/openebs/litmus/blob/master/apps/jenkins/upgrade/test_vars.yml
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=jenkins-upgrade-test metadata=${run_id})
###################
## DEPENDENCIES ##
###################
${utils_path}/setup_dependencies litmus-test
## Clone the litmus repo, navigate to litmus root
git clone https://github.com/openebs/litmus.git
cd litmus
############################
## LITMUS PRECONDITIONING ##
############################
: << EOF
----------------------------------------------------------------------------------------
| specAttribute | kind | jiva | cStor-sparse |
---------------------------------------------------------------------------------------- |
| litmusJobLabel | jobSpec | upgrade-jenkins | upgrade-jenkins-cstor |
| appNamespace | env | app-jenkins-ns | jenkins-cstor |
| runID | env(add) | - | cstor |
----------------------------------------------------------------------------------------
EOF
cp apps/jenkins/upgrade/run_litmus_test.yml run_test.yml
sed -i -e 's/app: upgrade-jenkins/app: upgrade-jenkins-cstor/g' \
-e 's/value: app-jenkins-ns/value: jenkins-cstor/g' run_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_test.yml
#################
## RUNNER MAIN ##
#################
echo "Running the litmus test.."
${utils_path}/litmus_job_runner label='app:upgrade-jenkins-cstor' job=run_test.yml
${utils_path}/task_delimiter;
echo "Dumping state of cluster post job run"; echo ""
${utils_path}/dump_cluster_state;
${utils_path}/task_delimiter;
#################
## GET RESULT ##
#################
## Check the test status & result from the litmus result custom resource
${utils_path}/get_litmus_result ${test_name}
......@@ -25,7 +25,7 @@ cd litmus
## LITMUS PRECONDITIONING ##
############################
cp apps/memleak/tests/run_litmus_test.yml run_test.yml
cp apps/custom/tests/memcheck/run_litmus_test.yml run_test.yml
#################
## RUNNER MAIN ##
......
......@@ -6,7 +6,7 @@ set -x
#################
## https://github.com/openebs/litmus/blob/master/apps/percona/chaos/openebs_target_network_delay/test_vars.yml
test_name=$(${utils_path}/generate_test_name testcase=openebs-target-network-delay metadata=cstor)
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=openebs-target-network-delay metadata=${run_id})
###################
## DEPENDENCIES ##
......@@ -44,7 +44,7 @@ sed -i -e 's/name: openebs-target-network-delay/name: openebs-target-network-del
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_metadata"'\
value: '"$run_id"'\
' run_test.yml
#################
......
......@@ -6,7 +6,7 @@ set -x
#################
## https://github.com/openebs/litmus/blob/master/apps/mongodb/deployers/test_vars.yml
test_name=$(${utils_path}/generate_test_name testcase=mongodb-deployment metadata=cstor)
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=mongodb-deployment metadata=${run_id})
###################
## DEPENDENCIES ##
......@@ -44,7 +44,7 @@ sed -i -e 's/app: mongodb-deployment-litmus/app: mongodb-deployment-cstor/g' \
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_metadata"'\
value: '"$run_id"'\
' run_test.yml
#################
......
......@@ -6,7 +6,7 @@ set -x
#################
## https://github.com/openebs/litmus/blob/master/apps/percona/workload/test_vars.yml
test_name=$(${utils_path}/generate_test_name testcase=mongodb-loadgen metadata=cstor)
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=mongodb-loadgen metadata=${run_id})
###################
## DEPENDENCIES ##
......@@ -40,7 +40,7 @@ sed -i -e 's/loadgen: mongodb-loadjob/loadgen: mongodb-loadjob-cstor/g' \
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_metadata"'\
value: '"$run_id"'\
' run_test.yml
#################
......
......@@ -6,7 +6,7 @@ set -x
#################
## https://github.com/openebs/litmus/blob/master/apps/percona/chaos/openebs_target_failure/test_vars.yml
test_name=$(${utils_path}/generate_test_name testcase=openebs-target-failure metadata=cstor)
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=openebs-target-failure metadata=${run_id})
###################
## DEPENDENCIES ##
......@@ -38,7 +38,7 @@ sed -i -e 's/name: openebs-target-failure/name: openebs-target-failure-cstor/g'
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_metadata"'\
value: '"$run_id"'\
' run_test.yml
#################
......
......@@ -5,8 +5,10 @@ set -x
## ENVIRONMENT ##
#################
#utils_path="/openebs/e2e-aws/script/utils"
## https://github.com/openebs/litmus/blob/master/apps/percona/deployers/test_vars.yml
test_name=$(${utils_path}/generate_test_name testcase=percona-deployment metadata=cstor)
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=percona-deployment metadata=${run_id})
###################
## DEPENDENCIES ##
......@@ -43,7 +45,7 @@ sed -i -e 's/app: percona-deployment/app: percona-deployment-cstor/g' \
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_metadata"'\
value: '"$run_id"'\
' run_test.yml
#################
......
......@@ -5,6 +5,8 @@ set -x
## ENVIRONMENT ##
#################
#utils_path="/openebs/e2e-aws/script/utils"
## https://github.com/openebs/litmus/blob/master/apps/percona/deployers/test_vars.yml
test_name=$(${utils_path}/generate_test_name testcase=percona-deployment metadata="")
......
......@@ -6,7 +6,7 @@ set -x
#################
## https://github.com/openebs/litmus/blob/master/apps/percona/workload/test_vars.yml
test_name=$(${utils_path}/generate_test_name testcase=percona-loadgen metadata=cstor)
run_id="cstor";test_name=$(${utils_path}/generate_test_name testcase=percona-loadgen metadata=${run_id})
###################
## DEPENDENCIES ##
......@@ -40,7 +40,7 @@ sed -i -e 's/loadgen: percona-loadjob/loadgen: percona-loadjob-cstor/g' \
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_metadata"'\
value: '"$run_id"'\
' run_test.yml
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment