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”Variables scoped to a tenant carry tenant-specific values. There is one variable model (not template/common types), resolved by additive specificity — see Tenant Variables.
Tenant List View
Section titled “Tenant List View”┌─────────────────────────────────────────────────────────────┐│ Tenants │├─────────────────────────────────────────────────────────────┤│ ││ Search: [____________________________] [+ New Tenant] ││ ││ ┌───────────────┬──────────────┬──────────┬─────────────┐ ││ │ Name │ Description │ Contact Email │ Created │ ·· │ ││ ├────────────┼─────────────┼───────────────┼─────────┼────┤ ││ │ Acme Corp │ Enterprise │ ops@acme.com │ Jan 15 │ ·· │ ││ │ Beta Inc │ SMB │ it@beta.com │ Jan 16 │ ·· │ ││ └────────────┴─────────────┴───────────────┴─────────┴────┘ ││ (last column is "Controls"; there is no Targets/Solutions ││ count column on the list) ││ │└─────────────────────────────────────────────────────────────┘Tenant Detail View
Section titled “Tenant Detail View”┌─────────────────────────────────────────────────────────────┐│ Acme Corp │├─────────────────────────────────────────────────────────────┤│ ││ Description: Enterprise customer since 2020 ││ Contact: admin@acme.com ││ Created: January 15, 2024 ││ ││ ───────────────────────────────────────────────────────── ││ ││ [Overview] [Statistics] [Solutions] [Targets] [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)
Candidates for database_host (matching scopes only), highest score wins: global (no scope) score 0 "localhost" tenant=Acme score 200 "db.acme.com" tenant=Acme, environment=Production score 300 "db.acme-prod.com" ← winsData Isolation
Section titled “Data Isolation”Tenants provide logical separation:
┌────────────────────────────────────────────────────────────────┐│ Mantis Platform ││ ┌──────────────────┐ ┌──────────────────┐ ││ │ Acme Corp │ │ Beta Inc │ ││ │ ┌──────────┐ │ │ ┌──────────┐ │ ││ │ │ Targets │ │ │ │ Targets │ │ Isolated ││ │ └──────────┘ │ │ └──────────┘ │ per tenant ││ │ ┌──────────┐ │ │ ┌──────────┐ │ ││ │ │ Variables│ │ │ │ Variables│ │ ││ │ └──────────┘ │ │ └──────────┘ │ ││ │ ┌──────────┐ │ │ ┌──────────┐ │ ││ │ │ History │ │ │ │ History │ │ ││ │ └──────────┘ │ │ └──────────┘ │ ││ └──────────────────┘ └──────────────────┘ ││ ││ Optionally tenant-scoped: Solutions, Actions, Sequences, Envs │└────────────────────────────────────────────────────────────────┘
Solutions, actions, sequences and environments are **optionally** tenant-scoped:each carries a nullable `tenant_id` — `NULL` means global (shared), non-NULL meansowned by that tenant. They are not unconditionally shared.Creating a Tenant
Section titled “Creating a Tenant”Via Lens UI
Section titled “Via Lens UI”- Navigate to Tenancy → Tenants in the top navigation (there is no left 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: cross-tenant or no-tenant access
Section titled “Deployment Fails: cross-tenant or no-tenant access”Cause / errors: Accessing another tenant’s resource returns
404 Tenant not found (existence is not leaked across tenants); a tenant-less
non-admin user gets 403 User account is not associated with a tenant. (There is
no “Not authorized for tenant” error.)
Solution: Use a token scoped to the right tenant, or have an admin assign the user a tenant.
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
