aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-11-15 22:23:24 +0100
committerSander Vrijders <[email protected]>2017-11-15 22:37:29 +0100
commit95f65acf781b179d5eacb08185eae30b9e2e1ca0 (patch)
tree5df084143bbb4081d6fe4ca38937cbd87bd52ba5
parentea5d4f3be72ff53064e62f10509f2c180a4da39b (diff)
downloadrumba-95f65acf781b179d5eacb08185eae30b9e2e1ca0.tar.gz
rumba-95f65acf781b179d5eacb08185eae30b9e2e1ca0.zip
prototypes: Add parallel installation for Ouroboros
This will install Ouroboros in parallel on the different nodes.
-rw-r--r--rumba/prototypes/irati.py1
-rw-r--r--rumba/prototypes/ouroboros.py26
2 files changed, 22 insertions, 5 deletions
diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py
index 0f2d69e..160bff1 100644
--- a/rumba/prototypes/irati.py
+++ b/rumba/prototypes/irati.py
@@ -22,6 +22,7 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., http://www.fsf.org/about/contact/.
#
+
import copy
import json
import os
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py
index 0a67e9b..a09f570 100644
--- a/rumba/prototypes/ouroboros.py
+++ b/rumba/prototypes/ouroboros.py
@@ -23,9 +23,11 @@
# Foundation, Inc., http://www.fsf.org/about/contact/.
#
+import time
+
import rumba.ssh_support as ssh
import rumba.model as mod
-import time
+import rumba.multiprocessing_utils as m_processing
import rumba.log as log
@@ -37,6 +39,13 @@ class Experiment(mod.Experiment):
def __init__(self, testbed, nodes=None):
mod.Experiment.__init__(self, testbed, nodes)
+ @staticmethod
+ def make_executor(node, packages, testbed):
+ def executor(commands):
+ ssh.aptitude_install(testbed, node, packages)
+ node.execute_commands(commands, time_out=None, use_proxy=True)
+ return executor
+
def prototype_name(self):
return 'ouroboros'
@@ -55,12 +64,19 @@ class Experiment(mod.Experiment):
"git clone -b be git://ouroboros.ilabt.imec.be/ouroboros " +
"~/ouroboros",
"cd ~/ouroboros && mkdir build && cd build && " +
- "cmake -DCMAKE_BUILD_TYPE=Debug .. && sudo make install"]
+ "cmake -DCMAKE_BUILD_TYPE=Debug .. && sudo make install " +
+ "-j$(nproc)"]
+
+ names = []
+ executors = []
+ args = []
for node in self.nodes:
- ssh.aptitude_install(self.testbed, node, packages)
- ssh.execute_commands(self.testbed, node.ssh_config,
- cmds, time_out=None)
+ executor = self.make_executor(node, packages, self.testbed)
+ names.append(node.name)
+ executors.append(executor)
+ args.append(cmds)
+ m_processing.call_in_parallel(names, args, executors)
def create_ipcps(self):
for node in self.nodes: