forked from TelluIoT/gateway-enact
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.sh
36 lines (29 loc) · 1.27 KB
/
script.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
#!/bin/sh
set -e
###########################################################
# Create a destination folder
###########################################################
mkdir -p /etc/tellugw
###########################################################
# Take a copy of Prometheus config
###########################################################
cp ansible/public-files/prometheus.yml /etc/tellugw
# cp -r ansible/public-files/prometheus.yml /etc/tellugw
###########################################################
# Replace the gateway ID
###########################################################
sed -i 's/GATEWAYID/enact-gateway/g' /etc/tellugw/prometheus.yml
###########################################################
# Create persistent data directory for Prometheus
###########################################################
mkdir -p /var/prometheus
##########################################################
# Install Docker-Compose
##########################################################
apt-get install -y libffi-dev libssl-dev python3 python3-pip
apt-get remove python-configparser
pip3 install docker-compose
#########################################################
# Confirm that everything is OK
#########################################################
echo "[ALL: SUCCESS]"