Deploy an AI model gateway on OpenShift with High Availability. Give users controlled access to AI models through virtual API keys.
Version: 0.3.0
- Infrastructure Team Guide - Managing models after deployment
- Model Management Role - Dedicated role for model sync
- RHDP Branding - Red Hat Demo Platform branding
- HA Deployment Details - Architecture and configuration reference
- Backup and Disaster Recovery - Automated backups to S3 and restore procedures
- OAuth Login - OpenShift OAuth integration
./deploy-litemaas.sh litellm-rhpdsOr with Ansible directly:
ansible-playbook playbooks/deploy_litemaas_ha.ymlWhat you get:
- 3 LiteLLM replicas (load-balanced)
- Redis caching
- PostgreSQL 16 database
- OAuth login via OpenShift (enabled by default)
- Backend API + Frontend UI
- Admin UI:
https://litellm.<cluster> - User UI:
https://litellm-frontend.<cluster>
./deploy-litemaas.sh litellm-rhpds --rhdpOr with Ansible directly:
ansible-playbook playbooks/deploy_litemaas_ha.yml \
-e ocp4_workload_litemaas_branding_enabled=trueSame as Option 1, plus:
- Red Hat Demo Platform logos (light and dark theme)
- Service attribution footer
- Custom favicon
The deploy-litemaas.sh script automatically:
- Creates and activates Python virtual environment
- Installs Ansible and Kubernetes Python dependencies
- Builds and installs the collection
- Deploys LiteMaaS with your chosen configuration
Prerequisites:
- OpenShift CLI (
oc) installed and logged in - Python 3 installed
jqinstalled (for resource discovery)
# Standard HA deployment
./deploy-litemaas.sh litellm-rhpds
# HA with RHDP branding
./deploy-litemaas.sh litellm-rhpds --rhdp
# Custom replicas
./deploy-litemaas.sh litellm-rhpds --replicas 5
# With OAuth and custom routes
./deploy-litemaas.sh litellm-rhpds --oauth --route-prefix litellm-prod
# Full RHDP production (OAuth + branding + custom routes)
./deploy-litemaas.sh litellm-rhpds --oauth --rhdp --route-prefix litellm-prod
# Remove deployment
./deploy-litemaas.sh litellm-rhpds --remove| Option | Description |
|---|---|
--replicas <count> |
Number of LiteLLM replicas (default: 3) |
--oauth |
Enable OAuth authentication with OpenShift |
--rhdp |
Enable RHDP branding (logos + footer) |
--route-prefix <name> |
Set custom route prefix |
--remove |
Remove existing deployment |
-e <key=value> |
Pass extra variables to Ansible |
When you use --route-prefix <name>, the script automatically sets:
| Route Type | Hostname |
|---|---|
| API | https://<prefix>.apps.cluster.com |
| Admin Backend | https://<prefix>-admin.apps.cluster.com |
| Frontend | https://<prefix>-frontend.apps.cluster.com |
# Standard HA (OAuth enabled by default)
ansible-playbook playbooks/deploy_litemaas_ha.yml
# With RHDP branding
ansible-playbook playbooks/deploy_litemaas_ha.yml \
-e ocp4_workload_litemaas_branding_enabled=true
# Custom namespace and replicas
ansible-playbook playbooks/deploy_litemaas_ha.yml \
-e ocp4_workload_litemaas_namespace=litellm-production \
-e ocp4_workload_litemaas_ha_litellm_replicas=5
# Disable OAuth for testing
ansible-playbook playbooks/deploy_litemaas_ha.yml \
-e ocp4_workload_litemaas_oauth_enabled=falseansible-playbook playbooks/deploy_litemaas_ha.yml \
-e ocp4_workload_litemaas_remove=true| Variable | Default | Description |
|---|---|---|
ocp4_workload_litemaas_namespace |
litemaas |
Deployment namespace |
ocp4_workload_litemaas_version |
0.2.2 |
Container image version |
ocp4_workload_litemaas_ha_litellm_replicas |
3 |
Number of LiteLLM replicas |
| Variable | Default | Description |
|---|---|---|
ocp4_workload_litemaas_oauth_enabled |
true (in playbook) |
Enable OAuth login |
ocp4_workload_litemaas_oauth_provider |
openshift |
OAuth provider |
| Variable | Default | Description |
|---|---|---|
ocp4_workload_litemaas_deploy_backend |
true |
Deploy backend API |
ocp4_workload_litemaas_deploy_frontend |
true |
Deploy frontend UI |
ocp4_workload_litemaas_branding_enabled |
false |
Enable RHDP branding |
| Variable | Default | Description |
|---|---|---|
ocp4_workload_litemaas_postgres_storage_class |
auto-detect | Storage class |
ocp4_workload_litemaas_postgres_storage_size |
10Gi |
PostgreSQL PVC size |
See roles/ocp4_workload_litemaas/defaults/main.yml and roles/ocp4_workload_litemaas/defaults/ha.yml for all variables.
- AI model gateway providing unified API for multiple AI providers
- Includes admin web UI for managing models and creating user keys
- REST API layer handling OAuth authentication
- User management and session handling
- User-facing web interface for browsing models and making API calls
- Login with OpenShift credentials
- Persistent database for LiteLLM configuration and user data
- Caching layer for improved performance and reduced latency
Pre-configure models during deployment:
ansible-playbook playbooks/deploy_litemaas_ha.yml \
-e '{
"ocp4_workload_litemaas_litellm_models": [
{
"model_name": "granite-3-8b",
"litellm_model": "openai/granite-3-2-8b-instruct",
"api_base": "https://granite-model.apps.cluster.com/v1",
"api_key": "sk-xxxxx",
"rpm": 120,
"tpm": 100000
}
]
}'# Add models via LiteLLM admin UI, then sync to backend
./sync-models.sh litellm-rhpdsSee docs/INFRA_TEAM_GUIDE.md for detailed instructions.
- CPU: ~3 cores request, ~5 cores limit
- Memory: ~4Gi request, ~6Gi limit
- Storage: 10Gi (PostgreSQL)
git clone https://github.com/rhpds/rhpds.litemaas.git
cd rhpds.litemaas
ansible-galaxy collection build --force
ansible-galaxy collection install rhpds-litemaas-*.tar.gz --forceOr use ./deploy-litemaas.sh which handles everything automatically.
# Get admin URL
echo "Admin UI: https://$(oc get route litellm -n litemaas -o jsonpath='{.spec.host}')"
# Get frontend URL
echo "Frontend: https://$(oc get route litellm-frontend -n litemaas -o jsonpath='{.spec.host}')"
# Login with OpenShift credentials (if OAuth enabled)# In common.yaml
workloads:
- rhpds.litemaas.ocp4_workload_litemaas
# HA configuration
ocp4_workload_litemaas_ha_litellm_replicas: 3
ocp4_workload_litemaas_oauth_enabled: true
ocp4_workload_litemaas_deploy_backend: true
ocp4_workload_litemaas_deploy_frontend: true
# Optional: RHDP branding
ocp4_workload_litemaas_branding_enabled: trueCheck redirect URIs match:
oc get oauthclient litemaas -o yamlShould show both:
https://litellm.<cluster>/api/auth/callbackhttps://litellm-frontend.<cluster>/api/auth/callback
oc logs deployment/litellm-backend -n litemaas# Check PostgreSQL logs
oc logs -n litemaas -l app=litellm-postgres
# Check migration logs
oc logs deployment/litellm-backend -n litemaas -c run-migrationsoc get pods -n litemaas
oc get events -n litemaas --sort-by='.lastTimestamp'Prakhar Srivastava Manager, Technical Marketing - Red Hat Demo Platform Red Hat
MIT