Example of configuring entry-balancing replication
This section covers how to set up a four-server replication topology that uses entry balancing to distribute entries across the servers and provides a start-to-finish example to walk you through this process.
Assumptions
The example assumes the following conditions:
-
None of the servers have participated in any previous replication topology. This is supported for one or multiple entry balancing domains.
-
This example uses the LDAP (389) and replication (8989) ports. It configures the following hosts:
-
austin1.example.com
-
newyork1.example.com
-
austin2.example.com
-
newyork2.example.com
-
-
The global domain is
dc=example,dc=com
, which is replicated across all servers. -
The data below the entry-balancing point of
ou=people,dc=example,dc=com
is distributed across two data sets, dataSet1 and dataSet2. -
Each data set is replicated between two directory servers. Each of these servers is associated with one of two locations, Austin or New York.
Configuration summary
To configure replication in an entry-balanced deployment:
-
Install two directory servers in an Austin location and two in a New York location.
-
Create a new backend, called
dataset
, to store the entry-balancing data set. -
Define entry-balancing set names
dataSet1
anddataSet2
for assignment to thereplication-set-name
Global Configuration Property of the PingDirectory server instances. -
Import the data representing the global domain, stored in
userRoot
, into a server. Choose a server for each of the entry-balancing data sets, both stored in the backend nameddataset
. -
Enable replication and initialize remaining servers.
-
Configure the proxies.
-
Check the status of replication.
Installing the PingDirectory server
About this task
Install four PingDirectory server instances, two in the Austin location and two in the New York location:
-
austin1.example.com
-
newyork1.example.com
-
austin2.example.com
-
newyork2.example.com
Steps
-
Install the first Austin server,
austin1
.Example:
root@austin1# ./setup --baseDN dc=example,dc=com \ --ldapPort 389 --rootUserDN "cn=Directory Manager" \ --rootUserPassword pass --no-prompt --acceptLicense \ --instanceName ds1 --location Austin
-
Install the second Austin server,
austin2
.Example:
root@austin2 # ./setup --baseDN dc=example,dc=com \ --ldapPort 389 --rootUserDN "cn=Directory Manager" \ --rootUserPassword pass --no-prompt --acceptLicense \ --instanceName ds2 --location Austin
-
Install the first New York server,
newyork1
.Example:
root@newyork1# ./setup --baseDN dc=example,dc=com \ --ldapPort 389 --rootUserDN "cn=Directory Manager" \ --rootUserPassword pass --no-prompt --acceptLicense \ --instanceName ds3 --location NewYork
-
Install the second New York server,
newyork2
.Example:
root@newyork# ./setup --baseDN dc=example,dc=com \ --ldapPort 389 --rootUserDN "cn=Directory Manager" \ --rootUserPassword pass --no-prompt --acceptLicense \ --instanceName ds4 --location NewYork
Creating the database backends and defining the replication set name
About this task
To store the entry-balancing data set, create a new backend.
Steps
-
On each server, create a dataset backend named
dataset
.Example:
./bin/dsconfig --no-prompt create-backend \ --backend-name dataset --type local-db --set enabled:true \ --set base-dn:ou=people,dc=example,dc=com
-
Set the
replication-set-name
foraustin1.example.com
andnewyork1.example.com
todataset1
.Example:
./bin/dsconfig --no-prompt \ set-global-configuration-prop \ --set replication-set-name:dataset1
-
Set the
replication-set-name
foraustin2.example.com
andnewyork1.example.com
todataset2
.Example:
./bin/dsconfig --no-prompt \ set-global-configuration-prop \ --set replication-set-name:dataset2
Creating and setting the locations
About this task
Create and set the locations of the Austin and New York server instances.
Steps
-
On the Austin servers, create two instance locations,
newyork
andaustin
.Example:
./bin/dsconfig --no-prompt create-location --location-name austin ./bin/dsconfig --no-prompt create-location --location-name newyork \ --set preferred-failover-location:austin
-
Set the location of the Austin server instances to
austin
.Example:
./bin/dsconfig --no-prompt set-location-prop --location-name austin \ --add preferred-failover-location:newyork ./bin/dsconfig --no-prompt set-global-configuration-prop \ --set location:austin
-
On the New York servers, create two instance locations,
newyork
andaustin
.Example:
./bin/dsconfig --no-prompt create-location \ --location-name austin ./bin/dsconfig --no-prompt create-location \ --location-name newyork \ --set preferred-failover-location:austin
-
Set the location of on the New York server instances to
newyork
.Example:
./bin/dsconfig --no-prompt set-location-prop \ --location-name austin \ --add preferred-failover-location:newyork ./bin/dsconfig --no-prompt set-global-configuration-prop \ --set location:newyork
Importing the entries
Import the userRoot
data based on data defined in the userRoot.ldif
file into one server.
About this task
Choose a server for each of the entry-balancing data sets, both stored in the dataset backend.
The |
Steps
-
Import the userRoot data using the
import-ldif
command.Example:
root@austin1# ./bin/import-ldif --backendID userRoot \ --ldifFile /data/userRoot.ldif \ --includeBranch dc=example,dc=com \ --rejectFile /data/austin1-import-rejects \ --port 389 --hostname austin1.example.com
-
Import the
dataSet1
data that is assigned thereplication-set-name
on one server into the dataset backend.Example:
root@austin1# ./bin/import-ldif --backendID dataset \ --ldifFile /data/dataset1.ldif \ --includeBranch ou=people,dc=example,dc=com \ --rejectFile /data/austin1-dataset-import-rejects \ --hostname austin1.example.com --port 389
-
Import the
dataSet2
data that is assigned thereplication-set-name
on one server into the dataset backend.Example:
root@austin2# ./bin/import-ldif --backendID dataset \ --ldifFile /data/dataset2.ldif \ --includeBranch ou=people,dc=example,dc=com \ --rejectFile /data/austin2-dataset-import-rejects \ --hostname austin2.example.com --port 389
Enabling replication in an entry-balancing deployment
Enable replication between the servers and initialize the remaining servers without data.
About this task
In this example, the |
To enable replication on the servers in the topology:
Steps
-
Run
dsreplication enable
.Example:
root@austin1# ./bin/dsreplication enable \ --host1 austin1.example.com \ --port1 389 --bindDN1 "cn=directory manager" \ --bindPassword1 pass --host2 austin2.example.com \ --port2 389 --bindDN2 "cn=directory manager" \ --bindPassword2 pass \ --replicationPort1 8989 \ --replicationPort2 8989 \ --baseDN dc=example,dc=com \ --baseDN ou=people,dc=example,dc=com \ --restricted ou=people,dc=example,dc=com \ --adminUID admin --adminPassword pass --trustAll \ --no-prompt
Running the
dsreplication enable
command for the first time creates the administrator account. -
Enable replication between
austin1
andnewyork1
.Example:
This procedure automatically also enables replication between
austin2
andnewyork1
.root@austin1# ./bin/dsreplication enable \ --host1 austin1.example.com \ --port1 389 --bindDN1 "cn=directory manager" \ --bindPassword1 pass --host2 newyork1.example.com \ --port2 389 --bindDN2 "cn=directory manager" \ --bindPassword2 pass \ --replicationPort1 8989 \ --replicationPort2 8989 \ --baseDN dc=example,dc=com \ --baseDN ou=people,dc=example,dc=com \ --restricted ou=people,dc=example,dc=com \ --adminUID admin --adminPassword pass --trustAll \ --no-prompt
-
Enable replication between
austin1
andnewyork2
.Example:
root@austin1# ./bin/dsreplication enable \ --host1 austin1.example.com \ --port1 389 --bindDN1 "cn=directory manager" \ --bindPassword1 pass --host2 newyork2.example.com \ --port2 389 --bindDN2 "cn=directory manager" \ --bindPassword2 pass \ --replicationPort1 8989 \ --replicationPort2 8989 \ --baseDN dc=example,dc=com \ --baseDN ou=people,dc=example,dc=com \ --restricted ou=people,dc=example,dc=com \ --adminUID admin --adminPassword pass --trustAll \ --no-prompt
Result:
The entry-balancing replication setup is complete.
-
Initialize the remaining servers without data.
-
Initialize the global domain,
dc=example,dc=com
onaustin2
,newyork1
, andnewyork2
servers.Example:
root@austin1# ./bin/dsreplication initialize \ --hostSource austin1.example.com --portSource 389 \ --hostDestination austin2.example.com \ --portDestination 389 --adminUID admin \ --adminPassword password \ --baseDN dc=example,dc=com \ --no-prompt
-
Initialize the entry-balancing domain,
ou=people,dc=example,dc=com
, fromaustin1
tonewyork2
.Example:
root@austin1# ./bin/dsreplication initialize \ --hostSource austin1.example.com --portSource 389 \ --hostDestination newyork1.example.com \ --portDestination 389 --adminUID admin \ --adminPassword password \ --baseDN dc=example,dc=com \ --baseDN ou=people,dc=example,dc=com \ --no-prompt
-
Initialize the entry-balancing domain,
ou=people,dc=example,dc=com
, fromaustin2
tonewyork2
.Example:
root@austin2# ./bin/dsreplication initialize \ --hostSource austin2.example.com --portSource 389 \ --hostDestination newyork2.example.com \ --portDestination 389 --adminUID admin \ --adminPassword password \ --baseDN dc=example,dc=com \ --baseDN ou=people,dc=example,dc=com \ --no-prompt
After
austin2
is initialized with the global domain, you can combine steps 4b and 4c by initializing both domains with one invocation.
-
Checking the status of replication
After you have configured replication, check the status of the replication topology using the dsreplication status
command.
Steps
-
To check the replication topology status, run the
dsreplication status
command .Example:
root@austin1# ./bin/dsreplication status \ --adminPassword pass --no-prompt --port 389