-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserdata_prod_web.sh
44 lines (34 loc) · 1.06 KB
/
userdata_prod_web.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
#!/bin/bash
# install dependencies
sudo yum update -y
sudo yum install epel-release -y
sudo yum install yum-utils -y
sudo yum install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx
sudo yum install git python-pip -y
# add docker repo
sudo cat >/etc/yum.repos.d/docker.repo <<-EOF
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
sudo yum install docker-engine -y
sudo systemctl enable docker
sudo systemctl start docker
sudo pip install docker-compose
sudo pip install awscli
mkdir -p /usr/local/share/bchd
cd /usr/local/share/bchd
aws s3 cp s3://bchd-configs/prod-secrets secrets.sh
aws s3 cp s3://bchd-configs/watchmaker config.yml
aws s3 cp s3://bchd-configs/prod-dashboardconfig config/healthdashboard.conf
# install and run watchmaker
git clone https://github.com/plus3it/watchmaker.git --recursive && cd watchmaker
git submodule update --init --recursive
git checkout 0.5.1
pip install .
#watchmaker --config /usr/local/share/bchd/config.yml