From cab2290e34c77e00914da1ef8115cf4c86956709 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Fri, 28 Apr 2017 11:23:00 +0200 Subject: model: fix bug in bootstrapper computation The bootstrapper computation must happen in a separate phase, after both IPCPs computation and enrollment computation. --- rumba/model.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/rumba/model.py b/rumba/model.py index 9187fcb..0b9fc7a 100644 --- a/rumba/model.py +++ b/rumba/model.py @@ -285,7 +285,7 @@ class IPCP: self.dif = dif self.registrations = [] - # Is this node the first in the DIF, so that it does not need + # Is this IPCP the first in its DIF, so that it does not need # to enroll to anyone ? self.dif_bootstrapper = False @@ -511,6 +511,7 @@ class Experiment: if dif not in node.difs: continue + # Create an instance of the required IPCP class ipcp = dif.get_ipcp_class()( name='%s.%s' % (dif.name, node.name), node=node, dif=dif) @@ -519,30 +520,34 @@ class Experiment: for lower in node.dif_registrations[dif]: ipcp.registrations.append(lower) + node.ipcps.append(ipcp) + dif.ipcps.append(ipcp) + + def compute_bootstrappers(self): + for node in self.nodes: + for ipcp in node.ipcps: ipcp.dif_bootstrapper = True for el in self.enrollments: for e in el: - if e['dif'] != dif: + if e['dif'] != ipcp.dif: # Skip this DIF break - if e['enrollee'] == node: + if e['enrollee'] == ipcp: ipcp.dif_bootstrapper = False # Exit the loops break if not ipcp.dif_bootstrapper: break - node.ipcps.append(ipcp) - dif.ipcps.append(ipcp) - - logger.info("IPCP for node %s: %s", node.name, node.ipcps) - # Examine the nodes and DIFs, compute the registration and enrollment # order, the list of IPCPs to create, registrations, ... def generate(self): self.compute_dif_ordering() self.compute_ipcps() self.compute_enrollments() + self.compute_bootstrappers() + for node in self.nodes: + logger.info("IPCPs for node %s: %s", node.name, node.ipcps) @abc.abstractmethod def install_prototype(self): -- cgit v1.2.3 From 3021a7c8501147975d2b773a1aabe7c766c44dd1 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Fri, 28 Apr 2017 15:24:16 +0200 Subject: prototypes: rlite: add sudo commands --- 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 8a06b44..b01f33f 100644 --- a/rumba/prototypes/rlite.py +++ b/rumba/prototypes/rlite.py @@ -108,8 +108,8 @@ class Experiment(mod.Experiment): def install_prototype(self): logger.info("installing rlite on all nodes") - cmds = ["apt-get update", - "apt-get install g++ gcc cmake " + cmds = ["sudo apt-get update", + "sudo apt-get install g++ gcc cmake " "linux-headers-$(uname -r) " "protobuf-compiler libprotobuf-dev git --yes", "rm -rf ~/rlite", -- cgit v1.2.3 From 41e472bd8fd5dc14c21aac0e5a0009a02e6ea95b Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Fri, 28 Apr 2017 15:33:26 +0200 Subject: prototypes: rlite: add depmod --- rumba/prototypes/rlite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py index b01f33f..a35f2f1 100644 --- a/rumba/prototypes/rlite.py +++ b/rumba/prototypes/rlite.py @@ -114,7 +114,9 @@ class Experiment(mod.Experiment): "protobuf-compiler libprotobuf-dev git --yes", "rm -rf ~/rlite", "cd ~; git clone https://github.com/vmaffione/rlite", - "cd ~/rlite && ./configure && make && sudo make install"] + "cd ~/rlite && ./configure && make && sudo make install", + "cd ~/rlite && sudo make depmod" + ] for node in self.nodes: self.execute_commands(node, cmds) -- cgit v1.2.3 From 5db6829d150669bb577565c0b6b26c5b03f8b421 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Fri, 28 Apr 2017 15:57:47 +0200 Subject: prototypes: rlite: add sudo when needed --- rumba/prototypes/rlite.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py index a35f2f1..d35c5d5 100644 --- a/rumba/prototypes/rlite.py +++ b/rumba/prototypes/rlite.py @@ -38,17 +38,21 @@ class Experiment(mod.Experiment): ssh.execute_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': + for i in range(len(cmds)): + cmds[i] = "sudo %s" % cmds[i] + def init_nodes(self): + # Load kernel modules and start the uipcps daemon cmds = ["modprobe rlite", "modprobe rlite-normal", "modprobe rlite-shim-eth", "modprobe rlite-shim-udp4", "modprobe rlite-shim-loopback", "rlite-uipcps -v DBG -k 0 &> uipcp.log &"] - - # Load kernel modules - - # Start the uipcps daemon + self.may_sudo(cmds) for node in self.nodes: self.execute_commands(node, cmds) @@ -80,6 +84,7 @@ class Experiment(mod.Experiment): cmds.append("rlite-ctl ipcp-config %s netdev %s" % (ipcp.name, ipcp.ifname)) + self.may_sudo(cmds) self.execute_commands(node, cmds) def register_ipcps(self): @@ -91,6 +96,7 @@ class Experiment(mod.Experiment): cmds.append("rlite-ctl ipcp-register %s %s" % (ipcp.name, lower.name)) + self.may_sudo(cmds) self.execute_commands(node, cmds) def enroll_ipcps(self): @@ -103,7 +109,9 @@ class Experiment(mod.Experiment): } cmd = "rlite-ctl ipcp-enroll %(enrollee)s %(dif)s "\ "%(lower_dif)s %(enroller)s" % d - self.execute_commands(e['enrollee'].node, [cmd]) + cmds = [cmd] + self.may_sudo(cmds) + self.execute_commands(e['enrollee'].node, cmds) time.sleep(1) def install_prototype(self): -- cgit v1.2.3 From a86cba38549283d8263a399ef7f731cf8bed023e Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Fri, 28 Apr 2017 17:44:42 +0200 Subject: rumba: Update to version 0.3 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 92d0c3b..316b6da 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f: setup( name="Rumba", - version="0.1", + version="0.3", url="https://gitlab.com/arcfire/rumba", keywords="rina measurement testbed", author="Sander Vrijders", -- cgit v1.2.3 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 From a34a5d7ec2e6aa59a0a0aa0daba62f7738a1749a Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 9 May 2017 11:50:17 +0200 Subject: rumba: model: Add StoryBoard for automated testing This adds an initial draft of the API to automate tests on a RINA network. --- examples/example.py | 20 ++++++++-------- rumba/model.py | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 11 deletions(-) diff --git a/examples/example.py b/examples/example.py index 56193c2..383dbf1 100755 --- a/examples/example.py +++ b/examples/example.py @@ -17,7 +17,6 @@ import rumba.prototypes.irati as irati import rumba.log as log - log.set_logging_level('DEBUG') n1 = NormalDIF("n1", policies = {"rmt.pff": "lfa", @@ -27,19 +26,16 @@ e1 = ShimEthDIF("e1") a = Node("a", difs = [n1, e1], - dif_registrations = {n1 : [e1]}, - registrations = {"a.crap" : [n1]}, - bindings = {"a.crap" : "/usr/bin/crap"}) + dif_registrations = {n1 : [e1]}) b = Node("b", difs = [e1, n1], - dif_registrations = {n1 : [e1]}) + dif_registrations = {n1 : [e1]}, + end_user = True) -tb = qemu.Testbed(exp_name = "example1", - username = "root", - password = "root", - bzimage = '/home/vmaffione/git/rlite/demo/buildroot/bzImage', - initramfs = '/home/vmaffione/git/rlite/demo/buildroot/rootfs.cpio') +tb = jfed.Testbed(exp_name = "example1", + username = "user1", + cert_file = "/home/user1/cert.pem") exp = rl.Experiment(tb, nodes = [a, b]) @@ -48,5 +44,9 @@ print(exp) try: exp.swap_in() exp.bootstrap_prototype() + c1 = Client("rinaperf", options = "-t perf -s 1000 -c 10000") + s1 = Server("rinaperf", options = "-l", nodes = [a], clients = [c1]) + sb = StoryBoard(exp, 3600, servers = [s1]) + sb.start() finally: exp.swap_out() diff --git a/rumba/model.py b/rumba/model.py index 0b9fc7a..91f33a6 100644 --- a/rumba/model.py +++ b/rumba/model.py @@ -152,7 +152,7 @@ class SSHConfig: # class Node: def __init__(self, name, difs=None, dif_registrations=None, - registrations=None, bindings=None): + registrations=None, bindings=None, end_user=False): self.name = name if difs is None: difs = list() @@ -170,6 +170,7 @@ class Node: self.bindings = bindings self.ssh_config = SSHConfig(name) self.ipcps = [] + self.end_user = end_user self._validate() @@ -564,3 +565,67 @@ class Experiment: def swap_out(self): # Undo the testbed (testbed-specific) self.testbed.swap_out(self) + +# Base class for client programs +# +# @ap: Application Process binary +# @options: Options to pass to the binary +# +class Client: + def __init__(self, ap, options=None): + self.ap = ap + self.options = options + +# Base class for server programs +# +# @ap: Application Process binary +# @options: Options to pass to the binary +# @max_clients: Maximum number of clients to serve +# @clients: Client binaries that will use this server +# @nodes: Specific nodes to start this server on +# +class Server: + def __init__(self, ap, options=None, max_clients=None, + clients=None, nodes=None): + self.ap = ap + self.options = options + self.max_clients = max_clients + if clients is None: + clients = list() + self.clients = clients + self.nodes = nodes + + def add_client(self, client): + self.clients.append(client) + + def del_client(self, client): + self.clients.remove(client) + + def add_node(self, node): + self.nodes.append(node) + + def del_node(self, node): + self.nodes.remove(node) + +# Base class for ARCFIRE storyboards +# +# @experiment: Experiment to use as input +# @duration: Duration of the whole storyboard +# @servers: App servers available in the network +# +class StoryBoard: + def __init__(self, experiment, duration, servers=None): + self.experiment = experiment + self.duration = duration + if servers is None: + servers = list() + self.servers = servers + + def add_server(self, server): + self.servers.append(server) + + def del_server(self, server): + self.servers.remove(server) + + def start(self): + pass -- cgit v1.2.3 From 43d3dbafc78172030dee2545b25d4fe5a05d1eba Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Wed, 10 May 2017 18:09:56 +0200 Subject: Storyboard: additions to the model Means of distributions and other required fields. --- rumba/model.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/rumba/model.py b/rumba/model.py index 91f33a6..97af536 100644 --- a/rumba/model.py +++ b/rumba/model.py @@ -20,6 +20,7 @@ # MA 02110-1301 USA import abc +import random import rumba.log as log @@ -572,20 +573,23 @@ class Experiment: # @options: Options to pass to the binary # class Client: - def __init__(self, ap, options=None): + def __init__(self, ap, duration, options=None): self.ap = ap self.options = options + self.duration = duration # in seconds # Base class for server programs # # @ap: Application Process binary +# @arrival_rate: Average requests/s to be received by this server # @options: Options to pass to the binary # @max_clients: Maximum number of clients to serve # @clients: Client binaries that will use this server # @nodes: Specific nodes to start this server on # class Server: - def __init__(self, ap, options=None, max_clients=None, + def __init__(self, ap, arrival_rate, mean_duration, + options=None, max_clients=None, clients=None, nodes=None): self.ap = ap self.options = options @@ -594,6 +598,8 @@ class Server: clients = list() self.clients = clients self.nodes = nodes + self.arrival_rate = arrival_rate # mean requests/s + self.mean_duration = mean_duration # in seconds def add_client(self, client): self.clients.append(client) @@ -607,6 +613,24 @@ class Server: def del_node(self, node): self.nodes.remove(node) + def get_new_clients(self, interval): + """ + Returns a list of clients of size appropriate to the server's rate. + + The list's size should be a sample from Poisson(arrival_rate) over + interval seconds. + Hence, the average size should be interval * arrival_rate. + """ + pass + + def make_client(self): + """Returns a client of this server""" + if len(self.clients) == 0: + raise Exception("Server %s has empty client list," % (self,)) + placeholder = 10 # TODO: Should be a sample from Exp(mean_duration) + return Client(random.choice(self.clients), placeholder) + + # Base class for ARCFIRE storyboards # # @experiment: Experiment to use as input -- cgit v1.2.3 From ea1a4462a8b7a2fb7404e4652e0806795ba96863 Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Thu, 11 May 2017 10:51:26 +0200 Subject: Storyboard: added modifications to API to example.py --- examples/example.py | 4 ++-- rumba/model.py | 47 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/examples/example.py b/examples/example.py index 383dbf1..7fe130d 100755 --- a/examples/example.py +++ b/examples/example.py @@ -44,8 +44,8 @@ print(exp) try: exp.swap_in() exp.bootstrap_prototype() - c1 = Client("rinaperf", options = "-t perf -s 1000 -c 10000") - s1 = Server("rinaperf", options = "-l", nodes = [a], clients = [c1]) + c1 = ClientBinary("rinaperf", options = "-t perf -s 1000 -c 10000") + s1 = Server("rinaperf", arrival_rate=2, mean_duration=5, options = "-l", nodes = [a], clients = [c1]) sb = StoryBoard(exp, 3600, servers = [s1]) sb.start() finally: diff --git a/rumba/model.py b/rumba/model.py index 97af536..36ac5c3 100644 --- a/rumba/model.py +++ b/rumba/model.py @@ -22,6 +22,8 @@ import abc import random +import time + import rumba.log as log @@ -567,16 +569,50 @@ class Experiment: # Undo the testbed (testbed-specific) self.testbed.swap_out(self) + # Base class for client programs # # @ap: Application Process binary # @options: Options to pass to the binary # -class Client: - def __init__(self, ap, duration, options=None): +class ClientBinary(object): + def __init__(self, ap, options=None): self.ap = ap self.options = options - self.duration = duration # in seconds + + def start_process(self, node, duration, start_time): + return ClientProcess(self.ap, node, duration, start_time, self.options) + + +# Base class for client processes +# +# @ap: Application Process binary +# @node: The node on which this process should run +# @duration: The time (in seconds) this process should run +# @start_time: The time at which this process is started. +# @options: Options to pass to the binary +# +class ClientProcess(ClientBinary): + def __init__(self, ap, node, duration, start_time, options=None): + super(ClientProcess, self).__init__(ap, options=options) + self.node = node + self.duration = duration + self.start_time = start_time + self.run() + self.running = True + + def run(self): + pass # TODO to be implemented + + def stop(self): + pass # TODO to be implemented + + def check(self, now): + if not self.running: + return + if now - self.start_time >= self.duration: + self.stop() + # Base class for server programs # @@ -623,12 +659,11 @@ class Server: """ pass - def make_client(self): + def make_client_process(self): """Returns a client of this server""" if len(self.clients) == 0: raise Exception("Server %s has empty client list," % (self,)) - placeholder = 10 # TODO: Should be a sample from Exp(mean_duration) - return Client(random.choice(self.clients), placeholder) + pass # TODO should return a ClientProcess # Base class for ARCFIRE storyboards -- cgit v1.2.3 From e78c92993406bc4ca24a1c38db7d3195901b28d9 Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Thu, 11 May 2017 11:32:11 +0200 Subject: Storyboard: small fixes to API --- examples/example.py | 2 +- rumba/model.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/example.py b/examples/example.py index 7fe130d..a3fe5ec 100755 --- a/examples/example.py +++ b/examples/example.py @@ -44,7 +44,7 @@ print(exp) try: exp.swap_in() exp.bootstrap_prototype() - c1 = ClientBinary("rinaperf", options = "-t perf -s 1000 -c 10000") + c1 = Client("rinaperf", options ="-t perf -s 1000 -c 10000") s1 = Server("rinaperf", arrival_rate=2, mean_duration=5, options = "-l", nodes = [a], clients = [c1]) sb = StoryBoard(exp, 3600, servers = [s1]) sb.start() diff --git a/rumba/model.py b/rumba/model.py index 36ac5c3..285d937 100644 --- a/rumba/model.py +++ b/rumba/model.py @@ -155,7 +155,7 @@ class SSHConfig: # class Node: def __init__(self, name, difs=None, dif_registrations=None, - registrations=None, bindings=None, end_user=False): + registrations=None, bindings=None, client=False): self.name = name if difs is None: difs = list() @@ -173,7 +173,7 @@ class Node: self.bindings = bindings self.ssh_config = SSHConfig(name) self.ipcps = [] - self.end_user = end_user + self.client = client self._validate() @@ -575,7 +575,7 @@ class Experiment: # @ap: Application Process binary # @options: Options to pass to the binary # -class ClientBinary(object): +class Client(object): def __init__(self, ap, options=None): self.ap = ap self.options = options @@ -592,7 +592,7 @@ class ClientBinary(object): # @start_time: The time at which this process is started. # @options: Options to pass to the binary # -class ClientProcess(ClientBinary): +class ClientProcess(Client): def __init__(self, ap, node, duration, start_time, options=None): super(ClientProcess, self).__init__(ap, options=options) self.node = node @@ -618,6 +618,7 @@ class ClientProcess(ClientBinary): # # @ap: Application Process binary # @arrival_rate: Average requests/s to be received by this server +# @mean_duration: Average duration of a client connection (in seconds) # @options: Options to pass to the binary # @max_clients: Maximum number of clients to serve # @clients: Client binaries that will use this server -- cgit v1.2.3 From 10da73cd31a26ad2b4a95bb1ec3d02f6afc57dc6 Mon Sep 17 00:00:00 2001 From: Marco Capitani Date: Thu, 11 May 2017 12:03:08 +0200 Subject: Storyboard missing end_user->client change --- examples/example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example.py b/examples/example.py index a3fe5ec..1acc883 100755 --- a/examples/example.py +++ b/examples/example.py @@ -31,7 +31,7 @@ a = Node("a", b = Node("b", difs = [e1, n1], dif_registrations = {n1 : [e1]}, - end_user = True) + client = True) tb = jfed.Testbed(exp_name = "example1", username = "user1", -- cgit v1.2.3 From c97cc90d8623dcb76969d8be30d9dee76c5927ea Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Sat, 20 May 2017 16:51:02 +0200 Subject: prototypes: irati: align setup to new kernel build system --- rumba/prototypes/irati.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py index b2f54d9..e24dd60 100644 --- a/rumba/prototypes/irati.py +++ b/rumba/prototypes/irati.py @@ -155,12 +155,15 @@ class Experiment(mod.Experiment): '') cmds = [self.sudo('hostname %(name)s' % format_args), + self.sudo('modprobe rina-irati-core'), self.sudo('chmod a+rw /dev/irati'), self.sudo('mv %(genfilesconf)s /etc' % format_args), self.sudo('mv %(genfilesbin)s /usr/bin') % format_args, self.sudo('chmod a+x /usr/bin/enroll.py') % format_args] cmds += [self.sudo('modprobe rina-default-plugin'), + self.sudo('modprobe shim-eth-vlan'), + self.sudo('modprobe normal-ipcp'), self.sudo('%(installpath)s/bin/ipcm -a \"%(ipcmcomps)s\" ' '-c /etc/%(name)s.ipcm.conf -l %(verb)s &> log &' % format_args)] -- cgit v1.2.3 From 2cf3cb3e9999a00ca21742f7a63c3cff15fce704 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Wed, 31 May 2017 14:16:22 +0200 Subject: examples: jfed-rlite: use try-finally --- examples/jfed-rlite.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/jfed-rlite.py b/examples/jfed-rlite.py index ce058eb..d80b56e 100755 --- a/examples/jfed-rlite.py +++ b/examples/jfed-rlite.py @@ -46,6 +46,9 @@ tb = jfed.Testbed(exp_name = args.expname, exp = rlite.Experiment(tb, nodes = [a, b]) -exp.swap_in() -exp.install_prototype() -exp.bootstrap_prototype() +try: + exp.swap_in() + exp.install_prototype() + exp.bootstrap_prototype() +finally: + exp.swap_out() -- cgit v1.2.3 From 24c375545c6ef7d03e8a18dea2cb06763059b1b9 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Wed, 31 May 2017 15:51:41 +0200 Subject: README: add info about dependencies Fixes #8. --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c854772..9bd7d38 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,19 @@ a look at the examples/ folder. ## Installation + For Debian and Ubuntu, the following command will ensure that the + required dependencies are installed (replace python-dev with python3-dev + if using Python 3): + + # apt-get install build-essential libssl-dev libffi-dev python-dev + Rumba can be found on the [PyPi](https://pypi.python.org/pypi/Rumba) and can thus be installed through pip, by using `pip install rumba`. However, to install the latest version, after cloning the repository, a user can also issue `python setup.py install`. + ## Supported prototypes * [IRATI](https://github.com/IRATI/stack) is an open source -- cgit v1.2.3