Tutorial:
Starting and Shutting down Legion 1.5


Table of Contents

 

First time start-up procedure
Set the environment
System shutdown
System restart


  Other relevant on-line documents:
  Logging in to a running Legion system
Legion graphical user interface
Introduction to Legion context space
Context-related commands
How to start remote programs in Legion
Sample makefile for remote programs
Object permissions
Legion tty objects
Running a PVM code in Legion
Running an MPI code in Legion
Quick list of all Legion commands
Usage of all Legion commands
Starting and shutting down Legion 1.5
Using Legion security features
Legion host and vault objects
Adding host and vault objects
The list of all on-line 1.5 tutorials


The Legion tutorials offer quick and simple instructions for various key procedures for a Legion system. More complete explanations of all of the procedures discussed here are available on separate pages, and can be found by clicking on the icon.

Depending on how your system is set up, you may need to set up your access to your system before you can run Legion commands. This will probably involve running a command such as this:

$ . ~legion/setup.sh

or

$ source ~legion/setup.csh
The exact syntax will depend on what kind of shell you are using and where your Legion files are installed (i.e., the value of ~legion will depend on your individual Legion net). Consult your system administrator for more information.

First time start-up procedure

The first time start-up process uses three commands: legion_setup_state to configure the system, legion_startup to start it, and legion_initialize to initialize it. The user must then source the script that sets up environment variables for using the context space. You can then run legion_init_security, if you wish to enable Legion security features. Please note that you must run this command when you first start up the system.
legion_setup_state   
If you do not wish to use the default settings, use the -i flag to run the command in an interactive mode. Output will look approximately like this:
$ legion_setup_state
Creating OPR directory "/home/xxxx/OPR".
Saving LegionClass configuration file:
/home/xxx/OPR/LegionClass.config
Enter LegionClass host name: = your.startup.host.name
Enter LegionClass port number: 7899
Enter LegionClass timestamp: 898198093
$
legion_startup   
Output will look approximately like this
(note that the user here requests "yes to all"
by entering Y when prompted):

$ legion_startup
Starting meta-class object: LegionClass
Continue (y=yes, Y=yes to all, n=no, N=no to all, v=verbose, V=verbose all)? Y
Starting meta-class object: BootstrapMetaClass
Starting class object: BindingAgentClass
Starting class object: CommandLineClass
Starting class object: UnixHostClass
Starting class object: UnixVaultClass
Starting class object: UnixImplementationClass
Starting class object: UnixImplementationCacheClass
Starting class object: ContextClass
$
legion_initialize   
Output will look approximately like this
(note that the user here requests "yes to all"
by entering Y when prompted):

$ legion_initialize
Creating host object BootstrapHostObject on "your.bootstrap.host.name"
Continue (y=yes, Y=yes to all, n=no, N=no to all, v=verbose, V=verbose all)? Y
Configuring wellknown binaries for host "1.01.07.0100..."
Creating vault object BootstrapVaultObject on "your.bootstrap.host.name"
Setting BootstrapHost and BootstrapVault restrictions
Added 1 host(s) to vault's compatibility set
Added 1 vault(s) to host's compatibility set
Creating an ImplementationCache
Creating an implementation (ContextObject) for ContextClass
Creating the root context object
Be sure to
   source /home/xxxx/OPR/legion_context_env.csh
or
   . /home/xxxx/OPR/legion_context_env.sh
