aboutsummaryrefslogtreecommitdiff
path: root/rumba/prototypes
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2017-06-07 11:08:39 +0200
committerMarco Capitani <m.capitani@nextworks.it>2017-06-07 11:08:39 +0200
commitd62b0595ab660d6c23ab24bd94cd79453f0129ff (patch)
tree06e6db10120307f9091db907cfc562384110bc9d /rumba/prototypes
parent77dccda7380679447fd8ad3176d239901301ba16 (diff)
parentdb18f01116739a2854c4305a7ad72da8c56d446d (diff)
downloadrumba-d62b0595ab660d6c23ab24bd94cd79453f0129ff.tar.gz
rumba-d62b0595ab660d6c23ab24bd94cd79453f0129ff.zip
Merge branch 'master' into jfed-irati-fixes
Diffstat (limited to 'rumba/prototypes')
-rw-r--r--rumba/prototypes/irati.py13
-rw-r--r--rumba/prototypes/ouroboros.py28
-rw-r--r--rumba/prototypes/rlite.py13
3 files changed, 18 insertions, 36 deletions
diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py
index c47d0d2..1e75efc 100644
--- a/rumba/prototypes/irati.py
+++ b/rumba/prototypes/irati.py
@@ -36,6 +36,9 @@ logger = log.get_logger(__name__)
# An experiment over the IRATI implementation
class Experiment(mod.Experiment):
+ def prototype_name(self):
+ return 'irati'
+
@staticmethod
def real_sudo(s):
return 'sudo ' + s
@@ -82,7 +85,7 @@ class Experiment(mod.Experiment):
+ self.sudo("./install-from-scratch")]
for node in self.nodes:
- ssh.execute_commands(self.testbed, node.ssh_config,
+ ssh.execute_proxy_commands(self.testbed, node.ssh_config,
cmds, time_out=None)
def setup(self):
@@ -230,16 +233,10 @@ class Experiment(mod.Experiment):
next_vlan += 10
self.shim2vlan[dif.name] = vlan
- # TODO: what format are the mappings registered in? Is this ok?
- app_mappings = []
- for node in self.nodes:
- app_mappings += [{'name': app, 'dif': self.dif_name(dif)}
- for app in node.registrations
- for dif in node.registrations[app]]
-
# If some app directives were specified, use those to build da.map.
# Otherwise, assume the standard applications are to be mapped in
# the DIF with the highest rank.
+ app_mappings = []
if len(app_mappings) == 0:
if len(self.dif_ordering) > 0:
for adm in \
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py
index 9c164e7..9ac1425 100644
--- a/rumba/prototypes/ouroboros.py
+++ b/rumba/prototypes/ouroboros.py
@@ -32,6 +32,9 @@ class Experiment(mod.Experiment):
def __init__(self, testbed, nodes=None):
mod.Experiment.__init__(self, testbed, nodes)
+ def prototype_name(self):
+ return 'ouroboros'
+
def setup_ouroboros(self):
for node in self.nodes:
ssh.execute_command(self.testbed, node.ssh_config,
@@ -50,27 +53,6 @@ class Experiment(mod.Experiment):
ssh.execute_commands(self.testbed, node.ssh_config,
cmds, time_out=None)
- def bind_names(self):
- for node in self.nodes:
- cmds = list()
- for name, ap in node.bindings.items():
- cmds.append("irm b ap " + ap + " n " + name)
-
- ssh.execute_commands(self.testbed, node.ssh_config,
- cmds, time_out=None)
-
- def reg_names(self):
- for node in self.nodes:
- cmds = list()
- for name, difs in node.registrations.items():
- cmd = "irm r n " + name
- for dif in difs:
- cmd += " dif " + dif.name
- cmds.append(cmd)
-
- ssh.execute_commands(self.testbed, node.ssh_config, cmds,
- time_out=None)
-
def create_ipcps(self):
for node in self.nodes:
cmds = list()
@@ -147,12 +129,8 @@ class Experiment(mod.Experiment):
def bootstrap_prototype(self):
logger.info("Starting IRMd on all nodes...")
self.setup_ouroboros()
- logger.info("Binding names...")
- self.bind_names()
logger.info("Creating IPCPs")
self.create_ipcps()
logger.info("Enrolling IPCPs...")
self.enroll_ipcps()
- logger.info("Registering names...")
- self.reg_names()
logger.info("All done, have fun!")
diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py
index 625668d..cc38255 100644
--- a/rumba/prototypes/rlite.py
+++ b/rumba/prototypes/rlite.py
@@ -34,10 +34,17 @@ class Experiment(mod.Experiment):
def __init__(self, testbed, nodes=None):
mod.Experiment.__init__(self, testbed, nodes)
+ def prototype_name(self):
+ return 'rlite'
+
def execute_commands(self, node, cmds):
ssh.execute_commands(self.testbed, node.ssh_config,
cmds, time_out=None)
+ def execute_proxy_commands(self, node, cmds):
+ ssh.execute_proxy_commands(self.testbed, node.ssh_config,
+ cmds, time_out=None)
+
# Prepend sudo to all commands if the user is not 'root'
def may_sudo(self, cmds):
if self.testbed.username != 'root':
@@ -117,17 +124,17 @@ class Experiment(mod.Experiment):
def install_prototype(self):
logger.info("installing rlite on all nodes")
cmds = ["sudo apt-get update",
- "export https_proxy=\"https://proxy.atlantis.ugent.be:8080\"; sudo -E apt-get install g++ gcc cmake "
+ "sudo -E apt-get install g++ gcc cmake "
"linux-headers-$(uname -r) "
"protobuf-compiler libprotobuf-dev git --yes",
"rm -rf ~/rlite",
- "cd ~; export https_proxy=\"https://proxy.atlantis.ugent.be:8080\"; git clone https://github.com/vmaffione/rlite",
+ "cd ~; git clone https://github.com/vmaffione/rlite",
"cd ~/rlite && ./configure && make && sudo make install",
"cd ~/rlite && sudo make depmod"
]
for node in self.nodes:
- self.execute_commands(node, cmds)
+ self.execute_proxy_commands(node, cmds)
logger.info("installation complete")
def bootstrap_prototype(self):