Index: openacs-4/packages/acs-core-docs/www/bootstrap-acs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/bootstrap-acs.html,v diff -u -r1.43 -r1.43.2.1 --- openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 7 Jun 2008 20:28:49 -0000 1.43 +++ openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 10 Jun 2009 22:24:06 -0000 1.43.2.1 @@ -1,89 +1,89 @@ - -
By Jon Salz
+ +By Jon Salz
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -Tcl code: /tcl/0-acs-init.tcl and /packages/acs-kernel/bootstrap.tcl
This document describes the startup (bootstrapping) process for an AOLserver +
Tcl code: /tcl/0-acs-init.tcl and /packages/acs-kernel/bootstrap.tcl
This document describes the startup (bootstrapping) process for an AOLserver running OpenACS. -
+
Before OpenACS 3.3, the OpenACS startup process was extremely simple: after AOLserver
performed its internal initialization (reading the configuration file,
loading shared libraries and module code, etc.) it scanned through the Tcl
-library directory (generally /var/lib/aolserver/yourservername/tcl),
+library directory (generally /var/lib/aolserver/
yourservername
/tcl
),
sourcing each file in sequence.
While this overall structure for initialization is still intact, package management has thrown a wrench into the works - there are a few extra things -to do during initialization, most notably:
Examine the OpenACS file tree for files that should not be present in OpenACS +to do during initialization, most notably:
Examine the OpenACS file tree for files that should not be present in OpenACS (i.e., that were once part of the OpenACS distribution but have since been -removed).
Scan the /packages directory for new packages.
Initialize enabled packages by sourcing their *-procs.tcl -and *-init.tcl files.
+removed).
Scan the /packages
directory for new packages.
Initialize enabled packages by sourcing their *-procs.tcl
+and *-init.tcl
files.
This document examines in detail each of the steps involved in AOLserver/OpenACS startup. -
+As soon as the nsd
daemon is executed by the init
process (or otherwise), AOLserver reads its configuration file and
-chroots itself if necessary. It then loads shared libraries
-indicated in the .ini file (e.g., the Oracle driver and
-nssock), and sources Tcl module files (generally in
-/home/aol30/modules/tcl). This step is, and has always been, the
+chroot
s itself if necessary. It then loads shared libraries
+indicated in the .ini
file (e.g., the Oracle driver and
+nssock
), and sources Tcl module files (generally in
+/home/aol30/modules/tcl
). This step is, and has always been, the
same for all AOLservers, regardless of whether they are running OpenACS.
Next AOLserver sources, in lexicographical order, each file in the
-/tcl directory. The first such file is
-0-acs-init.tcl, which doesn't do much directly except to
-determine the OpenACS path root (e.g., /var/lib/aolserver/yourservername)
+/tcl
directory. The first such file is
+0-acs-init.tcl
, which doesn't do much directly except to
+determine the OpenACS path root (e.g., /var/lib/aolserver/
yourservername
)
by trimming the final component from the path to the Tcl library directory
-(/var/lib/aolserver/yourservername/tcl). But
-0-acs-init.tcl's has an important function, namely sourcing
-/packages/acs-core/bootstrap.tcl, which does the following:
Initialize some NSVs used by the core. These NSVs are
-documented in /packages/acs-core/apm-procs.tcl - no need to
+(/var/lib/aolserver/
yourservername
/tcl
). But
+0-acs-init.tcl
's has an important function, namely sourcing
+/packages/acs-core/bootstrap.tcl
, which does the following:
Initialize some NSVs used by the core. These NSVs are
+documented in /packages/acs-core/apm-procs.tcl
- no need to
worry about them unless you're an OpenACS core hacker.
-
Verify the deletion of obsolete OpenACS files. The -/tcl directory has evolved quite a bit over the months and +
Verify the deletion of obsolete OpenACS files. The
+/tcl
directory has evolved quite a bit over the months and
years, and a few files have come and gone. The
-/www/doc/removed-files.txt file contains a list of files which
+/www/doc/removed-files.txt
file contains a list of files which
must be deleted from the AOLserver installation, at the risk of
causing weird conflicts, e.g., having several security filters registered.
-bootstrap.tcl scans through this list, logging error messages to
+bootstrap.tcl
scans through this list, logging error messages to
the log if any of these files exist.
-
Source *-procs.tcl files in the OpenACS core. -We source each file matching the *-procs.tcl glob in the -/packages/acs-kernel directory, in lexicographical order. These +
Source *-procs.tcl
files in the OpenACS core.
+We source each file matching the *-procs.tcl
glob in the
+/packages/acs-kernel
directory, in lexicographical order. These
procedure are needed to perform any of the following steps.
-
Ensure that the database is available by grabbing and +
Ensure that the database is available by grabbing and releasing a handle. If we can't obtain a handle, we terminate initialization (since OpenACS couldn't possibly start up the server without access to the database). -
Register any new packages in the /packages -directory. In each directory inside /packages, we look -for a .info file; if we find a package that hasn't yet been +
Register any new packages in the /packages
+directory. In each directory inside /packages
, we look
+for a .info
file; if we find a package that hasn't yet been
registered with the package manager (i.e., it's been copied there
manually), we insert information about it into the database. (The first time
OpenACS starts up, no packages will have been registered in the database
yet, so this step will registers every single package in the
-/packages directory.) Note that packages discovered here are
+/packages
directory.) Note that packages discovered here are
initially disabled; they must be manually enabled in the package manager
before they can be used.
-
Ensure that the acs-kernel package is -enabled. If the OpenACS core isn't initialized, the server +
Ensure that the acs-kernel
package is
+enabled. If the OpenACS core isn't initialized, the server
couldn't possibly be operational, so if there's no enabled version of
the OpenACS core we simply mark the latest installed one as enabled.
-
Load *-procs.tcl files for enabled -packages, activating their APIs. +
Load *-procs.tcl
files for enabled
+packages, activating their APIs.
-
Load *-init.tcl files for enabled packages, +
Load *-init.tcl
files for enabled packages,
giving packages a chance to register filters and procedures, initialize data
structures, etc.
-
Verify that the core has been properly initialized by +
Verify that the core has been properly initialized by checking for the existence of an NSV created by the request processor initialization code. If it's not present, the server won't be operational, so we log an error.
-At this point, bootstrap.tcl is done executing. AOLserver
-proceeds to source the remaining files in the /tcl directory
+At this point, bootstrap.tcl
is done executing. AOLserver
+proceeds to source the remaining files in the /tcl
directory
(i.e., unpackaged libraries) and begins listening for connections.
Prev | Home | Next |
Documenting Tcl Files: Page Contracts and Libraries | Up | External Authentication Requirements |