updated diff changes from licai openstack deployment script modified for deidtect

parent 5eb5cdca
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index dcdb11d..54ce7a8 100644 index dcdb11d..cd52d55 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -5,7 +5,7 @@ openstack: @@ -5,7 +5,7 @@ openstack:
...@@ -7,7 +7,7 @@ index dcdb11d..54ce7a8 100644 ...@@ -7,7 +7,7 @@ index dcdb11d..54ce7a8 100644
NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \ NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \
nodescount=$${#NODES[@]}; \ nodescount=$${#NODES[@]}; \
- computescount=$$(( $$nodescount - 3 )); \ - computescount=$$(( $$nodescount - 3 )); \
+ computescount=$$(( $$nodescount - 4 )); \ + computescount=$$(( $$nodescount - 5 )); \
./build_juno/multi-setup.sh $$experimentid all $$computescount ./build_juno/multi-setup.sh $$experimentid all $$computescount
virt_environment: virt_environment:
...@@ -16,7 +16,7 @@ index dcdb11d..54ce7a8 100644 ...@@ -16,7 +16,7 @@ index dcdb11d..54ce7a8 100644
NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \ NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \
nodescount=$${#NODES[@]}; \ nodescount=$${#NODES[@]}; \
- computescount=$$(( $$nodescount - 3 )); \ - computescount=$$(( $$nodescount - 3 )); \
+ computescount=$$(( $$nodescount - 4 )); \ + computescount=$$(( $$nodescount - 5 )); \
./build_juno/multi-setup.sh $$experimentid virt_environment $$computescount ./build_juno/multi-setup.sh $$experimentid virt_environment $$computescount
images_upload: images_upload:
...@@ -25,7 +25,7 @@ index dcdb11d..54ce7a8 100644 ...@@ -25,7 +25,7 @@ index dcdb11d..54ce7a8 100644
NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \ NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \
nodescount=$${#NODES[@]}; \ nodescount=$${#NODES[@]}; \
- computescount=$$(( $$nodescount - 3 )); \ - computescount=$$(( $$nodescount - 3 )); \
+ computescount=$$(( $$nodescount - 4 )); \ + computescount=$$(( $$nodescount - 5 )); \
./build_juno/multi-setup.sh $$experimentid images_upload $$computescount ./build_juno/multi-setup.sh $$experimentid images_upload $$computescount
images_update: images_update:
...@@ -34,7 +34,7 @@ index dcdb11d..54ce7a8 100644 ...@@ -34,7 +34,7 @@ index dcdb11d..54ce7a8 100644
NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \ NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \
nodescount=$${#NODES[@]}; \ nodescount=$${#NODES[@]}; \
- computescount=$$(( $$nodescount - 3 )); \ - computescount=$$(( $$nodescount - 3 )); \
+ computescount=$$(( $$nodescount - 4 )); \ + computescount=$$(( $$nodescount - 5 )); \
./build_juno/multi-setup.sh $$experimentid images_update $$computescount ./build_juno/multi-setup.sh $$experimentid images_update $$computescount
rejoin_disk: rejoin_disk:
...@@ -43,7 +43,7 @@ index dcdb11d..54ce7a8 100644 ...@@ -43,7 +43,7 @@ index dcdb11d..54ce7a8 100644
NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \ NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \
nodescount=$${#NODES[@]}; \ nodescount=$${#NODES[@]}; \
- computescount=$$(( $$nodescount - 3 )); \ - computescount=$$(( $$nodescount - 3 )); \
+ computescount=$$(( $$nodescount - 4 )); \ + computescount=$$(( $$nodescount - 5 )); \
./build_juno/multi-setup.sh $$experimentid rejoin_disk $$computescount ./build_juno/multi-setup.sh $$experimentid rejoin_disk $$computescount
ifsetup: ifsetup:
...@@ -52,30 +52,45 @@ index dcdb11d..54ce7a8 100644 ...@@ -52,30 +52,45 @@ index dcdb11d..54ce7a8 100644
NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \ NODES=(`ssh $$USERNAME@ops.emulab.net "/usr/testbed/bin/node_list -p -e $$projectid,$$experimentid"`); \
nodescount=$${#NODES[@]}; \ nodescount=$${#NODES[@]}; \
- computescount=$$(( $$nodescount - 3 )); \ - computescount=$$(( $$nodescount - 3 )); \
+ computescount=$$(( $$nodescount - 4 )); \ + computescount=$$(( $$nodescount - 5 )); \
./build_juno/multi-setup.sh $$experimentid ifsetup $$computescount ./build_juno/multi-setup.sh $$experimentid ifsetup $$computescount
production: production:
@@ -86,12 +86,6 @@ run:
./prepare.py production > ./pentest_info
./prepare.py < ./pentest_info
-
-
-
-
-
-
-
-
+all:
+ openstack
diff --git a/build_juno/deditect-env-setup.sh b/build_juno/deditect-env-setup.sh diff --git a/build_juno/deditect-env-setup.sh b/build_juno/deditect-env-setup.sh
index bdcdf3a..c425642 100755 index bdcdf3a..6743737 100755
--- a/build_juno/deditect-env-setup.sh --- a/build_juno/deditect-env-setup.sh
+++ b/build_juno/deditect-env-setup.sh +++ b/build_juno/deditect-env-setup.sh
@@ -3,9 +3,11 @@ set -x @@ -3,9 +3,12 @@ set -x
# Note: this script only can be run on *EXT node*. # Note: this script only can be run on *EXT node*.
workingdir=$(cd `dirname $0`; pwd) workingdir=$(cd `dirname $0`; pwd)
-wget http://www.red-dove.com/config-0.3.7.tar.gz -wget http://www.red-dove.com/config-0.3.7.tar.gz
-tar -xz config-0.3.7.tar.gz -tar -xz config-0.3.7.tar.gz
+cd ~/download +cd ~/downloads
+wget http://www.red-dove.com/config-0.3.9.tar.gz +wget http://www.red-dove.com/config-0.3.9.tar.gz
+tar -xzf config-0.3.9.tar.gz +tar -xzf config-0.3.9.tar.gz
cd config-0.3.9 cd config-0.3.9
-sudo python setup.py install sudo python setup.py install
-cd .. -cd ..
-rm -rf config-0.3.9 config-0.3.7.tar.gz -rm -rf config-0.3.9 config-0.3.7.tar.gz
+python setup.py install
+cd ../ +cd ../
+rm -rf config-0.3.9.tar.gz +rm -rf config-0.3.9.tar.gz
+rm -rf config-0.3.9
+cd $workingdir +cd $workingdir
diff --git a/build_juno/ext_setup.sh b/build_juno/ext_setup.sh diff --git a/build_juno/ext_setup.sh b/build_juno/ext_setup.sh
index 43d7ee6..10561b1 100755 index 43d7ee6..10561b1 100755
...@@ -107,10 +122,10 @@ index 810a222..98a7f28 100755 ...@@ -107,10 +122,10 @@ index 810a222..98a7f28 100755
function setup.images_propagate () { function setup.images_propagate () {
diff --git a/build_juno/multi-setup.sh b/build_juno/multi-setup.sh diff --git a/build_juno/multi-setup.sh b/build_juno/multi-setup.sh
index 51db0f5..559c553 100755 index 51db0f5..b6b5940 100755
--- a/build_juno/multi-setup.sh --- a/build_juno/multi-setup.sh
+++ b/build_juno/multi-setup.sh +++ b/build_juno/multi-setup.sh
@@ -60,6 +60,13 @@ function setup.ifsetup() { @@ -60,6 +60,15 @@ function setup.ifsetup() {
setup.sshall "sudo $workingdir/ifsetup.sh; " setup.sshall "sudo $workingdir/ifsetup.sh; "
} }
...@@ -118,13 +133,15 @@ index 51db0f5..559c553 100755 ...@@ -118,13 +133,15 @@ index 51db0f5..559c553 100755
+ #add distributed site gre port too later on.. + #add distributed site gre port too later on..
+ networkIP=`nslookup network.${expname}.$experiment_domain | awk '/^Address: / { print $2 }'` + networkIP=`nslookup network.${expname}.$experiment_domain | awk '/^Address: / { print $2 }'`
+ enterpriseIP=`nslookup enterprise.${expname}.$experiment_domain | awk '/^Address: / { print $2 }'` + enterpriseIP=`nslookup enterprise.${expname}.$experiment_domain | awk '/^Address: / { print $2 }'`
+ wanIP=`nslookup ext.${expname}.$experiment_domain | awk '/^Address: / { print $2 }'`
+ $sshnetwork "sudo ovs-vsctl add-port br-ex deid0 -- set interface deid0 type=gre options:remote_ip=$enterpriseIP options:local_ip=$networkIP" + $sshnetwork "sudo ovs-vsctl add-port br-ex deid0 -- set interface deid0 type=gre options:remote_ip=$enterpriseIP options:local_ip=$networkIP"
+ $sshnetwork "sudo ovs-vsctl add-port br-ex deid1 -- set interface deid1 type=gre options:remote_ip=$wanIP options:local_ip=$networkIP"
+} +}
+ +
# Just key exchange before everything get started. # Just key exchange before everything get started.
function setup.sshyes() { function setup.sshyes() {
echo '#############'$FUNCNAME'###################'; echo '#############'$FUNCNAME'###################';
@@ -177,11 +184,12 @@ function setup.image_svc(){ @@ -177,11 +186,12 @@ function setup.image_svc(){
echo '############ Below is to verify glance service ############' ; echo '############ Below is to verify glance service ############' ;
$sshcontroller "{ mkdir $workingdir/images ; \ $sshcontroller "{ mkdir $workingdir/images ; \
cd $workingdir/images ; \ cd $workingdir/images ; \
...@@ -139,18 +156,22 @@ index 51db0f5..559c553 100755 ...@@ -139,18 +156,22 @@ index 51db0f5..559c553 100755
glance image-list ; \ glance image-list ; \
rm -r $workingdir/images ; }" rm -r $workingdir/images ; }"
} }
@@ -384,6 +392,10 @@ function setup.ptcontroller_env () { @@ -384,6 +394,14 @@ function setup.ptcontroller_env () {
$sshext "{ $workingdir/ptcontroller-env-setup.sh ; }" $sshext "{ $workingdir/ptcontroller-env-setup.sh ; }"
} }
+function setup.deidtect_env () { +function setup.deidtect_env () {
+ $sshcontroller "{ $workingdir/deditect-env-setup.sh ; }" + $sshcontroller "{ $workingdir/deditect-env-setup.sh ; }"
+ $sshcontroller "sudo apt-get -y install curl"
+ setup.sshall "sudo apt-get -y install python-eventlet"
+ $sshnetwork "sudo apt-get -y install python-pip"
+ $sshnetwork "sudo pip install routes"
+} +}
+ +
function setup.network_init () { function setup.network_init () {
$sshcontroller "{ $workingdir/init.sh; }" $sshcontroller "{ $workingdir/init.sh; }"
} }
@@ -430,8 +442,10 @@ then @@ -430,8 +448,10 @@ then
setup.preinstall setup.preinstall
setup.ntp setup.ntp
setup.openstack_packages setup.openstack_packages
...@@ -162,7 +183,7 @@ index 51db0f5..559c553 100755 ...@@ -162,7 +183,7 @@ index 51db0f5..559c553 100755
setup.database controller setup.database controller
setup.rejoin_network setup.rejoin_network
setup.message_server controller setup.message_server controller
@@ -448,6 +462,8 @@ then @@ -448,6 +468,8 @@ then
setup.internet setup.internet
setup.ptcontroller_env setup.ptcontroller_env
setup.network_init setup.network_init
...@@ -171,7 +192,7 @@ index 51db0f5..559c553 100755 ...@@ -171,7 +192,7 @@ index 51db0f5..559c553 100755
# setup.virt_environment # setup.virt_environment
# # the command above makes the system to be rebooted. # # the command above makes the system to be rebooted.
# sleep 10m # sleep 10m
@@ -541,4 +557,12 @@ then @@ -541,4 +563,12 @@ then
if [ "$2" == "ifsetup" ]; then if [ "$2" == "ifsetup" ]; then
setup.ifsetup setup.ifsetup
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment