Tutorial:
Starting and Shutting down Legion 1.0


Table of Contents

 

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


Other relevant on-line documents:
  Legion context space
How to start remote programs in Legion
Legion host and vault objects
Quick list of all Legion commands
Usage of all Legion commands

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.


This information is aimed at Legion system administrators and users who are running their own Legion systems. Once fully operational, Legion does not automatically shut down and restart, so users will not need to worry about regularly going through these procedures. However, when properly compiled and started, the system can be shut down and restarted as necessary.

For information on downloading and compiling a new Legion system, please see "Instructions for Downloading Legion 1.0".

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.
legion_setup_state   
Output will look approximately like this
(note that the user here accepts the default
host name, port number and timestamp by hitting
the return key three times):

$ legion_setup_state
"/home/xxxx/OPR" not found - making it.
Enter LegionClass host name:[your.startup.host.name]
Enter LegionClass port number: [15347]
Enter LegionClass timestamp: [current time]
$
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
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 StatTreeClass
Creating an implementation (StatTreeObject) for StatTreeClass
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
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
$

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 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.