========================================== Toolkit Initialization Factoring for 2.1.3 ========================================== :version: $Revision: 1.2 $ :author: Ivan R. Judson :status: Draft Abstract ======== This AGEP describes a proposed factoring of the initialization code for the AGTk. The goal is to unify and clarify the process of initialization for anything that is developed using the AGTk. Overview ======== In order to unify and clarify the initialization process there are a few activities that need to be done by every piece of Access Grid related software. These activities are enumerated, described, and a factoring is presented that encapsulates them into a well defined set of interfaces. The basic activities that are done during initialization are: 1. Command Line Parsing 2. Logging/Debugging Setup 3. Security Environment Verification - Globus Initialization 4. Toolkit Environment Verification - Bring Linux Initialization up to par with Windows 5. Configuration Processing - Looking for system wide configs and either referencing or copying them The types of things that can be built using the AGTk (and thus it's initialization functionality) includes: ========================== =========== ======================= Class Type Run As ========================== =========== ======================= Venue Clients Application User Id Shared Application Clients Application User Id -------------------------- ----------- ----------------------- Node Services Service Service Id / User Id Service Managers Service Service Id / User Id Services Service Service Id / User Id -------------------------- ----------- ----------------------- Venue Server Service Service Id / User Id -------------------------- ----------- ----------------------- Network Services Service Service Id / User Id Application Services Service Service Id / User Id ========================== =========== ======================= Summary of Modifications ======================== 1. Refactor Toolkit.py to support more general configuration, extending it with configuration objects for systemConfig, userConfig, globusConfig. 2. Sorting out initialization order, removing redundancy, adding consistent debug logging, and ensuring all initialization is happening on both supported platforms. 3. Utilize completed platform refactoring, the resulting configuration objects make this AGEP significantly simpler. 4. Create a Toolkit.CommandLine class with a Parse(self, argc, argv) method. 5. Create a Toolkit.Service class for services to use to initialize 6. Unify the logging initialization 7. Bring the Linux initialization up to par with the windows initialization - LinuxInitUserEnv - LinuxRegisterMimeType 8. Define the search paths for installed packages and installed applications Proposed Standard Command Line Arguments ---------------------------------------- 1. -h|--help -- Help and/or usage 2. -d|--debug -- Set the debug level 3. -l|--log -- Tell the program where the log should go, the default is .log. 4. -v|--verbose -- Specify the program to run and print out information the level may be specified. 5. -c|--config -- Specify a configuration for this program to use. 6. -p|--profile -- Specify the profile to use Module Organization ------------------- - Toolkit.py - Application - CmdlineApplication - WXGUIApplication - Service Deprecated Packages ------------------- - Toolkit.py - ServiceApplicationWithIdentity - ServiceApplicationWithInheritedIdentity Specifications ============== During initialization the following is done, by: app = CmdlineApplication.instance() or WXGUIApplication.instance() app.Initialize(sys.argv) ... or service = Service.instance() service.Initialize(sys.argv) ... 0. Initialize logging, storing in log data memory 1. Process Command Line Arguments 2. Load the Toolkit wide configuration. 3. Load the user configuration, creating one if necessary. 4. Redirect logging to files in the user's directory, purging memory to file 5. Retrieve the Globus Configuration from the system. (this will implicitly initialize globus if it's not already initialized) (including the GLOBUS_HOSTNAME) 6. Initialize Certificate Management If This is an application: 7. Register agpm.py for handling shared application packages found as data in virtual venues. 8. Install shared applications from system config package cache, if not installed. Security Issues =============== This work should make the toolkit more secure, by enforcing all software built using the AGTk conforms to the security environment created by the AGTk. Interoperability Issues ======================= This internal refactoring should not affect interoperability. Related AGEPs ============= - AGEP 108: Platform Refactoring 213 - Authorization Refactoring 213 - Core Refactoring 213 Implementation ============== To Be Completed. References ========== None Copyright ========= This document is Copyright 2003, The University of Chicago/Argonne National Laboratory. .. Local Variables: mode: indented-text indent-tabs-mode: nil sentence-end-double-space: t fill-column: 70 End: