forked from WASdev/sample.microservices.web-app
-
Notifications
You must be signed in to change notification settings - Fork 5
/
packageAndDeployToMinikube.sh
63 lines (51 loc) · 1.61 KB
/
packageAndDeployToMinikube.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
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# This application has Fabric and ELK sample dependency.
# Make sure those are deployed prior to executing this script.
docker rm -v $(docker ps -a -q -f "status=exited")
docker rmi $(docker images -f "dangling=true" -q)
echo "Delete and Install web-application"
cd "$(dirname "$0")"
helm delete web-app --purge
sleep 30
mvn clean package
docker rmi -f web-application
docker build -t web-application .
helm install --name=web-app chart/web-application
sleep 10
echo "Delete and Install microservice-session"
cd ../*session
helm delete session --purge
sleep 30
mvn clean package
docker rmi -f microservice-session
docker build -t microservice-session .
helm install --name=session chart/microservice-session
sleep 10
echo "Delete and Install microservice-speaker"
cd ../*speaker
helm delete speaker --purge
sleep 30
mvn clean package
docker rmi -f microservice-speaker
docker build -t microservice-speaker .
helm install --name=speaker chart/microservice-speaker
sleep 10
echo "Delete and Install microservice-schedule"
cd ../*schedule
helm delete schedule --purge
sleep 30
mvn clean package
docker rmi -f microservice-schedule
docker build -t microservice-schedule .
helm install --name=schedule chart/microservice-schedule
sleep 10
echo "Delete and Install microservice-vote"
cd ../*vote
helm delete vote --purge
sleep 30
mvn clean package
docker rmi -f microservice-vote
docker build -t microservice-vote .
helm install --name=vote chart/microservice-vote
docker rm -v $(docker ps -a -q -f "status=exited")
docker rmi $(docker images -f "dangling=true" -q)