Author: akarasulu Date: Thu Dec 9 09:25:56 2004 New Revision: 111407 URL: http://svn.apache.org/viewcvs?view=rev&rev=111407 Log: Changes ...
o added more examples for usage in both the jndi and building/running docs o added dc=apache,dc=org partition config to eve.properties Modified: incubator/directory/eve/trunk/main/eve.properties incubator/directory/eve/trunk/xdocs/building.xml incubator/directory/eve/trunk/xdocs/jndi.xml Modified: incubator/directory/eve/trunk/main/eve.properties Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/main/eve.properties?view=diff&rev=111407&p1=incubator/directory/eve/trunk/main/eve.properties&r1=111406&p2=incubator/directory/eve/trunk/main/eve.properties&r2=111407 ============================================================================== --- incubator/directory/eve/trunk/main/eve.properties (original) +++ incubator/directory/eve/trunk/main/eve.properties Thu Dec 9 09:25:56 2004 @@ -19,6 +19,15 @@ # Eve Provider Properties # -eve.wkdir=eve-work +eve.wkdir=apache.org eve.disable.anonymous=true +eve.net.ldap.port=10389 + +# create apache partition + +eve.db.partitions=apache +eve.db.partition.suffix.apache=dc=apache,dc=org +eve.db.partition.indices.apache=objectClass ou uid +eve.db.partition.attributes.apache.objectClass=top domain extensibleObject +eve.db.partition.attributes.apache.dc=apache Modified: incubator/directory/eve/trunk/xdocs/building.xml Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/xdocs/building.xml?view=diff&rev=111407&p1=incubator/directory/eve/trunk/xdocs/building.xml&r1=111406&p2=incubator/directory/eve/trunk/xdocs/building.xml&r2=111407 ============================================================================== --- incubator/directory/eve/trunk/xdocs/building.xml (original) +++ incubator/directory/eve/trunk/xdocs/building.xml Thu Dec 9 09:25:56 2004 @@ -6,11 +6,11 @@ </properties> <body> - <section name="Building Eve"> + <section name="Building and Running Eve"> <p> All directory projects use <a href="http://maven.apache.org">Maven</a> as the default build tool. We try to remain current with the production - version of Maven. As of 11/04 we use Maven 1.0.1 on JDK 1.4 and up. + version of Maven. As of 12/04 we use Maven 1.0.2 on JDK 1.4 and up. </p> <p> @@ -20,8 +20,37 @@ </p> <source> - maven -Dgoal=clean,jar:jar multiproject:goal +maven multiproject:install </source> + + <p> + Once you've built the server you'll find an executable jar file under + the main/target directory labeled eve-${version}.jar which can be fired + up like so: + </p> + +<source> [EMAIL PROTECTED] trunk]$ java -jar main/target/eve-0.8.0-SNAPSHOT.jar +Eve: using default properties ... +Eve: standard ldap port 389 is not available, using 1024 instead +Eve: started in 1368 milliseconds +</source> + + <p> + When you start the server without a properties file arguement default + settings are used. She tries to bind to 389 but this non-root user + does not have the needed privledges so Eve tries to bind on the next + available port which is 1024. If you would like a properties file can + be used to override and set Eve specific properties to control her + behavoir. Below we use the properties file that comes preconfigured + for Apache under the eve/trunk/main directory: + </p> + +<source> [EMAIL PROTECTED] trunk]$ java -jar main/target/eve-0.8.0-SNAPSHOT.jar main/eve.properties +Eve: loading properties from main/eve.properties +Eve: started in 1449 milliseconds +</source> </section> <section name="Eve's Maven Modules"> @@ -40,16 +69,36 @@ <td>Contains an LDAP protocol provider for the SEDA framework.</td> </tr> <tr> - <td>maven-eve-plugin</td> + <td>plugin</td> <td>Contains a maven plugin used while developing with/for Eve.</td> </tr> <tr> - <td>jndi-provider</td> - <td>Contains Eve's JNDI Provider which wraps/is the backend subsystem.</td> + <td>dib</td> + <td> + Contains Eve's DIB (Directory Information Base) which contains the + JNDI Provider that wraps/is the backend subsystem. This name DIB + is really a misnomer: the DIB in X.500 terms represents collectively + the distributed database of all the entries in a directory system + composed of one or more servers. We just use it cuz it's 3 letters + long and we did not know whether we should call it backend, or + database, or what. + </td> </tr> <tr> <td>shared</td> <td>Contains shared classes between modules to prevent cyclic deps.</td> + </tr> + <tr> + <td>optional</td> + <td> + We might create this project in the near future to contain bundles + of optional schema jars. Eve's maven plugin generates Java class + files for OpenLDAP schema files. These classes create schema + objects way faster than parsing a file to dynamically create schema + objects. The optional package will contain all the schema classes + for published schemas we can find. When firing up Eve you can + request to load only those schemas you actually use. + </td> </tr> </table> </section> Modified: incubator/directory/eve/trunk/xdocs/jndi.xml Url: http://svn.apache.org/viewcvs/incubator/directory/eve/trunk/xdocs/jndi.xml?view=diff&rev=111407&p1=incubator/directory/eve/trunk/xdocs/jndi.xml&r1=111406&p2=incubator/directory/eve/trunk/xdocs/jndi.xml&r2=111407 ============================================================================== --- incubator/directory/eve/trunk/xdocs/jndi.xml (original) +++ incubator/directory/eve/trunk/xdocs/jndi.xml Thu Dec 9 09:25:56 2004 @@ -162,5 +162,83 @@ </table> </section> + + <section name="Embedding Eve"> + <p> + Embedding Eve is really easy. Just set the JNDI initial context + factory and other security settings along with Eve specific properties + to fire her up. Here's a simple example of code that embeds Eve using + the minimum configuration information: + </p> + +<source> +Hashtable env = new Hashtable(); +env.setProperty( Context.PROVIDER_URL, "ou=system" ); +env.setProperty( Context.INITIAL_CONTEXT_FACTORY, "org.apache.eve.jndi.EveContextFactory" ); +InitialDirContext ctx = new InitialDirContext( env ); +</source> + + <p> + This code snippet starts up Eve on port 389 or the next available port. + There is only one partition in the system hanging off of the "ou=system" + naming context. The server allows for anonymous binds and has two users + preconfigured: a regular test user, <b>uid=akarasulu,ou=users,ou=system + </b> with password <i>test</i>, and the super user <b>uid=admin,ou=system + </b>, with password <i>secret</i>. + </p> + + <p> + <b>WARNING:</b> REMOVE THE TEST USER AND RESET THE PASSWORD ON THE ADMIN + USER ACCOUNT AFTER STARTING EVE. + </p> + + <p> + Here's another more invovled configuration: + </p> + +<souce> +Hashtable env = new Hashtable(); + +// Standard JNDI properties +env.setProperty( Context.PROVIDER_URL, "ou=system" ); +env.setProperty( Context.INITIAL_CONTEXT_FACTORY, "org.apache.eve.jndi.EveContextFactory" ); +env.setProperty( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" ); +env.setProperty( Context.SECURITY_CREDENTIALS, "secret" ); +env.setProperty( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" ); + +// Eve specifice JNDI properties +env.setProperty( EnvKeys.WKDIR, "/var/ldap" ); +env.setProperty( EnvKeys.DISABLE_ANONYMOUS, "true" ); +env.setProperty( EnvKeys.LDAP_PORT, "10389" ); +env.setProperty( EnvKeys.PARTITIONS, "apache" ); + +// Setup new partition for Apache +BasicAttributes attrs = new BasicAttributes( true ); +BasicAttribute attr = new BasicAttribute( "objectClass" ); +attr.add( "top" ); +attr.add( "domain" ); +attr.add( "extensibleObject" ); +attrs.put( attr ); +attr = new BasicAttribute( "dc" ); +attr.add( "apache" ); +attrs.put( attr ); +env.put( EnvKeys.SUFFIX + "apache", "dc=apache,dc=org" ); // suffix +env.put( EnvKeys.INDICES + "apache", "ou uid objectClass" ); // user indices +env.put( EnvKeys.ATTRIBUTES + "apache", attrs ); // suffix entry + +// Fire it up! +InitialDirContext ctx = new InitialDirContext( env ); +</souce> + + <p> + This configuration starts up the server on port 10389 with anonymous + binds disabled. Eve stores its database files under /var/ldap + and creates a new application partition for Apache entries off of the + <b>dc=apache,dc=org</b> naming context in addition to the system + partition. If you look closely at /var/ldap you'll see a directory + names apache where you'll find even more database files. This is a + separate database partition for apache entries. + </p> + </section> </body> </document>
