From 1e58f917ce63e9d7bf6539160a7dd75c492f774f Mon Sep 17 00:00:00 2001 From: ralvarep Date: Wed, 20 Apr 2016 15:44:31 +0200 Subject: [PATCH 1/5] Uploaded ONOS installation script --- .../vagrantfile/VagrantfileGenerator.xtend | 4 ++ .../scripts/install_onos.sh | 45 +++++++++++++++++++ .../launcher/managers/SshManager.xtend | 1 + 3 files changed, 50 insertions(+) create mode 100644 plugins/eu.netide.configuration.launcher/scripts/install_onos.sh diff --git a/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerator.xtend b/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerator.xtend index 58047c3..b617844 100644 --- a/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerator.xtend +++ b/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerator.xtend @@ -59,6 +59,9 @@ class VagrantfileGenerator { url = bundle.getEntry("scripts/install_tools.sh") var toolscriptpath = scriptpath(url) + url = bundle.getEntry("scripts/install_onos.sh") + var onosscriptpath = scriptpath(url) + // var controllerPlatformKeys = input.allContents.filter(typeof(Controller)).map [ c | // String.format("controller_platform_%s", c.name) // ] @@ -107,6 +110,7 @@ class VagrantfileGenerator { config.vm.provision "shell", path: "«odlscriptpath»", privileged: false config.vm.provision "shell", path: "«flscriptpath»", privileged: false config.vm.provision "shell", path: "«toolscriptpath»", privileged: false + config.vm.provision "shell", path: "«onosscriptpath»", privileged: false «ENDIF» # Syncing the mininet configuration folder with the vm diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh b/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh new file mode 100644 index 0000000..d35d5a9 --- /dev/null +++ b/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +if [ ! -d ~/netide/onos ]; then + + if [ ! -d ~/netide/Engine ]; then + cd ~/netide + git clone https://github.com/fp7-netide/Engine.git + else + echo "Engine seems to be already installed. Skipping..." + fi + + cd ~/netide/ + git clone https://gerrit.onosproject.org/onos + cd onos + git checkout onos-1.4 + mvn clean install + + cd ~/netide/Engine/onos-shim + mvn clean install + +sh -c 'echo "# NetIDE cell + +# the address of the VM to install the package onto +export OC1=\"192.168.56.101\" + +# the default address used by ONOS utilities when none are supplied +export OCI=\"192.168.56.101\" + +# the ONOS apps to load at startup +export ONOS_APPS=\"drivers,openflow,proxyarp,mobility\" + +# the Mininet VM (if you have one) +#export OCN=\"192.168.56.102\" + +# pattern to specify which address to use for inter-ONOS node communication (not used with single-instance $ +export ONOS_NIC=\"192.168.56.*\" + +export ONOS_USER=karaf +export ONOS_GROUP=karaf +export ONOS_WEB_USER=karaf +export ONOS_WEB_PASS=karaf" > ~/netide/onos/tools/test/cells/netide' + +else + echo "ONOS already installed. Skipping..." +fi diff --git a/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend b/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend index de1e2ea..1f1042d 100644 --- a/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend +++ b/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend @@ -198,6 +198,7 @@ class SshManager implements IManager { "scripts/install_odl.sh", "scripts/install_logger_debugger.sh", "scripts/install_floodlight.sh" + "scripts/install_onos.sh" ) val fullScripts = newArrayList() From 61390495f60eefe08135a8a4cdcf66a76c8ae291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=C3=81lvarez=20Pinilla?= Date: Wed, 20 Apr 2016 16:18:30 +0200 Subject: [PATCH 2/5] Updated comments of ONOS installation script --- .../eu.netide.configuration.launcher/scripts/install_onos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh b/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh index d35d5a9..2aeb8a8 100644 --- a/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh +++ b/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh @@ -32,7 +32,7 @@ export ONOS_APPS=\"drivers,openflow,proxyarp,mobility\" # the Mininet VM (if you have one) #export OCN=\"192.168.56.102\" -# pattern to specify which address to use for inter-ONOS node communication (not used with single-instance $ +# pattern to specify which address to use for inter-ONOS node communication (not used with single-instance core) export ONOS_NIC=\"192.168.56.*\" export ONOS_USER=karaf From 6033e5651964b9bdc2b48b4cb63ab7ffb4059b7e Mon Sep 17 00:00:00 2001 From: Christian Stritzke Date: Wed, 4 May 2016 17:26:30 +0200 Subject: [PATCH 3/5] Some fixes for the installation scripts --- .../scripts/install_core.sh | 57 +++++++++++++++++++ .../scripts/install_engine.sh | 2 +- .../scripts/install_odl.sh | 2 +- .../scripts/install_ryu.sh | 2 +- .../launcher/managers/SshManager.xtend | 4 +- 5 files changed, 62 insertions(+), 5 deletions(-) diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_core.sh b/plugins/eu.netide.configuration.launcher/scripts/install_core.sh index cb8f4d5..ab06d39 100644 --- a/plugins/eu.netide.configuration.launcher/scripts/install_core.sh +++ b/plugins/eu.netide.configuration.launcher/scripts/install_core.sh @@ -1,3 +1,4 @@ +<<<<<<< HEAD #!/bin/bash if [ ! -d ~/core_engine ]; then @@ -49,3 +50,59 @@ if [ ! -d ~/core_engine ]; then else echo "Engine seems to be already installed. Skipping..." fi +======= +#!/bin/bash +if [ ! -d ~/core_engine ]; then + + sudo apt-get --yes update + sudo apt-get --yes install maven + sudo add-apt-repository --yes ppa:webupd8team/java + sudo apt-get --yes update + echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections + sudo apt-get --yes install oracle-java8-installer + sudo apt-get --yes install oracle-java8-set-default + + cd netide + git clone https://github.com/fp7-netide/Engine + + cd Engine/libraries/netip/java + mvn clean install -Dgpg.skip=true + + cd + cd netide/Engine/core + mvn clean install + cd tools/emulator + mvn clean install -Dgpg.skip=true + cd target + cp emulator-1.0-jar-with-dependencies.jar ~/netide/composition/ + + + cd + echo "Downloading Karaf..." + wget -q http://ftp.fau.de/apache/karaf/3.0.6/apache-karaf-3.0.6.tar.gz + tar xzf apache-karaf-3.0.6.tar.gz + cd apache-karaf-3.0.6/bin + chmod +x ./client ./start ./stop + echo "Installing karaf dependencies for core" + ./start + + while [ $(./client test 2>&1 | grep "Failed to get the session." | wc -l) -eq 1 ]; do + echo "No Connection to Karaf server. Trying again..." + sleep 1 + done + + ./client "feature:repo-add mvn:eu.netide.core/core/1.0.0.0-SNAPSHOT/xml/features" + ./client "feature:install netide-core" + sleep 15 + ./stop + + cd + +# mv apache-karaf-3.0.6-SNAPSHOT apache-karaf +# cd apache-karaf-3.0.6-SNAPSHOT/bin + + +else + echo "Engine seems to be already installed. Skipping..." +fi +>>>>>>> stash diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_engine.sh b/plugins/eu.netide.configuration.launcher/scripts/install_engine.sh index 564910a..7dac12f 100644 --- a/plugins/eu.netide.configuration.launcher/scripts/install_engine.sh +++ b/plugins/eu.netide.configuration.launcher/scripts/install_engine.sh @@ -3,7 +3,7 @@ cd if [ ! -d ~/netide/Engine ]; then cd netide - git clone -b demo-brussels https://github.com/fp7-netide/Engine + git clone https://github.com/fp7-netide/Engine cd fi diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_odl.sh b/plugins/eu.netide.configuration.launcher/scripts/install_odl.sh index a6d4bbe..5cddec7 100644 --- a/plugins/eu.netide.configuration.launcher/scripts/install_odl.sh +++ b/plugins/eu.netide.configuration.launcher/scripts/install_odl.sh @@ -1,6 +1,6 @@ #!/bin/bash cd -if [ ! -d ~/netide/openflowplugin ]; then +if [ ! -d ~/netide/distribution-karaf-0.4.0-Beryllium ]; then cd netide diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_ryu.sh b/plugins/eu.netide.configuration.launcher/scripts/install_ryu.sh index b051d08..cf75120 100644 --- a/plugins/eu.netide.configuration.launcher/scripts/install_ryu.sh +++ b/plugins/eu.netide.configuration.launcher/scripts/install_ryu.sh @@ -3,7 +3,7 @@ if [ "$(which pip)" == "" ] || [ "$(pip list | grep ryu)" == "" ]; then if [ ! -d ~/netide/Engine ]; then cd ~/netide - git clone -b demo-brussels https://github.com/fp7-netide/Engine + git clone https://github.com/fp7-netide/Engine else echo "Engine seems to be already installed. Skipping..." diff --git a/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend b/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend index 1f1042d..c09d049 100644 --- a/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend +++ b/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/managers/SshManager.xtend @@ -197,8 +197,8 @@ class SshManager implements IManager { "scripts/install_pox.sh", "scripts/install_odl.sh", "scripts/install_logger_debugger.sh", - "scripts/install_floodlight.sh" - "scripts/install_onos.sh" + "scripts/install_floodlight.sh", + "scripts/install_onos.sh" ) val fullScripts = newArrayList() From 4ec4d7c7b614596087ff3ee45f73935abc26d415 Mon Sep 17 00:00:00 2001 From: Christian Stritzke Date: Thu, 23 Jun 2016 11:46:40 +0200 Subject: [PATCH 4/5] Core installer fix --- .../scripts/install_core.sh | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_core.sh b/plugins/eu.netide.configuration.launcher/scripts/install_core.sh index 52fd7b3..9780baf 100644 --- a/plugins/eu.netide.configuration.launcher/scripts/install_core.sh +++ b/plugins/eu.netide.configuration.launcher/scripts/install_core.sh @@ -1,4 +1,3 @@ -<<<<<<< HEAD #!/bin/bash if [ ! -d ~/.m2/repository/eu/netide/core/ ]; then @@ -43,59 +42,3 @@ if [ ! -d ~/.m2/repository/eu/netide/core/ ]; then else echo "Engine seems to be already installed. Skipping..." fi -======= -#!/bin/bash -if [ ! -d ~/core_engine ]; then - - sudo apt-get --yes update - sudo apt-get --yes install maven - sudo add-apt-repository --yes ppa:webupd8team/java - sudo apt-get --yes update - echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections - sudo apt-get --yes install oracle-java8-installer - sudo apt-get --yes install oracle-java8-set-default - - cd netide - git clone https://github.com/fp7-netide/Engine - - cd Engine/libraries/netip/java - mvn clean install -Dgpg.skip=true - - cd - cd netide/Engine/core - mvn clean install - cd tools/emulator - mvn clean install -Dgpg.skip=true - cd target - cp emulator-1.0-jar-with-dependencies.jar ~/netide/composition/ - - - cd - echo "Downloading Karaf..." - wget -q http://ftp.fau.de/apache/karaf/3.0.6/apache-karaf-3.0.6.tar.gz - tar xzf apache-karaf-3.0.6.tar.gz - cd apache-karaf-3.0.6/bin - chmod +x ./client ./start ./stop - echo "Installing karaf dependencies for core" - ./start - - while [ $(./client test 2>&1 | grep "Failed to get the session." | wc -l) -eq 1 ]; do - echo "No Connection to Karaf server. Trying again..." - sleep 1 - done - - ./client "feature:repo-add mvn:eu.netide.core/core/1.0.0.0-SNAPSHOT/xml/features" - ./client "feature:install netide-core" - sleep 15 - ./stop - - cd - -# mv apache-karaf-3.0.6-SNAPSHOT apache-karaf -# cd apache-karaf-3.0.6-SNAPSHOT/bin - - -else - echo "Engine seems to be already installed. Skipping..." -fi ->>>>>>> stash From 66dc21272c857d7b84c9005c4ede339518d94ff7 Mon Sep 17 00:00:00 2001 From: Christian Stritzke Date: Fri, 22 Jul 2016 10:48:56 +0200 Subject: [PATCH 5/5] Onos installation script update --- .../vagrantfile/VagrantfileGenerateAction.xtend | 2 -- .../scripts/install_onos.sh | 2 ++ .../launcher/starters/impl/DebuggerStarter.xtend | 2 +- plugins/eu.netide.sysreq/src/eu/netide/SysReq.xtext | 1 + releng/eu.netide.dependencies/pom.xml | 9 +++++++-- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerateAction.xtend b/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerateAction.xtend index 5a8951c..7dc253b 100644 --- a/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerateAction.xtend +++ b/plugins/eu.netide.configuration.generator/src/eu/netide/configuration/generator/vagrantfile/VagrantfileGenerateAction.xtend @@ -2,8 +2,6 @@ package eu.netide.configuration.generator.vagrantfile import eu.netide.configuration.utils.fsa.FSAProvider import org.eclipse.core.resources.IResource -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl /** * Sets up the necessary tools to generate a Vagrantfile diff --git a/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh b/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh index 2aeb8a8..e5e183b 100644 --- a/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh +++ b/plugins/eu.netide.configuration.launcher/scripts/install_onos.sh @@ -11,6 +11,8 @@ if [ ! -d ~/netide/onos ]; then cd ~/netide/ git clone https://gerrit.onosproject.org/onos + sleep 5 + git clone https://gerrit.onosproject.org/onos cd onos git checkout onos-1.4 mvn clean install diff --git a/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/starters/impl/DebuggerStarter.xtend b/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/starters/impl/DebuggerStarter.xtend index ec02484..ba1963c 100644 --- a/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/starters/impl/DebuggerStarter.xtend +++ b/plugins/eu.netide.configuration.launcher/src/eu/netide/configuration/launcher/starters/impl/DebuggerStarter.xtend @@ -19,7 +19,7 @@ class DebuggerStarter extends Starter { } override getCommandLine() { - String.format("python ~/netide/Tools/debugger/Core/debugger.py -o ~/netide/debug_results") + String.format("bash -c \'cd ~/netide/Tools/debugger/Core/ && python ./debugger.py -o ~/netide/debug_results\'") } } \ No newline at end of file diff --git a/plugins/eu.netide.sysreq/src/eu/netide/SysReq.xtext b/plugins/eu.netide.sysreq/src/eu/netide/SysReq.xtext index bb523b8..065cd02 100644 --- a/plugins/eu.netide.sysreq/src/eu/netide/SysReq.xtext +++ b/plugins/eu.netide.sysreq/src/eu/netide/SysReq.xtext @@ -24,6 +24,7 @@ Controller: '{' 'name' ':' name=STRING ',' ('version' ':' version=STRING ',')? + ('port' ':' port=STRING ',')? ('entrypoint' ':' entrypoint=STRING ',')? ('features' ':' '[' features+=STRING (',' features+=STRING)* ']' ',')? '}' diff --git a/releng/eu.netide.dependencies/pom.xml b/releng/eu.netide.dependencies/pom.xml index 990e9e1..2572ee3 100644 --- a/releng/eu.netide.dependencies/pom.xml +++ b/releng/eu.netide.dependencies/pom.xml @@ -1,5 +1,4 @@ - + 4.0.0 eu.netide.dependencies @@ -36,6 +35,12 @@ default-cli + package + + + site + +