Example 3 - Bidirectional Replication

You can configure one directory server to act as both a master server and a slave server. A master server contains the data that is to be replicated; a slave server receives the replicated data from the master server.

In this example we have a company, Adagio, with two domains and two servers in different locations. One is in Texas (domain: texas.adagio.com, host: yellowrose) and the other in California (domain: calif.adagio.com, host: surfergirl). The directory

FIGURE  10-4 DIT Structure for Adagio Corporation

In each domain, we want the local servers to have a complete copy of the SIMS LDAP directory. However, on yellowrose we want the naming context
ou=texas,o=adagio,c=US to be master, and the naming context ou=calif,o=adagio,c=US be a replicated slave. On surfergirl we want the naming context ou=texas,o=adagio,c=US to be a replicated slave, and the naming context ou=calif,o=adagio,c=US be the master.

  1. Bring up the Admin console on the yellowrose.
  Log in to http://yellowrose.texas/sims
  2.

FIGURE  B-15 SIMS Directory Interface

  3. Click on Data Store.
 

FIGURE  B-16 Data Store

  4. Double click the data store name (o=adagio,c=US) to bring up the data store property book. Then click on Naming Contexts section.
 

FIGURE  B-17 Naming Contexts

  Although two naming contexts are shown, they actually refer to the same subtree. The top one is called the OSI tree and the bottom one is called the Domain Component tree, and they are mapped to each other. The reason for having two naming contexts referring to the same subtree has to do with dual standards.
  5. Modify the OSI naming context to be ou=texas,o=adagio,c=US. Designate it to be a master.
 

FIGURE  B-18 Modify Naming Context Window

  6. Modify the Domain Component (DC) naming context to be dc=texas,dc=adagio,dc=com. Designate it to be a master.
  Double click the DC naming context dc=adagio,dc=com. In the Modify Naming Context window, repeat the above steps for the DC subtree. Change dc=adagio,dc=com to dc=texas,dc=adagio,dc=com. After making all changes, press OK to save.
  7. Create OSI naming context called ou=calif,o=adagio,c=US. Designate it to be a slave.
  Click on Create-->Naming Context.
  The Add Naming Context window appears. Change the mode from Master to Slave. Enter the name of the new naming context. Enter the master hostname for the naming context next to Referral hostname.
 

FIGURE  B-19 Modify Naming Context Window

  8. Create DC naming context called dc=calif,dc=adagio,dc=com. Designate it to be a slave.
  Click on Create-->Naming Context. Use the following parameters:
  Suffix: dc=calif,dc=adagio,dc=com
Referral hostname: calif.adagio.com
Update DN: dc=admin,dc=adagio,dc=com
 

FIGURE  B-20 Completed Naming Context Window for yellowrose

  9. Create a directory replica for ou=texas,o=adagio,c=US.
  Select the "Create->Replica" menu option. Select Subtree and fill in the subtree that you want to replicate, i.e., ou=texas,o=adagio,c=US. Select All attributes. In the Host field, enter the fully qualified domain name of the slave server (surfergirl.eng) and the port number on which the slave LDAP server is listening (default=389). Update DN field should be the same name of Update DN that you entered in the slave server (in this example cn=admin,o=adagio,c=US). The password must be the password for the Update DN on the slave. This is the password used by the master server to make updates to the slave server, so make sure that this DN has the appropriate access control permissions for making the changes to the slave.
 

FIGURE  B-21 Add an LDAP Replica from Master Server Admin Console

  10. Create a directory replica for dc=texas,dc=adagio,dc=com
  You need updates for the DC tree as well as the OSI tree. Define another replica using the procedures described in Step 9 with the following parameters:
  Subtree: dc=texas,dc=adagio,dc=com
Host: surfergirl.eng
Update DN: dc=admin,dc=adagio,dc=com
  11. Press Apply on the property book.
  The master and slave directory servers are now set up on host yellowrose.
  12. On host surfergirl, set up slave and master naming contexts.
  Use the same procedure described from Step 1 through Step 8 on surfergirl. However, make the naming context ou=texas,o=adagio,c=US to be a replicated slave and ou=calif,o=adagio,c=US be the master. The Naming Context section look as follows.
 

FIGURE  B-22 Completed Naming Context Window for surfergirl

  13. Create directory replicas for ou=calif,o=adagio,c=US and dc=calif,dc=adagio,dc=com.
  Host: yellowrose.eng
Update DN: dc=admin,dc=adagio,dc=com (DC) and cn=admin,o=adagio,c=US (OSI)
  14. Press Apply on the property book.
  The master and slave directory servers are now set up on host yellowrose.
  15. Synchronize both replicas and set synchronization schedule.
 

FIGURE  B-23 Applying Modifications to the Data Store.

  Next to Replica Synchronization select Immediate for immediate directory updates (every time an entry is modified, added, or deleted, change is sent to the slave) or choose Delayed and specify an update schedule. You can also perform a complete synchronization of the master with the slave by pressing the "synchronize" button.
  16. When synchronization occurs, the bidirectional replicas will be operational.



Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.