Changes between Version 5 and Version 6 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute


Ignore:
Timestamp:
03/11/15 15:40:07 (5 years ago)
Author:
acb@cs.princeton.edu
Comment:

--

Legend:

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

    v5 v6  
    2020= STEPS FOR EXECUTING EXERCISE =
    2121
     22----
     23
     24'''Your goal in this tutorial is to fetch a parameterized URL on each node of your slicelet:'''
     25
     26 '''!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>'''
     27
     28We will work up to this goal through hands-on learning with Ansible.
     29
     30----
     31
    2232== Experiment with various Ansible modules: ping, shell, setup ==
    2333
    24 Next, get familiar with some basic Ansible commands .  The '''ping''' module simply tries to do a SSH login to a node and reports success or failure.  Run the following command on your controller:
     34We will first get familiar with some basic Ansible commands using the command-line interface.  The '''ping''' module simply tries to do a SSH login to a node and reports success or failure.  Run the following command on your controller:
    2535
    2636{{{
     
    4454}}}
    4555
    46 == Create an Ansible playbook to achieve the tutorial objective ==
     56== Create an Ansible playbook to download a parameterized URL from each node ==
    4757
    4858First create a starter Ansible playbook.  Recall that a playbook is a YAML file containing a list of Ansible commands.  Copy the following into a file called lab.yaml:
     
    6676'''Pro Tip:''' Solve the problem on one node in your slice first, then deploy your solution to the remaining nodes.  One thing at a time
    6777
    68 Now, think about how you are going to solve the problems of this tutorial.  Recall that your goal is to fetch a parameterized URL on each node of your slicelet:
    69 
    70   ''!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>''
     78Now, think about how you are going to solve the problems of this tutorial. 
    7179
    7280For instance, the IP address visible inside the slicelet (as reported in the variable ''ansible_eth0.ipv4.address'') is a private address -- it is not the control address of the host, which is one piece of information you want.  There are a number of ways that you could discover the control address, including running '''dig +short''' on the host’s name (see if you can find a variable that contains this; HINT: you need it to SSH into the slicelet) or by running '''curl''' against a webserver that reports the client’s externally visible address.
     
    98106== Run the playbook ==
    99107
    100 Once you have finished your playbook, run it against all the nodes!
    101 
    102 {{{
    103 $ ansible-playbook -i ansible-hosts --private-key id_rsa lab.yaml
    104 }}}
    105 
    106 Our Ansible playbook contained six commands (not including debug commands) and used the '''apt''', '''shell''', and '''get_url''' modules.
     108Once you have finished your playbook, run it against all the nodes!  As a data point, our Ansible playbook contained six commands (not including debug commands) and used the '''apt''', '''shell''', and '''get_url''' modules.
    107109
    108110= [wiki:GENIExperimenter/Tutorials/GENIExperimentEngine/Finish Next: Teardown Experiment] =