directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r836500 - in /websites/staging/directory/trunk/content: ./ apacheds/ apacheds/basic-ug/ apacheds/basic-ug/images/
Date Mon, 29 Oct 2012 16:26:14 GMT
Author: buildbot
Date: Mon Oct 29 16:26:13 2012
New Revision: 836500

Log:
Staging update by buildbot for directory

Added:
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-addition.png
  (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-installation.png
  (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/sevenseas-naming-context.png
  (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/sevenseas-partition-creation.png
  (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/studio-apacheds-configuration1.png
  (with props)
    websites/staging/directory/trunk/content/apacheds/basic-ug/images/studio-partitions-configuration.png
  (with props)
Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/apacheds/basic-ug/1-how-to-begin.html
    websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html
    websites/staging/directory/trunk/content/apacheds/basic-users-guide.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Oct 29 16:26:13 2012
@@ -1 +1 @@
-1403329
+1403407

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/1-how-to-begin.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/1-how-to-begin.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/1-how-to-begin.html Mon Oct
29 16:26:13 2012
@@ -129,28 +129,28 @@
 <ul>
 <li><a href="1-how-to-begin.html">1 - How to begin</a><ul>
 <li><a href="1.1-what-apacheds-is.html">1.1 - What Apache Directory Server is</a></li>
-<li><a href="basic-ug/1.2-some-background.html">1.2 - Some Background. Directories,
directory services and LDAP</a></li>
-<li><a href="basic-ug/1.3-installing-and-starting.html">1.3 - Installing and
starting the server</a></li>
-<li><a href="basic-ug/1.4-basic-configuration-tasks.html">1.4 - Basic configuration
tasks</a><ul>
-<li><a href="basic-ug/1.4.1-changing-server-port.html">1.4.1 - Changing the server
port for LDAP</a></li>
-<li><a href="basic-ug/1.4.2-changing-admin-password.html">1.4.2 - Changing the
admin password</a></li>
-<li><a href="basic-ug/1.4.3-adding-partition.html">1.4.3 - Adding your own partition
resp. suffix</a></li>
-<li><a href="basic-ug/1.4.4-configure-logging.html">1.4.4 - Configure logging</a></li>
-<li><a href="basic-ug/1.4.5-anonymous-access.html">1.4.5 - Enable and disable
anonymous access</a></li>
+<li><a href="1.2-some-background.html">1.2 - Some Background. Directories, directory
services and LDAP</a></li>
+<li><a href="1.3-installing-and-starting.html">1.3 - Installing and starting
the server</a></li>
+<li><a href="1.4-basic-configuration-tasks.html">1.4 - Basic configuration tasks</a><ul>
+<li><a href="1.4.1-changing-server-port.html">1.4.1 - Changing the server port
for LDAP</a></li>
+<li><a href="1.4.2-changing-admin-password.html">1.4.2 - Changing the admin password</a></li>
+<li><a href="1.4.3-adding-partition.html">1.4.3 - Adding your own partition resp.
suffix</a></li>
+<li><a href="1.4.4-configure-logging.html">1.4.4 - Configure logging</a></li>
+<li><a href="1.4.5-anonymous-access.html">1.4.5 - Enable and disable anonymous
access</a></li>
 </ul>
 </li>
-<li><a href="basic-ug/1.5-sample-configuration.html">1.5 - About the sample configurations
and sample directory data</a></li>
+<li><a href="1.5-sample-configuration.html">1.5 - About the sample configurations
and sample directory data</a></li>
 </ul>
 </li>
-<li><a href="basic-ug/2-handling-data.html">2 - Handling of data within your
directory</a></li>
-<li><a href="basic-ug/3-basic-security.html">3 - Basic Security</a><ul>
-<li><a href="basic-ug/3.1-authentication-options.html">3.1 - Authentication options</a></li>
-<li><a href="basic-ug/3.2-basic-authorization.html">3.2 - Basic authorization</a></li>
-<li><a href="basic-ug/3.3-enabling-ssl.html">3.3 - How to enable SSL</a></li>
+<li><a href="2-handling-data.html">2 - Handling of data within your directory</a></li>
+<li><a href="3-basic-security.html">3 - Basic Security</a><ul>
+<li><a href="3.1-authentication-options.html">3.1 - Authentication options</a></li>
+<li><a href="3.2-basic-authorization.html">3.2 - Basic authorization</a></li>
+<li><a href="3.3-enabling-ssl.html">3.3 - How to enable SSL</a></li>
 </ul>
 </li>
-<li><a href="basic-ug/4-integrating-apacheds.html">4 - Integrating ApacheDS with
other programs</a><ul>
-<li><a href="basic-ug/4.1-mozilla-thunderbird.html">4.1 - Mozilla Thunderbird</a></li>
+<li><a href="4-integrating-apacheds.html">4 - Integrating ApacheDS with other
programs</a><ul>
+<li><a href="4.1-mozilla-thunderbird.html">4.1 - Mozilla Thunderbird</a></li>
 </ul>
 </li>
 </ul>

Modified: websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html
(original)
+++ websites/staging/directory/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.html
Mon Oct 29 16:26:13 2012
@@ -126,7 +126,133 @@
 
 
 <h1 id="143-adding-your-own-partition-resp-suffix">1.4.3 - Adding your own partition
resp. suffix</h1>
-<p>TODO</p>
+<p>This section describes how to add your own data partition.</p>
+<div class="toc">
+<ul>
+<li><a href="#143-adding-your-own-partition-resp-suffix">1.4.3 - Adding your
own partition resp. suffix</a><ul>
+<li><a href="#what-are-partitions">What are partitions?</a></li>
+<li><a href="#minimal-partition-definition">Minimal partition definition</a></li>
+<li><a href="#adding-a-partition-programmatically">Adding a partition programmatically</a></li>
+<li><a href="#more-configuration-options-for-a-jdbm-partition">More configuration
options for a JDBM partition</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<h2 id="what-are-partitions">What are partitions?</h2>
+<p>In ApacheDS entries are stored in partitions.  Each partition contains a complete
entry tree, also referred to as a DIT. Multiple partitions may exist and the entry trees they
contain are disconnected from each other, meaning that changes to entries in partition <em>A</em>
would never affect entries in partition <em>B</em>. The entries in a particular
partition are stored below some naming context called the partition suffix.</p>
+<p>The default implementation of partitions is based on <a href="http://jdbm.sourceforge.net/">JDBM</a>
B+Trees (but it's possible to add custom partition implementations). The ApacheDS default
configuration contains a a data partition with the suffix "dc=example,dc=com". The image below
shows the suffixes of a freshly installed ApacheDS within Apache Directory Studio.</p>
+<p><img alt="Partition in studio after installation" src="images/partitions-in-studio-after-installation.png"
/></p>
+<p>The schema subsystem and ApacheDS itself store their information in special partitions,
"ou=schema", "ou=config" and "ou=system" respectively.</p>
+<h2 id="minimal-partition-definition">Minimal partition definition</h2>
+<p>For the examples in the following sections, we want to add a partition with the
suffix "o=sevenSeas". This requires editing of the configuration, and injecting a first entry,
associated with the root of this partition (here, "o=sevenseas"). This can be done using <em>Apache
Directory Studio</em>. Open the server configuration :</p>
+<p><img alt="Studio Apacheds Configuration" src="images/studio-apacheds-configuration1.png"
/></p>
+<p>and select the <em>Partitions</em> tab :</p>
+<p><img alt="Studio Apacheds Partitions Configuration" src="images:studio-partitions-configuration.png"
/></p>
+<p>Add another jdbmPartition element for the sevenSeas partition, just below the <em>example</em>
partition:</p>
+<p><img alt="SevenSeas Partition Creation" src="images/sevenseas-partition-creation.png"
/></p>
+<p>As you can see, we have modified the <em>ID</em> and the <em>Suffix</em>,
all the other parameters remaining to their default values.</p>
+<p>Save the configuration now, and restart the server.</p>
+<p>The server has a new suffix now, but no context entry has been created for it. If
you connect with an LDAP Browser (Apache Directory Studio for instance), the partition is
only visible in the Root DSE. Below the Entry Editor of Directory Studio for the Root DSE
after connecting to an ApacheDS instance configured like above.</p>
+<p><img alt="RootDSE" src="images/sevenseas-naming-context.png" /></p>
+<p>Before using the partition (e.g. adding entries), you have to add a context entry.
If you plan to load LDIF data to your partition anyway, simply provide the context entry (the
"root" of your partition) as a first data set. In our example it might look like this:</p>
+<div class="codehilite"><pre><span class="err">dn:</span> <span
class="err">o=sevenSeas</span>
+<span class="err">o:</span> <span class="err">sevenSeas</span>
+<span class="err">objectClass:</span> <span class="err">top</span>
+<span class="err">objectClass:</span> <span class="err">organization</span>
+<span class="err">description:</span> <span class="err">The</span>
<span class="err">context</span> <span class="err">entry</span> <span
class="err">for</span> <span class="err">suffix</span> <span class="err">o=sevenSeas</span>
+</pre></div>
+
+
+<p>It is also possible to import a file to ApacheDS which only contains such an entry,
of cause. Here is an example on how to procede for the seven seas :</p>
+<p>In the LDAP Browser of Directory Studio, right click on the DIT entry and select
"Import -&gt; LDIF Import...". A file selections dialog appears. Browse to the LDIF file
and click Finish. The entry (or entries, if you provide more of them) will be added to to
partition.</p>
+<p>The following image depicts the partitions after reconnecting with Apache Directory
Studio (<em>LDAP Browser</em> view).</p>
+<p><img alt="Partition in Studio after addition" src="images/partitions-in-studio-after-addition.png"
/></p>
+<h2 id="adding-a-partition-programmatically">Adding a partition programmatically</h2>
+<p>The same o=sevenseas partition can be created through the application code using
the Partition and DirectoryService API</p>
+<p>Here is the sample code to create a new partition o=sevenseas and its context entry
programmatically</p>
+<div class="codehilite"><pre><span class="sr">//</span> <span
class="n">Get</span> <span class="n">the</span> <span class="n">SchemaManager</span><span
class="p">,</span> <span class="n">we</span> <span class="n">need</span>
<span class="n">it</span> <span class="k">for</span> <span class="n">this</span>
<span class="n">addition</span>
+<span class="n">SchemaManager</span> <span class="n">schemaManager</span>
<span class="o">=</span> <span class="n">directoryService</span><span
class="o">.</span><span class="n">getSchemaManager</span><span class="p">();</span>
+
+<span class="sr">//</span> <span class="n">Create</span> <span
class="n">the</span> <span class="n">partition</span>
+<span class="n">JdbmPartition</span> <span class="n">sevenseasPartition</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">JdbmPartition</span><span
class="p">(</span> <span class="n">schemaManager</span> <span class="p">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">setId</span><span class="p">(</span><span class="s">&quot;sevenseas&quot;</span><span
class="p">);</span>
+<span class="n">Dn</span> <span class="n">suffixDn</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">Dn</span><span
class="p">(</span> <span class="n">schemaManager</span><span class="p">,</span>
<span class="s">&quot;o=sevenseas&quot;</span> <span class="p">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">setSuffix</span><span class="p">(</span> <span class="n">suffixDn</span>
<span class="p">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">setCacheSize</span><span class="p">(</span><span class="mi">1000</span><span
class="p">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">init</span><span class="p">(</span><span class="n">directoryService</span><span
class="p">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">setPartitionPath</span><span class="p">(</span> <span class="o">&lt;</span><span
class="n">a</span> <span class="n">path</span> <span class="n">on</span>
<span class="n">your</span> <span class="n">disk</span><span class="o">&gt;</span>
<span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">Create</span> <span
class="n">some</span> <span class="n">indices</span> <span class="p">(</span><span
class="n">optional</span><span class="p">)</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">addindex</span><span class="p">(</span> <span class="k">new</span>
<span class="n">JdbmIndex</span><span class="p">(</span> <span
class="s">&quot;objectClass&quot;</span><span class="p">,</span>
<span class="n">false</span> <span class="p">)</span> <span class="p">);</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">addindex</span><span class="p">(</span> <span class="k">new</span>
<span class="n">JdbmIndex</span><span class="p">(</span> <span
class="s">&quot;o&quot;</span><span class="p">,</span> <span
class="n">false</span> <span class="p">)</span> <span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">Initialize</span> <span
class="n">the</span> <span class="n">partition</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">initialize</span><span class="p">();</span>
+
+<span class="sr">//</span> <span class="n">create</span> <span
class="n">the</span> <span class="n">context</span> <span class="n">entry</span>
+<span class="n">Entry</span> <span class="n">contextEntry</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">DefaultEntry</span><span
class="p">(</span> <span class="n">schemaManager</span><span class="p">,</span>
<span class="s">&quot;o=sevenseas&quot;</span><span class="p">,</span>
+    <span class="s">&quot;objectClass: top&quot;</span><span class="p">,</span>

+    <span class="s">&quot;objectClass: organization&quot;</span><span
class="p">,</span>
+    <span class="s">&quot;o: sevenseas&quot;</span> <span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">add</span> <span class="n">the</span>
<span class="n">context</span> <span class="n">entry</span>
+<span class="n">sevenseasPartition</span><span class="o">.</span><span
class="n">add</span><span class="p">(</span> <span class="k">new</span>
<span class="n">AddOperationContext</span><span class="p">(</span>
<span class="n">null</span><span class="p">,</span> <span class="n">entry</span>
<span class="p">)</span> <span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">We</span> <span class="n">are</span>
<span class="n">done</span> <span class="o">!</span>
+</pre></div>
+
+
+<h2 id="more-configuration-options-for-a-jdbm-partition">More configuration options
for a JDBM partition</h2>
+<p>Here is a list of the used attributes, their default values and meaning :</p>
+<div class="table-wrap">
+    <table class="confluenceTable">
+        <tbody>
+            <tr>
+                <th class="confluenceTh"> Property </th>
+                <th class="confluenceTh"> Description </th>
+                <th class="confluenceTh"> Default value </th>
+                <th class="confluenceTh"> Required </th>
+            </tr>
+            <tr>
+                <td class="confluenceTd"> ads-partitionId </td>
+                <td class="confluenceTd"> uniquely identifies the partition </td>
+                <td class="confluenceTd"> N/A </td>
+                <td class="confluenceTd"> yes </td>
+            </tr>
+            <tr>
+                <td class="confluenceTd"> ads-partitionSuffix </td>
+                <td class="confluenceTd"> a DN ("dc=example, dc=com", for instance)
</td>
+                <td class="confluenceTd"> N/A </td>
+                <td class="confluenceTd"> yes </td>
+            </tr>
+            <tr>
+                <td class="confluenceTd"> ads-contextEntry </td>
+                <td class="confluenceTd"> The context entry </td>
+                <td class="confluenceTd"> Will be automatically deduced <br/>
+                    if no value is provided </td>
+                <td class="confluenceTd"> no </td>
+            </tr>
+            <tr>
+                <td class="confluenceTd"> optimizerEnabled </td>
+                <td class="confluenceTd"> Tells the server to turn on the optimizer</td>
+                <td class="confluenceTd"> true </td>
+                <td class="confluenceTd"> no </td>
+            </tr>
+            <tr>
+                <td class="confluenceTd"> ads-partitionCacheSize </td>
+                <td class="confluenceTd"> The cache size (only for JDBM partitions)
</td>
+                <td class="confluenceTd"> -1 (no cache) </td>
+                <td class="confluenceTd"> no </td>
+            </tr>
+            <tr>
+                <td class="confluenceTd"> ads-partitionSyncOnWrite </td>
+                <td class="confluenceTd"> sync disks on every write operation </td>
+                <td class="confluenceTd"> true </td>
+                <td class="confluenceTd"> no </td>
+            </tr>
+        </tbody>
+    </table>
+</div>
 
 
     <div class="nav">

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-addition.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-addition.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-installation.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-installation.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/sevenseas-naming-context.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/sevenseas-naming-context.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/sevenseas-partition-creation.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/sevenseas-partition-creation.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/studio-apacheds-configuration1.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/studio-apacheds-configuration1.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/apacheds/basic-ug/images/studio-partitions-configuration.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/apacheds/basic-ug/images/studio-partitions-configuration.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: websites/staging/directory/trunk/content/apacheds/basic-users-guide.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/basic-users-guide.html (original)
+++ websites/staging/directory/trunk/content/apacheds/basic-users-guide.html Mon Oct 29 16:26:13
2012
@@ -120,8 +120,8 @@
 <p><img alt="email" src="../images/email.png" /> <a href="mailto:users@directory.apache.org">mailto:users@directory.apache.org</a>
</p>
 <h2 id="table-of-contents">Table of contents</h2>
 <ul>
-<li><a href="1-how-to-begin.html">1 - How to begin</a><ul>
-<li><a href="1.1-what-apacheds-is.html">1.1 - What Apache Directory Server is</a></li>
+<li><a href="basic-ug/1-how-to-begin.html">1 - How to begin</a><ul>
+<li><a href="basic-ug/1.1-what-apacheds-is.html">1.1 - What Apache Directory
Server is</a></li>
 <li><a href="basic-ug/1.2-some-background.html">1.2 - Some Background. Directories,
directory services and LDAP</a></li>
 <li><a href="basic-ug/1.3-installing-and-starting.html">1.3 - Installing and
starting the server</a></li>
 <li><a href="basic-ug/1.4-basic-configuration-tasks.html">1.4 - Basic configuration
tasks</a><ul>



Mime
View raw message