Add a Service
Declare a Service, something your Team deploys, so it appears on the diagrams and agents can find it.
Before you start
Section titled “Before you start”- The Project that owns the Service exists. See Add a Project.
- You know whether the Service belongs to a System. See Elements.
1. Declare the Service
Section titled “1. Declare the Service”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-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 8583Only 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:
# 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: SQL2. Add its Components
Section titled “2. Add its Components”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.
3. Connect it
Section titled “3. Connect it”Declare what the Service depends on under its relationships. See Connect Services.
4. Deploy it
Section titled “4. Deploy it”Add a Deployment for each Environment it runs in, with its URL. See Add Deployments.
5. Check the Workspace
Section titled “5. Check the Workspace”archidocs check0 errors, 0 warningsCheck it worked
Section titled “Check it worked”Run archidocs dev, press / and find the Service by name. The Element panel shows its description, its Owner and its Relationships.
If it didn’t
Section titled “If it didn’t”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.
With 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.
Related
Section titled “Related”Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.