aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/prototypes/rlite.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py
index b66bd69..6a9d6ef 100644
--- a/rumba/prototypes/rlite.py
+++ b/rumba/prototypes/rlite.py
@@ -27,6 +27,7 @@
import rumba.ssh_support as ssh
import rumba.model as mod
import rumba.log as log
+import rumba.multiprocess as m_processing
import time
@@ -40,6 +41,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 'rlite'
@@ -140,12 +148,20 @@ class Experiment(mod.Experiment):
cmds = ["rm -rf ~/rlite",
"cd ~; git clone https://github.com/vmaffione/rlite",
- "cd ~/rlite && ./configure && make && sudo make install",
+ "cd ~/rlite && ./configure && make -j${nproc} " +
+ "&& sudo make install",
"cd ~/rlite && sudo make depmod"]
+ names = []
+ executors = []
+ args = []
+
for node in self.nodes:
- ssh.aptitude_install(self.testbed, node, packages)
- self.execute_proxy_commands(node, cmds)
+ 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)
logger.info("installation complete")
def bootstrap_prototype(self):