-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathlaunch.sh
executable file
·65 lines (52 loc) · 1.52 KB
/
launch.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
64
65
if [ $1 = '--stats' ]; then
shift
STATS=1
fi
RUN_DIR=~/iSDX
RIBS_DIR=$RUN_DIR/xrs/ribs
TEST_DIR=$1
LOG_FILE=SDXLog.log
set -x
case $2 in
(1)
if [ ! -d $RIBS_DIR ]
then
mkdir $RIBS_DIR
fi
cd $RUN_DIR
sh pctrl/clean.sh
rm -f $LOG_FILE
python logServer.py $LOG_FILE
;;
(2)
# the following gets around issues with vagrant direct mount
cd ~
sudo python $RUN_DIR/examples/$TEST_DIR/mininet/sdx_mininet.py $RUN_DIR/examples/$TEST_DIR/mininet/mininet.cfg
#cd $RUN_DIR/examples/$TEST_DIR/mininext
#sudo ./sdx_mininext.py
;;
(3)
cd $RUN_DIR/flanc
if [ -n "$STATS" ]; then
export GAUGE_CONFIG=$RUN_DIR/examples/$TEST_DIR/config/gauge.conf
STATS_APP=stats/gauge.py
fi
ryu-manager $STATS_APP ryu.app.ofctl_rest refmon.py --refmon-config $RUN_DIR/examples/$TEST_DIR/config/sdx_global.cfg &
sleep 1
cd $RUN_DIR/xctrl
python xctrl.py $RUN_DIR/examples/$TEST_DIR/config/sdx_global.cfg
cd $RUN_DIR/arproxy
sudo python arproxy.py $TEST_DIR &
sleep 1
cd $RUN_DIR/xrs
sudo python route_server.py $TEST_DIR &
sleep 1
cd $RUN_DIR/pctrl
sudo python participant_controller.py $TEST_DIR 1 &
sudo python participant_controller.py $TEST_DIR 2 &
sudo python participant_controller.py $TEST_DIR 3 &
sleep 1
cd $RUN_DIR
exabgp examples/$TEST_DIR/config/bgp.conf
;;
esac