directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1403407 - in /directory/site/trunk/content/apacheds: ./ basic-ug/ basic-ug/images/
Date Mon, 29 Oct 2012 16:26:09 GMT
Author: elecharny
Date: Mon Oct 29 16:26:09 2012
New Revision: 1403407

URL: http://svn.apache.org/viewvc?rev=1403407&view=rev
Log:
Added the 'adding partition' page, updating the menu links

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

Modified: directory/site/trunk/content/apacheds/basic-ug/1-how-to-begin.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/1-how-to-begin.mdtext?rev=1403407&r1=1403406&r2=1403407&view=diff
==============================================================================
--- directory/site/trunk/content/apacheds/basic-ug/1-how-to-begin.mdtext (original)
+++ directory/site/trunk/content/apacheds/basic-ug/1-how-to-begin.mdtext Mon Oct 29 16:26:09
2012
@@ -24,19 +24,19 @@ Notice: Licensed to the Apache Software 
 
 * [1 - How to begin](1-how-to-begin.html)
 	* [1.1 - What Apache Directory Server is](1.1-what-apacheds-is.html)
-	* [1.2 - Some Background. Directories, directory services and LDAP](basic-ug/1.2-some-background.html)
-	* [1.3 - Installing and starting the server](basic-ug/1.3-installing-and-starting.html)
-	* [1.4 - Basic configuration tasks](basic-ug/1.4-basic-configuration-tasks.html)
-		* [1.4.1 - Changing the server port for LDAP](basic-ug/1.4.1-changing-server-port.html)
-		* [1.4.2 - Changing the admin password](basic-ug/1.4.2-changing-admin-password.html)
-		* [1.4.3 - Adding your own partition resp. suffix](basic-ug/1.4.3-adding-partition.html)
-		* [1.4.4 - Configure logging](basic-ug/1.4.4-configure-logging.html)
-		* [1.4.5 - Enable and disable anonymous access](basic-ug/1.4.5-anonymous-access.html)
-	* [1.5 - About the sample configurations and sample directory data](basic-ug/1.5-sample-configuration.html)
-* [2 - Handling of data within your directory](basic-ug/2-handling-data.html)
-* [3 - Basic Security](basic-ug/3-basic-security.html)
-	* [3.1 - Authentication options](basic-ug/3.1-authentication-options.html)
-	* [3.2 - Basic authorization](basic-ug/3.2-basic-authorization.html)
-	* [3.3 - How to enable SSL](basic-ug/3.3-enabling-ssl.html)
-* [4 - Integrating ApacheDS with other programs](basic-ug/4-integrating-apacheds.html)
-	* [4.1 - Mozilla Thunderbird](basic-ug/4.1-mozilla-thunderbird.html)
+	* [1.2 - Some Background. Directories, directory services and LDAP](1.2-some-background.html)
+	* [1.3 - Installing and starting the server](1.3-installing-and-starting.html)
+	* [1.4 - Basic configuration tasks](1.4-basic-configuration-tasks.html)
+		* [1.4.1 - Changing the server port for LDAP](1.4.1-changing-server-port.html)
+		* [1.4.2 - Changing the admin password](1.4.2-changing-admin-password.html)
+		* [1.4.3 - Adding your own partition resp. suffix](1.4.3-adding-partition.html)
+		* [1.4.4 - Configure logging](1.4.4-configure-logging.html)
+		* [1.4.5 - Enable and disable anonymous access](1.4.5-anonymous-access.html)
+	* [1.5 - About the sample configurations and sample directory data](1.5-sample-configuration.html)
+* [2 - Handling of data within your directory](2-handling-data.html)
+* [3 - Basic Security](3-basic-security.html)
+	* [3.1 - Authentication options](3.1-authentication-options.html)
+	* [3.2 - Basic authorization](3.2-basic-authorization.html)
+	* [3.3 - How to enable SSL](3.3-enabling-ssl.html)
+* [4 - Integrating ApacheDS with other programs](4-integrating-apacheds.html)
+	* [4.1 - Mozilla Thunderbird](4.1-mozilla-thunderbird.html)

Modified: directory/site/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.mdtext?rev=1403407&r1=1403406&r2=1403407&view=diff
==============================================================================
--- directory/site/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.mdtext (original)
+++ directory/site/trunk/content/apacheds/basic-ug/1.4.3-adding-partition.mdtext Mon Oct 29
16:26:09 2012
@@ -24,4 +24,144 @@ Notice: Licensed to the Apache Software 
 
 # 1.4.3 - Adding your own partition resp. suffix
 
