Changes between Version 64 and Version 65 of GENIExperimenter/Tutorials/GENI-SAVI/DesignSetup
- Timestamp:
- 06/23/15 10:41:05 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/GENI-SAVI/DesignSetup
v64 v65 98 98 $ ./tutorial.sh createvm savi <tenant_name> <location> <os_image_name> <vm-size> <ssh_key> <vm-name> 99 99 }}} 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;" 103 Use the following command to reserve your SAVI node: 103 104 {{{ 104 105 $ ./tutorial.sh createvm savi geniUsers <savi site> Ubuntu-14-04-64 small geni_key_portal <geni_username>-<savi sitename> 105 106 }}} 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;" 111 Check the status of your resources on both GENI and SAVI: 107 112 {{{ 108 113 $ ./tutorial.sh listinstance geni <slice-name> 109 114 $ ./tutorial.sh listinstance savi <site-name> 110 115 }}} 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.'' 112 118 113 119 == 4. Set up Ansible for your experiment == … … 157 163 }}} 158 164 165 166 {{{ 167 #!div style="background: #ffd; border: 3px ridge; width: 800px;" 168 159 169 Create an Ansible inventory file named `ansible-hosts` for your slice. 160 170 … … 168 178 169 179 Where `geni_resource_name` and `savi_resource_ip` are what you found from the `listinstance` commands from step 3. 170 180 }}} 171 181 === (b) Add private key to SSH agent === 172 182 173 183 In 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;" 187 To save time entering the passphrase for your private key multiple times, add your private key to your ssh agent as follows: 175 188 {{{ 176 189 $ ssh-agent bash 177 190 $ ssh-add ~/.ssh/geni_key_portal 178 191 }}} 192 }}} 179 193 180 194 === (c) The ping module === 181 195 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 196 The '''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 201 Run the following command on your controller: 184 202 {{{ 185 203 $ ansible nodes -i ansible-hosts -m ping … … 187 205 188 206 If you don’t see success everywhere then there is something wrong with your setup. Ask one of the tutorial leaders for help. 207 }}} 189 208 190 209 === (d) The shell module === … … 192 211 The '''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. 193 212 213 {{{ 214 #!div style="background: #ffd; border: 3px ridge; width: 800px;" 215 194 216 Try it out: 195 217 … … 200 222 You can replace ''hostname'' above with any other Linux command. 201 223 224 }}} 225 202 226 === (e) The setup module === 203 227 204 228 The '''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! 205 229 230 {{{ 231 #!div style="background: #ffd; border: 3px ridge; width: 800px;" 232 206 233 Try it out on a node to see what it collects (replace `<your-vm>` with your hostname): 207 234 … … 210 237 }}} 211 238 239 }}} 212 240 {{{ 213 241 #!comment … … 240 268 == 5. Create and run an Ansible playbook to install the software you will need == 241 269 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:270 Now 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 276 The ansible playbook you will need: 249 277 {{{ 250 278 --- … … 266 294 }}} 267 295 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 268 303 * Run this playbook on your Ansible control machine against all the nodes in your slice. 269 304 {{{ … … 273 308 || [[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. || 274 309 310 }}} 275 311 276 312 ----