forked from eclipse/microprofile-conference
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cloud-deploy.sh
executable file
·52 lines (46 loc) · 1.73 KB
/
cloud-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
52
#!/usr/bin/env bash
# A script to deploy all of the microservices to openshift
# microservice-authz
cd microservice-authz
mvn clean package
declare -a authz_sha256=($(shasum -a 256 target/microservice-authz-swarm.jar))
docker build -t example/microservice-authz:latest -t ${authz_sha256[1]}:${authz_sha256[0]} .
cat src/main/kubernetes/Deployment.yml | sed s/JAR_SHA256_VALUE/${authz_sha256[0]}/ >target/Deployment.yml
oc create -f target/Deployment.yml
oc create -f src/main/kubernetes/Service.yml
oc expose service microservice-authz
cd ..
# microservice-session
cd microservice-session
mvn clean package
declare -a session_sha256=($(shasum -a 256 target/microservice-session-swarm.jar))
docker build -t example/microservice-session:latest -t ${session_sha256[1]}:${session_sha256[0]} .
cat src/main/kubernetes/Deployment.yml | sed s/JAR_SHA256_VALUE/${session_sha256[0]}/ >target/Deployment.yml
oc create -f target/Deployment.yml
oc create -f src/main/kubernetes/Service.yml
oc expose service microservice-session
cd ..
# microservice-schedule
cd microservice-schedule
mvn clean package
docker build -t example/microservice-schedule .
oc create -f src/main/kubernetes/Deployment.yml
oc create -f src/main/kubernetes/Service.yml
oc expose service microservice-schedule
cd ..
# microservice-speaker
cd microservice-speaker
mvn clean package
docker build -t example/microservice-speaker .
oc create -f src/main/kubernetes/Deployment.yml
oc create -f src/main/kubernetes/Service.yml
oc expose service microservice-speaker
cd ..
# microservice-vote
cd microservice-vote
mvn clean package
docker build -t example/microservice-vote .
oc create -f src/main/kubernetes/Deployment.yml
oc create -f src/main/kubernetes/Service.yml
oc expose service microservice-vote
cd ..