The deployment is the inventory
Seventy commits in a repository of thirteen thousand, almost none of them code — deploying a mobile core function is a service entry and two sets of variables.
The repository is an Ansible tree that has been accumulating since 2015 (13,641 commits, all
refs). My share of it is 70
commits between June 2024 and September 2026: +169/-6 lines of code and +1,280/-270 of
config, which is 1% of the history and an accurate picture of what deploying these services
involves. Almost nothing in it is a program (169 lines of code in two years). A network function arrives as one entry in
playbooks/autodeploy/docker.ini plus variables in host_vars/ and group_vars/.
A service is an entry, and the entry is odd
wireless-dra-partner-a: bash -c "docker create \
--name wireless-dra-partner-a \
--network {{ internal_net }} --ip {{ partner_a_dra.internal_ip }} \
--dns {{ dns_server_1 }} --dns {{ dns_server_2 }} \
--memory=12g --memory-reservation=600m \
--expose 8000 --expose 8001 \
--env PROMETHEUS_METRICS_PORT=8000 \
--env SERVICE_8000_TAGS=metrics \
--env SERVICE_8001_CHECK_HTTP=/health \
registry.internal/{{ env }}/wireless-dra-partner-a:{{ tag }} && \
docker network connect --ip={{ partner_a_dra.partner_ip }} \
{{ partner_net }} wireless-dra-partner-a && \
docker start wireless-dra-partner-a"
Every other service in the file is a plain docker run (and there are hundreds). This one is three commands in a bash -c (create,
connect, start), and the reason is a limitation worth knowing: docker run attaches exactly
one network at creation. A DRA needs two, each with a fixed address — the
internal one it is scraped and managed on, and the partner-facing one its Diameter peers know.
The only way to get both is to create the container, attach the second network, and start it
afterwards.
Metrics are a service tag, not a scrape target
There is no Prometheus file listing these containers (no static targets, no file_sd). The SERVICE_<port>_* variables register
the container in Consul, and SERVICE_8000_TAGS=metrics is the whole of the discovery; health
is the same mechanism on 8001 with SERVICE_8001_CHECK_HTTP=/health at a 60-second interval.
Which explains a commit that reads like nothing: Adding expose statement to docker command for
exposing metrics [Unified port for all DRAs]. Each partner's DRA had been using a different metrics
port, so no single rule could scrape them. Unifying on one port (8000, with health on 8001) is
what made a single rule work for all of them. A sibling commit set SERVICE_8000_PODIP to the internal address. Registered
with the partner-facing address instead, the container is discovered on an interface the
scraper cannot reach.
The variables are the interface
host_vars/<host>.yml carries what is true of one machine, group_vars/<group>.yml what is
true of a role. Secrets are never in either — they are Vault lookups evaluated at run time:
partner_api_key: "{{ lookup('hashi_vault', 'secret=.../provided-creds/...') }}"
Of my 70 commits, 28 touch host_vars/ and 6 touch group_vars/. That ratio is the honest
shape of the work: most changes are true of one host.
What the history is actually about
It is not new services. The same four things recur, each discovered after the service was
already running: metrics exposure, memory limits (--memory=12g --memory-reservation=600m, a
hard ceiling and a soft reservation, added to DRA and STP together), DNS resolvers for
container-to-service lookups, and a mount so logs survive a restart. One commit splits a service
group so individual hosts can be targeted (one new group, same hosts), because deploying to all
of them at once had become the only option available.
The last one in the set is a single variable (September 2026, two lines of diff). An STP's expected peer source ports were corrected
to match production, which sounds cosmetic and is not: that STP enforces the source port of the
peer it expects, so a peer arriving from a different port matches no configuration and has its
association dropped after the SCTP cookie exchange. The symptom is indistinguishable from
having configured nothing at all. The fix is one line of host_vars; finding it took reading the template that consumes the
variable (and the C that reads the template's output).
That is the part I would tell someone starting on this kind of tree. The inventory is not documentation of the deployment; it is the deployment, and a protocol-level decision can live in it as a number with no comment.