Skip to content

Creating Deployments

This guide walks you through creating and executing deployments in Mantis.

You can deploy from three sources:

SourceDescriptionUse Case
SolutionComplete deployment packageFull application deployment
SequenceSpecific workflowTargeted operation
ActionSingle operationQuick fix or test
  1. Open Lens in your browser
  2. Open the Deployment group in the top navigation, then the Deployments pill
  3. Click New Deployment

Choose the tenant and an environment. The environment is a scope, not a destination — it is listed as {name} (Order: {n}) by promotion order, and targets are chosen in the next step. Lens labels it “Optional”, but it is required whenever a tenant is set: the API refuses a tenant deployment without one (environment_id is required for tenant-aware deployments). It is genuinely optional only for a platform-wide deployment with no tenant.

  1. Choose Solution as the source type
  2. Select the solution from the dropdown
  3. Choose the version to deploy
┌─────────────────────────────────────────────────────────┐
│ Create Deployment │
├─────────────────────────────────────────────────────────┤
│ │
│ Source Type: ● Solution ○ Sequence ○ Action │
│ │
│ Solution: [customer-portal ▼] │
│ Version: [1.3.0 ▼] │
│ │
└─────────────────────────────────────────────────────────┘

An environment scopes a deployment; it does not receive one. This step is required — the wizard blocks until a destination is chosen, by one of three modes:

┌─────────────────────────────────────────────────────────┐
│ Select Targets │
├─────────────────────────────────────────────────────────┤
│ │
│ [ By Target ] [ By Tags ] [ By Pool ] │
│ │
│ ☑ web-01 ☑ web-02 ☐ db-01 │
│ │
└─────────────────────────────────────────────────────────┘
  • By Target — pick targets explicitly
  • By Tags — every target carrying the tags, matched ANY or ALL
  • By Pool — an execution pool, which runs off-target (see Target Selection)

Set execution options:

OptionDescriptionDefault
Execution ModeParallel, Sequential, or RollingParallel
Failure StrategyStop, Continue, or Ignore failuresStop
TimeoutMaximum step duration300 seconds
PriorityQueue priority0 (normal)
  1. Review the deployment summary
  2. Verify targets and versions
  3. Click Deploy
┌─────────────────────────────────────────────────────────┐
│ Review Deployment │
├─────────────────────────────────────────────────────────┤
│ │
│ Solution: customer-portal v1.3.0 │
│ Environment: Production │
│ Targets: 12 machines │
│ │
│ Sequences: │
│ 1. run-migrations (^1.0.0 → 1.2.0) │
│ 2. deploy-backend (^2.0.0 → 2.3.1) │
│ 3. deploy-frontend (^1.0.0 → 1.1.0) │
│ │
│ Execution: Rolling (batch size: 3) │
│ Failure: Stop on first failure │
│ │
│ [Cancel] [Deploy] │
└─────────────────────────────────────────────────────────┘

For targeted operations without a full solution:

  1. Select Sequence as source type
  2. Choose the sequence and version
  3. Select targets directly (not via environment)
  4. Configure and deploy

For quick single operations:

  1. Select Action as source type
  2. Choose the action and version
  3. Provide argument values
  4. Select target(s)
  5. Execute

The solution’s Environment Deployment Status cards do not start a deployment directly. They offer:

  • Promote to {environment} — deploy the version this environment holds into the next one in the chain. Shown when a next environment exists, this one has a version deployed, and you hold promotions:create
  • Rollback — open that environment’s state page. Shown once the environment has a deployed version and a recorded deployment
  • Configure Targets — shown while the environment has no targets

To deploy a specific version, use the deployment wizard above.

The Configuration step carries a Variables section: enter a name and a value and press Add, once per variable. Inherited environment values are not displayed there — you set the name you want to override and the value to use.

Overrides apply only to the current deployment.

Scheduled deployments are managed through the Schedules feature, which is separate from creating an ad-hoc deployment. To deploy at a future time or on a recurring basis, create a schedule rather than a deployment directly.

See Schedules for details on creating and managing scheduled deployments.

Using the mantisctl deployment create command. The --solution-id, --sequence-id, --action-id and --environment-id flags are typed as UUIDs, so a slug or a name is rejected by the CLI before a request is made. Only --target takes free-form strings.

Terminal window
# Deploy a solution to an environment (parallel mode by default). Targets are
# required: the environment scopes the deployment, it does not supply them.
mantisctl deployment create \
--solution-id 019b8c41-7a52-8e39-9d10-4f2b6c83a501 \
--source-version 1.3.0 \
--environment-id 019b8c41-9f0d-8a74-b2c6-71e3d8f4a922 \
--target 019b8c41-c3a1-8b55-9e07-5d1f2a6b4c88
# Deploy a sequence to specific targets
mantisctl deployment create \
--sequence-id 019b8c42-1e88-8b05-9a3f-5c7d21e60b48 \
--source-version 2.0.0 \
--target 019b8c42-4b31-8d6c-8e70-93a15f2c7d10 \
--target 019b8c42-6c9a-8f21-b458-2d70e9a31c85
# Deploy an action with a variable
mantisctl deployment create \
--action-id 019b8c43-0d17-8c94-a6b2-8f31c50d7e26 \
--source-version 1.0.0 \
--target 019b8c42-4b31-8d6c-8e70-93a15f2c7d10 \
--var check_url=http://localhost/health

A --var value is visible to every local user in the process list, so pass secrets in a file of key=value lines instead: --var-file ./deploy.vars (blank lines and # comments are skipped, and --var flags override the file). --var-file - reads the lines from standard input, so a secret never has to be written to disk: vault kv get -field=vars secret/deploy | mantisctl deployment create ... --var-file -.

To deploy a solution by the slug the Nickel files and the UI show, use the top-level mantisctl deploy instead — it resolves the solution and environment slugs and then takes the same path (a UUID is accepted here unchanged too):

Terminal window
mantisctl deploy customer-portal --env production --source-version 1.3.0 \
--target 019b8c41-c3a1-8b55-9e07-5d1f2a6b4c88

Sequences and actions have no slug form; they stay on deployment create.

Before deploying to production:

  • Tested in lower environments
  • Variable values configured for target environment
  • All targets are online
  • No deployment freeze is active
  • Team is available to monitor
  • Rollback plan is ready

Cause: A tenant was set but no environment was chosen — a tenant deployment requires both

Solution: Pick an environment in the Context step before creating the deployment

Cause: Requested version doesn’t exist or is archived

Solution: Check available versions in the solution/sequence

Cause: A deployment freeze is active

Solution: Wait for freeze to end or request override