-
Notifications
You must be signed in to change notification settings - Fork 0
/
localbuild.sh
39 lines (34 loc) · 1.81 KB
/
localbuild.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#########################################################################
# This script can be executed for local deployment.
# This script must never be used on an environment exposed to the public,
# because instead of overwriting the secrets during the build process,
# it will use the defaults values we set in the values.yaml of the
# respective charts.
#
# Requires:
# kubectl (v1.x or higher)
# helm
#########################################################################
# Set secrets to be used during deployment
# TODO: NECESSARY?
# export SCHEDULYTICS_CERT_MANAGER_SA=xxx # Required for values yaml
# export MONGODB_ROOT_PW=gwrqgj4293fsdd
# export MONGODB_USER_PW=sdgl354053fdks
# Prepare helm
helm repo add jetstack https://charts.jetstack.io
helm repo add traefik https://containous.github.io/traefik-helm-chart
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
# Deploy Secrets
# TODO: Change Issuer for local since DNS will fail
# kubectl apply --filename=./cert-manager/secrets.yaml
# Deploy infrastructure
helm upgrade -i cert-manager --namespace cert-manager jetstack/cert-manager -f ./cert-manager/values.yaml --version v0.15.1
helm upgrade -i traefik --namespace default traefik/traefik -f ./traefik/values.yaml
helm upgrade -i mongodb --namespace default bitnami/mongodb -f ./mongodb/values.yaml
helm upgrade -i schedulytics-frontend --namespace default ./schedulytics-frontend -f ./schedulytics-frontend/values.yaml
helm upgrade -i schedulytics-grpc-server --namespace default ./schedulytics-grpc-server -f ./schedulytics-grpc-server/values.yaml
helm upgrade -i envoy --namespace default stable/envoy -f ./envoy/values.yaml
# Deploy CRDs
kubectl apply --filename=./cert-manager/certs.yaml
kubectl apply --filename=./traefik/routes.yaml