aboutsummaryrefslogtreecommitdiff
path: root/rumba/prototypes/ouroboros.py
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-04-20 17:12:34 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-04-21 11:28:35 +0200
commit009c8ff7570105a79278559202fdd46616b83a92 (patch)
tree06fc2bafc26683c82795db750187ff7cefdcc43e /rumba/prototypes/ouroboros.py
parent06b3694633bd8315d55b5d75a2ca6c20afc54651 (diff)
downloadrumba-009c8ff7570105a79278559202fdd46616b83a92.tar.gz
rumba-009c8ff7570105a79278559202fdd46616b83a92.zip
model: Split experiment run()
This splits experiment.run() into 4 different operations: swap_in, install_prototype, bootstrap_prototype and swap_out.
Diffstat (limited to 'rumba/prototypes/ouroboros.py')
-rw-r--r--rumba/prototypes/ouroboros.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py
index 4fdacd6..4ebeea8 100644
--- a/rumba/prototypes/ouroboros.py
+++ b/rumba/prototypes/ouroboros.py
@@ -28,18 +28,22 @@ class Experiment(mod.Experiment):
mod.Experiment.__init__(self, testbed, nodes)
def setup_ouroboros(self):
+ for node in self.nodes:
+ ssh.execute_command(self.testbed, node.ssh_config,
+ "sudo nohup irmd > /dev/null &",
+ time_out=None)
+
+ def install_ouroboros(self):
cmds = list()
cmds.append("sudo apt-get update")
cmds.append("sudo apt-get install cmake protobuf-c-compiler git --yes")
cmds.append("sudo rm -r ~/ouroboros/build")
cmds.append("cd ~/ouroboros; sudo ./install_debug.sh /")
- cmds.append("sudo nohup irmd > /dev/null &")
for node in self.nodes:
ssh.execute_commands(self.testbed, node.ssh_config,
cmds, time_out=None)
- return
def bind_names(self):
for node in self.nodes:
@@ -131,8 +135,13 @@ class Experiment(mod.Experiment):
cmds, time_out = None)
time.sleep(2)
- def run_prototype(self):
- print("Setting up Ouroboros...")
+ def install_prototype(self):
+ print("Installing Ouroboros...")
+ self.install_ouroboros()
+ print("Installed on all nodes...")
+
+ def bootstrap_prototype(self):
+ print("Starting IRMd on all nodes...")
self.setup_ouroboros()
print("Binding names...")
self.bind_names()