Add a Service
Topic add-service: archidocs guide add-service or get_authoring_guide("add-service").
Add one Service with its Components, Relationships and Deployments.
- Place it. Find the Project (
get_workspace_info,search_elements) and, if it belongs to one, its System. Confirm the id: a lowercase slug unique in the Project across Elements and Deployment Targets. - Service.
upsert_element(project, kind: "service", id, fields, parent?):fields:name,description,technology,type(appby default,datastore,broker),external,tags,links;owneronly when it differs from the Project’s.parentnames the System. A new Element goes into its parent’s file; withfileas well it goes top-level in that file and attaches within:. A top-level Service goes intofile, elsemodel.yaml.fieldsnever setsrelationships,componentsorin; each has its own tool or parameter.
- Components. For each,
upsert_element(kind: "component", parent: <service>). An External Service has no Components. - Relationships. Follow the
relationshipstopic for each outbound dependency. - Deployments. Follow the
deploymentstopic for each Environment the Service runs in. - Finish the edit loop: show the diffs, run
check, suggest a branch, PR title and body.
Example
Section titled “Example”systems: shop: name: Shop services: cart: name: Cart technology: Go components: pricing: name: Pricing