Skip to content

Deploy a Replicated PingDirectory Pair

You'll use Docker Compose to deploy a replicated pair of PingDirectory containers.

What You'll Do

  • Deploy the replicated pair.
  • Test the deployment.
  • Bring down or stop the stack.


  • You've already been through Get Started to set up your DevOps environment and run a test deployment of the products.

Deploy Stack

  1. Go to your local devops/pingidentity-devops-getting-started/11-docker-compose/02-replicated-pair directory. Enter:

    docker-compose up -d

    This kicks off a PingDirectory instance that will stand up, become healthy, and then go into a loop looking for other directories.

  2. Scale up instances

    docker-compose up -d --scale pingdirectory=2
  3. At intervals, check to see when the containers are healthy and running:

    docker-compose ps

    You can also display the startup logs:

    docker-compose logs -f

    To see the logs for a particular product container at any point, enter:

    docker-compose logs <product-container-name>

    DevOps Aliases

    Enter dhelp for a listing of the DevOps command aliases. See the Docker Compose Command Line Reference for the Docker Compose commands.

  4. To view the running instance, log in to PingDirectory using the Ping Data Console:

    Product Connection Details

Test Deployment

  1. Verify that data is replicating between the pair by adding a description entry for the first container. First, exec into the container.

    docker container exec -it \
       02-replicated-pair_pingdirectory_1 \
    # Successfully connected to localhost:1636

    Then copy and paste this entire block:

    dn: uid=user.0,ou=people,dc=example,dc=com
    changetype: modify
    replace: description
    description: Made this change on the first container.

    The blank line followed by the <Ctrl-D> is important. It's how entries are separated in the LDAP Data Interchange Format (LDIF).

  2. Check that the second container in the pair now has a matching entry for the description. Enter:

    docker container exec -it \
       02-replicated-pair_pingdirectory_2 \
       /opt/out/instance/bin/ldapsearch \
       -b uid=user.0,ou=people,dc=example,dc=com \
       -s base '(&)' description

    The result should show the description that you specified for the first container, similar to this:

    # dn: uid=user.0,ou=people,dc=example,dc=com
    # description: Made this change on the first container.

Clean Up

When you no longer want to run this stack, bring the stack down.

To remove all of the containers and associated Docker networks, enter:

docker-compose down

To stop the running stack without removing any of the containers or associated Docker networks, enter:

docker-compose stop

To remove attached Docker Volumes

docker volume prune