| 1 | |
| 2 | == OMF Basic Reference |
| 3 | |
| 4 | === A brief overview === |
| 5 | |
| 6 | OMF is a subset of OEDL which is a domain specific language providing a framwork to control and management functionalities for large scale testbeds with multiple networked resources. This framework is implemented as a set of libraries and services mainly written in Ruby. OMF can be used to initiate experiments, control resources & collect live measurements for recording and analysis. The full details for OMF [https://omf.orbit-lab.org/ can be found here.] |
| 7 | |
| 8 | To get quickly the sections below describe some of the most used OMF commands in the basic form. These commands are run from the testbed console. |
| 9 | |
| 10 | === OMF usage |
| 11 | {{{ |
| 12 | console> omf |
| 13 | |
| 14 | Run a command on the testbed(s) |
| 15 | |
| 16 | Usage: omf [COMMAND] [ARGUMENT]... |
| 17 | Available COMMANDs: |
| 18 | help Print this help message or a specify command usage |
| 19 | exec Execute an experiment script |
| 20 | load Load a disk image on a given set of nodes |
| 21 | save Save a disk image from a given node into a file |
| 22 | tell Switch a given set of nodes ON/OFF or reboot them |
| 23 | stat Returns the status of a given set of nodes |
| 24 | To get more help on individual commands: 'omf [COMMAND]' |
| 25 | }}} |
| 26 | |
| 27 | |
| 28 | |
| 29 | === OMF status to retrieve status of node(s) |
| 30 | {{{ |
| 31 | console> omf status |
| 32 | |
| 33 | Returns the status of the nodes in a testbed. |
| 34 | |
| 35 | Usage: |
| 36 | omf stat [-h] -t TOPOLOGY [-h] [-s] [-c AGGREGATE]}}} |
| 37 | |
| 38 | Arguments: |
| 39 | |
| 40 | -h, --help print this help message |
| 41 | -t, --topology TOPOLOGY a valid topology file or description (MANDATORY) |
| 42 | -s, --summary print a summary of the node status for the testbed |
| 43 | -c, --config AGGREGATE use testbed AGGREGATE |
| 44 | }}} |
| 45 | |
| 46 | Examples: |
| 47 | |
| 48 | Get the status of all nodes in the testbed. This is good way to find all the FQDN of the nodes in the console. |
| 49 | {{{omf stat -t all}}} |
| 50 | |
| 51 | Get the status of a single node. |
| 52 | {{{omf stat -t sdr2-md1.bed.cosmos-lab.org}}} |
| 53 | |
| 54 | Get the status of multiple nodes. Use a comma-separate list to specify multiple nodes in the topology (no space before or after the comma). |
| 55 | {{{omf stat -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org}}} |
| 56 | |
| 57 | |
| 58 | === OMF tell to power on or off the node(s) |
| 59 | |
| 60 | {{{ |
| 61 | console> omf tell |
| 62 | |
| 63 | Switch ON/OFF and reboot the nodes in a testbed. |
| 64 | |
| 65 | Usage: |
| 66 | omf tell [-h] -t TOPOLOGY -a ACTION [-c AGGREGATE]}}} |
| 67 | |
| 68 | Arguments: |
| 69 | -h, --help print this help message |
| 70 | -a, --action ACTION specify an ACTION: |
| 71 | on turn node(s) ON |
| 72 | offs turn node(s) OFF (soft) |
| 73 | offh turn node(s) OFF (hard) |
| 74 | reboot reboots node(s) (soft) |
| 75 | reset resets node(s) (hard) |
| 76 | -t, --topology TOPOLOGY a valid topology file or description (MANDATORY) |
| 77 | -c, --config AGGREGATE use testbed AGGREGATE |
| 78 | }}} |
| 79 | |
| 80 | Examples: |
| 81 | |
| 82 | Reset (soft) a node. |
| 83 | {{{omf tell -a reset -t sdr2-md1.bed.cosmos-lab.org}}} |
| 84 | |
| 85 | Reboot (hard) a node. |
| 86 | {{{omf tell -a reboot -t sdr2-md1.bed.cosmos-lab.org}}} |
| 87 | |
| 88 | Turn on multiple nodes. |
| 89 | {{{omf tell -a offh -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org}}} |
| 90 | |
| 91 | Turn offh (hard) multiple nodes. |
| 92 | {{{omf tell -a offh -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org}}} |
| 93 | |
| 94 | |
| 95 | === OMF load to install a disk image on the node(s) |
| 96 | |
| 97 | {{{ |
| 98 | console> omf load |
| 99 | Install a given disk image on the nodes in a testbed. |
| 100 | |
| 101 | Usage: |
| 102 | omf load [-h] -t TOPOLOGY [-i IMAGE_PATH] [-o TIMEOUT] [-c AGGREGATE]}}} |
| 103 | |
| 104 | Arguments: |
| 105 | |
| 106 | -h, --help print this help message |
| 107 | -t, --topology TOPOLOGY a valid topology file or description (MANDATORY) |
| 108 | (if a file 'TOPOLOGY' doesn't exist, interpret it as a |
| 109 | comma-separated list of nodes) |
| 110 | -i, --image IMAGE disk image to load |
| 111 | (default is 'baseline.ndz', the latest stable baseline image) |
| 112 | -c, --config AGGREGATE use testbed AGGREGATE |
| 113 | -o, --timeout TIMEOUT a duration (in sec.) after which imageNodes should stop waiting for |
| 114 | nodes that have not finished their image installation |
| 115 | (default is 800 sec, i.e. 13min 20sec) |
| 116 | -r, --resize SIZE Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or |
| 117 | leave x percent of free space if SIZE=x% |
| 118 | --outpath PATH Path where the resulting Topologies should be saved |
| 119 | (default is '/tmp') |
| 120 | --outprefix PREFIX Prefix to use for naming the resulting Topologies |
| 121 | (default is your experiment ID) |
| 122 | }}} |
| 123 | |
| 124 | Examples: |
| 125 | |
| 126 | Load the default baseline image (baseline.ndz) on all nodes in the testbed. |
| 127 | |
| 128 | {{{omf load -t system:topo:all -i baseline.ndz}}} |
| 129 | |
| 130 | Load a specific image (my_image.ndz) on all nodes in a topology. |
| 131 | |
| 132 | {{{omf load -t system:topo:all -i my_image.ndz}}} |
| 133 | |
| 134 | Load a specific image (my_image.ndz) onto a single node. |
| 135 | |
| 136 | {{{omf load -t sdr2-md1.bed.cosmos-lab.org -i my_image.ndz}}} |
| 137 | |
| 138 | Load a specific image (my_image.ndz) onto multiple nodes with a timeout of 400 seconds. |
| 139 | |
| 140 | {{{omf load -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org -i my_image.ndz -o 400}}} |
| 141 | |
| 142 | |
| 143 | === OMF save to export the disk image from a single node into the repository. |
| 144 | |
| 145 | {{{ |
| 146 | console> omf save |
| 147 | |
| 148 | Save a disk image from a given node into an archive file. |
| 149 | |
| 150 | Usage: |
| 151 | omf save -n NODE [-h] [-c AGGREGATE]}}} |
| 152 | |
| 153 | |
| 154 | Arguments: |
| 155 | -h, --help print this help message |
| 156 | -n, --node NODE a valid description of a single node (MANDATORY) |
| 157 | (no default here, you have to enter a node!) |
| 158 | -r, --resize SIZE Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or |
| 159 | leave x percent of free space if SIZE=x% |
| 160 | }}} |
| 161 | |
| 162 | NODE must be specified in FQDN (fully qualified domain name) format (eg. node1-1.sb1.orbit-lab.org). |
| 163 | |
| 164 | Examples: |
| 165 | |
| 166 | Save the disk image from a node. |
| 167 | {{{omf save -n sdr2-md1.bed.cosmos-lab.org}}} |
| 168 | |
| 169 | |
| 170 | === omf exec to execute an OEDL script |
| 171 | |
| 172 | {{{ |
| 173 | console> omf exec |
| 174 | |
| 175 | Execute an experiment script. |
| 176 | |
| 177 | Usage: |
| 178 | exec [OPTIONS] ExperimentName [-- EXP_OPTIONS]}}} |
| 179 | |
| 180 | !ExperimentName is the filename of the experiment script |
| 181 | |
| 182 | [EXP_OPTIONS] are any options defined in the experiment script |
| 183 | |
| 184 | [OPTIONS] are any of the following: |
| 185 | -a, --allow-missing Continue experiment even if some nodes did not check in |
| 186 | -c, --config NAME Configuration section from the config file ('default' if omitted) |
| 187 | -C, --configfile FILE File containing local configuration parameters |
| 188 | -d, --debug Operate in debug mode |
| 189 | -i, --interactive Run the experiment controller in interactive mode |
| 190 | -l, --libraries LIST Comma separated list of libraries to load (defaults to [system:exp:stdlib,system:exp:eventlib,system:exp:winlib]) |
| 191 | --log FILE File containing logging configuration information |
| 192 | -m, --message MESSAGE Message to add to experiment trace |
| 193 | -n, --just-print Print the commands that would be executed, but do not execute them |
| 194 | -N, --no-am Don't use the Aggregate Manager (AM) |
| 195 | -p, --print URI Print the contents of the experiment script |
| 196 | -o, --output-result FILE File to write final state information to |
| 197 | -e, --experiment-id EXPID Set the ID for this experiment, instead of the default standard ID |
| 198 | -O, --output-app Display STDOUT & STDERR output from the executed applications |
| 199 | -r, --reset If set, then reset (reboot) the nodes before the experiment |
| 200 | -s, --shutdown If set, then shut down resources at the end of an experiment |
| 201 | -S, --slice NAME Name of the Slice where this EC should operate |
| 202 | -t, --tags TAGS Comma separated list of tags to add to experiment trace |
| 203 | --oml-uri URI The URI to the OML server for this experiment |
| 204 | -x, --extra-libs LIST Comma separated list of libraries to load in addition to [system:exp:stdlib,system:exp:eventlib,system:exp:winlib] |
| 205 | --slave-mode EXPID Run in slave mode in disconnected experiment, EXPID is the exp. ID |
| 206 | --slave-mode-resource NAME When in slave mode, NAME is the HRN of the resource for this EC |
| 207 | -h, --help Show this message |
| 208 | -v, --version Show the version |
| 209 | }}} |