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)”

Variable templates are managed after creation, not within the create form. To define variables that can differ per environment:

  1. Open the solution from the Solutions list
  2. Click the Variable Templates button in the solution header action bar
  3. Click Add Variable Template
  4. Configure the template and click Save

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. Configure Variables - Set environment-specific values
  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