Creating Solutions
This guide walks you through creating solutions that bundle sequences for deployment across environments.
Before You Begin
Section titled “Before You Begin”Make sure you have:
- At least one published sequence to include
- Understanding of your deployment pipeline
- Environments configured in your system
Creating a Solution
Section titled “Creating a Solution”Step 1: Navigate to Solutions
Section titled “Step 1: Navigate to Solutions”- Open Lens in your browser
- Click Solutions in the sidebar
- Click New Solution
Step 2: Basic Information
Section titled “Step 2: Basic Information”| Field | Description | Example |
|---|---|---|
| Name | Unique identifier | customer-portal |
| Initial Version | Starting version | 1.0.0 |
Step 3: Add Sequences
Section titled “Step 3: Add Sequences”- Click Add Sequence
- Select a sequence from the dropdown
- Specify the version requirement
- 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] │└─────────────────────────────────────────────────────────┘Step 4: Order Sequences
Section titled “Step 4: Order Sequences”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] ││ │└─────────────────────────────────────────────────────────┘Step 5: Create the Solution
Section titled “Step 5: Create the Solution”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:
- Open the solution from the Solutions list
- Click the Variable Templates button in the solution header action bar
- Click Add Variable Template
- Configure the template and click Save
Solution Editor Interface
Section titled “Solution Editor Interface”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] │└─────────────────────────────────────────────────────────┘Example Solutions
Section titled “Example Solutions”Web Application
Section titled “Web Application”| Sequence | Version | Purpose |
|---|---|---|
database-migration | ^1.0.0 | Update database schema |
deploy-api | ^2.0.0 | Deploy API services |
deploy-web | ^1.0.0 | Deploy web frontend |
invalidate-cdn | ^1.0.0 | Clear CDN cache |
Microservices Suite
Section titled “Microservices Suite”| Sequence | Version | Purpose |
|---|---|---|
deploy-gateway | ^1.0.0 | API Gateway |
deploy-auth-service | ^1.0.0 | Authentication service |
deploy-user-service | ^2.0.0 | User management |
deploy-order-service | ^1.0.0 | Order processing |
health-check-all | ^1.0.0 | Verify all services |
Infrastructure Update
Section titled “Infrastructure Update”| Sequence | Version | Purpose |
|---|---|---|
backup-configs | ^1.0.0 | Save current configs |
update-certificates | ^1.0.0 | Rotate TLS certs |
restart-services | ^1.0.0 | Apply changes |
verify-ssl | ^1.0.0 | Confirm TLS working |
After Creation
Section titled “After Creation”Your solution is ready to:
- Deploy - Execute on target environments
- Configure Variables - Set environment-specific values
- Promote - Move through your deployment pipeline
Sequence Ordering
Section titled “Sequence Ordering”Order Considerations
Section titled “Order Considerations”Consider dependencies when ordering:
Common Patterns
Section titled “Common Patterns”Database-First:
1. database-migration2. deploy-applicationBlue-Green:
1. deploy-to-inactive2. verify-inactive3. switch-trafficCanary:
1. deploy-canary2. monitor-canary3. deploy-fullValidation
Section titled “Validation”Before saving, Mantis validates:
| Check | Description |
|---|---|
| Sequences exist | All referenced sequences are available |
| Versions available | Matching versions exist for requirements |
| Slug uniqueness | No other solution with the same name or equivalent slug (the name is auto-converted to a URL-safe slug) |
| Valid version format | Semantic version format |
Best Practices
Section titled “Best Practices”1. Keep Solutions Focused
Section titled “1. Keep Solutions Focused”One solution = one deployable unit:
| Good | Bad |
|---|---|
payment-service | all-services |
customer-portal | q4-release |
api-gateway | everything |
2. Use Meaningful Names
Section titled “2. Use Meaningful Names”Names should describe what’s being deployed:
Good: customer-portal, order-api, analytics-dashboardBad: app1, solution-v2, new-thing3. Start with Simple Versions
Section titled “3. Start with Simple Versions”Begin with 1.0.0 and increment meaningfully:
1.0.0 - Initial release1.1.0 - Added monitoring sequence2.0.0 - Major architecture change4. Document Variables
Section titled “4. Document Variables”Add descriptions to help operators understand:
Variable: database_hostLabel: Database HostnameHelp: Primary PostgreSQL server hostnameTroubleshooting
Section titled “Troubleshooting”Sequence Not in Dropdown
Section titled “Sequence Not in Dropdown”Cause: Sequence has no versions yet
Solution: Add at least one version to the sequence before including it in a solution
Version Requirement Too Restrictive
Section titled “Version Requirement Too Restrictive”Cause: No versions match the requirement
Solution: Use a broader requirement (e.g., ^1.0.0 instead of =1.5.3)
Cannot Add Same Sequence Twice
Section titled “Cannot Add Same Sequence Twice”Cause: Some UIs prevent duplicate sequences
Solution: This is expected behavior; use one reference per sequence
Next Steps
Section titled “Next Steps”- Variables - Configure environment-specific values
- Versioning - Manage solution versions
- Promotion Lifecycle - Environment progression
- Overview - Return to solutions overview
