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 ¶
Go to your local
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.
Scale up instances
docker-compose up -d --scale pingdirectory=2
At intervals, check to see when the containers are healthy and running:
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>
dhelpfor a listing of the DevOps command aliases. See the Docker Compose Command Line Reference for the Docker Compose commands.
To view the running instance, log in to PingDirectory using the Ping Data Console:
Product Connection Details PingDirectory
- URL: https://localhost:8443/console
- Server: pingdirectory:1636
- Username: administrator
- Password: 2FederateM0re
Test Deployment ¶
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 \ /opt/out/instance/bin/ldapmodify ... # 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. <Ctrl-D>
The blank line followed by the
<Ctrl-D>is important. It's how entries are separated in the LDAP Data Interchange Format (LDIF).
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:
To stop the running stack without removing any of the containers or associated Docker networks, enter:
To remove attached Docker Volumes
docker volume prune