Changes between Version 2 and Version 3 of Internal/newTutorials/0-2


Ignore:
Timestamp:
Jan 24, 2018, 4:51:49 PM (7 years ago)
Author:
jkol
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/newTutorials/0-2

    v2 v3  
    11= Tutorial 0-2: Using a testbed =
    22
    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 }}}
     3Most interactions with nodes are done via "OMF commands". These are a simple set of commands used to perform basic functions such as checking node status, turning nodes on/off, loading/saving disk images, or executing experiment scripts (which will be addressed in future tutorials). These OMF commands are performed on the console of the testbed you will be using. As such, the first step is to connect to the testbed console after the time slot for your approved reservation begins.
    214
    225[[BR]]
    23 == Connecting to a testbed ==
    24 TODO
     6== Connecting to a testbed console ==
    257
    26 All access to a testbed is done through the testbed's console machine. During the time slot of your approved reservation, you can connect to the console via SSH.
     8All access to a testbed is done through the testbed's console machine. You can connect to the console at any time during your approved reservation time slot.
    279
    2810For example, connecting via SSH to {{{yourUserName@sb7.orbit-lab.org}}} will connect you to the console machine of "Sandbox 7".
    2911
    3012[[BR]]
     13== Checking the status of a node ==
     14
     15To check the status of ''node1-1'', on the console run:
     16 {{{omf stat -t node1-1}}}
     17
     18Which will give output that looks similar to the following
     19{{{
     20DEBUG FQDN:console.sb7.orbit-lab.org:
     21 INFO NodeHandler: OMF Experiment Controller 5.4 (git 861d645)
     22 INFO NodeHandler: Reading configuration file /etc/omf-expctl-5.4/services.yaml
     23 INFO NodeHandler: Add domain http - http://internal1.orbit-lab.org:5054/
     24 INFO NodeHandler: Add domain http - http://repository1.orbit-lab.org:5054/
     25 INFO NodeHandler: Add domain http - http://external1.orbit-lab.org:5054/
     26 INFO NodeHandler: Slice ID: default_slice (default)
     27 INFO NodeHandler: Experiment ID: default_slice-2018-01-24t11.49.44.767-05.00
     28 INFO NodeHandler: Message authentication is disabled
     29 INFO Experiment: load system:exp:stdlib
     30 INFO property.resetDelay: resetDelay = 230 (Fixnum)
     31 INFO property.resetTries: resetTries = 1 (Fixnum)
     32 INFO Experiment: load system:exp:eventlib
     33 INFO Experiment: load system:exp:winlib
     34 INFO Experiment: load system:exp:stat
     35 INFO property.nodes: nodes = "node1-1" (String)
     36 INFO property.summary: summary = false (FalseClass)
     37
     38Talking to the CMC service, please wait
     39-----------------------------------------------
     40 Node: node1-1.sb7.orbit-lab.org         State: POWERON
     41-----------------------------------------------
     42
     43 INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
     44 INFO NodeHandler:
     45 INFO NodeHandler: Shutting down experiment, please wait...
     46 INFO NodeHandler:
     47 INFO run: Experiment default_slice-2018-01-24t11.49.44.767-05.00 finished after 0:5
     48}}}
     49
     50You can see the state of node1-1 in this case as "POWERON", meaning that the node is powered on. Other states may say "POWEROFF" to indicate a node is powered off or "NOT REGISTERED" indicating the node was unavailable for use at this time.
     51
     52[[BR]]
    3153== Loading a disk image onto a node ==
    32 TODO
    3354
    3455'''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''.
     
    3960For the "topology" listed after '''-t''', you can specify a single node such as "node1-1", a set of nodes such 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".
    4061
    41 After imaging completes successfully, the nodes will be turned off. They must be turned on before you can SSH into them.
    42 
    43 Command help output:
    44 {{{
    45 Install a given disk image on the nodes in a testbed
    46 Usage:
    47       omf load [-h] -t TOPOLOGY [-i IMAGE_PATH] [-o TIMEOUT] [-c AGGREGATE]
    48 
    49       With:
    50       -h, --help                print this help message
    51       -t, --topology TOPOLOGY   a valid topology file or description (MANDATORY)
    52                                 (if a file 'TOPOLOGY' doesn't exist, interpret it as a
    53                                 comma-separated list of nodes)
    54       -i, --image IMAGE         disk image to load
    55                                 (default is 'baseline.ndz', the latest stable baseline image)
    56       -c, --config AGGREGATE    use testbed AGGREGATE
    57       -o, --timeout TIMEOUT     a duration (in sec.) after which imageNodes should stop waiting for
    58                                 nodes that have not finished their image installation
    59                                 (default is 800 sec, i.e. 13min 20sec)
    60       -r, --resize SIZE         Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or
    61                                 leave x percent of free space if SIZE=x%
    62           --outpath PATH        Path where the resulting Topologies should be saved
    63                                 (default is '/tmp')
    64           --outprefix PREFIX    Prefix to use for naming the resulting Topologies
    65                                 (default is your experiment ID)
    66 
    67       Some Examples:
    68                     omf load -t all
    69                     omf load -t system:topo:all -i baseline-2.4.ndz
    70                     omf load -t node1-1 -i wireless-2.6.ndz
    71                     omf load -t [1..10,1..5] -i baseline.ndz -o 400
    72                     omf load -t system:topo:circle -i my_Own_Image.ndz
    73                     omf load -t my_Own_Topology -i baseline-2.2.ndz -t 600 -c grid
    74                     omf load -t my_Own_Topology --outpath ./ --outprefix my_Own_Prefix
    75 
    76 }}}
     62After imaging completes successfully, the nodes will be turned off. They must be turned on before you can connect to them.
    7763
    7864[[BR]]
    7965== Turning nodes on/off ==
    80 TODO
    8166
    8267To turn on ''node1-1'':
     
    8469 {{{omf tell -a on -t node1-1}}}
    8570
    86 '''NOTE:''' Just like a normal computer, it can take several minutes for a node to finish booting up. Please wait before trying to SSH into it.
     71Just like a normal computer, it can take several minutes for a node to finish booting up. Please wait before trying to SSH into it.
    8772
     73A clever little shortcut to turning on the nodes that you just imaged is specifying the topology {{{system:topo:imaged}}} which is automatically regenerated every time you perform an imaging operation on a node or set of nodes.
     74
     75[[BR]]
    8876To turn off ''node1-1'' as if you held down the power button (ie. hard off):
    8977
    9078 {{{omf tell -a offh -t node1-1}}}
    9179
     80[[BR]]
    9281To reset ''node1-1'' as if your pressed the reset button:
    9382
    9483 {{{omf tell -a reset -t node1-1}}}
    9584
    96 Command help output:
    97 {{{
    98 Switch ON/OFF and reboot the nodes in a testbed
    99 Usage:
    100       omf tell [-h] -t TOPOLOGY -a ACTION [-c AGGREGATE]
    101 
    102       With:
    103       -h, --help           print this help message
    104 
    105       -a, --action ACTION  specify an action
    106       ACTION:
    107       on              turn node(s) ON
    108       offs            turn node(s) OFF (soft)
    109       offh            turn node(s) OFF (hard)
    110       reboot          reboots node(s) (soft)
    111       reset           resets node(s) (hard)
    112 
    113       -h, --help                print this help message
    114       -t, --topology TOPOLOGY   a valid topology file or description (MANDATORY)
    115       -c, --config AGGREGATE    use testbed AGGREGATE
    116 
    117       Some Examples:
    118                     omf tell -a reset -t node1-1.grid.orbit-lab.org
    119                     omf tell -a on -t system:topo:all -c grid
    120                     omf tell -a reboot -t node1-1
    121                     omf tell -a offh -t [1..2,1..5]
    122                     omf tell -a offh -t system:topo:all
    123                     omf tell -a reset -t system:topo:imaged
    124 }}}
    125 
    12685[[BR]]
    12786== Accessing a node ==
    128 TODO
    12987
    13088On the console:
    13189 {{{ssh root@node1-1}}}
    13290
    133 '''NOTE:''' 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.
     91If 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.
    13492
    13593[[BR]]
    13694== Saving a node's disk image ==
    137 TODO
    13895
    139 If you wish to save a node's disk image for future use, it is important to do so BEFORE your reservation is over because it takes several minutes to complete and there is no guarantee what the next user will do to the node.
     96If you wish to save a node's disk image for future use, it is important to do so well BEFORE your reservation is over because it takes several minutes to complete and there is no guarantee what the next user will do to the node.
    14097
    141 '''Example:''' Suppose we want to save the disk image of ''node1-1'' on the ''grid'' testbed.
     98'''Example:''' Suppose we want to save the disk image of ''node1-1'' on in Sandbox 7.
    14299
    143 First SSH into 'node1-1' and run:
     100First SSH into ''node1-1'' and run:
    144101 {{{/root/prepare.sh}}}
    145102
     
    147104
    148105Then on the console run:
    149  {{{omf save -n node1-1.grid.orbit-lab.org}}}
     106 {{{omf save -n node1-1.sb7.orbit-lab.org}}}
    150107It 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.
    151 
    152 Command help output:
    153 {{{
    154 Save a disk image from a given node into an archive file
    155 Usage:
    156       omf save -n NODE [-h] [-c AGGREGATE]
    157 
    158       With:
    159       -h, --help          print this help message
    160       -n, --node NODE     a valid description of a single node (MANDATORY)
    161                           (no default here, you have to enter a node!)
    162       -r, --resize SIZE   Resizes the first partition to SIZE GB or to maximum size if SIZE=0 or
    163                           leave x percent of free space if SIZE=x%
    164 
    165       Some Examples:
    166                     omf save -n node5-3.grid.orbit-lab.org
    167                     omf save -n node1-1.sb2.orbit-lab.org
    168 }}}