| 1 | = [wiki:GENIExperimenter/Tutorials/GENIExperimentEngine Get to Know the GENI Experiment Engine] = |
| 2 | {{{ |
| 3 | #!html |
| 4 | <table border="0"> |
| 5 | |
| 6 | <tr> |
| 7 | <td> |
| 8 | <a href="http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/Template/ExerciseLayout/DesignSetup"> <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/design.2.png?format=raw" alt="Hello GENI index" height="90" /> </a> |
| 9 | </td> |
| 10 | <td> |
| 11 | <a href="http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/Template/ExerciseLayout/Execute"> <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/execute_on.2.png?format=raw" alt="Hello GENI index" height="90" /> </a> |
| 12 | </td> |
| 13 | <td> |
| 14 | <a href="http://groups.geni.net/geni/wiki/GENIEducation/SampleAssignments/Template/ExerciseLayout/Finish"> <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/finish.2.png?format=raw" alt="Hello GENI index" height="90" /> </a> |
| 15 | </td> |
| 16 | </tr> |
| 17 | </table> |
| 18 | }}} |
| 19 | |
| 20 | = STEPS FOR EXECUTING EXERCISE = |
| 21 | |
| 22 | == Experiment with various Ansible modules: ping, shell, setup == |
| 23 | |
| 24 | Next, get familiar with some basic Ansible commands . 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: |
| 25 | |
| 26 | {{{ |
| 27 | $ ansible nodes -i ansible-hosts --private-key id_rsa -u root -m ping |
| 28 | }}} |
| 29 | |
| 30 | If you don’t see success everywhere then there is something wrong with your setup. Ask one of the tutorial leaders for help. |
| 31 | |
| 32 | 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. Try it out: |
| 33 | |
| 34 | {{{ |
| 35 | $ ansible nodes -i ansible-hosts --private-key id_rsa -u root -m shell -a "hostname" |
| 36 | }}} |
| 37 | |
| 38 | You can replace ''hostname'' above with any other Linux command. |
| 39 | |
| 40 | == Create an Ansible playbook to achieve the tutorial objective == |
| 41 | |
| 42 | == Run the playbook == |
| 43 | |
| 44 | |
| 45 | |
| 46 | = [wiki:GENIExperimenter/Tutorials/GENIExperimentEngine/Finish Next: Teardown Experiment] = |