Changes between Version 40 and Version 41 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
- Timestamp:
- 03/17/15 15:03:58 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
v40 v41 31 31 32 32 You 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 34 The 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 35 the variables you'll need. 33 36 34 37 {{{ … … 130 133 || [[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. || 131 134 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 }}} 142 to the top. Then, first run every playbook on {{{debug_nodes}}} for your tests. 143 || 144 132 145 || [[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]. || 133 146 … … 162 175 Once you have finished your playbook, run it against all the nodes! 163 176 164 As a data point, our Ansible playbook contained six commands (not including debug commands) and used the '''apt''', '''shell''', and '''get_url''' modules. 177 As 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 178 Experiment Engine substrate. 165 179 166 180 ----