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.
1. Check the Environment exists
Section titled “1. Check the Environment exists”Environments are defined once, in workspace.yaml, and shared by every Project. Add one only after agreeing it with the other Teams.
2. Declare the Targets
Section titled “2. Declare the Targets”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:
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: platformOther Projects use them by Qualified id, as platform:eks-prod. A Target has its own Owner, the Project’s Team unless owner says otherwise.
3. Add the Deployments
Section titled “3. Add the Deployments”Under deployments, add one entry per Service per Environment and Target, with its url, and any further named URLs as endpoints:
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-stagingA 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:
targets: eu-west-1: name: EU West 1 kind: regiondeployments: - service: web environment: production target: eu-west-1 url: https://shop.example.comarchidocs check reports unknown-environment and suggests prod.
4. Check it
Section titled “4. Check it”archidocs checkIn the viewer, select the Service and use Where is it deployed?, or open the Environment’s Deployment View, deployment/prod.
With an agent
Section titled “With an agent”upsert_target and upsert_deployment write them; upsert_environment adds an Environment.