-
Notifications
You must be signed in to change notification settings - Fork 0
/
start-agent.sh
32 lines (29 loc) · 1.39 KB
/
start-agent.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
#!/bin/bash
ETCD_HOST=etcd
ETCD_PORT=2379
ETCD_URL=http://$ETCD_HOST:$ETCD_PORT
echo ETCD_URL = $ETCD_URL
if [[ "$1" == "consumer" ]]; then
echo "Starting consumer agent..."
# java -Xms4166M -Xmx4166M -jar -Dserver.port=20000 -Detcd.url=http://etcd:2379 /root/dists/ca.jar > /root/logs/ca.log 2>&1
# pypy /root/dists/ca.py --port=20000 --etcd=etcd > /root/logs/ca.log 2>&1
pypy /root/dists/ca_startup.py --port=20000 --etcd=etcd --ca_path=/root/dists/ca.out > /root/logs/ca.log 2>&1
elif [[ "$1" == "provider-small" ]]; then
echo "Starting small provider agent..."
# pypy /root/dists/pa.py --port=30000 --etcd=etcd --weight=14 > /root/logs/pa.log 2>&1
pypy /root/dists/pa_register.py --port=30000 --etcd=etcd --weight=14
/root/dists/pa.out > /root/logs/pas.log 2>&1
elif [[ "$1" == "provider-medium" ]]; then
echo "Starting medium provider agent..."
pypy /root/dists/pa_register.py --port=30000 --etcd=etcd --weight=25
/root/dists/pa.out > /root/logs/pam.log 2>&1
# pypy /root/dists/pa.py --port=30000 --etcd=etcd --weight=25 > /root/logs/pa.log 2>&1
elif [[ "$1" == "provider-large" ]]; then
echo "Starting large provider agent..."
pypy /root/dists/pa_register.py --port=30000 --etcd=etcd --weight=25
/root/dists/pa.out > /root/logs/pal.log 2>&1
# pypy /root/dists/pa.py --port=30000 --etcd=etcd --weight=25 > /root/logs/pa.log 2>&1
else
echo "Unrecognized arguments, exit."
exit 1
fi