Now we can enable replication between the servers and initialize the remaining servers without data. Notice that we specify the --restricted domain in the dsreplication command.

  1. Run dsreplication enable to enable the servers in the topology. The first invocation of this command creates the admin account.
    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    
    
  2. Enable replication between austin1 and newyork1. This procedure automatically enables replication between austin2 and newyork1 as well.
    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     
    
  3. Enable replication between austin1 and newyork2. This will complete the entry-balancing replication setup.
    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
    
  4. Initialize the remaining servers without data. The global domain, dc=example,dc=com needs to be initialized on austin2, newyork1 and newyork2. The ou=people,dc=example,dc=com entry-balancing domain needs to be initialized from austin1 to newyork2, and then again from austin2 to newyork2. We will combine these steps by initializing both domains with one invocation once austin2 is initialized with the global domain.
    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
    
    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
    
    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