-
Notifications
You must be signed in to change notification settings - Fork 27
/
full_stack_deploy.sh
executable file
·51 lines (40 loc) · 1.33 KB
/
full_stack_deploy.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
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
set -v
#REQUIRES HELM 3
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo add hashicorp https://helm.releases.hashicorp.com
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
cd consul
./consul.sh
cd ..
kubectl wait --timeout=180s --for=condition=Ready $(kubectl get pod --selector=app=consul -o name)
cd mariadb
./mariadb.sh
cd ..
kubectl wait --timeout=180s --for=condition=Ready $(kubectl get pod --selector=app=mariadb -o name)
cd postgresql
./postgresql.sh
cd ..
kubectl wait --timeout=180s --for=condition=Ready $(kubectl get pod pq-postgresql-0 -o name)
cd vault
./vault.sh
sleep 5s
./vault_setup.sh
cd ..
sleep 5s
kubectl apply -f ./application_deploy_sidecar
kubectl get svc k8s-transit-app
kubectl apply -f ./go_movies_app
kubectl get svc go-movies-app
kubectl wait --timeout=180s --for=condition=Ready $(kubectl get pod --selector=app=go-movies-app -o name)
consul config write consul/ingress.hcl
consul config write consul/resolver.hcl
consul config write consul/splitter.hcl
consul config write consul/router-headers.hcl
consul config write consul/service-intentions.hcl
#kubectl apply -f learn-consul-k8s-hashicups/hashicups
echo ""
echo "Vault Transit App"
echo "use the following command to get your demo IP, port is 5000"
echo "$ kubectl get svc k8s-transit-app"