Changes between Version 25 and Version 26 of GENIExperimenter/Tutorials/GENIExperimentEngine/Execute


Ignore:
Timestamp:
03/16/15 17:54:30 (9 years ago)
Author:
acb@cs.princeton.edu
Comment:

--

Legend:

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

    v25 v26  
    6969
    7070{{{
     71#!python
    7172---
    7273- hosts: nodes
     
    9798
    9899{{{
     100#!python
    99101---
    100102- hosts: nodes
     
    181183=== (d) Get the latitude and longitude for each node ===
    182184
    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 to use the '''geoiplookup''' tool, provided by package '''geoip-bin'''.
     185To 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'''.
    184186
    185187{{{
     
    189191where ''<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.   
    190192
    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 
    193193|| [[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 ||
    194194
    195195|| [[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 ||
    196196
    197 At this point, you should have enough information to flesh 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.
     197At this point, you should have enough information to fetch the parameterized URL in the playbook.
    198198
    199199== 3. Run the playbook ==