From 1e7215a18ea96fbba60bb5df4f33bb15a90d434e Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Sat, 29 Apr 2017 13:19:27 +0200 Subject: README.md: update with JFed-specific instructions to access nodes --- README.md | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 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"). -- cgit v1.2.3 From b9dca213b9f725ccf776b5f50a58bdd2b1586f8b Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Sat, 29 Apr 2017 15:37:54 +0200 Subject: prototypes: rlite: add temporary jfed-specific variables in install_prototype --- rumba/prototypes/rlite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" ] -- cgit v1.2.3 From 32d53fa835918353128152a54e8f8539a89f4388 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Sat, 29 Apr 2017 18:30:37 +0200 Subject: examples: add example to run rlite on jFed --- examples/jfed-rlite.py | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 examples/jfed-rlite.py 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() -- cgit v1.2.3