Changes between Version 64 and Version 65 of GENIExperimenter/Tutorials/GENI-SAVI/DesignSetup


Ignore:
Timestamp:
06/23/15 10:41:05 (9 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/GENI-SAVI/DesignSetup

    v64 v65  
    9898$ ./tutorial.sh createvm savi <tenant_name> <location> <os_image_name> <vm-size> <ssh_key> <vm-name>
    9999}}}
    100  * Each group will be given a specific site and values for all parameters. 
    101    * The `vm-name` should be your GENI username, followed by the `sitename`.  e.g., for `rickmcg`, the name at Toronto will be `rickmcg-toronto`
    102    * Use the following command to reserve your SAVI node:
     100 * Each group will be given a specific site and values for all parameters.  The `vm-name` should be your GENI username, followed by the `sitename`.  e.g., for `rickmcg`, the name at Toronto will be `rickmcg-toronto`
     101{{{
     102#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     103Use the following command to reserve your SAVI node:
    103104{{{
    104105$ ./tutorial.sh createvm savi geniUsers <savi site> Ubuntu-14-04-64 small geni_key_portal <geni_username>-<savi sitename>
    105106}}}
    106  * You should now have one VM on a GENI rack and one VM at a SAVI site.   Check the status of your resources on both GENI and SAVI:
     107}}}
     108 * You should now have one VM on a GENI rack and one VM at a SAVI site.   
     109{{{
     110#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     111Check the status of your resources on both GENI and SAVI:
    107112{{{
    108113$ ./tutorial.sh listinstance geni <slice-name>
    109114$ ./tutorial.sh listinstance savi <site-name>
    110115}}}
    111  * Take note of the hostname for your GENI VM and the public IP address listed for your SAVI VM as these will be used in the next step.  ''Notice that access to the SAVI machines are by IP address.''
     116}}}
     117 * Make note of the hostname for your GENI VM and the public IP address listed for your SAVI VM as these will be used in the next step.  ''Notice that access to the SAVI machines are by IP address.''
    112118
    113119== 4. Set up Ansible for your experiment ==
     
    157163}}}
    158164
     165
     166{{{
     167#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     168
    159169Create an Ansible inventory file named `ansible-hosts` for your slice.
    160170
     
    168178
    169179Where `geni_resource_name` and `savi_resource_ip` are what you found from the `listinstance` commands from step 3.
    170 
     180}}}
    171181=== (b) Add private key to SSH agent ===
    172182
    173183In the next step, Ansible will try to SSH into multiple nodes.
    174  * To save time entering the passphrase for your private key multiple times, add your private key to your ssh agent as follows:
     184
     185{{{
     186#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     187To save time entering the passphrase for your private key multiple times, add your private key to your ssh agent as follows:
    175188{{{
    176189$ ssh-agent bash
    177190$ ssh-add ~/.ssh/geni_key_portal
    178191}}}
     192}}}
    179193
    180194=== (c) The ping module ===
    181195
    182 The '''ping''' module simply tries to do a SSH login to a node and reports success or failure.  Run the following command on your controller:
    183 
     196The '''ping''' module simply tries to do a SSH login to a node and reports success or failure. 
     197
     198{{{
     199#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     200
     201Run the following command on your controller:
    184202{{{
    185203$ ansible nodes -i ansible-hosts -m ping
     
    187205
    188206If you don’t see success everywhere then there is something wrong with your setup.  Ask one of the tutorial leaders for help. 
     207}}}
    189208
    190209=== (d) The shell module ===
     
    192211The '''shell''' module lets you run arbitrary SSH commands in parallel across a set of hosts.  It’s useful for poking around, or if there is no Ansible module with the functionality you need. 
    193212
     213{{{
     214#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     215
    194216Try it out:
    195217
     
    200222You can replace ''hostname'' above with any other Linux command.
    201223
     224}}}
     225
    202226=== (e) The setup module ===
    203227
    204228The '''setup''' module gathers a bunch of information about each node and saves it in variables that you can reference in your Ansible playbook.  This will be really useful to do the tutorial!   
    205229
     230{{{
     231#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     232
    206233Try it out on a node to see what it collects (replace `<your-vm>` with your hostname):
    207234
     
    210237}}}
    211238
     239}}}
    212240{{{
    213241#!comment
     
    240268== 5. Create and run an Ansible playbook to install the software you will need ==
    241269
    242 Now you will use a playbook to install the software you will need on all the nodes.  Below is the ansible playbook you will need. 
    243 
    244  * To download this playbook to your client machine, type:
    245 {{{
    246  wget http://groups.geni.net/geni/raw-attachment/wiki/GENIExperimenter/Tutorials/GENI-SAVI/DesignSetup/software-install-solution.yaml
    247 }}}
    248  * The ansible playbook:
     270Now you will use a playbook to install the software you will need on all the nodes. 
     271
     272 
     273{{{
     274#!div style="background: #ffd; border: 3px ridge; width: 800px;"
     275
     276The ansible playbook you will need:
    249277{{{
    250278---
     
    266294}}}
    267295
     296
     297 * To download this playbook to your client machine, type:
     298{{{
     299 wget http://groups.geni.net/geni/raw-attachment/wiki/GENIExperimenter/Tutorials/GENI-SAVI/DesignSetup/software-install-solution.yaml
     300}}}
     301
     302
    268303 * Run this playbook on your Ansible control machine against all the nodes in your slice. 
    269304{{{
     
    273308|| [[Image(wiki:GENIExperimenter/Tutorials/Graphics:tip.png, nolink, 50px, bottom)]] || '''Pro Tip:''' use the `-f` argument to `ansible-playbook` to speed things up -- it lets you control the number of nodes to operate on in parallel, and the default is 5.  Specifying `-f 20` will run the playbook's tasks against all your nodes in parallel.   ||
    274309
     310}}}
    275311
    276312----