Changes between Version 43 and Version 44 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
- Timestamp:
- 03/18/15 18:10:50 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
v43 v44 32 32 You will use Ansible to do this. 33 33 34 == 1. Create an Ansible playbook to install the software you'll need == 35 36 First you will write a playbook to install the software you'll need on all the nodes. Below is a skeleton Ansible file that you use ([attachment:software-install.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 this [attachment:software-install-solution.yaml solution]. 37 38 {{{ 39 #!python 40 --- 41 - hosts: nodes 42 remote_user: root 43 tasks: 44 - name: Update apt cache 45 apt: # INSERT ARGUMENTS HERE 46 47 - name: Install dnsutils (for dig) 48 apt: # INSERT ARGUMENTS HERE 49 50 - name: Install geoip-bin (for geoiplookup) 51 apt: # INSERT ARGUMENTS HERE 52 }}} 53 54 Run this playbook on all the nodes in your slice. You'll only need to do this step once. 55 56 ----- 57 58 == 2. Create an Ansible playbook to download a parameterized URL from each node == 34 == 1. Create an Ansible playbook to download a parameterized URL from each node == 59 35 60 36 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. 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 61 37 the variables you'll need. You then need to fetch a custom URL containing this information from each host. 62 38 63 Below is a skeleton Ansible file that you use ([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 this [attachment:gee-tutorial-solution.yaml solution] -- but don't give up too easily!39 Below is a [attachment:gee-tutorial.yaml skeleton Ansible playbook] that you can use. 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 this [attachment:gee-tutorial-solution.yaml solution] -- but don't give up too easily! 64 40 65 41 {{{ … … 182 158 ---- 183 159 184 == 3. Run the playbook ==160 == 2. Run the playbook == 185 161 186 Once you have finished with Step 2, run your playbook against all the nodes in your slicelet!162 Once you have finished with Step 1, run your playbook against all the nodes in your slicelet! 187 163 188 164 ---- 189 165 190 == 4. Verify that your playbook worked as expected ==166 == 3. Verify that your playbook worked as expected == 191 167 192 168 Once you have completed the tutorial, you can check where you’ve said hello from at: