Skip to content

Tenants

Organize deployments by customer, region, or business unit.

A tenant represents a logical grouping for deployments:

Use CaseTenant Strategy
Multi-customer SaaSOne tenant per customer
Geographic regionsOne tenant per region (US, EU, APAC)
Business unitsOne tenant per department
Deployment tiersOne tenant per tier (Standard, Premium)
PropertyRequiredDescription
NameYesUnique identifier
DescriptionNoHuman-readable description
Logo URLNoBrand logo for UI display
Contact EmailNoPrimary contact

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)

Tenants are authorized for specific solutions in environments:

Tenant: Acme Corp
├── customer-portal (Production, Staging)
├── auth-service (Production, Staging)
└── billing-api (Production only)

Two types of tenant-specific variables:

TypeDescription
Template VariablesValues for solution-defined templates
Common VariablesShared key-value pairs across solutions
┌─────────────────────────────────────────────────────────────┐
│ 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 │ │
│ └───────────────┴──────────────┴──────────┴─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ 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] │
│ │
└─────────────────────────────────────────────────────────────┘

When deploying to a tenant:

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 value

Tenants provide logical separation:

┌────────────────────────────────────────────────────────────────┐
│ Mantis Platform │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Acme Corp │ │ Beta Inc │ │
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
│ │ │ Targets │ │ │ │ Targets │ │ Isolated │
│ │ └──────────┘ │ │ └──────────┘ │ per tenant │
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
│ │ │ Variables│ │ │ │ Variables│ │ │
│ │ └──────────┘ │ │ └──────────┘ │ │
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
│ │ │ History │ │ │ │ History │ │ │
│ │ └──────────┘ │ │ └──────────┘ │ │
│ └──────────────────┘ └──────────────────┘ │
│ │
│ Shared: Solutions, Actions, Sequences, Environments │
└────────────────────────────────────────────────────────────────┘
  1. Navigate to Tenants in the sidebar
  2. Click New Tenant
  3. Enter tenant details
  4. Click Create
Terminal window
mantisctl tenant create \
--name "Acme Corp" \
--description "Enterprise customer" \
--email "admin@acme.com"

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

Define your tenant model before deployment:

QuestionConsideration
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
GoodAvoid
Acme Corpacme, ACME, acme-corp
US-East Regionuse1, region1
Enterprise Tiertier-1, ent

Record what each tenant represents:

Tenant: EU-West
Purpose: European customers (GDPR compliance)
Targets: eu-west-* servers
Contact: eu-ops@company.com
Special requirements: Data residency

Audit tenants periodically:

  • Remove unused tenants
  • Update contact information
  • Verify target assignments
  • Check variable values

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

Cause: Required variables not set for tenant

Solution: Set tenant variable values before deployment

Cause: Target assigned to wrong tenant or environment

Solution: Verify target-tenant-environment assignments