-
Notifications
You must be signed in to change notification settings - Fork 0
/
start-agent.sh
executable file
·55 lines (52 loc) · 1.37 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/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 -jar \
-Xms1536M \
-Xmx1536M \
-Dtype=consumer \
-Dserver.port=20000 \
-Detcd.url=$ETCD_URL \
-Dlogs.dir=/root/logs \
/root/dists/mesh-agent.jar
elif [[ "$1" == "provider-small" ]]; then
echo "Starting small provider agent..."
java -jar \
-Xms512M \
-Xmx512M \
-Dtype=provider \
-Ddubbo.protocol.port=20880 \
-Dserver.port=30000 \
-Detcd.url=$ETCD_URL \
-Dlogs.dir=/root/logs \
/root/dists/mesh-agent.jar
elif [[ "$1" == "provider-medium" ]]; then
echo "Starting medium provider agent..."
java -jar \
-Xms1536M \
-Xmx1536M \
-Dtype=provider \
-Ddubbo.protocol.port=20880 \
-Dserver.port=30000 \
-Detcd.url=$ETCD_URL \
-Dlogs.dir=/root/logs \
/root/dists/mesh-agent.jar
elif [[ "$1" == "provider-large" ]]; then
echo "Starting large provider agent..."
java -jar \
-Xms2560M \
-Xmx2560M \
-Dtype=provider \
-Ddubbo.protocol.port=20880 \
-Dserver.port=30000 \
-Detcd.url=$ETCD_URL \
-Dlogs.dir=/root/logs \
/root/dists/mesh-agent.jar
else
echo "Unrecognized arguments, exit."
exit 1
fi