Skip to content

Target Selection

Choosing the right targets for your deployment ensures your changes reach the intended machines.

A deployment’s targets are resolved from either explicit target IDs or a set of tags — these are the two underlying selector types. The UI layers convenience flows (manual picking, name patterns) on top of them. The environment is a separate deployment context that supplies the candidate targets and their priority ordering; it is not itself a target selector.

MethodResolves viaBest For
By TagTagsTargeted updates
By TargetTarget IDsAd-hoc operations

When deploying a solution, the environment supplies the candidate targets, which you can then narrow:

┌─────────────────────────────────────────────────────────────┐
│ Target Selection │
├─────────────────────────────────────────────────────────────┤
│ │
│ Environment: Production │
│ │
│ Targets in environment (12): │
│ ┌────────────────┬────────┬──────────┬────────────┐ │
│ │ Name │ Status │ Mode │ Priority │ │
│ ├────────────────┼────────┼──────────┼────────────┤ │
│ │ ✓ web-prod-01 │ Online │ Listen │ 80 │ │
│ │ ✓ web-prod-02 │ Online │ Listen │ 70 │ │
│ │ ✓ web-prod-03 │ Online │ Listen │ 60 │ │
│ │ ⚠ db-prod-01 │ Stale │ Poll │ 10 │ │
│ └────────────────┴────────┴──────────┴────────────┘ │
│ │
│ [✓] Include all online targets │
│ [ ] Include stale targets │
│ │
└─────────────────────────────────────────────────────────────┘
  1. Choose the target environment
  2. View all assigned targets
  3. See target status and priority
  4. Optionally exclude offline/stale targets
  5. Proceed with deployment

Filter targets using tags for more granular control:

┌─────────────────────────────────────────────────────────────┐
│ Filter by Tags │
├─────────────────────────────────────────────────────────────┤
│ │
│ Include targets where: │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ role [=] [web ] [×] │ │
│ │ region [=] [us-east-1 ] [×] │ │
│ │ [+ Add Filter] │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ Matching targets (4 of 12): │
│ ● web-prod-01 │
│ ● web-prod-02 │
│ ● web-prod-03 │
│ ● web-prod-04 │
│ │
└─────────────────────────────────────────────────────────────┘

Tag filters match by exact key=value equality. Each filter you add must specify both a key and a value; a target is included only when it carries a tag with that exact key and that exact value.

FieldDescriptionExample
keyThe tag key to matchrole
valueThe exact valueweb

Multiple filters combine with AND logic:

role = web AND region = us-east-1 AND tier = frontend

This selects only targets matching all criteria.

For ad-hoc deployments, manually pick targets by their ID. The search box filters the displayed list by name or hostname on the client side — it is a convenience filter for finding the right targets, not a deployment selector itself. Only the targets you check are sent to the deployment.

┌─────────────────────────────────────────────────────────────┐
│ Select Targets │
├─────────────────────────────────────────────────────────────┤
│ │
│ Search: [web-prod_________] │
│ │
│ Available Targets: │
│ ┌────────────────┬────────┬──────────┬────────────────┐ │
│ │ [✓] web-prod-01│ Online │ Listen │ Production │ │
│ │ [✓] web-prod-02│ Online │ Listen │ Production │ │
│ │ [ ] web-prod-03│ Online │ Listen │ Production │ │
│ │ [ ] web-stg-01 │ Online │ Poll │ Staging │ │
│ └────────────────┴────────┴──────────┴────────────────┘ │
│ │
│ Selected: 2 targets │
│ │
└─────────────────────────────────────────────────────────────┘
  • Testing on specific machines
  • Investigating issues on particular targets
  • Running maintenance on subset of servers
  • Canary deployments to single targets

Control which targets by status:

StatusDefaultDescription
OnlineIncludedHealthy, connected targets
StaleExcludedRecently missed heartbeat
OfflineExcludedNot connected
┌─────────────────────────────────────────────────────────────┐
│ Status Filter │
├─────────────────────────────────────────────────────────────┤
│ │
│ Include targets with status: │
│ [✓] Online (10 targets) │
│ [ ] Stale (2 targets) │
│ [ ] Offline (1 target) │
│ │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ ⚠ Including offline targets may cause failures │ │
│ └───────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘

Selected targets are ordered by priority. Priority values range from -100 to 100 (default 50), and targets with higher priority deploy first:

TargetPriorityDeploy Order
web-0180First batch
web-0280First batch
web-0370Second batch
web-0470Second batch
db-0110Last

Before deployment, Mantis validates your selection:

CheckDescription
Minimum targetsAt least one target selected
Target healthWarns about offline/stale targets
┌─────────────────────────────────────────────────────────────┐
│ Selection Warnings │
├─────────────────────────────────────────────────────────────┤
│ │
│ ⚠ 1 target is stale and may fail: │
│ - db-prod-01 (last seen 15 minutes ago) │
│ │
│ ⚠ 2 targets are in different environments: │
│ - web-staging-01 (Staging) │
│ - web-staging-02 (Staging) │
│ │
│ [Continue Anyway] [Modify Selection] │
│ │
└─────────────────────────────────────────────────────────────┘

Using the CLI for target selection:

Terminal window
# By environment
mantisctl deployment create --solution-id <id> --environment-id production
# By tag (repeat --target-tag for multiple key=value pairs)
mantisctl deployment create --solution-id <id> \
--target-tag role=web --target-tag region=us-east-1
# Explicit targets by UUID (repeat --target for each)
mantisctl deployment create --solution-id <id> \
--target <target-uuid-1> --target <target-uuid-2> --target <target-uuid-3>

--target is repeatable, so you can expand a one-target-per-line file with your shell:

Terminal window
# targets.txt - one target UUID per line (blank lines and # comments ignored)
args=$(grep -v '^\s*#' targets.txt | grep -v '^\s*$' | sed 's/^/--target /')
mantisctl deployment create --solution-id <id> $args

Deploy to a single target first:

┌─────────────────────────────────────────────────────────────┐
│ Canary Strategy │
├─────────────────────────────────────────────────────────────┤
│ │
│ Phase 1: Canary (1 target) │
│ [✓] web-prod-01 │
│ │
│ Phase 2: Remaining (11 targets) │
│ [ ] web-prod-02 through web-prod-12 │
│ │
│ ● Deploy Phase 1, then manually approve Phase 2 │
│ │
└─────────────────────────────────────────────────────────────┘

Deploy by region:

Phase 1: us-east-1 (tag: region=us-east-1)
Phase 2: us-west-2 (tag: region=us-west-2)
Phase 3: eu-west-1 (tag: region=eu-west-1)

Deploy by server role:

Phase 1: Workers (tag: role=worker)
Phase 2: API servers (tag: role=api)
Phase 3: Web servers (tag: role=web)

Review matched targets before deploying:

Preview shows:
├── Target count
├── Target names
├── Target status
└── Any warnings

Standardize tags across your infrastructure:

TagPurpose
roleServer function
regionGeographic location
tierApplication tier
teamOwning team
  • Deploy to online targets for reliability
  • Investigate stale targets before including
  • Never deploy to offline targets in production

Record why you selected specific targets:

Deployment: Emergency security patch
Selection: role=web AND region=us-east-1
Reason: Patch critical vulnerability in US East web servers only

Cause: Filter criteria too restrictive

Solution: Broaden filters or check tag values

Cause: Incorrect filter or environment

Solution: Review selection preview before deploying

Cause: Target not in environment or missing tags

Solution: Verify target assignment and tag values