Changes between Version 25 and Version 26 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
- Timestamp:
- 03/16/15 17:54:30 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/GENIExperimentEngine/Execute
v25 v26 69 69 70 70 {{{ 71 #!python 71 72 --- 72 73 - hosts: nodes … … 97 98 98 99 {{{ 100 #!python 99 101 --- 100 102 - hosts: nodes … … 181 183 === (d) Get the latitude and longitude for each node === 182 184 183 Another requirement of the lab is to map the host's control IP address obtained in the previous step to the latitude and longitude for each node. One way to do this is touse the '''geoiplookup''' tool, provided by package '''geoip-bin'''.185 To map the host's control IP address obtained in the previous step to the latitude and longitude for each node, use the '''geoiplookup''' tool, provided by package '''geoip-bin'''. 184 186 185 187 {{{ … … 189 191 where ''<data file>'' is the database of IP addresses and locations. You can find a good one at: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz, which you’ll have to download to each node and unzip. 190 192 191 A different approach would be to run '''curl''' against a webserver that maps IP address to latitude and longitude, such as http://ipinfo.io, and parse the output. '''NOTE:''' this particular website rate-limits the number of requests per node per day, so if you use it, ''make only a single request per node and save the result in a file''… keep in mind that everyone in the tutorial may be hitting this server from the same set of hosts!192 193 193 || [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' The Ansible '''script''' module can be used to run arbitrary scripts in your slicelet. See: http://docs.ansible.com/script_module.html || 194 194 195 195 || [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' Not all the resources you may need are installed on the nodes! The '''apt''' Ansible module is useful for installing packages; see: http://docs.ansible.com/apt_module.html || 196 196 197 At this point, you should have enough information to f lesh out the base Ansible playbook. No need to hurry. Do each step, one at a time, and use the '''debug''' module to print out variable values after each step. This will help you get something working very quickly.197 At this point, you should have enough information to fetch the parameterized URL in the playbook. 198 198 199 199 == 3. Run the playbook ==