MATIH Platform is in active MVP development. Documentation reflects current implementation status.
7. Tenant Lifecycle
Provisioning
Overview

Provisioning System

The MATIH provisioning system transforms a newly created tenant from PENDING status into a fully operational data platform with isolated Kubernetes namespaces, deployed services, DNS zones, ingress controllers, monitoring, and compliance policies. The system consists of 56 ordered provisioning steps organized into 9 phases.


Architecture

The provisioning system has two layers:

  1. ProvisioningOrchestrator -- Manages the high-level state machine and branches between FREE tier (shared cluster) and PROFESSIONAL/ENTERPRISE tier (dedicated infrastructure) flows
  2. ProvisioningService -- Executes individual provisioning steps sequentially, handles retries, and manages rollback

Provisioning Phases

PhaseStepsDescription
0 - Validation1-2Input validation and quota checks
1 - Control Plane3-6Tenant record, admin user, roles, API keys
2 - Kubernetes7-13Namespace, resource quotas, RBAC, network policies
3 - Cloud Storage14-20Storage accounts, key vaults, managed identities
4 - Data Infrastructure21-25Databases, caches, vector stores, search indices, message topics
5 - Services26-4213 data plane service deployments + ingress + DNS
6 - Observability43-48Monitoring, audit logging, identity provider, billing, compliance
7 - Cloud Infrastructure49-54Terraform provisioning, cloud AI services
8 - Finalization55-56Welcome email and tenant activation

Two-Tier Provisioning

The orchestrator branches based on the tenant tier:

FREE tier (shared cluster):

  1. Allocate namespace in shared cluster
  2. Configure resource quotas
  3. Deploy services to namespace
  4. Verify connectivity
  5. Complete provisioning

PROFESSIONAL/ENTERPRISE tier (dedicated infrastructure):

  1. Validate service principal credentials
  2. Acquire Terraform state lock
  3. Provision infrastructure via Terraform
  4. Create Kubernetes resources
  5. Deploy services to dedicated cluster
  6. Verify connectivity
  7. Complete provisioning

Sections

PageDescription
State MachineState machine states, transitions, and error handling
Namespace CreationKubernetes namespace setup, RBAC, quotas
Service DeploymentHelm-based service deployment per tenant
DNS ZonesAzure DNS child zones, NS delegation
Ingress SetupPer-tenant NGINX ingress and TLS
Observability SetupMonitoring stack provisioning
Audit TrailProvisioning audit logging
RollbackRollback procedures and failure handling