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.
1. Place it
Section titled “1. Place it”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.
2. Declare it
Section titled “2. Declare it”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-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 8583nameis required. Add adescriptionthat says what it does for the business, and atechnology.typeisappunless the Service is adatastoreor a messagebroker.- Set
external: truefor a Service run outside the organisation, such as a provider’s API. - Set
owneronly if a Team other than the Project’s owns it. tagsgroup Elements for Saved Views, andlinksadd 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:
# 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: SQL3. Add its Components
Section titled “3. Add its Components”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.
4. Connect it
Section titled “4. Connect it”Declare what the Service depends on under its relationships. See Connect Services.
5. Deploy it
Section titled “5. Deploy it”Add a Deployment for each Environment it runs in, with its URL. See Add Deployments.
6. Check it
Section titled “6. Check it”archidocs checkWith an agent
Section titled “With an agent”upsert_element adds a Service, or a Component with a parent, and returns the diff. Relationships and Deployments have tools of their own.