-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathstartup.sh
63 lines (53 loc) · 1.62 KB
/
startup.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
#!/bin/sh
WORKDIR=/home/work/open-falcon
function deploy_config {
if [ ! -f "$WORKDIR/conf/$1" ]; then
cp /conf/$1 $WORKDIR/conf/
fi
}
if [ ! -d "$WORKDIR/mysql/mysql" ]; then
rsync -a /var/lib/mysql $WORKDIR/
fi
deploy_config my.cnf
deploy_config redis.conf
deploy_config alarm.cfg
deploy_config fe.cfg
deploy_config graph.cfg
deploy_config graph_backends.txt
deploy_config hbs.cfg
deploy_config judge.cfg
deploy_config query.cfg
deploy_config sender.cfg
deploy_config transfer.cfg
deploy_config dashboard.py
deploy_config dashboard-gunicorn.conf
rm $WORKDIR/dashboard/rrd/config.py
rm $WORKDIR/dashboard/gunicorn.conf
ln -s $WORKDIR/conf/dashboard.py $WORKDIR/dashboard/rrd/config.py
ln -s $WORKDIR/conf/dashboard-gunicorn.conf $WORKDIR/dashboard/gunicorn.conf
deploy_config portal.py
deploy_config portal-gunicorn.conf
rm $WORKDIR/portal/frame/config.py
rm $WORKDIR/portal/gunicorn.conf
ln -s $WORKDIR/conf/portal.py $WORKDIR/portal/frame/config.py
ln -s $WORKDIR/conf/portal-gunicorn.conf $WORKDIR/portal/gunicorn.conf
deploy_config links.py
deploy_config links-gunicorn.conf
rm $WORKDIR/links/frame/config.py
rm $WORKDIR/links/gunicorn.conf
ln -s $WORKDIR/conf/links.py $WORKDIR/links/frame/config.py
ln -s $WORKDIR/conf/links-gunicorn.conf $WORKDIR/links/gunicorn.conf
supervisorctl start mysql
supervisorctl start redis
sleep 5
supervisorctl start alarm
supervisorctl start dashboard
supervisorctl start fe
supervisorctl start graph
supervisorctl start hbs
supervisorctl start judge
supervisorctl start query
supervisorctl start sender
supervisorctl start transfer
supervisorctl start links
supervisorctl start portal