before starting anything else from the command line.
Deactivating BootstrapHostObject
Creating an implementation (MetaClassObject) for LegionClass
Creating the VanillaMetaClass
Creating an implementation (ClassObject) for VanillaMetaClass
Creating an implementation (BindingAgent) for BindingAgentClass
Creating the sub-context "/class" for classes
Creating the sub-context "/hosts" for hosts
Creating the sub-context "/vaults" for vaults
Creating the sub-context "/home" for users
Adding "LegionClass" to the class context
Adding "VanillaMetaClass" to the class context
Adding "BootstrapMetaClass" to the class context
Creating BasicFileClass
Creating an implementation (BasicFileObject) for BasicFileClass
Creating ttyObjectClass
Creating an implementation (ttyObject) for ttyObjectClass
Creating JobProxyClass
Creating an implementation (JobProxyObject) for JobProxyClass
Creating BatchQueueMetaClass
Creating an implementation (BatchQueueClassObject) for BatchQueueMetaClass
Creating StatTreeClass
Creating an implementation (StatTreeObject) for StatTreeClass
Creating AuthenticationObject class and implementation
Creating implementation (AuthenticationObject) for AuthenticationObjectClass
Adding "UnixHostClass" to the class context
Adding "UnixVaultClass" to the class context
Adding "BindingAgentClass" to the class context
Adding "CommandLineClass" to the class context
Adding "ContextClass" to the class context
Adding "UnixImplementationClass" to the class context
Adding "UnixImplementationCacheClass" to the class context
Creating an implementation (StatelessProxyClassObject) for StatelessProxyMetaClass
Adding "StatelessClasses" to the class context
Adding "BootstrapHost" to the hosts context
Adding the alias "your.bootstrap.host.name" for BootstrapHost to the hosts context
Adding "BootstrapVault" to the vaults context
$
legion_init_security   
Output will look approximately like this
(some of this output has been edited out to save space):

$ legion_init_security
Creating the context "/users" to contain user-objects
Creating context "users" in parent "/".
New context LOID = "1.3622260c.05.08000000.000001fc..."
Creating the initial system-admin user object, "/users/admin"
Please select a Legion password for "/users/admin":
New Legion password: xxxx
Retype password: xxxx
1.3622260c.6b000000.01000000.000001fc0c...
Please enter the Legion password for "/users/admin" to continue:
Password: xxxx
Changing ownership of all objects to "/users/admin"
1.3622260c.01..000001fc0cbe1846763f895a...
1.3622260c.02..000001fc0b3b16eb8b2dde29...
[...etc.]
Changed ownership of 43 objects.
Creating initial ACLs files for all core objects in
   /home/xxxx/OPR/init_acls
Creating ACL for /class/AuthenticationObjectClass class
Creating ACL for /class/BasicFileClass class
[...etc.]
Creating context "tmp" in parent "/".
New context LOID = "1.362dabd6.05.09000000.000001fc..."
Creating context "etc" in parent "/".
New context LOID = "1.362dabd6.05.0a000000.000001fc..."
Creating context "mpi" in parent "/".
New context LOID = "1.362dabd6.05.0b000000.000001fc..."
Creating context "programs" in parent "/mpi".
New context LOID = "1.362dabd6.05.0c000000.000001fc..."
Creating context "instances" in parent "/mpi".
New context LOID = "1.362dabd6.05.0d000000.000001fc..."
Creating context "pvm" in parent "/".
New context LOID = "1.362dabd6.05.0e000000.000001fc..."
Creating context "tasks" in parent "/pvm".
New context LOID = "1.362dabd6.05.0f000000.000001fc..."
Done creating acl files
Setting ACL for /class/AuthenticationObjectClass class
Setting ACL for /class/BasicFileClass class
[...etc.]
All acls set.
$

Set the environment

Depending on how your system is set up, you may need to set up your access to your system before you can run Legion commands. This will probably involve running a script such as this:
$ . ~LEGION/setup.sh
or
$ source ~LEGION/setup.csh
The exact syntax will depend on what kind of shell you are using and on where your Legion files are installed. Consult your system administrator for more information.

System shutdown

legion_shutdown    Issue the legion_shutdown command from the bootstrap host. This may take several minutes. Be patient, and do not try to quit the process with ^C. When completed, the entire system, with the notable exception of extra hosts and vaults that were started separately will be deactivated.

System restart

legion_startup    For a normal system restart, check to be sure that variables are properly set. Go to the start-up host and run the legion_startup command.

If you wish to restart the system from scratch, you will need to run all three commands (legion_setup_state, legion_startup, and legion_initialize) again. Note, however, that you must remove your $LEGION_OPR directory before you can run legion_setup_state. This means that you will destroy your objects' persistent state.