-TODO
\ No newline at end of file
+This section describes how to add your own data partition.
+
+[TOC]
+
+## What are partitions?
+
+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 _A_ would never
affect entries in partition _B_. The entries in a particular partition are stored below some
naming context called the partition suffix.
+
+The default implementation of partitions is based on [JDBM](http://jdbm.sourceforge.net/)
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.
+
+![Partition in studio after installation](images/partitions-in-studio-after-installation.png)
+
+The schema subsystem and ApacheDS itself store their information in special partitions, "ou=schema",
"ou=config" and "ou=system" respectively.
+
+## Minimal partition definition
+
+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 _Apache Directory Studio_.
Open the server configuration :
+
+![Studio Apacheds Configuration](images/studio-apacheds-configuration1.png)
+
+and select the _Partitions_ tab :
+
+![Studio Apacheds Partitions Configuration](images:studio-partitions-configuration.png)
+
+Add another jdbmPartition element for the sevenSeas partition, just below the _example_ partition:
+
+![SevenSeas Partition Creation](images/sevenseas-partition-creation.png)
+
+As you can see, we have modified the _ID_ and the _Suffix_, all the other parameters remaining
to their default values.
+
+Save the configuration now, and restart the server.
+
+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.
+
+![RootDSE](images/sevenseas-naming-context.png)
+
+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:
+
+	dn: o=sevenSeas
+	o: sevenSeas
+	objectClass: top
+	objectClass: organization
+	description: The context entry for suffix o=sevenSeas
+
+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 :
+
+In the LDAP Browser of Directory Studio, right click on the DIT entry and select "Import
\-> 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.
+
+The following image depicts the partitions after reconnecting with Apache Directory Studio
(_LDAP Browser_ view).
+
+![Partition in Studio after addition](images/partitions-in-studio-after-addition.png)
+
+## Adding a partition programmatically
+
+The same o=sevenseas partition can be created through the application code using the Partition
and DirectoryService API
+
+Here is the sample code to create a new partition o=sevenseas and its context entry programmatically
+
+	// Get the SchemaManager, we need it for this addition
+	SchemaManager schemaManager = directoryService.getSchemaManager();
+	
+	// Create the partition
+	JdbmPartition sevenseasPartition = new JdbmPartition( schemaManager );
+	sevenseasPartition.setId("sevenseas");
+	Dn suffixDn = new Dn( schemaManager, "o=sevenseas" );
+    sevenseasPartition.setSuffix( suffixDn );
+	sevenseasPartition.setCacheSize(1000);
+	sevenseasPartition.init(directoryService);
+    sevenseasPartition.setPartitionPath( <a path on your disk> );
+	
+	// Create some indices (optional)
+	sevenseasPartition.addindex( new JdbmIndex( "objectClass", false ) );
+	sevenseasPartition.addindex( new JdbmIndex( "o", false ) );
+	
+	// Initialize the partition
+	sevenseasPartition.initialize();
+	
+	// create the context entry
+	Entry contextEntry = new DefaultEntry( schemaManager, "o=sevenseas",
+		"objectClass: top", 
+		"objectClass: organization",
+		"o: sevenseas" );
+	
+	// add the context entry
+    sevenseasPartition.add( new AddOperationContext( null, entry ) );
+	
+	// We are done !
+
+## More configuration options for a JDBM partition
+
+Here is a list of the used attributes, their default values and meaning :
+
+<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>

Added: directory/site/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-addition.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-addition.png?rev=1403407&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-addition.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-installation.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-installation.png?rev=1403407&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/apacheds/basic-ug/images/partitions-in-studio-after-installation.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/apacheds/basic-ug/images/sevenseas-naming-context.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/images/sevenseas-naming-context.png?rev=1403407&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/apacheds/basic-ug/images/sevenseas-naming-context.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/apacheds/basic-ug/images/sevenseas-partition-creation.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/images/sevenseas-partition-creation.png?rev=1403407&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/apacheds/basic-ug/images/sevenseas-partition-creation.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/apacheds/basic-ug/images/studio-apacheds-configuration1.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/images/studio-apacheds-configuration1.png?rev=1403407&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/apacheds/basic-ug/images/studio-apacheds-configuration1.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/apacheds/basic-ug/images/studio-partitions-configuration.png
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-ug/images/studio-partitions-configuration.png?rev=1403407&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/apacheds/basic-ug/images/studio-partitions-configuration.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: directory/site/trunk/content/apacheds/basic-users-guide.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/apacheds/basic-users-guide.mdtext?rev=1403407&r1=1403406&r2=1403407&view=diff
==============================================================================
--- directory/site/trunk/content/apacheds/basic-users-guide.mdtext (original)
+++ directory/site/trunk/content/apacheds/basic-users-guide.mdtext Mon Oct 29 16:26:09 2012
@@ -40,8 +40,8 @@ We are quite interested to improve the c
 
 ## Table of contents
 
-* [1 - How to begin](1-how-to-begin.html)
-	* [1.1 - What Apache Directory Server is](1.1-what-apacheds-is.html)
+* [1 - How to begin](basic-ug/1-how-to-begin.html)
+	* [1.1 - What Apache Directory Server is](basic-ug/1.1-what-apacheds-is.html)
 	* [1.2 - Some Background. Directories, directory services and LDAP](basic-ug/1.2-some-background.html)
 	* [1.3 - Installing and starting the server](basic-ug/1.3-installing-and-starting.html)
 	* [1.4 - Basic configuration tasks](basic-ug/1.4-basic-configuration-tasks.html)



Mime
View raw message