Deployment Conventions

Originally, all deployments were a vertical stack that deployed everything for a single installation. These installations were called 'infras'.

Later, some services were removed from this convention to become multi-tenant; i.e. they service multiple infra installations. This is particular true for user-facing UI services. These follow a new convention simply called a 'deployment'.

Both conventions revolve around a base key - infra_id and deployment_id - used to prevent collision of names and data between:

  • docker containers and services running on the same servers

  • partitions in database instances

  • dns routes

  • etc.

In Ansible, the vars files you will be most interested in are:

Convention Vars files Notes

Infras

  • groups_vars/infra

Infras only really have one meaningful vars file

Deployments

  • group_vars/deployment.yml

  • group_vars/<infra>.yml

Deployments have an <infra>.yml file for every infra that deployment tenants.

DNS and Container Naming

DNS and container names follow hierarchical structures:

For 'infras':

  1. Service ID

  2. Optional Service Group

  3. Infra ID

  4. Deploy Level

The Infra ID and Deploy Level are somewhat interchangeable/inconsistent depending on the context as they are a fair bit older and have undergone a few iterations.

For `Deployments'

  1. Service ID

  2. Optional Service Group

  3. Infra ID, if applicable

  4. Deployment ID

Docker container names start with the most general term and end with the most specific. DNS names start with the most specific and end with the most general.