Skip to content

Add a Service

A Service is something you deploy: it has Deployments and a URL in each Environment. See Elements for how Services relate to Systems and Components.

Decide which Project the Service belongs in (its Owner’s, usually) and whether it belongs to a System. Its id is a lowercase slug, unique in the Project across Elements and Deployment Targets.

Put it under its System’s services, or under a top-level services key if it belongs to no System. Big Bank’s Payments System holds three:

payments/model.yaml
payments-service:
name: Payments Service
description: Validates, posts and settles customer payments.
technology: Java, Spring Boot
relationships:
- to: payments-db
description: Stores payment state in
technology: JDBC
- to: core:mainframe
description: Posts payments to the ledger in
technology: XML/HTTPS
- to: card-gateway
description: Settles card payments through
technology: ISO 8583
  • name is required. Add a description that says what it does for the business, and a technology.
  • type is app unless the Service is a datastore or a message broker.
  • Set external: true for a Service run outside the organisation, such as a provider’s API.
  • Set owner only if a Team other than the Project’s owns it.
  • tags group Elements for Saved Views, and links add labelled URLs, such as a runbook, to the Element panel.

If the System is declared in another file of the Project, declare the Service at the top level of its own file and attach it with in:

sink/reporting.yaml
# A Service declared in a file of its own and placed in a System with `in`.
services:
reports:
name: Reports
description: A Service in Shop, declared outside the System's file.
technology: Python
in: shop
owner: data
relationships:
- to: orders-db
description: Reads order history from
technology: SQL

A Component is a part of the Service that isn’t deployed on its own, such as a controller or a module. List them under the Service’s components, only when people talk about them by name. An External Service has none.

Declare what the Service depends on under its relationships. See Connect Services.

Add a Deployment for each Environment it runs in, with its URL. See Add Deployments.

Terminal window
archidocs check

upsert_element adds a Service, or a Component with a parent, and returns the diff. Relationships and Deployments have tools of their own.