forked from FudanSELab/serverless-trainticket
-
Notifications
You must be signed in to change notification settings - Fork 1
/
part01_DataBaseDeployment.sh
executable file
·110 lines (87 loc) · 2.11 KB
/
part01_DataBaseDeployment.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
echo "Part01 DataBase Deployment"
mkdir /var/nfs/data/station
mkdir /var/nfs/data/auth
mkdir /var/nfs/data/config
mkdir /var/nfs/data/contacts
mkdir /var/nfs/data/insidePayment
mkdir /var/nfs/data/order
mkdir /var/nfs/data/payment
mkdir /var/nfs/data/price
mkdir /var/nfs/data/route
mkdir /var/nfs/data/security
mkdir /var/nfs/data/train
mkdir /var/nfs/data/travel
mkdir /var/nfs/data/user
PROJECT_DIR=$(cd $(dirname $0); pwd)
cd deployment/Part01-database/
kubectl apply -f ts-serverless-database-deployment.yml
kubectl apply -f ts-serverless-persistent-deployment.yml
cd ..
cd ..
cd src/initDB/initDatabaseFunctions/
cd initAuthMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-auth-mongo.yml
cd ..
echo "FINISHED 1/13"
cd initConfigMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-config-mongo.yml
cd ..
echo "FINISHED 2/13"
cd initContactsMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-contacts-mongo.yml
cd ..
echo "FINISHED 3/13"
cd initInsidePaymentMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-inside-payment-mongo.yml
cd ..
echo "FINISHED 4/13"
cd initOrderMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-order-mongo.yml
cd ..
echo "FINISHED 5/13"
cd initPaymentMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-payment-mongo.yml
cd ..
echo "FINISHED 6/13"
cd initPriceMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-price-mongo.yml
cd ..
echo "FINISHED 7/13"
cd initRouteMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-route-mongo.yml
cd ..
echo "FINISHED 8/13"
cd initSecurityMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-security-mongo.yml
cd ..
echo "FINISHED 9/13"
cd initStationMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-station-mongo.yml
cd ..
echo "FINISHED 10/13"
cd initTrainMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-train-mongo.yml
cd ..
echo "FINISHED 11/13"
cd initTravelMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-travel-mongo.yml
cd ..
echo "FINISHED 12/13"
cd initUserMongo/
cp -r $PROJECT_DIR/template ./
faas-cli up -f init-user-mongo.yml
cd ..
echo "FINISHED 13/13"
echo "DONE"