| 1 | = Tutorial 0-2: Using a testbed = |
| 2 | |
| 3 | TODO |
| 4 | |
| 5 | Command help output: |
| 6 | {{{ |
| 7 | Run a command on the testbed(s) |
| 8 | Usage: omf [COMMAND] [ARGUMENT]... |
| 9 | Available COMMANDs: |
| 10 | help Print this help message or a specify command usage |
| 11 | exec Execute an experiment script |
| 12 | load Load a disk image on a given set of nodes |
| 13 | save Save a disk image from a given node into a file |
| 14 | tell Switch a given set of nodes ON/OFF or reboot them |
| 15 | stat Returns the status of a given set of nodes |
| 16 | To get more help on individual commands: 'omf help [COMMAND]' |
| 17 | Examples: |
| 18 | omf help exec Return usage/help for the 'exec' command |
| 19 | omf help load Return usage/help for the 'load' command |
| 20 | }}} |
| 21 | |
| 22 | [[BR]] |
| 23 | == Accessing == |
| 24 | TODO |
| 25 | |
| 26 | {{{ssh yourUserName@sb7.orbit-lab.org}}} |
| 27 | |
| 28 | [[BR]] |
| 29 | == Loading a disk image onto a node == |
| 30 | TODO |
| 31 | |
| 32 | '''Example:''' Suppose we want to load the ''baseline'' disk image onto ''node1-1'' and expand the partition to the full size of the disk in ''node1-1''. |
| 33 | |
| 34 | On the console run: |
| 35 | {{{omf load -i baseline.ndz -r -t node1-1}}} |
| 36 | |
| 37 | For the "topology" (-t), you can specify a single node such as "node1-1", a set of nodes sucha as "node1-1,node1-3,node1-4", or even a range of nodes such as "[1..2,7..9]" which in this case is equivalent to "node1-7,node1-8,node1-9,node2-7,node2-8,node2-9". See the command's help output for more possibilities. |
| 38 | |
| 39 | Command help output: |
| 40 | {{{ |
| 41 | Install a given disk image on the nodes in a testbed |
| 42 | Usage: |
| 43 | omf load [-h] -t TOPOLOGY [-i IMAGE_PATH] [-o TIMEOUT] [-c AGGREGATE] |
| 44 | |
| 45 | With: |
| 46 | -h, --help print this help message |
| 47 | -t, --topology TOPOLOGY a valid topology file or description (MANDATORY) |
| 48 | (if a file 'TOPOLOGY' doesn't exist, interpret it as a |
| 49 | comma-separated list of nodes) |
| 50 | -i, --image IMAGE disk image to load |
| 51 | (default is 'baseline.ndz', the latest stable baseline image) |
| 52 | -c, --config AGGREGATE use testbed AGGREGATE |
| 53 | -o, --timeout TIMEOUT a duration (in sec.) after which imageNodes should stop waiting for |
| 54 | nodes that have not finished their image installation |
| 55 | (default is 800 sec, i.e. 13min 20sec) |
| 56 | -r, --resize SIZE Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or |
| 57 | leave x percent of free space if SIZE=x% |
| 58 | --outpath PATH Path where the resulting Topologies should be saved |
| 59 | (default is '/tmp') |
| 60 | --outprefix PREFIX Prefix to use for naming the resulting Topologies |
| 61 | (default is your experiment ID) |
| 62 | |
| 63 | Some Examples: |
| 64 | omf load -t all |
| 65 | omf load -t system:topo:all -i baseline-2.4.ndz |
| 66 | omf load -t node1-1 -i wireless-2.6.ndz |
| 67 | omf load -t [1..10,1..5] -i baseline.ndz -o 400 |
| 68 | omf load -t system:topo:circle -i my_Own_Image.ndz |
| 69 | omf load -t my_Own_Topology -i baseline-2.2.ndz -t 600 -c grid |
| 70 | omf load -t my_Own_Topology --outpath ./ --outprefix my_Own_Prefix |
| 71 | |
| 72 | }}} |
| 73 | |
| 74 | [[BR]] |
| 75 | == Turning nodes on/off == |
| 76 | TODO |
| 77 | |
| 78 | To turn on ''node1-1'': |
| 79 | |
| 80 | {{{omf tell -a on -t node1-1}}} |
| 81 | |
| 82 | To turn off ''node1-1'' as if you held down the power button (ie. hard off): |
| 83 | |
| 84 | {{{omf tell -a offh -t node1-1}}} |
| 85 | |
| 86 | To turn reset ''node1-1'' as if your pressed the reset button: |
| 87 | |
| 88 | {{{omf tell -a reset -t node1-1}}} |
| 89 | |
| 90 | Command help output: |
| 91 | {{{ |
| 92 | Switch ON/OFF and reboot the nodes in a testbed |
| 93 | Usage: |
| 94 | omf tell [-h] -t TOPOLOGY -a ACTION [-c AGGREGATE] |
| 95 | |
| 96 | With: |
| 97 | -h, --help print this help message |
| 98 | |
| 99 | -a, --action ACTION specify an action |
| 100 | ACTION: |
| 101 | on turn node(s) ON |
| 102 | offs turn node(s) OFF (soft) |
| 103 | offh turn node(s) OFF (hard) |
| 104 | reboot reboots node(s) (soft) |
| 105 | reset resets node(s) (hard) |
| 106 | |
| 107 | -h, --help print this help message |
| 108 | -t, --topology TOPOLOGY a valid topology file or description (MANDATORY) |
| 109 | -c, --config AGGREGATE use testbed AGGREGATE |
| 110 | |
| 111 | Some Examples: |
| 112 | omf tell -a reset -t node1-1.grid.orbit-lab.org |
| 113 | omf tell -a on -t system:topo:all -c grid |
| 114 | omf tell -a reboot -t node1-1 |
| 115 | omf tell -a offh -t [1..2,1..5] |
| 116 | omf tell -a offh -t system:topo:all |
| 117 | omf tell -a reset -t system:topo:imaged |
| 118 | }}} |
| 119 | |
| 120 | [[BR]] |
| 121 | == Accessing a node == |
| 122 | TODO |
| 123 | |
| 124 | On the console: |
| 125 | {{{ssh root@node1-1}}} |
| 126 | |
| 127 | If you see an error or warning message while trying to SSH into a node, please read the message. Often times the message has to do with host keys on the node having changed from what the console expects (this is typically normal) because every image has a different host key, therefore it will change depending on what node and image you happen to be using. Follow the instructions in the message to resolve this. |
| 128 | |
| 129 | [[BR]] |
| 130 | == Saving a node's disk image == |
| 131 | TODO |
| 132 | |
| 133 | '''Example:''' Suppose we want to save the disk image of ''node1-1'' on the ''grid'' testbed. |
| 134 | |
| 135 | First SSH into 'node1-1' and run: |
| 136 | {{{/root/prepare.sh}}} |
| 137 | |
| 138 | '''NOTE: If you do not run prepare.sh on the node, the disk image WILL NOT WORK when loaded onto another node.''' |
| 139 | |
| 140 | Then on the console run: |
| 141 | {{{omf save -n node1-1.grid.orbit-lab.org}}} |
| 142 | It will take several minutes to complete the save. Once finished, take note of the filename the disk image was saved to (the format of which is username-node-nodename-date-time.ndz) so that you can use it later when loading the disk image again. |
| 143 | |
| 144 | Command help output: |
| 145 | {{{ |
| 146 | Save a disk image from a given node into an archive file |
| 147 | Usage: |
| 148 | omf save -n NODE [-h] [-c AGGREGATE] |
| 149 | |
| 150 | With: |
| 151 | -h, --help print this help message |
| 152 | -n, --node NODE a valid description of a single node (MANDATORY) |
| 153 | (no default here, you have to enter a node!) |
| 154 | -r, --resize SIZE Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or |
| 155 | leave x percent of free space if SIZE=x% |
| 156 | |
| 157 | Some Examples: |
| 158 | omf save -n node5-3.grid.orbit-lab.org |
| 159 | omf save -n node1-1.sb2.orbit-lab.org |
| 160 | }}} |
| 161 | |
| 162 | [[BR]] |
| 163 | == Accessing the list of node images == |
| 164 | {{{ ssh userName@gw.orbit-lab.org }}} |
| 165 | |
| 166 | {{{ ssh repository1 }}} |
| 167 | |
| 168 | Go to the disk images folder {{{ cd /export/omf/omf-images/ }}} |
| 169 | |
| 170 | TODO |