From 009c8ff7570105a79278559202fdd46616b83a92 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 20 Apr 2017 17:12:34 +0200 Subject: model: Split experiment run() This splits experiment.run() into 4 different operations: swap_in, install_prototype, bootstrap_prototype and swap_out. --- rumba/prototypes/ouroboros.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'rumba/prototypes/ouroboros.py') 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() -- cgit v1.2.3