Changes between Version 40 and Version 41 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute


Ignore:
Timestamp:
03/17/15 15:03:58 (9 years ago)
Author:
rick@mcgeer.com
Comment:

--

Legend:

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

    v40 v41  
    3131
    3232You will use Ansible to do this.  Below is a skeleton Ansible file that you use to work through the tutorial ([attachment:gee-tutorial.yaml download]).  You will need to fill in the bits marked `# INSERT ARGUMENTS HERE` based on the instructions in the following section.  If you get stuck at any point, you can take a look at one possible [attachment:solution.yaml solution] -- but don't give up too easily! 
     33
     34The task is to collect six pieces of information.  Three of these (the slice name, container name, and local IP) can be found from Ansible variables.  Running a {{{setup}}} command, as on the previous page, will show you the Ansible variables.  Note that {{{setup}}} is run automatically by Ansible, so when executing a playbook on a node that information is available.  Look through the output from {{{setup}}}, and you can identify
     35the variables you'll need.
    3336
    3437{{{
     
    130133|| [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' The '''ansible''' command-line tool is a good way to try out Ansible tasks before putting them in your playbook.  Look at the examples in part 1 above. ||
    131134
     135|| [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' Running a playbook on all the nodes can take a fair amount of time, and this can lengthen the debug cycle.  Pick one or two nodes to be {{{debug_nodes}}}, then go to the {{{ansible-hosts}}} inventory file and add the lines
     136{{{
     137#!python
     138[debug_nodes]
     139    <slice-name>.pcvm3-1.geni.case.edu ansible_ssh_host=pcvm3-1.geni.case.edu ansible_ssh_port=49153
     140     <slice-name>.pcvm2-2.instageni.rnoc.gatech.edu ansible_ssh_host=pcvm2-2.instageni.rnoc.gatech.edu ansible_ssh_port=49153
     141}}}
     142to the top.  Then, first run every playbook on {{{debug_nodes}}} for your tests.
     143 ||
     144
    132145|| [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' Usually in an Ansible playbook you reference a variable by surrounding it in double curly brackets: ''{{ ansible_eth0.ipv4.address }}''.  You can see examples of how variables are referenced in tasks in [https://github.com/ansible/ansible-examples/blob/master/language_features/get_url.yml this playbook]. ||
    133146
     
    162175Once you have finished your playbook, run it against all the nodes! 
    163176
    164 As a data point, our Ansible playbook contained six commands (not including debug commands) and used the '''apt''', '''shell''', and '''get_url''' modules.
     177As a data point, our Ansible playbook contained six commands (not including debug commands) and used the '''apt''', '''shell''', and '''get_url''' modules.  It took about 10 minutes to fully execute over the entire GENI
     178Experiment Engine substrate.
    165179
    166180----