By Jaws Deploy team · Updated

Environments and Targets

An environment is a stage a release passes through, a target is where the work runs, and tags decide which targets a step runs on.

Search guides... Ctrl K

Three concepts describe your infrastructure in Jaws Deploy: environment, target and tag. Used consistently, they keep the model small as you add servers and services.

The three concepts

Environment A deployment stage such as Development, Staging or Production. Variables are scoped to environments, and lifecycles put them in order.
Target A machine running the agent, or an Azure Web App, that receives deployments.
Tag A label on targets. Steps and variables can be scoped to tags, so one process can serve targets with different roles.

Environments are scopes

When a release is deployed to Production, Jaws Deploy resolves every variable for Production, runs the steps that apply to Production and records the deployment in Production's history. Each environment has its own variable values, so the same release can move from Staging to Production unchanged.

Don't create one environment per machine. Environments are stages of the release lifecycle, machines are where the work runs, and tags group machines. Keep these three layers separate.

// Topology example
// Environments
Dev └─ agent-dev-01 [role:app, role:db]
Staging ├─ agent-stg-01 [role:app]
└─ agent-stg-02 [role:db]
Prod ├─ agent-prd-01 [role:app, region:eu]
├─ agent-prd-02 [role:app, region:us]
└─ azure-prd-db [role:db]

Tag conventions

Tags are free text, so agree on a convention early, for example role tags (role:app, role:db, role:cache) and region tags (region:eu-west). One deployment process can then run its database step on role:db, its package step on role:app, and a smoke test only on role:app in region:eu-west.

Prefer a tag over a new structure. A region, a cluster and a tier can each be a tag.