Changes between Version 11 and Version 12 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute


Ignore:
Timestamp:
03/13/15 16:29:36 (9 years ago)
Author:
acb@cs.princeton.edu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/GENIExperimentEngine/Execute

    v11 v12  
    2626 '''!http://www.lively-web.org/nodejs/GEETutorial/helloWorld?slice=<slice name>&name=<container name>&ip=<IP of host>&local=<IP of  container>&lat=<latitude of host>&lng=<longitude of container>'''
    2727
     28'''This page will log each of your queries, and you can check that all your nodes were successfully able to run the query.'''
     29
    2830We will work up to this goal through hands-on learning with Ansible.
    2931
     
    3436We will first get familiar with some basic Ansible commands using the command-line interface. 
    3537
    36 === 1.1 The ping module ===
     38=== (a) The ping module ===
    3739
    3840The '''ping''' module simply tries to do a SSH login to a node and reports success or failure.  Run the following command on your controller:
     
    4446If you don’t see success everywhere then there is something wrong with your setup.  Ask one of the tutorial leaders for help.
    4547
    46 === 1.2 The shell module ===
     48=== (b) The shell module ===
    4749
    4850The '''shell''' module lets you run arbitrary SSH commands in parallel across a set of hosts.  It’s useful for poking around, or if there is no Ansible module with the functionality you need.  Try it out:
     
    5456You can replace ''hostname'' above with any other Linux command.
    5557
    56 === 1.3 The setup module ===
     58=== (c) The setup module ===
    5759
    5860The '''setup''' module gathers a bunch of information about each node and saves it in variables that you can reference in your Ansible playbooks.  This will be really useful to do the tutorial!   Try it out on a node to see what it collects (replace slice338 with your slicelet’s name):
     
    6466== 2. Create an Ansible playbook to download a parameterized URL from each node ==
    6567
    66 === 2.1 Create a starter Ansible playbook ===
     68=== (a) Create a starter Ansible playbook ===
    6769
    6870A playbook is a YAML file containing a list of Ansible commands.  To get started creating your Ansible playbook, copy the following into a file called lab.yaml:
     
    8486The '''setup''' module is run automatically at the beginning of a playbook to populate variables for each node.  The above playbook will dump the value of each node’s ''ansible_hostname'' variable.  To run the playbook on a single node, replace ''nodes'' with the name of one of your slice nodes (e.g., slice338.pcvm3-7.instageni.nps.edu).
    8587
    86 === 2.2 Iteratively build your Ansible playbook ===
     88=== (b) Iteratively build your Ansible playbook ===
    8789
    8890Now, think about how you are going to solve the problems of this tutorial.  You need to collect several pieces of information on each node: the container name, the IP of the host (i.e., the VM hosting the container), the IP of the container, and the latitude and longitude of the host.  You then need to fetch a custom URL containing this information from each host.