directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Directory Server v1.5 > ApacheDS Bootstrapping
Date Thu, 03 Sep 2009 15:19:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=DIRxSRVx11&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/DIRxSRVx11/ApacheDS+Bootstrapping">ApacheDS
Bootstrapping</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~akarasulu">Alex
Karasulu</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <h2><a name="ApacheDSBootstrapping-Introduction"></a>Introduction</h2>

<p>This document describes the process where ApacheDS is first started up, starts to
initialize various components, to finally reach a solid state of operation where it can service
LDAP request along with other directory backed protocol requests.  </p>

<p>We break up this process into several different categories as phases in the bootstrapping
process, since each phase involves a different set of facilities and components.  The phases
are:</p>

<ol>
	<li>Daemon Bootstrapping Phase</li>
	<li>Initial Bootstrap Schema Load Phase</li>
	<li>Full Schema Load Phase</li>
	<li>Configuration Load Phase</li>
	<li>Wiring and DI Phase</li>
</ol>



<h2><a name="ApacheDSBootstrapping-DaemonBootstrappingPhase"></a>Daemon
Bootstrapping Phase</h2>

<p>Several daemon frameworks have been used in the past to make ApacheDS' process act
like a daemon on *NIX platforms and as a service on Windows platforms. These frameworks were
Procrun, Jsvc, and the Tanuki wrapper.</p>

<p>Each framework has a means to start up a Java program and set it up so it detaches
from the console and becomes a daemon on UNIX and/or a service on Windows.  How this is done
is abstracted away by some minimal code in ApacheDS used to bootstrap it.  Some of this code
is very specific to the wrapper and some is quit general.</p>

<h3><a name="ApacheDSBootstrapping-Bootstrappers"></a>Bootstrappers</h3>

<p>In ApacheDS' repository there's a daemon-bootstrappers project which contains a base
Bootstrapper implementation and some helper classes along with various framework subtypes
of the Bootstrapper.</p>

<p>The goal here was to adapt the set of events handled by various frameworks to startup
a Java based daemon, to a generalized interface.  In this case the generalized interface is
really a class called Bootstrapper.</p>

<h3><a name="ApacheDSBootstrapping-TanukiBootstrapper"></a>Tanuki Bootstrapper</h3>

<p>The Tanuki framework has a TanukiBootstrapper implementation extending the Bootstrapper
class.  On startup the Tanuki framework calls the main(String[]) method of this TanukiBootstrapper.
 The apacheds.conf file contains configuration entries telling Tanuki to start ApacheDS by
calling this class' main method with various arguments.</p>

<p>The static main() method in the TanukiBootstrapper simply instantiates a new TanukiBootstrapper
instance and asks the wrapper framework (WrapperManager) to start up the TanukiBootstrapper.
 Here are the String[] args handed off to the main() method:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>/usr/local/apacheds-1.5.5-SNAPSHOT, 
org.apache.directory.server.Service, 
/usr/local/apacheds-1.5.5-SNAPSHOT/instances/default/conf/server.xml
</pre>
</div></div>

<h3><a name="ApacheDSBootstrapping-FutureWork"></a>Future Work</h3>

<p>We envision a configuration free of Maven plugins to generate the installers.  We
also would like to modify the InstallationLayout bean and the InstanceLayout bean so that
the InstanceLayout bean has a handle on the InstallationLayout.  The InstanceLayout bean will
be provided to higher layers for the server to properly conduct it's bootstrap process in
later phases.</p>

<h2><a name="ApacheDSBootstrapping-InitialBootstrapSchemaLoadPhase"></a>Initial
Bootstrap Schema Load Phase</h2>

<p>We store the schema in a partition.  We also store configuration state information
regarding which schema is to be enabled and which schema are disabled in this partition. 
Everything that is needed for loading and setting up the schema subsystem is located in this
partition.</p>

<p>Also this partition can use any kind of backing store, or Partition interface implementation
so those wishing to store schema information in various backing stores can do so.</p>

<h3><a name="ApacheDSBootstrapping-PrepackagedSchemaLDIFFiles"></a>Pre-packaged
Schema LDIF Files</h3>

<p>The ldap-schema project in shared produces a jar file which contains LDIF files within
in a specific layout.  These LDIF files encode schema information for various published schema
as well as critical schema specifically required for ApacheDS operation.</p>





<p>If we are to store the schema along with schema configuration information telling
the server which schemas to load within a partition, we</p>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/DIRxSRVx11/ApacheDS+Bootstrapping">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=2330706&revisedVersion=3&originalVersion=2">View
Change</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message