command = "ping -c5 nepi.inria.fr" # Add simulated nodes and applications nodes = list() apps = list() for i in xrange(node_count): node = create_node(ec, username, pl_user, pl_password) nodes.append(node) for j in xrange(app_count): app = add_app(ec, command, node) apps.append(app) # Set perisent blacklist to True ec.set_global('PlanetlabNode', 'persist_blacklist', True) # Deploy the experiment zero_time = datetime.datetime.now() # Launch thread to monitor CPU and memory usage thread_monitor_deploy.start() # Deploy experiment ec.deploy() # Wait until nodes and apps are deployed ec.wait_deployed(nodes + apps) # Time to deploy ttd_time = datetime.datetime.now()
command = "ping -c5 nepi.inria.fr" # Add simulated nodes and applications nodes = list() apps = list() for i in xrange(node_count): node = create_node(ec, username, pl_user, pl_password) nodes.append(node) for j in xrange(app_count): app = add_app(ec, command, node) apps.append(app) # Set perisent blacklist to True ec.set_global('PlanetlabNode', 'persist_blacklist', True) # Deploy the experiment zero_time = datetime.datetime.now() # Launch thread to monitor CPU and memory usage thread_monitor_deploy.start() # Deploy experiment ec.deploy() # Wait until nodes and apps are deployed ec.wait_deployed(nodes + apps) # Time to deploy ttd_time = datetime.datetime.now()
ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) node3 = ec.register_resource("planetlab::Node") ec.set(node3, "username", username) ec.set(node3, "pluser", pl_user) ec.set(node3, "plpassword", pl_password) ec.set(node3, "cleanExperiment", True) ec.set(node3, "cleanProcesses", True) # Set the global attribute 'persist_blacklist' # (that applies to all PlanetlabNodes) to persist the # use of the blacklist, meaning leaving out of the # provisioning the nodes in that file, and adding the new blacklisted # nodes to the file. ec.set_global("planetlab::Node", "persist_blacklist", True) # apps app1 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app1, "command", command) ec.register_connection(app1, node1) app2 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app2, "command", command) ec.register_connection(app2, node2) app3 = ec.register_resource("linux::Application") command = "ping -c5 google.com" ec.set(app3, "command", command)