...
 
Commits (53)
This diff is collapsed.
......@@ -5,13 +5,28 @@ path=$(pwd)
echo "creating packet-cluster"
mkdir -p ~/.kube $path/cluster $path/cluster/ssh $path/cluster/.kube
export PACKET_API_TOKEN=$packet_api_token
git clone https://github.com/openebs/litmus.git
git clone https://github.com/mayadata-io/litmus.git
cd litmus/k8s/packet/k8s-installer
echo "--------------- creating packet cluster --------------------"
ansible-playbook create_packet_cluster.yml --extra-vars "k8s_version=1.10.0-00" -v
ansible-playbook create_packet_cluster.yml --extra-vars "k8s_version=1.16.1-00 os=ubuntu_16_04" -v | tee create_packet_cluster
cat create_packet_cluster | grep failed=0
if [ "$?" != "0" ]; then
rm create_packet_cluster
exit 1;
fi
echo "--------------Attaching disks to the nodes------------------"
cd ../packet-storage
ansible-playbook create-volume.yml -vv --extra-vars "packet_api=$packet_api_token" | tee disk_attach
cat disk_attach | grep failed=0
if [ "$?" != "0" ]; then
rm disk_attach
exit 1;
fi
kubectl get nodes
kubectl get pods --all-namespaces
kubectl apply -f https://raw.githubusercontent.com/openebs/litmus/master/hack/rbac.yaml
kubectl apply -f https://litmuschaos.github.io/pages/litmus-operator-v1.0.0.yaml
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/hack/rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/hack/crds.yaml
cp -r /tmp/packet/. $path/cluster/
cat ~/.kube/config > $path/cluster/.kube/admin.conf
cp -r ~/.kube/. $path/cluster/.kube/
......
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies infra-setup
#pooling over previous job to complete
echo "*******Creating cstor-pool**************"
bash script/utils/pooling jobname:s2-j1-openebs-deploy
bash script/utils/e2e-cr jobname:s2-j2-cstor-striped-pool jobphase:Waiting
bash script/utils/e2e-cr jobname:s2-j2-cstor-striped-pool jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
run_id="striped";test_name=$(bash script/utils/generate_test_name testcase=cstor-block-device-pool-provision metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
# copy the content of deployer run_litmus_test.yml into a different file to update the test specific parameters.
cp providers/cstor/cstor-block-device-pool/run_litmus_test.yml create_striped_pool.yml
#################
## RUNNER MAIN ##
#################
echo "Running the litmus test.."
: << EOF
---------------------------------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------------------------------
| Litmus job label | label | app: cstor-block-device-pool-provision | app: cstor-striped-pool-provision |
| Litmus Job name | name | generateName: cstor-block-device-pool-provision | generateName: cstor-block-device-striped-pool-provision |
| ImagePullPolicy | value | Always | IfNotPresent |
| Pool name | name | cstor-block-disk-pool | cstor-block-disk-pool-stripe |
---------------------------------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/app: cstor-block-device-pool-provision/app: cstor-striped-pool-provision/g' \
-e 's/generateName: cstor-block-device-pool-provision/generateName: cstor-block-device-striped-pool-provision/g' \
-e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: cstor-block-disk-pool/value: cstor-block-disk-pool-stripe/g' create_striped_pool.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' create_striped_pool.yml
cat create_striped_pool.yml
bash ../script/utils/litmus_job_runner label='app:cstor-striped-pool-provision' job=create_striped_pool.yml
bash ../script/utils/dump_cluster_state;
cd ..
bash script/utils/event_updater jobname:s2-j2-cstor-striped-pool $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
## Check the test status & result from the litmus result custom resource
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:s2-j2-cstor-striped-pool jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies infra-setup
#pooling over previous job to complete
echo "***********nfs-provisioning************"
bash script/utils/pooling jobname:s2-j3-policies
bash script/utils/e2e-cr jobname:s2-j4-nfs-provisioner jobphase:Waiting
bash script/utils/e2e-cr jobname:s2-j4-nfs-provisioner jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
run_id="version3";test_name=$(bash script/utils/generate_test_name testcase=nfs-provision metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
# copy the content of deployer run_litmus_test.yml into a different file to update the test specific parameters.
cp providers/nfs-provisioner/run_litmus_test.yml nfsv3-provision.yml
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: app-nfs-ns/value: app-nfsv3-ns/g' \
-e 's/value: vers=4.1/value: vers=3/g' \
-e 's/app: nfs-litmus/app: nfsv3-litmus/g' \
-e 's/value: openebs-nfs/value: openebs-nfs3/g' nfsv3-provision.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' nfsv3-provision.yml
cat nfsv3-provision.yml
bash ../script/utils/litmus_job_runner label='app:nfsv3-litmus' job=nfsv3-provision.yml
bash ../script/utils/dump_cluster_state;
cd ..
bash script/utils/event_updater jobname:s2-j4-nfs-provisioner $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
## Check the test status & result from the litmus result custom resource
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:s2-j4-nfs-provisioner jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -ex
set -x
######################
## ENVIRONMENT ##
######################
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
releaseBranch=$RELEASE_BRANCH
ndmTag=$NDM_TAG
elastic_user=$E_USER
elastic_password=$E_PASSWORD
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
#clone e2e-infrastructre to get the latest commits and run env-exporter script from env
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies infra-setup
for i in efk-vars.yml efk.yml get_url.yml; do
wget https://raw.githubusercontent.com/openebs/e2e-infrastructure/master/workload/efk-client/playbook/$i
done
echo "EFK: Deploying Aggregrator and Forwarder on client"
ansible-playbook efk.yml --extra-vars "commit_id=$commit_id pipeline_id=$pipeline_id e_user=$elastic_user e_password=$elastic_password"
# Applying e2e-CRD
echo "***Applying e2e-crd***********"
kubectl apply -f script/utils/e2e-crd.yml
echo "*****Deploying openebs*******"
bash script/utils/e2e-cr jobname:s2-j1-openebs-deploy jobphase:Waiting
bash script/utils/e2e-cr jobname:s2-j1-openebs-deploy jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:s2-j3-policies jobphase:Waiting
bash script/utils/e2e-cr jobname:s2-j2-cstor-striped-pool jobphase:Waiting
bash script/utils/e2e-cr jobname:s2-j4-nfs-provisioner jobphase: Waiting
source ~/.profile
git clone https://github.com/openebs/e2e-infrastructure.git
cd e2e-infrastructure/env
######################################################
##exporting jiva-controller-image as env##
export OPENEBS_IO_JIVA_CONTROLLER_IMAGE=$(eval python env_exporter.py -o jcontroller -fp ../baseline/baseline)
##exporting jiva-replica-image as env##
......@@ -25,73 +59,66 @@ export OPENEBS_IO_CSTOR_POOL_MGMT_IMAGE=$(eval python env_exporter.py -o cpoolmg
export OPENEBS_IO_CSTOR_POOL_IMAGE=$(eval python env_exporter.py -o cstorpool -fp ../baseline/baseline)
##
export OPENEBS_IO_CSTOR_TARGET_IMAGE=$(eval python env_exporter.py -o target -fp ../baseline/baseline)
##
cd $present_dir
test_name=$(${utils_path}/generate_test_name testcase=openebsinstaller metadata="")
export OPENEBS_IO_CSTOR_POOL_EXPORTER_IMAGE=$(eval python env_exporter.py -o iovolume -fp ../baseline/baseline)
## Display pipeline info
echo $CI_PIPELINE_ID; echo $CI_PIPELINE_IID; echo $CI_COMMIT_SHA
export NODE_DISK_MANAGER_IMAGE=$ndmTag
${utils_path}/task_delimiter;
cd ../..
###################
## DEPENDENCIES ##
###################
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies infra-setup
for i in efk-vars.yml efk.yml get_url.yml; do
wget https://raw.githubusercontent.com/openebs/e2e-infrastructure/master/workload/efk-client/playbook/$i
done
echo "EFK: Deploying Aggregrator and Forwarder on client"
ansible-playbook efk.yml --extra-vars "commit_id=$CI_COMMIT_SHA pipeline_id=$CI_PIPELINE_ID"
echo "Generating test name***************************"
test_name=$(bash script/utils/generate_test_name testcase=openebs-provision metadata="")
echo $test_name
## Clone the litmus repo, navigate to litmus root
git clone https://github.com/openebs/litmus.git
git clone https://github.com/mayadata-io/litmus.git
cd litmus
${utils_path}/task_delimiter;
############################
## LITMUS PRECONDITIONING ##
############################
#update openebs litmus job
wget https://raw.githubusercontent.com/openebs/e2e-infrastructure/master/env-update/env.py # script to update openebs_setup.yaml
python3 env.py -f providers/openebs/installers/operator/master/litmusbook/openebs_setup.yaml
python3 env.py -f providers/openebs/installers/operator/master/litmusbook/run_litmus_test.yaml
echo "updated yaml"
cat providers/openebs/installers/operator/master/litmusbook/openebs_setup.yaml
cp providers/openebs/installers/operator/master/litmusbook/openebs_setup.yaml run_test.yml
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e "s/value: '10'/value: '20'/g" \
-e "s/value: master/value: $releaseBranch/g" providers/openebs/installers/operator/master/litmusbook/run_litmus_test.yaml
#update openebs litmus job
wget https://raw.githubusercontent.com/openebs/e2e-infrastructure/master/env-update/env.py # script to update openebs_setup.yaml
python3 env.py -f providers/openebs/installers/operator/master/litmusbook/openebs_setup.yaml
echo "updated yaml"
cat providers/openebs/installers/operator/master/litmusbook/openebs_setup.yaml
cat providers/openebs/installers/operator/master/litmusbook/run_litmus_test.yaml
#################
## RUNNER MAIN ##
#################
# echo "Applying rbac.yml********************************"
# kubectl apply -f ./hack/rbac.yaml
# kubectl apply -f ./hack/crds.yaml
# echo "Copying kube config for litmus"
# cp ~/.kube/config admin.conf
# kubectl create cm kubeconfig --from-file=admin.conf -n litmus
echo "Running litmus test for openebs deploy.."
${utils_path}/litmus_job_runner label='provider:openebs-setup' 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;
run_test=providers/openebs/installers/operator/master/litmusbook/run_litmus_test.yaml
bash ../script/utils/litmus_job_runner label='provider:openebs-runner' job=$run_test
echo "Dumping state of cluster post job run"; echo ""
bash ../script/utils/dump_cluster_state;
cd ..
bash script/utils/event_updater jobname:s2-j1-openebs-deploy $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
## Check the test status & result from the litmus result custom resource
${utils_path}/get_litmus_result ${test_name}
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:s2-j1-openebs-deploy jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
time="date"
current_time=$(eval $time)
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies infra-setup
#pooling over previous job to complete
echo "***********Applying openebs-storage-clas********"
bash script/utils/pooling jobname:s2-j2-cstor-striped-pool
bash script/utils/e2e-cr jobname:s2-j3-policies jobphase:Waiting
bash script/utils/e2e-cr jobname:s2-j3-policies jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
test_name=$(bash script/utils/generate_test_name testcase=cstor-storage-policies metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test.."
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/cstor-sparse-pool/cstor-block-disk-pool-stripe/g' providers/cstor-storage-policies/run_litmus_test.yml
run_test=providers/cstor-storage-policies/run_litmus_test.yml
cat $run_test
bash ../script/utils/litmus_job_runner label='app:cstor-storage-policy' job=$run_test
echo "Dumping state of cluster post job run"; echo ""
bash ../script/utils/dump_cluster_state;
cd ..
bash script/utils/event_updater jobname:s2-j3-policies $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
## Check the test status & result from the litmus result custom resource
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:s2-j3-policies jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
This diff is collapsed.
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
time="date"
source ~/.profile
gittoken=$(echo "$github_token")
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
current_time=$(eval $time)
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:app-deploy-rwx jobphase:Waiting
bash script/utils/e2e-cr jobname:app-deploy-rwx jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
test_name=$(bash script/utils/generate_test_name testcase=wordpress-deployment metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test.."
cp apps/wordpress/deployers/run_litmus_test.yml deploy_app.yml
# Replace the storage class name
sed -i -e 's/value: openebs-nfs/value: openebs-nfs4/g' deploy_app.yml
cat deploy_app.yml
bash ../script/utils/litmus_job_runner label='app:wordpress-litmus' job=deploy_app.yml
echo "Dumping state of cluster post job run"; echo ""
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:app-deploy-rwx $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
exit 1;
fi
#################
## GET RESULT ##
#################
rc_val=$(echo $?)
source ~/.profile
gittoken=$(echo "$github_token")
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
## Check the test status & result from the litmus result custom resource
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:app-deploy-rwx jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:$testResult
# python3 script/utils/result/result_update.py $job_id WOEM 3-functional "Deploy the application using nfs-provisioner accessmode as a readwritemany" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
This diff is collapsed.
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/pooling jobname:snapshot-clone
bash script/utils/e2e-cr jobname:clone-different-capacity jobphase:Waiting
bash script/utils/e2e-cr jobname:clone-different-capacity jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
################
# LitmusBook 1 #
################
run_id="different-capacity";test_name=$(bash script/utils/generate_test_name testcase=create-clone metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/clone-creation/run_litmus_test.yml run_diff_vol_size_clone.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| appNamespace | env | app-busybox-ns | busybox-snap |
| appPVC | env | openebs-busybox | busybox-snapshot |
| clonePVC | env | clone-busybox | clone-different-capacity |
| volume size | env | value: 5G | value: 4G |
| Litmus job label | label | app: litmus-clone | app: clone-different-capacity |
| Litmus Job name | name | generateName: litmus-clone- | generateName: litmus-clone-different-capacity- |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: app-busybox-ns/value: busybox-snap/g' \
-e 's/value: openebs-busybox/value: busybox-snapshot/g' \
-e 's/value: clone-busybox/value: clone-different-capacity/g' \
-e 's/value: 5G/value: 4G/g' \
-e 's/app: litmus-clone/app: clone-different-capacity/g' \
-e 's/generateName: litmus-clone-/generateName: litmus-clone-different-capacity-/g' run_diff_vol_size_clone.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_diff_vol_size_clone.yml
echo "Running the litmus test for Busybox Deployment Clone.."
cat run_diff_vol_size_clone.yml
bash ../script/utils/litmus_job_runner label='app:clone-different-capacity' job=run_diff_vol_size_clone.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:clone-different-capacity $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id 6RQL 3-functional "Check if the clone can't be created with different volume capacity" $testResult $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:clone-different-capacity jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id 6RQL 3-functional "Check if the clone can't be created with different volume capacity" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/pooling jobname:clone-different-capacity
bash script/utils/e2e-cr jobname:clone-parent-volume-delete jobphase:Waiting
bash script/utils/e2e-cr jobname:clone-parent-volume-delete jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
echo "*******Taking clone of BusyBox snapshot application**********"
test_name=$(bash script/utils/generate_test_name testcase=delete-parent-volume metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/restrict-parent-volume-deletion/run_litmus_test.yml run_parent_vol_test.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| appPVC | env | openebs-busybox | busybox-snapshot |
| appNamespace | env | app-busybox-ns | busybox-snap |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: openebs-busybox/value: busybox-snapshot/g' \
-e 's/value: app-busybox-ns/value: busybox-snap/g' run_parent_vol_test.yml
echo "Running the litmus test for Busybox Deployment Clone.."
cat run_parent_vol_test.yml
bash ../script/utils/litmus_job_runner label='app:litmus-delete-parent-volume' job=run_parent_vol_test.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:clone-parent-volume-delete $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id 5O5V 3-functional "Check if the clone can be created using volume snapshot" $testResult $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:clone-parent-volume-delete jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id 5O5V 3-functional "Check if the clone can be created using volume snapshot" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -x
source ~/.profile
gittoken=$(echo "$github_token")
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:data-integrity-cstor jobphase:Waiting init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:data-integrity-cstor jobphase:Running
test_name=$(bash script/utils/generate_test_name testcase=fio-data-integrity metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/fio/data-integrity/run_litmus_test.yml data_integrity_cstor.yml
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| imagePullPolicy | image | Always | IfNotPresent |
| storgae class | env | openebs-standard | openebs-cstor-disk |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: openebs-standard/value: openebs-cstor-disk/g' data_integrity_cstor.yml
cat data_integrity_cstor.yml
bash ../script/utils/litmus_job_runner label='app:fio-di-litmus' job=data_integrity_cstor.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:data-integrity-cstor $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
# Update the result of the test case in github mayadata-io/e2e-packet repository.
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id QDLO 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:data-integrity-cstor jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id QDLO 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
\ No newline at end of file
#!/bin/bash
set -x
source ~/.profile
gittoken=$(echo "$github_token")
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:data-integrity-jiva jobphase:Waiting init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:data-integrity-jiva jobphase:Running
################
# LitmusBook 1 #
################
run_id="jiva";test_name=$(bash script/utils/generate_test_name testcase=fio-data-integrity metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/fio/data-integrity/run_litmus_test.yml data_integrity_test_jiva.yml
: << EOF
--------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default busybox value | test specifc value |
--------------------------------------------------------------------------------------------------------------|
| imagePullPolicy | image | Always | IfNotPresent |
| LitmusjobLabel | label | app:fio-di-litmus | app:fio-di-litmus-jiva |
| storage class | env | openebs-standard | openebs-jiva-default |
| appNamespace | env | fio | fio-jiva |
--------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: openebs-standard/value: openebs-jiva-default/g' \
-e 's/app: fio-di-litmus/app: fio-di-litmus-jiva/g' \
-e 's/value: fio/value: fio-jiva/g' data_integrity_test_jiva.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' data_integrity_test_jiva.yml
cat data_integrity_test_jiva.yml
bash ../script/utils/litmus_job_runner label='app:fio-di-litmus-jiva' job=data_integrity_test_jiva.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:data-integrity-jiva $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id UH9A 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:data-integrity-jiva jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:$testResult
# python3 script/utils/result/result_update.py $job_id UH9A 3-functional "Ensure the data integrity in openebs volume using fio" $testResult $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:memory-consumption-jiva jobphase:Waiting init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:memory-consumption-jiva jobphase:Running init_time:"$current_time"
################
# LitmusBook 1 #
################
test_name=$(bash script/utils/generate_test_name testcase=memleak-test metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/custom/tests/memcheck/run_litmus_test.yml memcheck_jiva.yml
: << EOF
--------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default busybox value | test specifc value |
--------------------------------------------------------------------------------------------------------------|
| storage class | env | openebs-standard | openebs-standard |
| appNamespace | env | memleak | memleak-jiva |
--------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: memleak/value: memleak-jiva/g' memcheck_jiva.yml
cat memcheck_jiva.yml
bash ../script/utils/litmus_job_runner label='app:memleak-test' job=memcheck_jiva.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:memory-consumption-jiva $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id SN3A 3-functional "Check if the memory consumption doesn't cross the desired threshold for known workload" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
rc_val=$(echo $?)
# testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id SN3A 3-functional "Check if the memory consumption doesn't cross the desired threshold for known workload" Fail $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:memory-consumption-jiva jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id SN3A 3-functional "Check if the memory consumption doesn't cross the desired threshold for known workload" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:jiva-internal-snapshot-deletion jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-internal-snapshot-deletion jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
################
# LitmusBook 1 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| storage clas | env | openebs-jiva-standard | openebs-jiva-default |
| appNamespace | env | fio | fio-jiva-snapshot-del |
---------------------------------------------------------------------------------------------------------------------
EOF
test_name=$(bash script/utils/generate_test_name testcase=fio-di-delete-jiva-snapshots metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test for Jiva internal snapshot deletion."
cp experiments/functional/snapshot_deletion/jiva/run_litmus_test.yml jiva_snapshot_delete.yml
sed -i -e 's/value: fio/value: fio-jiva-snapshot-del/g' \
-e 's/value: openebs-jiva-standard/value: openebs-jiva-default/g' jiva_snapshot_delete.yml
cat jiva_snapshot_delete.yml
bash ../script/utils/litmus_job_runner label='app:fio-di-litmus-snap-del' job=jiva_snapshot_delete.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-internal-snapshot-deletion $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id 8QQP 3-functional "Verify if the snapshot is getting Deleted Automatically" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
This diff is collapsed.
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
gitlab_stage=3-functional # Gitlab stage where this test case is running.
source ~/.profile
#github token to push the test result into github mayadata-io/e2e-packet repository.
#This token is set as an env in ~/.profile in the test cluster.
gitToken=$github_token
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
#Creating e2e custom resource result for the test.
bash script/utils/e2e-cr jobname:jiva-openebs-ns jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-openebs-ns jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
# Runnig LitmusBook to deploy busybox and check the JIVA controller and replica pods scheduled on OpenEBS namespace.
################
# LitmusBook 1 #
################
run_id="provision";test_name=$(bash script/utils/generate_test_name testcase=jiva-pods-openebs-ns metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
# copy the content of run_litmus_test.yml into a different file to update the test specific parameters.
cp experiments/functional/jiva-pods-openebs-ns/run_litmus_test.yml busybox_jiva_openebs.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' busybox_jiva_openebs.yml
cat busybox_jiva_openebs.yml
# Run the Litmus job and get the details of the litmus job from litmus_job_runner utils.
bash ../script/utils/litmus_job_runner label='app:litmus-jiva-openebs-ns' job=busybox_jiva_openebs.yml
cd ..
# Get the cluster state Once the litmus jobs completed.
bash script/utils/dump_cluster_state;
# Update the e2e event for the job.
bash script/utils/event_updater jobname:jiva-openebs-ns $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id $case_id 3-functional "Check if the application is successfully deployed and JIVA Controller, Replica pods are scheduled on OpenEBS namespace" $testResult $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
#### Deprovision BusyBox application
################
# LitmusBook 2 #
################
run_id="deprovision";test_name=$(bash script/utils/generate_test_name testcase=jiva-pods-openebs-ns metadata=${run_id})
echo $test_name
cd litmus
# copy the content of deployer run_litmus_test.yml into a different file to update the test specific parameters.
cp experiments/functional/jiva-pods-openebs-ns/run_litmus_test.yml deprovision_busybox_jiva_openebs.yml
# Update the environmental variables in litmus job spec.
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
-------------------------------------------------------------------------------------------------------------------- |
| action | env | provision | deprovision |
| Litmus job label | label | app: litmus-jiva-openebs-ns | app: deprovision-busybox-jiva-openebs |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: provision/value: deprovision/g' \
-e 's/app: litmus-jiva-openebs-ns/app: deprovision-busybox-jiva-openebs/g' deprovision_busybox_jiva_openebs.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' deprovision_busybox_jiva_openebs.yml
cat deprovision_busybox_jiva_openebs.yml
# Run the Litmus job and get the details of the litmus job from litmus_job_runner utils.
bash ../script/utils/litmus_job_runner label='app:deprovision-busybox-jiva-openebs' job=deprovision_busybox_jiva_openebs.yml
cd ..
#Get the cluster state Once the litmus jobs completed.
bash script/utils/dump_cluster_state;
#Update the e2e event for the job
bash script/utils/event_updater jobname:jiva-openebs-ns $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
# Update the result of the test case in github mayadata-io/e2e-packet repository.
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id $case_id 3-functional "Check if the application is successfully deployed and JIVA Controller, Replica pods are scheduled on OpenEBS namespace" $testResult $pipeline_id "$current_time" $commit_id $gitToken
exit 1;
fi
current_time=$(eval $time)
# Update the e2e cr once the job is completed
bash script/utils/e2e-cr jobname:jiva-openebs-ns jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:$testResult
# python3 script/utils/result/result_update.py $job_id $case_id 3-functional "Check if the application is successfully deployed and JIVA Controller, Replica pods are scheduled on OpenEBS namespace" $testResult $pipeline_id "$current_time" $commit_id $gitToken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/pooling jobname:jiva-snapshot
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
echo "*******Taking clone of BusyBox snapshot application**********"
################
# LitmusBook 1 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| pvcName | env | openebs-busybox | busybox-jiva-snapshot |
| Litmus job label | label | app: litmus-clone | app: litmus-jiva-clone |
| snapshot name | env | value: snapshot-busybox | value: snapshot-jiva-busybox |
| clone name | env | value: clone-busybox | value: clone-jiva-busybox |
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
---------------------------------------------------------------------------------------------------------------------
EOF
run_id="jiva";test_name=$(bash script/utils/generate_test_name testcase=create-clone metadata=${run_id})
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
cp experiments/functional/clone-creation/run_litmus_test.yml run_jiva_clone_test.yml
sed -i -e 's/value: openebs-busybox/value: busybox-jiva-snapshot/g' \
-e 's/app: litmus-clone/app: litmus-jiva-clone/g' \
-e 's/value: snapshot-busybox/value: snapshot-jiva-busybox/g' \
-e 's/value: clone-busybox/value: clone-jiva-busybox/g' \
-e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' run_jiva_clone_test.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_jiva_clone_test.yml
cat run_jiva_clone_test.yml
bash ../script/utils/litmus_job_runner label='app:litmus-jiva-clone' job=run_jiva_clone_test.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot-clone $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id Y4ET 3-functional "Check if the clone can be created using jiva volume snapshot" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
current_time=$(eval $time)
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Completed end_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag" test_result:Pass
# python3 script/utils/result/result_update.py $job_id Y4ET 3-functional "Check if the clone can be created using jiva volume snapshot" Pass $pipeline_id "$current_time" $commit_id $gittoken
if [ "$rc_val" != "0" ]; then
exit 1;
fi
#!/bin/bash
set -x
job_id=$CI_JOB_ID
pipeline_id=$CI_PIPELINE_ID
commit_id=$CI_COMMIT_SHA
releaseTag=$RELEASE_TAG
source ~/.profile
gittoken=$(echo "$github_token")
time="date"
current_time=$(eval $time)
present_dir=$(pwd)
echo $present_dir
echo "Setting up test dependencies.."
${utils_path}/setup_dependencies litmus-test
bash script/utils/e2e-cr jobname:jiva-snapshot jobphase:Waiting
bash script/utils/e2e-cr jobname:jiva-snapshot jobphase:Running init_time:"$current_time" jobid:"$job_id" pipelineid:"$pipeline_id" openebs_version:"$releaseTag"
bash script/utils/e2e-cr jobname:jiva-snapshot-clone jobphase:Waiting
###########Deploying Busybox Application
################
# LitmusBook 1 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| Litmus job label | label | app: busybox-litmus | app: deploy-jiva-busybox-snapshot |
| Litmus Job name | name | generateName: litmus-busybox-deploy | generateName: busybox-provision-jiva-snapshot |
| appLabel | env | app=busybox-sts | app=busybox-jiva-snap |
| deploy type | env | statefulset | deployment |
| pvcName | env | openebs-busybox | busybox-jiva-snapshot |
| storage clas | env | openebs-cstor-sparse | openebs-jiva-standalone |
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
---------------------------------------------------------------------------------------------------------------------
EOF
test_name=$(bash script/utils/generate_test_name testcase=busybox-provision-busybox-jiva-snap metadata="")
echo $test_name
git clone https://github.com/mayadata-io/litmus.git
cd litmus
echo "Running the litmus test for Busybox Deployment.."
cp apps/busybox/deployers/run_litmus_test.yml deploy_jiva_snapshot.yml
sed -i -e 's/app: busybox-litmus/app: deploy-jiva-busybox-snapshot/g' \
-e 's/generateName: litmus-busybox-deploy/generateName: busybox-provision-jiva-snapshot/g' \
-e 's/app=busybox-sts/app=busybox-jiva-snap/g' \
-e 's/value: statefulset/value: deployment/g' \
-e 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' \
-e 's/value: openebs-busybox/value: busybox-jiva-snapshot/g' \
-e 's/value: openebs-cstor-sparse/value: openebs-jiva-standalone/g' \
-e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' deploy_jiva_snapshot.yml
cat deploy_jiva_snapshot.yml
bash ../script/utils/litmus_job_runner label='app:deploy-jiva-busybox-snapshot' job=deploy_jiva_snapshot.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id CL2N 3-functional "Verify if the snapshot can be created for JIVA persistent volume" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
##Deploying loadgen and liveness
#################
# LitmusBook 2 #
################
run_id="jiva-snap";test_name=$(bash script/utils/generate_test_name testcase=busybox-liveness metadata=${run_id})
echo $test_name
cd litmus
# copy the content of deployer run_litmus_test.yml into a different file to update the test specific parameters.
cp apps/busybox/liveness/run_litmus_test.yml busybox_loadgen_jiva_snapshot.yml
# Update the environmental variables in litmus job spec.
: << EOF
---------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
---------------------------------------------------------------------------------------------------------------------|
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
| appLabel | env | app=busybox-sts | app=busybox-jiva-snap |
| Litmus job label | label | liveness: litmus-busybox-liveness | liveness:bb-liveness-jiva-snapshot |
----------------------------------------------------------------------------------------------------------------------
EOF
sed -i -e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' \
-e 's/app=busybox-sts/app=busybox-jiva-snap/g' \
-e 's/liveness: litmus-busybox-liveness/liveness: bb-liveness-jiva-snapshot/g' busybox_loadgen_jiva_snapshot.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' busybox_loadgen_jiva_snapshot.yml
cat busybox_loadgen_jiva_snapshot.yml
# Run the Litmus job and get the details of the litmus job from litmus_job_runner utils.
bash ../script/utils/litmus_job_runner label='liveness:bb-liveness-jiva-snapshot' job=busybox_loadgen_jiva_snapshot.yml
cd ..
# Get the cluster state Once the litmus jobs completed.
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
if [ "$?" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id CL2N 3-functional "Verify if the snapshot can be created for JIVA persistent volume" Fail $pipeline_id "$current_time" $commit_id $gittoken
exit 1;
fi
###########Taking snapshot of BusyBox application
################
# LitmusBook 3 #
################
: << EOF
--------------------------------------------------------------------------------------------------------------------
| specAttribute | kind | default value | test specifc value |
------------------------------------------------------------------------------------------------------------------- |
| Litmus job label | label | app: snapshot-litmus | app: snapshot-jiva-litmus |
| snapshot name | env | value: snapshot-busybox | value: snapshot-jiva-busybox |
| pvcName | env | openebs-busybox | busybox-jiva-snapshot |
| appNamespace | env | app-busybox-ns | busybox-jiva-snap |
---------------------------------------------------------------------------------------------------------------------
EOF
run_id="jiva";test_name=$(bash script/utils/generate_test_name testcase=create-snapshot metadata=${run_id})
echo $test_name
cd litmus
cp experiments/functional/snapshot-creation/run_litmus_test.yml run_snap_test_jiva.yml
sed -i -e 's/value: openebs-busybox/value: busybox-jiva-snapshot/g' \
-e 's/value: snapshot-busybox/value: snapshot-jiva-busybox/g' \
-e 's/app: snapshot-litmus/app: snapshot-jiva-litmus/g' \
-e 's/value: app-busybox-ns/value: busybox-jiva-snap/g' run_snap_test_jiva.yml
sed -i '/command:/i \
- name: RUN_ID\
value: '"$run_id"'\
' run_snap_test_jiva.yml
cat run_snap_test_jiva.yml
bash ../script/utils/litmus_job_runner label='app:snapshot-jiva-litmus' job=run_snap_test_jiva.yml
cd ..
bash script/utils/dump_cluster_state;
bash script/utils/event_updater jobname:jiva-snapshot $test_name jobid:"$job_id" pipelineid:"$pipeline_id"
rc_val=$(echo $?)
# Obtain the status of the test using litmusresult(lr)
testResult=$(kubectl get litmusresult ${test_name} --no-headers -o custom-columns=:spec.testStatus.result)
if [ "$rc_val" != "0" ]; then
# python3 script/utils/result/result_update.py $job_id CL2N 3-functional "Verify if the snapshot can be created for JIVA persistent volume" $testResult $pipeline_id "$current_time" $commit_id $gi