PingDirectory

Deploying with non-interactive dsreplication

Steps

  1. To generate the sample data on the first server, use the make-ldif tool.

    Example:

    $ bin/make-ldif --templateFile config/MakeLDIF/example-10K.template \
      --ldifFile ldif/10K.ldif
  2. To import the data, select a server from which to import data and to be the source for future initialization to other servers, and then follow the import steps.

    1. Stop the server.

    2. To import the sample LDIF to the server, run import-ldif.

    3. Start the server.

      Example:

      $ bin/stop-server
      $ bin/import-ldif --backendID userRoot --ldifFile ldif/10K.ldif
      $ bin/start-server
  3. To enable replication, select a specific server and run dsreplication enable three times.

    For the first invocation, create the replication topology administrator with the name admin.

    Example:

    $ bin/dsreplication enable --host1 austin01.example.com --port1 1389 \
        --bindDN1 "cn=Directory Manager" --bindPassword1 password \
        --replicationPort1 8989 --host2 austin02.example.com --port2 1389 \
        --bindDN2 "cn=Directory Manager" --bindPassword2 password \
        --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \
        --adminPassword password --no-prompt
    
    $ bin/dsreplication enable --host1 austin01.example.com --port1 1389 \
        --bindDN1 "cn=Directory Manager" --bindPassword1 password \
        --replicationPort1 8989 --host2 budapest01.example.com --port2 1389 \
        --bindDN2 "cn=Directory Manager" --bindPassword2 password \
        --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \
        --adminPassword password --no-prompt
    
    $ bin/dsreplication enable --host1 austin01.example.com --port1 1389 \
        --bindDN1 "cn=Directory Manager" --bindPassword1 password \
        --replicationPort1 8989 --host2 budapest02.example.com --port2 1389 \
        --bindDN2 "cn=Directory Manager" --bindPassword2 password \
        --replicationPort2 8989 --baseDN dc=example,dc=com --adminUID admin \
        --adminPassword password --no-prompt
  4. To initialize the other servers, the dc=example,dc=com replicas, from the server you imported the data into with import-ldif, run dsreplication initialize.

    Example:

    For this example, initialize budapest02 from budapest01 to minimize the WAN transfers.

    $ bin/dsreplication initialize --hostSource austin01.example.com --portSource 1389 \
      --hostDestination austin02.example.com --portDestination 1389 \
      --adminUID admin --adminPassword password --baseDN dc=example,dc=com --no-prompt
    
    $ bin/dsreplication initialize --hostSource austin01.example.com --portSource 1389 \
      --hostDestination budapest01.example.com --portDestination 1389 \
      --adminUID admin --adminPassword password --baseDN dc=example,dc=com --no-prompt
    
    $ bin/dsreplication initialize --hostSource budapest01.example.com --portSource 1389 \
      --hostDestination budapest02.example.com --portDestination 1389 \
      --adminUID admin --adminPassword password --baseDN dc=example,dc=com --no-prompt
  5. To view the replication state, run dsreplication status.

    Example:

    $ bin/dsreplication status --adminPassword password --no-prompt --displayServerTable --showAll