aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-05-03 11:26:18 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-05-03 11:26:18 +0200
commitbf9a98603c8fc8dd8f15a7d54ffb2111fc6428a9 (patch)
treea465775369733dfde1407a26920eec5f6bacea2d
parenta86cba38549283d8263a399ef7f731cf8bed023e (diff)
parent32d53fa835918353128152a54e8f8539a89f4388 (diff)
downloadrumba-bf9a98603c8fc8dd8f15a7d54ffb2111fc6428a9.tar.gz
rumba-bf9a98603c8fc8dd8f15a7d54ffb2111fc6428a9.zip
Merge branch 'master' of gitlab.com:arcfire/rumba
-rw-r--r--README.md30
-rwxr-xr-xexamples/jfed-rlite.py51
-rw-r--r--rumba/prototypes/rlite.py4
3 files changed, 74 insertions, 11 deletions
diff --git a/README.md b/README.md
index d6e0839..c854772 100644
--- a/README.md
+++ b/README.md
@@ -82,16 +82,28 @@ a look at the examples/ folder.
Here the experiment name is rochefort10, the user's name is
ricksanchez, and the certificate can be found in
- /home/morty/cert.pem. Please use an absolute path for cert_file for
- now.
+ /home/morty/cert.pem. An absolute path must be used for cert_file.
- Before running the experiment it is wise to use an SSH agent to
- avoid having to enter the passphrase for every login to a node by
- the framework if you are not on an IPv6 enabled network. (Apart
- from asking for the passphrase to login to the nodes, the framework
+ Before running the rumba you must run an SSH agent in same terminal.
+ This will also avoid you having to enter the passphrase for every
+ login to a node by the framework if you are not on an IPv6 enabled network.
+ (Apart from asking for the passphrase to login to the nodes, the framework
will always ask for the passphrase since it is needed by the jFed
CLI as well.) In order to start an SSH agent and to add the
- certificate, simply perform the following commands:
+ certificate, type the following commands:
- eval `ssh-agent`
- ssh-add /home/morty/cert.pem
+ $ eval `ssh-agent`
+ $ ssh-add /home/morty/cert.pem
+
+ To access a node once the experiment swapped in, use the following
+ command (in the same terminal where ssh-agent was run):
+
+ $ ssh -A -oProxyCommand="ssh -i $CERTPATH
+ -o StrictHostKeyChecking=no $USER@bastion.test.iminds.be
+ nc $NODENAME.$EXP.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be 22"
+ $USER@$NODENAME.$EXP.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be
+
+ where $CERTPATH is the absolute path of the certificate (e.g.
+ /home/morty/cert.pem), $USER is the jFed username (e.g. "ricksanchez"),
+ $NODENAME is the name of the node you want to access (e.g. "a"),
+ and $EXP is the name of the experiment (e.g. "rochefort10").
diff --git a/examples/jfed-rlite.py b/examples/jfed-rlite.py
new file mode 100755
index 0000000..ce058eb
--- /dev/null
+++ b/examples/jfed-rlite.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+
+from rumba.model import *
+
+import rumba.testbeds.jfed as jfed
+import rumba.prototypes.rlite as rlite
+
+import rumba.log as log
+
+import argparse
+
+
+description = "Script to run rlite on jfed"
+epilog = "2017 H2020 ARCFIRE"
+
+argparser = argparse.ArgumentParser(description = description,
+ epilog = epilog)
+argparser.add_argument('--user', type = str, default = 'vmaffio',
+ help = "jFed username")
+argparser.add_argument('--cert', type = str,
+ help = "Absolute path to certificate (.pem) file"
+ " to be used with jFed",
+ default = '/home/vmaffione/Downloads/vmaffio-jfed.pem')
+argparser.add_argument('--expname', type = str, default = 'pinocchio',
+ help = "Name of the experiment within the jFed testbed")
+
+args = argparser.parse_args()
+
+log.set_logging_level('DEBUG')
+
+n1 = NormalDIF("n1")
+
+e1 = ShimEthDIF("e1")
+
+a = Node("a",
+ difs = [n1, e1],
+ dif_registrations = {n1 : [e1]})
+
+b = Node("b",
+ difs = [e1, n1],
+ dif_registrations = {n1 : [e1]})
+
+tb = jfed.Testbed(exp_name = args.expname,
+ cert_file = args.cert,
+ username = args.user)
+
+exp = rlite.Experiment(tb, nodes = [a, b])
+
+exp.swap_in()
+exp.install_prototype()
+exp.bootstrap_prototype()
diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py
index d35c5d5..625668d 100644
--- a/rumba/prototypes/rlite.py
+++ b/rumba/prototypes/rlite.py
@@ -117,11 +117,11 @@ class Experiment(mod.Experiment):
def install_prototype(self):
logger.info("installing rlite on all nodes")
cmds = ["sudo apt-get update",
- "sudo apt-get install g++ gcc cmake "
+ "export https_proxy=\"https://proxy.atlantis.ugent.be:8080\"; sudo -E apt-get install g++ gcc cmake "
"linux-headers-$(uname -r) "
"protobuf-compiler libprotobuf-dev git --yes",
"rm -rf ~/rlite",
- "cd ~; git clone https://github.com/vmaffione/rlite",
+ "cd ~; export https_proxy=\"https://proxy.atlantis.ugent.be:8080\"; git clone https://github.com/vmaffione/rlite",
"cd ~/rlite && ./configure && make && sudo make install",
"cd ~/rlite && sudo make depmod"
]