Tenants
Organize deployments by customer, region, or business unit.
What is a Tenant?
Section titled “What is a Tenant?”A tenant represents a logical grouping for deployments:
Common Use Cases
Section titled “Common Use Cases”| Use Case | Tenant Strategy |
|---|---|
| Multi-customer SaaS | One tenant per customer |
| Geographic regions | One tenant per region (US, EU, APAC) |
| Business units | One tenant per department |
| Deployment tiers | One tenant per tier (Standard, Premium) |
Tenant Properties
Section titled “Tenant Properties”| Property | Required | Description |
|---|---|---|
| Name | Yes | Unique identifier |
| Description | No | Human-readable description |
| Logo URL | No | Brand logo for UI display |
| Contact Email | No | Primary contact |
What Tenants Contain
Section titled “What Tenants Contain”Assigned Targets
Section titled “Assigned Targets”Targets can be assigned to specific tenants:
Tenant: Acme Corp├── acme-web-01 (Production)├── acme-web-02 (Production)├── acme-api-01 (Staging)└── acme-db-01 (Production)Solution Access
Section titled “Solution Access”Tenants are authorized for specific solutions in environments:
Tenant: Acme Corp├── customer-portal (Production, Staging)├── auth-service (Production, Staging)└── billing-api (Production only)Variables
Section titled “Variables”Two types of tenant-specific variables:
| Type | Description |
|---|---|
| Template Variables | Values for solution-defined templates |
| Common Variables | Shared key-value pairs across solutions |
Tenant List View
Section titled “Tenant List View”┌─────────────────────────────────────────────────────────────┐│ Tenants │├─────────────────────────────────────────────────────────────┤│ ││ Search: [____________________________] [+ New Tenant] ││ ││ ┌───────────────┬──────────────┬──────────┬─────────────┐ ││ │ Name │ Description │ Targets │ Solutions │ ││ ├───────────────┼──────────────┼──────────┼─────────────┤ ││ │ Acme Corp │ Enterprise │ 12 │ 4 │ ││ │ Beta Inc │ SMB customer │ 4 │ 2 │ ││ │ Gamma LLC │ Startup │ 2 │ 1 │ ││ │ Delta Co │ New client │ 0 │ 0 │ ││ └───────────────┴──────────────┴──────────┴─────────────┘ ││ │└─────────────────────────────────────────────────────────────┘Tenant Detail View
Section titled “Tenant Detail View”┌─────────────────────────────────────────────────────────────┐│ Acme Corp │├─────────────────────────────────────────────────────────────┤│ ││ Description: Enterprise customer since 2020 ││ Contact: admin@acme.com ││ Created: January 15, 2024 ││ ││ ───────────────────────────────────────────────────────── ││ ││ [Targets] [Solutions] [Variables] [Tags] ││ ││ ┌───────────────────────────────────────────────────────┐ ││ │ Assigned Targets (12) │ ││ │ │ ││ │ acme-web-01 ● Online Production │ ││ │ acme-web-02 ● Online Production │ ││ │ acme-api-01 ● Online Staging │ ││ │ ... │ ││ └───────────────────────────────────────────────────────┘ ││ ││ [Edit] [Delete] ││ │└─────────────────────────────────────────────────────────────┘How Tenants Work in Deployments
Section titled “How Tenants Work in Deployments”When deploying to a tenant:
Variable Resolution
Section titled “Variable Resolution”Variables are resolved with tenant values:
Deployment: customer-portal to Acme Corp (Production)
Variable Resolution Order (later overrides earlier):1. Solution defaults: database_host = "localhost"2. Template variables: database_host = "db.template.com"3. Common variables: database_host = "db.acme.com" ← Final valueData Isolation
Section titled “Data Isolation”Tenants provide logical separation:
┌────────────────────────────────────────────────────────────────┐│ Mantis Platform ││ ┌──────────────────┐ ┌──────────────────┐ ││ │ Acme Corp │ │ Beta Inc │ ││ │ ┌──────────┐ │ │ ┌──────────┐ │ ││ │ │ Targets │ │ │ │ Targets │ │ Isolated ││ │ └──────────┘ │ │ └──────────┘ │ per tenant ││ │ ┌──────────┐ │ │ ┌──────────┐ │ ││ │ │ Variables│ │ │ │ Variables│ │ ││ │ └──────────┘ │ │ └──────────┘ │ ││ │ ┌──────────┐ │ │ ┌──────────┐ │ ││ │ │ History │ │ │ │ History │ │ ││ │ └──────────┘ │ │ └──────────┘ │ ││ └──────────────────┘ └──────────────────┘ ││ ││ Shared: Solutions, Actions, Sequences, Environments │└────────────────────────────────────────────────────────────────┘Creating a Tenant
Section titled “Creating a Tenant”Via Lens UI
Section titled “Via Lens UI”- Navigate to Tenants in the sidebar
- Click New Tenant
- Enter tenant details
- Click Create
Via CLI
Section titled “Via CLI”mantisctl tenant create \ --name "Acme Corp" \ --description "Enterprise customer" \ --email "admin@acme.com"Managing Tenant Resources
Section titled “Managing Tenant Resources”Target-to-tenant assignment and solution authorization are managed in Lens (or
via the REST API); they are not exposed as mantisctl tenant subcommands. Use
the tenant and target detail views in Lens to:
- Assign targets to a tenant and scope them to an environment
- Authorize (or revoke) which solutions a tenant may deploy per environment
Best Practices
Section titled “Best Practices”1. Plan Tenant Strategy Early
Section titled “1. Plan Tenant Strategy Early”Define your tenant model before deployment:
| Question | Consideration |
|---|---|
| What does a tenant represent? | Customer, region, business unit |
| How many tenants expected? | Impacts management overhead |
| Variable overlap? | Use common variables if shared |
| Isolation requirements? | Strict or soft boundaries |
2. Use Consistent Naming
Section titled “2. Use Consistent Naming”| Good | Avoid |
|---|---|
Acme Corp | acme, ACME, acme-corp |
US-East Region | use1, region1 |
Enterprise Tier | tier-1, ent |
3. Document Tenant Purpose
Section titled “3. Document Tenant Purpose”Record what each tenant represents:
Tenant: EU-WestPurpose: European customers (GDPR compliance)Targets: eu-west-* serversContact: eu-ops@company.comSpecial requirements: Data residency4. Review Regularly
Section titled “4. Review Regularly”Audit tenants periodically:
- Remove unused tenants
- Update contact information
- Verify target assignments
- Check variable values
Troubleshooting
Section titled “Troubleshooting”Deployment Fails: “Not authorized for tenant”
Section titled “Deployment Fails: “Not authorized for tenant””Cause: User lacks permission for the tenant
Solution: Check user permissions or contact admin
Missing Variables During Deployment
Section titled “Missing Variables During Deployment”Cause: Required variables not set for tenant
Solution: Set tenant variable values before deployment
Wrong Targets Deployed To
Section titled “Wrong Targets Deployed To”Cause: Target assigned to wrong tenant or environment
Solution: Verify target-tenant-environment assignments
Next Steps
Section titled “Next Steps”- Tenant Context - Working within tenant scope
- Tenant Variables - Configure tenant-specific values
- Switching Tenants - Change tenant context
