-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_setup.sh
executable file
·52 lines (40 loc) · 1.27 KB
/
init_setup.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
#!/usr/bin/env bash
srcdir="`dirname "$0"`"
srcdir="`cd "$srcdir"; pwd`"
source $srcdir/../envs.sh
sbin=$SHORTSTACK_ROOT/sbin
export SHORTSTACK_SERVERS=$SHORTSTACK_HOSTS
nl1=1
nl2=1
nl3=1
rep=1
nredis=1
trace=$1
objsz=1000
nopushbins="none"
noredis="none"
if [[ "$nopushbins" != "nopushbins" ]]
then
echo "Pushing binaries"
$ARTIFACT_ROOT/scripts/push_bins.sh
fi
echo "Generate + sync hosts file"
python3 $SHORTSTACK_ROOT/gen_hosts_file.py /local/deploy/shortstack.hosts /local/deploy/hosts.csv $nl1 1 1 $nl2 1 1 $nl3 1 1 $nredis 1 1 0 $rep $rep
$sbin/sync.sh /local/deploy/hosts.csv
if [[ "$noredis" != "noredis" ]]
then
echo "Starting redis"
$sbin/hosts.sh /local/deploy/stop_redis.sh; $sbin/run_redis.sh /local/deploy/hosts.csv
echo "Init KV store + push distinfo"
/local/deploy/proxy_server init -h /local/deploy/hosts.csv -o $objsz -t $trace -d /local/deploy/distinfo.bin && $sbin/sync.sh /local/deploy/distinfo.bin
fi
echo "Starting proxies"
$sbin/hosts.sh /local/deploy/stop_proxys.sh;
sleep 2;
$sbin/run_l3.sh /local/deploy/hosts.csv -s 1 -c 1 -y 1;
sleep 4;
$sbin/run_l2.sh /local/deploy/hosts.csv $rep -c 1 -y 1;
sleep 4;
$sbin/run_l1.sh /local/deploy/hosts.csv $rep -c 1 -f;
sleep 4;
/local/deploy/proxy_server manager -h /local/deploy/hosts.csv -s