[[TOC(UserGuide/OmfQuickStart,inline,nonumbering,depth=3,notitle)]]
OMF is the command-line interface for controlling testbed resources from the console: loading disk images onto nodes, powering nodes on/off, and checking their status. The commands below are the ones you use day to day, run from your domain's console. For orchestrating more complex, multi-node experiments see the Experimentation guide.
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.
-session
user@console:~$ omf
Run a command on the testbed(s)
Usage: omf [COMMAND] [ARGUMENT]...
Available COMMANDs:
help Print this help message or a specify command usage
load Load a disk image on a given set of nodes
save Save a disk image from a given node into a file
tell Switch a given set of nodes ON/OFF or reboot them
stat Returns the status of a given set of nodes
To get more help on individual commands: 'omf [COMMAND]'
-session
user@console:~$ omf status
Returns the status of the nodes in a testbed.
Usage:
omf stat [-h] -t TOPOLOGY [-h] [-s] [-c AGGREGATE]
Arguments:
-h, --help print this help message
-t, --topology TOPOLOGY a valid topology file or description (MANDATORY)
-s, --summary print a summary of the node status for the testbed
-c, --config AGGREGATE use testbed AGGREGATE
}}}
Examples:
Get the status of all nodes in the testbed. This is good way to find all the FQDN of the nodes in the console.
omf stat -t all
Get the status of a single node.
omf stat -t sdr2-md1.bed.cosmos-lab.org
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).
omf stat -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org
-session
user@console:~$ omf tell
Switch ON/OFF and reboot the nodes in a testbed.
Usage:
omf tell [-h] -t TOPOLOGY -a ACTION [-c AGGREGATE]
Arguments:
-h, --help print this help message
-a, --action ACTION specify an ACTION:
on turn node(s) ON
offs turn node(s) OFF (soft)
offh turn node(s) OFF (hard)
reboot reboots node(s) (soft)
reset resets node(s) (hard)
-t, --topology TOPOLOGY a valid topology file or description (MANDATORY)
-c, --config AGGREGATE use testbed AGGREGATE
}}}
Examples:
Reset (soft) a node.
omf tell -a reset -t sdr2-md1.bed.cosmos-lab.org
Reboot (hard) a node.
omf tell -a reboot -t sdr2-md1.bed.cosmos-lab.org
Turn on multiple nodes.
omf tell -a on -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org
Turn offh (hard) multiple nodes.
omf tell -a offh -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org
-session
user@console:~$ omf load
Install a given disk image on the nodes in a testbed.
Usage:
omf load [-h] -t TOPOLOGY [-i IMAGE_PATH] [-o TIMEOUT] [-c AGGREGATE]
Arguments:
-h, --help print this help message
-t, --topology TOPOLOGY a valid topology file or description (MANDATORY)
(if a file 'TOPOLOGY' doesn't exist, interpret it as a
comma-separated list of nodes)
-i, --image IMAGE disk image to load
(default is 'baseline.ndz', the latest stable baseline image)
-c, --config AGGREGATE use testbed AGGREGATE
-o, --timeout TIMEOUT a duration (in sec.) after which imageNodes should stop waiting for
nodes that have not finished their image installation
(default is 800 sec, i.e. 13min 20sec)
-r, --resize SIZE Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or
leave x percent of free space if SIZE=x%
--outpath PATH Path where the resulting Topologies should be saved
(default is '/tmp')
--outprefix PREFIX Prefix to use for naming the resulting Topologies
(default is your experiment ID)
}}}
Examples:
Load the default baseline image (baseline.ndz) on all nodes in the testbed.
omf load -t system:topo:all -i baseline.ndz
Load a specific image (my_image.ndz) on all nodes in a topology.
omf load -t system:topo:all -i my_image.ndz
Load a specific image (my_image.ndz) onto a single node.
omf load -t sdr2-md1.bed.cosmos-lab.org -i my_image.ndz
Load a specific image (my_image.ndz) onto multiple nodes with a timeout of 400 seconds.
omf load -t sdr2-md1.bed.cosmos-lab.org,srv1-co1.bed.cosmos-lab.org -i my_image.ndz -o 400
Once you have the image prepared the way you want it. You need to run the following script on the node:
root@srv1-lg1.sb1.orbit-lab.org: /root/prepare.sh
This will remove udev rules (to prevent renaming of interfaces) and dump log files to lower the size of the image. It will also shutdown the node.
Once the node has been shutdown, to save the existing disk image use the command:
-session
user@console:~$ omf save
Save a disk image from a given node into an archive file.
Usage:
omf save -n NODE [-h] [-c AGGREGATE]
Arguments:
-h, --help print this help message
-n, --node NODE a valid description of a single node (MANDATORY)
(no default here, you have to enter a node)
-r, --resize SIZE Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or
leave x percent of free space if SIZE=x%
}}}
NODE must be specified in FQDN (fully qualified domain name) format (eg. srv1-lg1.sb2.cosmos-lab.org).
Examples:
Save the disk image from a node.
omf save -n srv1-lg1.sb2.cosmos-lab.org