-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove node selectors - to allow switching node pools * added dry run before upgrade, update deployment docs, allow to run more charts on test environment
- Loading branch information
Showing
24 changed files
with
171 additions
and
52 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
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,68 @@ | ||
#!/usr/bin/env bash | ||
|
||
source connect.sh | ||
|
||
RES=0 | ||
|
||
echo "Performing health checks for all charts of ${K8S_ENVIRONMENT_NAME} environment" | ||
|
||
root_healthcheck() { | ||
! [ "`./read_env_yaml.sh global enableRootChart`" == "true" ] \ | ||
&& echo "root chart is disabled, skipping healthcheck" && return 0 | ||
kubectl rollout status deployment/adminer --watch=false &&\ | ||
kubectl rollout status deployment/nginx --watch=false &&\ | ||
kubectl rollout status deployment/traefik --watch=false | ||
} | ||
|
||
spark_healthcheck() { | ||
! [ "`./read_env_yaml.sh spark enabled`" == "true" ] \ | ||
&& echo "spark is disabled, skipping healthcheck" && return 0 | ||
kubectl rollout status deployment/spark --watch=false &&\ | ||
kubectl rollout status deployment/sparkdb --watch=false | ||
} | ||
|
||
volunteers_healthcheck() { | ||
! [ "`./read_env_yaml.sh volunteers enabled`" == "true" ] \ | ||
&& echo "volunteers is disabled, skipping healthcheck" && return 0 | ||
kubectl rollout status deployment/volunteers --watch=false &&\ | ||
kubectl rollout status deployment/volunteersdb --watch=false | ||
|
||
} | ||
|
||
bi_healthcheck() { | ||
! [ "`./read_env_yaml.sh bi enabled`" == "true" ] \ | ||
&& echo "bi is disabled, skipping healthcheck" && return 0 | ||
kubectl rollout status deployment/metabase --watch=false | ||
|
||
} | ||
|
||
profiles_healthcheck() { | ||
! [ "`./read_env_yaml.sh profiles enabled`" == "true" ] \ | ||
&& echo "profiles is disabled, skipping healthcheck" && return 0 | ||
kubectl rollout status deployment/profiles-drupal --watch=false &&\ | ||
kubectl rollout status deployment/profiles-db --watch=false | ||
} | ||
|
||
chatops_healthcheck() { | ||
! [ "`./read_env_yaml.sh chatops enabled`" == "true" ] \ | ||
&& echo "chatops is disabled, skipping healthcheck" && return 0 | ||
kubectl rollout status deployment/chatops --watch=false | ||
} | ||
|
||
dreams_healthcheck() { | ||
! [ "`./read_env_yaml.sh dreams enabled`" == "true" ] \ | ||
&& echo "dreams is disabled, skipping healthcheck" && return 0 | ||
kubectl rollout status deployment/dreams --watch=false | ||
} | ||
|
||
! root_healthcheck && echo failed root healthcheck && RES=1; | ||
! spark_healthcheck && echo failed spark healthcheck && RES=1; | ||
! volunteers_healthcheck && echo failed volunteers healthcheck && RES=1; | ||
! bi_healthcheck && echo failed bi healthcheck && RES=1; | ||
! profiles_healthcheck && echo failed profiles healthcheck && RES=1; | ||
! chatops_healthcheck && echo failed chatops healthcheck && RES=1; | ||
! dreams_healthcheck && echo failed dreams healthcheck && RES=1; | ||
|
||
[ "${RES}" == "0" ] && echo Great Success! | ||
|
||
exit $RES |
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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
source connect.sh | ||
|
||
RES=0 | ||
|
||
echo "Removing all charts of ${K8S_ENVIRONMENT_NAME} environment" | ||
|
||
[ "${1}" != "--approve" ] && read -p 'Press <Enter> to continue...' | ||
|
||
! helm delete --purge "${K8S_HELM_RELEASE_NAME}-${K8S_ENVIRONMENT_NAME}" && RES=1 | ||
! helm delete --purge "${K8S_HELM_RELEASE_NAME}-spark-${K8S_ENVIRONMENT_NAME}" && RES=1 | ||
! helm delete --purge "${K8S_HELM_RELEASE_NAME}-volunteers-${K8S_ENVIRONMENT_NAME}" && RES=1 | ||
! helm delete --purge "${K8S_HELM_RELEASE_NAME}-bi-${K8S_ENVIRONMENT_NAME}" && RES=1 | ||
! helm delete --purge "${K8S_HELM_RELEASE_NAME}-profiles-${K8S_ENVIRONMENT_NAME}" && RES=1 | ||
! helm delete --purge "${K8S_HELM_RELEASE_NAME}-chatops-${K8S_ENVIRONMENT_NAME}" && RES=1 | ||
! helm delete --purge "${K8S_HELM_RELEASE_NAME}-dreams-${K8S_ENVIRONMENT_NAME}" && RES=1 | ||
|
||
exit $RES |
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,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
source connect.sh | ||
|
||
RES=0 | ||
|
||
echo "Upgrading all charts of ${K8S_ENVIRONMENT_NAME} environment" | ||
|
||
! ./helm_upgrade.sh "$@" && echo 'failed helm upgrade' && RES=1; | ||
! ./helm_upgrade_external_chart.sh spark "$@" && echo 'failed spark upgrade' && RES=1; | ||
! ./helm_upgrade_external_chart.sh volunteers "$@" && echo 'failed volunteers upgrade' && RES=1; | ||
! ./helm_upgrade_external_chart.sh bi "$@" && echo 'failed bi upgrade' && RES=1; | ||
! ./helm_upgrade_external_chart.sh profiles "$@" && echo 'failed profiles upgrade' && RES=1; | ||
! ./helm_upgrade_external_chart.sh chatops "$@" && echo 'failed chatops upgrade' && RES=1; | ||
! ./helm_upgrade_external_chart.sh dreams "$@" && echo 'failed dreams upgrade' && RES=1; | ||
|
||
exit $RES |
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
source connect.sh >/dev/null | ||
|
||
ENV_AUTO_VALUE="`./read_yaml.py environments/${K8S_ENVIRONMENT_NAME}/values.auto-updated.yaml "$@" 2>/dev/null`" | ||
if [ "${ENV_AUTO_VALUE}" != "" ] && [ "${ENV_AUTO_VALUE}" != "{}" ]; then | ||
echo "${ENV_AUTO_VALUE}" | ||
exit 0 | ||
fi | ||
|
||
ENV_MAN_VALUE="`./read_yaml.py environments/${K8S_ENVIRONMENT_NAME}/values.yaml "$@" 2>/dev/null`" | ||
if [ "${ENV_MAN_VALUE}" != "" ] && [ "${ENV_MAN_VALUE}" != "{}" ]; then | ||
echo "${ENV_MAN_VALUE}" | ||
exit 0 | ||
fi | ||
|
||
ROOT_VALUE="`./read_yaml.py ./values.yaml "$@" 2>/dev/null`" | ||
if [ "${ROOT_VALUE}" != "" ] && [ "${ROOT_VALUE}" != "{}" ]; then | ||
echo "${ROOT_VALUE}" | ||
exit 0 | ||
fi | ||
|
||
exit 1 |
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
Oops, something went wrong.