Deploying a Replicated PingDirectory Pair ¶
Use Docker compose to deploy a replicated pair of PingDirectory containers.
Before you begin ¶
You must complete Get Started to set up your DevOps environment and run a test deployment of the products.
About this task ¶
- Deploy the replicated pair.
- Test the deployment.
- Bring down or stop the stack.
Deploying the stack ¶
Go to your local
devops/pingidentity-devops-getting-started/11-docker-compose/02-replicated-pairdirectory and 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.
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, sign on to PingDirectory using the PingData Console:
Product Connection Details PingDirectory
- URL: https://localhost:8443/console
- Server: pingdirectory:1636
- Username: administrator
- Password: 2FederateM0re
Testing the deployment ¶
Verify that data is replicating between the pair by adding a description entry for the first container:
Exec into the container.
docker container exec -it \ 02-replicated-pair_pingdirectory_1 \ /opt/out/instance/bin/ldapmodify ... # Successfully connected to localhost:1636
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).
To 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 shows the description that you specified for the first container, similar to the following:
# dn: uid=user.0,ou=people,dc=example,dc=com # description: Made this change on the first container.
Cleaning 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, enter:
docker volume prune