Skip to content

Add Deployments

A Deployment is one Service in one Environment on one Deployment Target, and it holds the Service’s URL there. See Deployments for the idea.

Environments are defined once, in workspace.yaml, and shared by every Project. Add one only after agreeing it with the other Teams.

Under targets, declare where Services run: a name and a kind (region, cluster, namespace, platform, or whatever fits), nested as they nest. Usually one Team, such as a platform Team, declares the shared ones:

platform/targets.yaml
targets:
aws-eu-west-2:
name: AWS eu-west-2 (London)
kind: region
targets:
eks-prod:
name: EKS prod
kind: cluster
eks-staging:
name: EKS staging
kind: cluster
msk-prod:
name: MSK prod
kind: platform
london-dc:
name: London data centre
kind: region
owner: core-banking
targets:
zos-prod:
name: z/OS production LPAR
kind: platform
zos-test:
name: z/OS test LPAR
kind: platform

Other Projects use them by Qualified id, as platform:eks-prod. A Target has its own Owner, the Project’s Team unless owner says otherwise.

Under deployments, add one entry per Service per Environment and Target, with its url, and any further named URLs as endpoints:

platform/deployments.yaml
deployments:
- service: email-system
environment: prod
target: eks-prod
url: https://mail.bigbank.example
- service: kafka
environment: prod
target: msk-prod
endpoints:
- name: bootstrap
url: https://kafka.bigbank.example:9094
- service: kafka
environment: staging
target: eks-staging

A Service that doesn’t serve HTTP, such as a database, has no url. Kafka has an endpoint for its bootstrap servers instead.

The environment must be defined in workspace.yaml. A near miss is caught:

shop/deployments.yaml · fails check: unknown-environment
targets:
eu-west-1:
name: EU West 1
kind: region
deployments:
- service: web
environment: production
target: eu-west-1
url: https://shop.example.com

archidocs check reports unknown-environment and suggests prod.

Terminal window
archidocs check

In the viewer, select the Service and use Where is it deployed?, or open the Environment’s Deployment View, deployment/prod.

upsert_target and upsert_deployment write them; upsert_environment adds an Environment.