Deployments
Topic deployments: archidocs guide deployments or get_guide("authoring", "deployments").
A Deployment Target is where Services run (a region, a cluster in it, a namespace, a platform); Targets nest to any depth, have their own Owner, and are not Elements. A Deployment is one Service in one Environment on one Target, named by that triple, and is the only place a URL lives.
- Environment.
list_environments. Environments are defined once inworkspace.yaml; add a missing one withupsert_environment(id, fields: {name})only after the user confirms it, because every Project shares it. - Targets.
upsert_target(project, id, fields, parent?, file?):fields:name,kind(required),description,owner,tags,links.kindis printed as written in the Target’s header, so use a short form:region,az,vnet,snet,vm,aks,ns,asp. Notavailability-zone,subnetorapp-service-plan.parentnests it in the parent’s file. A Target can’t be moved; remove it and add it again.- Target ids share the Project’s id namespace with Elements. Reuse a Target from another Project as
project:id, resolved withsearch_elementsorget_deployments.
- Deployment.
upsert_deployment(project, service, environment, target, fields, file?):fields:url(the Service’s main URL in that Environment),endpoints([{name, url}]for further named URLs: admin, health, gRPC) andinstances(see Scaling).- A new Deployment goes beside the Project’s other Deployments unless
fileis given.
- Finish the edit loop.
Scaling
Section titled “Scaling”instances says how many copies of the Service run on the Target: a whole number for a fixed count, {min, max} for an autoscale range. Leave it out for one. A scaled Deployment draws as a stack with a ×3 or 2–10 chip.
- Use
instancesfor interchangeable copies on one Target: an App Service plan running N workers, a Kubernetes Deployment with N replicas, an autoscaling group. - Use separate Deployments when where each copy runs is the point: one per availability zone, one per named VM, the members of a Solr or ZooKeeper ensemble. Give each its own Target, so the View shows the placement.
- Don’t put the count in the Target’s name (“autoscale 2–10”): one Target can host Deployments that scale differently.
Example
Section titled “Example”targets: eu-west-1: name: EU West 1 kind: region targets: eks-main: name: Main EKS kind: eksdeployments: - service: cart environment: prod target: eks-main url: https://cart.example.com instances: 3 # fixed: three interchangeable copies endpoints: - name: health url: https://cart.example.com/healthz - service: search environment: prod target: eks-main instances: { min: 2, max: 10 } # autoscale rangeDocuments the beta branch at cd98671, ahead of the latest release, v1.4.0.