Tenant Manager¶
The Tenant Manager (cbtenant) is the central orchestration system for Campaign Brain.
Features¶
- Tenant Lifecycle Management: Create, deploy, upgrade, and delete tenants
- Service Management: Start, stop, restart tenant services
- Port Allocation: Automatic port assignment with conflict detection
- Version Control: Track deployed versions, manage upgrades
- Health Monitoring: Check tenant service status
Quick Reference¶
API Endpoints¶
| Endpoint | Method | Description |
|---|---|---|
/api/tenants |
GET | List all tenants |
/api/tenants |
POST | Create new tenant |
/api/tenants/{id} |
GET | Get tenant details |
/api/tenants/{id} |
DELETE | Delete tenant |
/api/tenants/{id}/deploy |
POST | Deploy tenant |
/api/tenants/{id}/upgrade |
POST | Upgrade tenant |
/api/tenants/{id}/version |
GET | Check version status |
/api/tenants/{id}/services/start |
POST | Start services |
/api/tenants/{id}/services/stop |
POST | Stop services |
/api/tenants/{id}/services/restart |
POST | Restart services |
/api/tenants/{id}/services/status |
GET | Check service status |
Common Operations¶
Get Auth Token¶
List Tenants¶
Check Tenant Version¶
Upgrade Tenant¶
curl -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"target_version": "v0.3.0", "backup_db": true}' \
http://localhost:32201/api/tenants/{id}/upgrade
Dashboard¶
Access the web dashboard at http://localhost:32200
Features:
- Tenant overview with health status
- One-click deployment and upgrades
- Service management
- Log viewing