This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'integration' into stable
- Loading branch information
Showing
12 changed files
with
922 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
solution_yaml=${1:-'solution.yaml'} | ||
|
||
# Check if the file exists | ||
if [ ! -f $solution_yaml ] | ||
then | ||
echo "ERROR: $solution_yaml does not exist" | ||
exit 1 | ||
fi | ||
|
||
function parseSolution() | ||
{ | ||
echo "$(./parse_scripts/parse_yaml.sh $solution_yaml $1)" | ||
} | ||
|
||
namespace=$(parseSolution 'solution.namespace') | ||
namespace=$(echo $namespace | cut -f2 -d'>') | ||
|
||
printf "########################################################\n" | ||
printf "# Shutdown CORTX Data \n" | ||
printf "########################################################\n" | ||
|
||
while IFS= read -r line; do | ||
IFS=" " read -r -a deployments <<< "$line" | ||
kubectl scale deploy "${deployments[0]}" --replicas 0 --namespace=$namespace | ||
done <<< "$(kubectl get deployments --namespace=$namespace | grep 'cortx-control-pod')" | ||
|
||
printf "\nWait for CORTX Control to be shutdown" | ||
while true; do | ||
output=$(kubectl get pods --namespace=$namespace | grep 'cortx-control-pod-') | ||
if [[ "$output" == "" ]]; then | ||
break | ||
else | ||
printf "." | ||
fi | ||
sleep 1s | ||
done | ||
printf "\n\n" | ||
printf "All CORTX Control pods have been shutdown" | ||
printf "\n\n" | ||
|
||
printf "########################################################\n" | ||
printf "# Shutdown CORTX Data \n" | ||
printf "########################################################\n" | ||
|
||
while IFS= read -r line; do | ||
IFS=" " read -r -a deployments <<< "$line" | ||
kubectl scale deploy "${deployments[0]}" --replicas 0 --namespace=$namespace | ||
done <<< "$(kubectl get deployments --namespace=$namespace | grep 'cortx-data-pod-')" | ||
|
||
printf "\nWait for CORTX Data to be shutdown" | ||
while true; do | ||
output=$(kubectl get pods --namespace=$namespace | grep 'cortx-data-pod-') | ||
if [[ "$output" == "" ]]; then | ||
break | ||
else | ||
printf "." | ||
fi | ||
sleep 1s | ||
done | ||
printf "\n\n" | ||
printf "All CORTX Data pods have been shutdown" | ||
printf "\n\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.