HomeDevCentral

Standardize containers pillar

Description

Standardize containers pillar

Summary:
The docker_containers dictionnary contains two kind of items:

  • containers, with several instance, one key per instance
  • unique container with one assocaited instance

While it currently works, this setup makes complex to parse the entry
without knowledge of what key contains what.

An example of an issue is how to provide nginx configuration for
the containers with several instances? That would require two for loop
one to find containers with Host key at first level, a second to seek
Host key at second level (and parse wastefully properties of unique
containers).

This change standardizes the entries to use the hierarchy model
and provides documentation about the entry structure and how it
matches roles/ states and files.

A drawback is it repeats the service name as instance name for
containers deployed only once like Cachet, but that also provides
more flexibility if in the future we need to run another instance
of the same service for someone else.

Ref T1422

Test Plan: Apply nginx and containers configuration to Equatower

Reviewers: dereckson

Reviewed By: dereckson

Maniphest Tasks: T1422

Differential Revision: http://devcentral.nasqueron.org/D1720

Details