aboutsummaryrefslogtreecommitdiff
path: root/rumba/prototypes/irati.py
diff options
context:
space:
mode:
Diffstat (limited to 'rumba/prototypes/irati.py')
-rw-r--r--rumba/prototypes/irati.py46
1 files changed, 27 insertions, 19 deletions
diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py
index 0d40580..f012512 100644
--- a/rumba/prototypes/irati.py
+++ b/rumba/prototypes/irati.py
@@ -65,23 +65,26 @@ class Experiment(mod.Experiment):
def conf_dir(self, path):
return os.path.join(self._conf_dir, path)
+ def install(self):
+ """Installs IRATI on the nodes."""
+ cmds = list()
+
+ cmds.append("sudo apt-get update")
+ cmds.append("sudo apt-get install g++ gcc "
+ "protobuf-compiler libprotobuf-dev git --yes")
+ cmds.append("sudo rm -rf ~/irati")
+ cmds.append("cd && git clone https://github.com/IRATI/stack irati")
+ cmds.append("cd ~/irati && sudo ./install-from-scratch")
+
+ for node in self.nodes:
+ ssh.execute_commands(self.testbed, node.ssh_config,
+ cmds, time_out=None)
+
def setup(self):
- """Installs IRATI on the vms."""
- setup_irati = False
- if setup_irati:
- cmds = list()
-
- cmds.append("sudo apt-get update")
- cmds.append("sudo apt-get install g++ gcc "
- "protobuf-compiler libprotobuf-dev git --yes")
- cmds.append("sudo rm -rf ~/irati")
- cmds.append("cd && git clone https://github.com/IRATI/stack irati")
- cmds.append("cd ~/irati && sudo ./install-from-scratch")
- cmds.append("sudo nohup ipcm &> ipcm.log &")
-
- for node in self.nodes:
- ssh.execute_commands(self.testbed, node.ssh_config,
- cmds, time_out=None)
+ for node in self.nodes:
+ ssh.execute_command(self.testbed, node.ssh_config,
+ "sudo nohup ipcm &> ipcm.log &",
+ time_out=None)
def bootstrap_network(self):
"""Creates the network by enrolling and configuring the nodes"""
@@ -89,7 +92,12 @@ class Experiment(mod.Experiment):
self.process_node(node)
self.enroll_nodes()
- def run_prototype(self):
+ def install_prototype(self):
+ print("irati: installing")
+ self.install()
+ print("irati: done installing")
+
+ def bootstrap_prototype(self):
print("irati: setting up")
self.setup()
print("irati: software initialized on all nodes")
@@ -102,8 +110,8 @@ class Experiment(mod.Experiment):
"""
Installs the configuration and boots up rina on a node
:type node: mod.Node
- :param node:
- :return:
+ :param node:
+ :return:
"""
name = node.name