Skip to content

Add a Service

Declare a Service, something your Team deploys, so it appears on the diagrams and agents can find it.

  • The Project that owns the Service exists. See Add a Project.
  • You know whether the Service belongs to a System. See Elements.

Put it under its System’s services, or under a top-level services key if it belongs to no System. Its id must be unique in the Project. Big Bank’s Payments System holds this one:

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

Only name is required. Every other field, such as type, external and owner, is in the Elements and Relationships reference.

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

List the parts of the Service that people talk about by name under its components. Leave this out for an External Service, which has none. The fields are in the components reference.

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
0 errors, 0 warnings

Run archidocs dev, press / and find the Service by name. The Element panel shows its description, its Owner and its Relationships.

check reports duplicate-id when another Element or Deployment Target in the Project has the same id. Choose another id.

check reports external-with-components when an External Service lists Components. Remove them, or remove external: true.

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

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.