-
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.
deploy dreams to production --no-deploy
- Loading branch information
Showing
6 changed files
with
53 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{ if .Values.enabled }}{{ if .Values.autoscaler.enabled }} | ||
apiVersion: autoscaling/v1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: dreams | ||
spec: | ||
maxReplicas: {{ .Values.autoscaler.maxReplicas }} | ||
minReplicas: {{ .Values.autoscaler.minReplicas }} | ||
scaleTargetRef: | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
name: dreams | ||
targetCPUUtilizationPercentage: {{ .Values.autoscaler.targetCPUUtilizationPercentage }} | ||
{{ end }}{{ end }} |
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
19 changes: 19 additions & 0 deletions
19
environments/production/dreamsdb_persistent_storage_migration.sh
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 switch_environment.sh production | ||
|
||
PERSISTENT_STORAGE_NAME="dreamsdb" | ||
|
||
echo "deleting existing ${PERSISTENT_STORAGE_NAME} data from persistent storage (if there is any)" | ||
read -p "press <Enter> to continue" | ||
! gcloud compute ssh midburn-k8s-persistent-storage-vm --command="bash -c 'sudo rm -rf /data/${K8S_ENVIRONMENT_NAME}/${PERSISTENT_STORAGE_NAME}'" && echo failed && exit 1 | ||
|
||
echo "creating storage" | ||
gcloud compute ssh midburn-k8s-persistent-storage-vm --command="bash -c ' | ||
mkdir -p /data/${K8S_ENVIRONMENT_NAME} | ||
! mkdir /data/${K8S_ENVIRONMENT_NAME}/${PERSISTENT_STORAGE_NAME} && echo failed to create ${PERSISTENT_STORAGE_NAME} dir && exit 1 | ||
echo setting permissions | ||
sudo chown -R root:root /data/${K8S_ENVIRONMENT_NAME}/${PERSISTENT_STORAGE_NAME} | ||
echo great success | ||
exit 0 | ||
'" |
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