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. Open the Deployment group in the top navigation, then the Solutions pill
  3. Click New Solution
FieldDescriptionExample
NameUnique identifiercustomer-portal
Initial VersionStarting version1.0.0

There is no dialog. Clicking Add Sequence appends a blank row to the list, which you then fill in place:

  1. Click Add Sequence
  2. Pick the sequence from the dropdown in the new row
  3. Set the version requirement in the same row (prefilled ^1.0.0)
┌─────────────────────────────────────────────────────────┐
│ Sequences [+ Add Sequence]│
├─────────────────────────────────────────────────────────┤
│ │
│ 1. [deploy-backend ▼] [^1.0.0 ] [↑][↓][✕] │
│ 2. [ ▼] [^1.0.0 ] [↑][↓][✕] │
│ │
└─────────────────────────────────────────────────────────┘

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, then link that set to the solution with POST /api/v1/solutions/{solution_id}/variable-sets. scope_solution_id is a read-only column, not a request field — CreateVariableRequest is deny_unknown_fields and does not declare it. scope_environment_id IS a real request field and is how per-environment values are scoped.

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_environment_id; solution association comes from linking the set to the solution)
  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: The API refuses two entries that resolve to the same sequence version — “a sequence may only be listed once”. Lens does not pre-filter the list, so the duplicate is only rejected on submit.

Solution: Two entries for one sequence are allowed when their version requirements resolve differently (say =1.0.0 and =2.0.0). Otherwise keep a single reference.