Skip to content

Creating Solutions

This guide walks you through creating solutions that bundle sequences for deployment across environments.

Make sure you have:

  • At least one published sequence to include
  • Understanding of your deployment pipeline
  • Environments configured in your system
  1. Open Lens in your browser
  2. Click Solutions in the sidebar
  3. Click New Solution
FieldDescriptionExample
NameUnique identifiercustomer-portal
Initial VersionStarting version1.0.0
  1. Click Add Sequence
  2. Select a sequence from the dropdown
  3. Specify the version requirement
  4. Click Add
┌─────────────────────────────────────────────────────────┐
│ Add Sequence │
├─────────────────────────────────────────────────────────┤
│ │
│ Sequence: [deploy-backend ▼] │
│ │
│ Version Requirement: [^1.0.0 ] │
│ │
│ Preview: Matches 1.0.0, 1.2.0, 1.5.3 │
│ │
│ [Cancel] [Add] │
└─────────────────────────────────────────────────────────┘

Sequences execute in order. Arrange appropriately:

┌─────────────────────────────────────────────────────────┐
│ Solution Sequences │
├─────────────────────────────────────────────────────────┤
│ │
│ 1. [≡] run-migrations (^1.0.0) [↑] [↓] [✕] │
│ 2. [≡] deploy-backend (^2.0.0) [↑] [↓] [✕] │
│ 3. [≡] deploy-frontend (^1.0.0) [↑] [↓] [✕] │
│ 4. [≡] warmup-caches (^1.0.0) [↑] [↓] [✕] │
│ │
│ [+ Add Sequence] │
│ │
└─────────────────────────────────────────────────────────┘

Click Create Solution to save. You will be redirected to the solution detail page.

Step 6: Configure Variable Templates (Optional)

Section titled “Step 6: Configure Variable Templates (Optional)”

Variables that differ per environment are defined through the Variable Sets UI (or the variables API), not on the solution page — the solution header action bar is only Promote / Edit / Delete, and there is no “Variable Templates” button. Create the variable in a variable set and scope it with scope_solution_id (and scope_environment_id for per-environment values).

The create form has two cards — Basic Information and Sequences — followed by the action bar.

┌─────────────────────────────────────────────────────────┐
│ Create Solution │
├─────────────────────────────────────────────────────────┤
│ Basic Information │
│ ───────────────────────────────────────────────────── │
│ Name: [customer-portal ] │
│ Version: [1.0.0 ] │
├─────────────────────────────────────────────────────────┤
│ Sequences │
│ ───────────────────────────────────────────────────── │
│ ┌─────┬─────────────────────┬────────────┬─────────┐ │
│ │ # │ Sequence │ Version │ Actions │ │
│ ├─────┼─────────────────────┼────────────┼─────────┤ │
│ │ 1 │ run-migrations │ ^1.0.0 │ [↑][↓][✕]│ │
│ │ 2 │ deploy-backend │ ^2.0.0 │ [↑][↓][✕]│ │
│ │ 3 │ deploy-frontend │ ^1.0.0 │ [↑][↓][✕]│ │
│ └─────┴─────────────────────┴────────────┴─────────┘ │
│ │
│ [+ Add Sequence] │
│ │
│ [Cancel] [Create Solution] │
└─────────────────────────────────────────────────────────┘
SequenceVersionPurpose
database-migration^1.0.0Update database schema
deploy-api^2.0.0Deploy API services
deploy-web^1.0.0Deploy web frontend
invalidate-cdn^1.0.0Clear CDN cache
SequenceVersionPurpose
deploy-gateway^1.0.0API Gateway
deploy-auth-service^1.0.0Authentication service
deploy-user-service^2.0.0User management
deploy-order-service^1.0.0Order processing
health-check-all^1.0.0Verify all services
SequenceVersionPurpose
backup-configs^1.0.0Save current configs
update-certificates^1.0.0Rotate TLS certs
restart-services^1.0.0Apply changes
verify-ssl^1.0.0Confirm TLS working

Your solution is ready to:

  1. Deploy - Execute on target environments
  2. Set variables - environment-specific values via variable sets (scoped with scope_solution_id / scope_environment_id)
  3. Promote - Move through your deployment pipeline

Consider dependencies when ordering:

Database-First:

1. database-migration
2. deploy-application

Blue-Green:

1. deploy-to-inactive
2. verify-inactive
3. switch-traffic

Canary:

1. deploy-canary
2. monitor-canary
3. deploy-full

Before saving, Mantis validates:

CheckDescription
Sequences existAll referenced sequences are available
Versions availableMatching versions exist for requirements
Slug uniquenessNo other solution with the same name or equivalent slug (the name is auto-converted to a URL-safe slug)
Valid version formatSemantic version format

One solution = one deployable unit:

GoodBad
payment-serviceall-services
customer-portalq4-release
api-gatewayeverything

Names should describe what’s being deployed:

Good: customer-portal, order-api, analytics-dashboard
Bad: app1, solution-v2, new-thing

Begin with 1.0.0 and increment meaningfully:

1.0.0 - Initial release
1.1.0 - Added monitoring sequence
2.0.0 - Major architecture change

Add descriptions to help operators understand:

Variable: database_host
Label: Database Hostname
Help: Primary PostgreSQL server hostname

Cause: Sequence has no versions yet

Solution: Add at least one version to the sequence before including it in a solution

Cause: No versions match the requirement

Solution: Use a broader requirement (e.g., ^1.0.0 instead of =1.5.3)

Cause: Some UIs prevent duplicate sequences

Solution: This is expected behavior; use one reference per sequence