-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathinstall
More file actions
executable file
·62 lines (44 loc) · 1.62 KB
/
Copy pathinstall
File metadata and controls
executable file
·62 lines (44 loc) · 1.62 KB
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
#!/bin/bash
programname=$0
function usage {
echo "usage: $programname [-u mqtt_admin_user] [-P mqtt_admin_pass] [-PC mqtt_user_pass] [-PK keycloak_admin_pass]"
echo " -u mqtt_admin_user admin user for mqtt broker"
echo " -P mqtt_admin_pass pass for admin user for mqtt broker"
echo " -PC mqtt_user_pass pass for writer user for mqtt broker"
echo " -PK keycloak_admin_pass pass keycloak admin user"
exit 1
}
if [ $# != 8 ]; then
usage
fi
echo "Cleaning install dir and remake it"
rm -rf ~/iot-install
mkdir ~/iot-install
cd ~/iot-install
echo "Cloning repos"
git clone https://github.com/rfaita/iot-tsa.git
git clone https://github.com/rfaita/iot-tsp.git
git clone https://github.com/rfaita/iot-edge.git
git clone https://github.com/rfaita/iot-asset.git
git clone https://github.com/rfaita/iot-gtw.git
git clone https://github.com/rfaita/iot-infra.git
git clone https://github.com/rfaita/iot-rule.git
git clone https://github.com/rfaita/iot-reactive.git
echo "Replaces"
find . -iname *yml | xargs sed -i "s/<CHANGEIT_USER>/$2/g"
find . -iname *yml | xargs sed -i "s/<CHANGEIT_PASS>/$4/g"
find . -iname *yml | xargs sed -i "s/<CHANGEIT_KEYCLOAK_PASS>/$8/g"
find . -iname Dockerfile | xargs sed -i "s/DEFAULT_MQTT_SENDER_PASS/$6/g"
echo "Compile Repos"
cd iot-tsa && mvn clean install
cd ../iot-tsp && mvn clean install
cd ../iot-edge && mvn clean install
cd ../iot-asset && mvn clean install
cd ../iot-gtw && mvn clean install
cd ../iot-reactive && mvn clean install
cd ../iot-rule && mvn clean install
cd ../iot-infra
echo "Build Images"
docker-compose build
echo "Start Images"
docker-compose up -d