PingDirectory

Deployment automation

Automated workflows help shift the deployment process from a pets service model to a cattle service model. The primary tools that are required to manage the replication topology are dsreplication and remove-defunct-server.

Another key to every topology-management workflow is the topology.json file, which represents the intended state of the topology at any time. An administrator should create this file manually or by using external automation. When promoting from a dev/test environment to a stage/prod environment, you can obtain a topology.json file using the manage-topology export subcommand.

The following code shows an example topology.json file:

{
  "serverInstances" : [
    {
      "instanceName" : "ds-0",
      "hostname" : "ds-0.ds-topology.production.svc.cluster.local",
      "location" : "Austin",
      "ldapPort" : 389,
      "ldapsPort" : 636,
      "replicationPort" : 989,
      "startTLSEnabled" : true,
      "preferredSecurity" : "SSL",
      "product" : "DIRECTORY"
    },
    {
      "instanceName" : "ds-1",
      "hostname" : "ds-1.ds-topology.production.svc.cluster.local",
      "location" : "Austin",
      "ldapPort" : 389,
      "ldapsPort" : 636,
      "replicationPort" : 989,
      "startTLSEnabled" : true,
      "preferredSecurity" : "SSL",
      "product" : "DIRECTORY"
    },
    {
      "instanceName" : "ds-2",
      "hostname" : "ds-2.ds-topology.production.svc.cluster.local",
      "location" : "Austin",
      "ldapPort" : 389,
      "ldapsPort" : 636,
      "replicationPort" : 989,
      "startTLSEnabled" : true,
      "preferredSecurity" : "SSL",
      "product" : "DIRECTORY"
    },
    {
      "instanceName" : "ds-3",
      "hostname" : "ds-3.ds-topology.production.svc.cluster.local",
      "location" : "Austin",
      "ldapPort" : 389,
      "ldapsPort" : 636,
      "replicationPort" : 989,
      "startTLSEnabled" : true,
      "preferredSecurity" : "SSL",
      "product" : "DIRECTORY"
    },
    ...
  ]
}

The remaining sections in this chapter describe the deployment automation that is necessary to satisfy the following workflows:

  • Setting up the initial topology

  • Initializing data on all servers

  • Replacing crashed instances and scaling up

  • Scaling down

  • Rolling updates

Consistent network identifiers are required for each server instance. Additionally, we strongly recommend persistent storage for all server bits. The required level of automation changes slightly when this recommendation is not followed, as noted in each section.