Changes between Version 23 and Version 24 of FeddCommands


Ignore:
Timestamp:
Jun 6, 2010 9:37:43 AM (14 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FeddCommands

    v23 v24  
    9090
    9191These scripts make up the command line interface to the federation system.  They remain the most versatile and powerful way to create and manage federated experiments.  Most of these commands communicate with the experiment controller through either a SOAP or XMLRPC interface to carry out their functions.
     92
     93All these programs will print a summary of their arguments if given the '''--help''' argument.
    9294
    9395All are installed in {{{/usr/local/bin}}} by default.
     
    110112  Print the SOAP exchanges to stderr.  Currently only the SOAP transport is supported.
    111113
    112 == fedd_create.py ==
     114=== fedd_create.py ===
    113115
    114116This command creates a federated experiment from an experiment description.  It does the equivalent of a call to [FeddCommands#fedd_new.py fedd_new.py] to make an allocation and then attaches resources and services as described in the description file.  On completion it returns the name of the experiment, and if requested using the '''--experiment_cert''' parameter, a certificate that grants access to the experiment.
     
    280282 Print a log of the experiment controllers actions.
    281283
    282 == Fedd_client.py ==
    283 
    284 The `fedd_client.py` command was the original command line interface  to most of `fedd`'s interfaces.  It has been superceded by the individual scripts below.  It allows users to create terminate and interrogate experiments as well as to make access requests and request experiment splits.  The access and splitting commands are primarily for debugging.  Users who wish to make use of that function can consult the command's internal help message, by issuing one of
    285 
    286 {{{
    287 $ fedd_client.py split --help
    288 $ fedd_client.py access --help
    289 }}}
    290 
    291 The general syntax for invoking the command is:
    292 
    293 {{{
    294 $ fedd_client.py operation parameters
    295 }}}
    296 
    297 where operation is one of '''create, terminate, info, vtopo, vis, multiinfo, multistatus, spewlog, image, ns_image, split, or access''' and the parameters are described below.
    298 
    299 All commands take the following parameters:
    300  '''--cert='''''filename''::
    301   Certificate from which to derive the user's [FeddAbout#GlobalIdentifiers:Fedids fedid].  By default the contents of `.ssl/emulab.pem` in the user's home directory is used.
    302  '''--debug'''::
    303   Produce additional debugging output.
    304  '''--serializeOnly'''::
    305   Do not contact the `fedd`, but just print the SOAP or XMLRPC message to the standard output.
    306  '''--trusted='''''filename''::
    307   Use the certificates in ''filename'' as certificate authorities to confirm the server's identity.  Optional.
    308  '''--url='''''fedd_url'''::
    309   Fedd to contact.
    310  '''--transport=[xmlrpc|soap]'''::
    311   Use the given encoding of the service request.
    312  '''--trace'''::
    313   Print the SOAP exchanges to stderr.  Currently only the SOAP transport is supported.
    314 
    315 The '''create''' command takes the following additional parameters:
    316  '''--experiment_cert='''''filename''::
    317   Store the certificate used to access the resulting experiment in ''filename''.  This certificate can be used as an input parameter to the terminate and informational commands below, but is an output parameter here.
    318  '''--experiment_name='''''exp_name''::
    319   Suggest ''exp_name'' to the `fedd` as a local identifier for the federated experiment.  The actual local name chosen will be returned from the command.
    320  '''--file='''''filename''::
    321   File containing the [FeddAbout#ExperimentDescriptions experiment description].
    322  '''--project='''''export_project''::
    323   The local project to export from the master testbed.
    324  '''--master='''''master_testbed''::
    325   The master testbed.  This should correspond to one of the annotations used for testbed names in the experiment.  The `fedd` will use its [FeddDatabases#ExperimentNameMappingDB experiment name mapping DB] to resolve that name to a testbed.
    326  '''--ssh_key='''''file''::
    327   Use the contents of ''file'' as the SSH key for service access in the experiment.  By default the contents of `.ssh/id_rsa.pub` is used.
    328 
    329 An example of experiment creation is:
    330 
    331 {{{
    332 $ fedd_client.py create --file=test_fedd.tcl --master=deter --project=emulab-ops --url=https://users.isi.deterlab.net:23235 --transport=xmlrpc
    333 }}}
    334 
    335 The results are the local name of the experiment and its fedid printed to standard output.  If ''--experiment_file'' is given an X.509 certificate and private key are saved to the given file that can be used as a capability to access the experiment state.  When the '''create''' command terminates the experiment is being created.  Use the '''info''' or '''spewlog''' command to see when the experiment has been fully created.
    336 
    337 The commands to access data about an experiment or to terminate it all take only two non-generic options:
    338 
    339  '''--experiment_file='''''filename''::
    340   The ''filename'' must contain a certificate valid for the experiment's fedid.  If so it is used to authenticate access to the experiment.  A password may be required if one has been added to the private key.
    341  '''--experiment_name='''''name''::
    342   The local name of the experiment to terminate.  Only the experiment creator can use this for access.
    343 
    344 The informational commands are '''vtopo''', '''vis''', and '''info'''.  '''Vtopo''' and '''vis''' are equivalent to the analogous Emulab XMLRPC commands, and `fedd_client.py` prints thier results in raw XML.  '''Info''' provides general access to information about an experiment's state.  It takes an additonal parameter to control the data output:
    345 
    346  '''--data ='''''data_element''::
    347   The data to output. May be specified more than once.
    348 
    349 The valid choices for '''--data''' are:
    350  '''federant'''::
    351   All information about the various federants.  The XML format is available in the [source:fedd/trunk/wsdl/fedd_types.xsd data description]
    352  '''id'''::
    353   The local name and fedid of the experiment
    354  '''status'''::
    355   The current status of the experiment.  One of '''active''', '''starting''', or '''failed'''
    356  '''log'''::
    357   The current experiment allocation log (may be incomplete for experiments still '''starting''')
    358  '''access'''::
    359   The X.509 credentials used to access the experiment.  Note that this is only available to those who already have access to the experiment, but that can be passed along to others to grant them access.
    360  '''vis'''::
    361   visualization XML as above.  (In fact '''vis''' is an alias for this.)
    362  '''vtopo'''::
    363   topology information as above. ('''vtopo''' is an alias for this.)
    364 
    365 The '''image''', '''ns_image''' and '''status''' commands are more useful to users.  The first two create simple image files from either an existing federated experiment or from the experiment description.  '''image''' takes the same parameters as '''vtopo''', '''vis''', and '''info''' as well as:
    366 
    367  '''--output='''''file''::
    368  A file to store the image in.  The output format is determined by the file suffix.
    369  '''--format='''''fmt''::
    370  The image format to use.  Valid choices are '''jpg''', '''png''', '''svg''', and '''dot'''.  '''dot''' is graphviz input.
    371  '''--labels'''::
    372  Include node names and IP address information in the image.  This is the default.
    373  '''--no-labels'''::
    374   Omit node names and IP address information in the image.
    375  '''--pixels='''''pix''::
    376   Output an image that is ''pix'' pixels, square.
    377 
    378 '''ns_image''' takes the same additional parameters as '''image''', but is takes '''create''' parameters instead.  It generates the image from the description rather than the existing experiment.  It does not create a federated experiment.
    379 
    380 The '''status''' command is a modified '''info''' command that prints a single word that describes the status of an experiment:
    381  '''active'''::
    382  The experiment exists
    383  '''starting'''::
    384  The experiment is being created.
    385  '''terminating'''::
    386  The experiment is beinfg terminated
    387  '''failed'''::
    388  The experiment could not be started.  This state allows users to retrieve logs and federant information from failed experiments.  Once information is retrieved, this experiment should be terminated.
    389 
    390 The '''multiinfo''' command takes the '''--data''' options that '''info''' takes, and returns the specified information for all experiments that the user has access to, separated by three dashes for each experiment.
    391 
    392 The '''multistatus''' command returns the following information for each experiment that the user can access.  Each experiment's information is on a single line, separated by colons.  The information is the experiment's human-readable name, the experiment's fedid as a hex string, the experiment's status, the master testbed for the experiment, and the project name on that master testbed.
    393 
    394 The '''spewlog''' command waits for a given experiment to go into either '''active''' or '''failed''' state and incrementally outputs the allocation log as it is generated at the fedd.  In addition to the ususal information parameters it takes a '''--logfile='''''file'' parameter that specifies where to put the log file, and a '''--update='''''secs'' parameter that specifies how often to poll for log updates (default 10 seconds).  When '''spewlog''' completes, it outputs the status of the experiment into the log file and terminates.
    395 
    396 
    397 The '''terminate''' command stops a federated experiment and removes the access granted from the federants.  It takes a '''--force''' parameter that terminates experiments that are starting, terminating or in an unusual state.  It also reports a log of the steps to deallocate the experiments if '''--print_log''' is given or writes that log to a file if '''--logfile='''''file'' is given.
    398 
    399 The '''split''' and  '''access''' commands are really only for developers.  They are not described here, but
    400 
    401 {{{
    402 $ fedd_client.py access --help
    403 $ fedd_client.py split --help
    404 }}}
    405 
    406 provides information on their use.
     284=== fedd_client.py ===
     285
     286The `fedd_client.py` command was the original command line interface  to most of `fedd`'s interfaces.  It has been superceded by the individual scripts above.  There are one or two functions it still provides, but these are very specialized debugging functions, and most users will not need it.
     287