Skip to content

Automated Setup

setup-maas.sh is a single script that handles the entire MaaS lifecycle, from operator installation through model deployment and verification.

setup-maas.sh is a single script that handles the entire MaaS lifecycle, from operator installation through model deployment and verification. Each phase is idempotent; re-running skips what’s already done.

Important

This guide is not a replacement for the official Red Hat OpenShift AI Models as a Service documentation (3.5 | 3.4). It is a companion resource with opinionated Kustomize manifests and automation scripts to accelerate deployment.

Clone and Run

git clone https://github.com/rh-aiservices-bu/CAI-Field-Manual-MaaS.git
cd CAI-Field-Manual-MaaS
./scripts/setup-maas.sh
./scripts/setup-maas.sh --rhoai-version 3.4

This runs Phases 0-6 automatically. The script detects what’s already installed and skips completed phases.

Arguments

OptionDescriptionDefault
--model <name>Model to deploy: simulator (CPU), granite-tiny-gpu (small GPU), gemma (mid GPU), gpt-oss-20b (large GPU), qwen3-06b (real CPU, no GPU), auto (auto-detect by GPU VRAM)auto
--rhoai-version <v>RHOAI version: 3.4 or 3.5. Auto-detects if already installed.3.5
--from-phase <N>Start from phase N (0-8), skipping earlier phases0
--skip-modelsSkip Phase 5 (model deployment)
--skip-verifySkip Phase 6 (verification)
--with-observabilityAlso run Phase 7 (COO + Gateway telemetry)
--with-external-modelsAlso run Phase 8 (ExternalModel deployment via OpenAI, Gemini, or Bedrock)
--dry-runPreview what would be applied without making changes

Phases

PhaseWhat it doesTime
0Preflight - detect cluster state, decide which phases to runinstant
1Operators - oc apply -k manifests/01-prerequisites/operators/, wait for CSVs2-5 min
2Platform - Kuadrant, UWM, GatewayClass, envsubst Gateway2-5 min
3MaaS Platform - PostgreSQL secrets/deployment2-3 min
4RHOAI - DSC with modelsAsService: Managed, Dashboard flags, wait for maas-api3-5 min
5Model - auto-detect GPU, apply Kustomize, wait for Ready0.5-15 min
6Verify - 6-phase E2E (API, auth, rate limits, cleanup)3-5 min
7Observability - COO subscription + Gateway TelemetryPolicy2-3 min
8External Models - ExternalModel CRs + MaaS governance (only with --with-external-models)5-10 min

Common Usage Patterns

For a fresh cluster with no MaaS components:

./scripts/setup-maas.sh

With observability

./scripts/setup-maas.sh --with-observability

Resume from a specific phase

If a previous run failed at Phase 4:

./scripts/setup-maas.sh --from-phase 4

Models only

If the platform is already installed and you just want to deploy a model:

./scripts/setup-maas.sh --from-phase 5

Or use the standalone model script for more control:

./scripts/deploy-model.sh --model simulator

With external OIDC authentication

After the base installation, add Keycloak-based OIDC authentication so users can access MaaS with their corporate credentials instead of OpenShift tokens:

# Deploy Keycloak + configure MaaS for OIDC
./manifests/09-external-oidc/setup-keycloak.sh

# Verify the OIDC flow (tokens, API keys, inference, group access)
./manifests/09-external-oidc/test-external-oidc.sh

See Phase 9: External OIDC Authentication for the full manual walkthrough and Bring Your Own IdP instructions.

Verify only

./scripts/setup-maas.sh --from-phase 6

Or directly:

./manifests/06-verification/verify.sh

Convenience Scripts

These wrap individual phases for standalone use:

ScriptWhat it does
scripts/deploy-model.shPhase 5 only - deploy a model with GPU auto-detection
scripts/test-inference.shSend inference requests to a deployed model endpoint
scripts/verify-maas.shPhase 6 only - wrapper for manifests/06-verification/verify.sh
manifests/09-external-oidc/setup-keycloak.shPhase 9 - deploy Keycloak + configure OIDC on the MaaS tenant (--cleanup to revert)
manifests/09-external-oidc/test-external-oidc.shPhase 9 verification - 6-test OIDC flow (tokens, API keys, inference, group access)

State Detection

Phase 0 inspects the cluster and reports what’s already installed. The script uses this to skip completed phases:

  • Operators installed? Skip Phase 1.
  • Kuadrant + UWM + Gateway ready? Skip Phase 2.
  • PostgreSQL running? Skip Phase 3.
  • DSC with modelsAsService: Managed + maas-api running? Skip Phase 4.
  • Models deployed in llm namespace? Skip Phase 5.

Override with --from-phase N to force re-running from a specific phase.

AI-Assisted Installation

If you use an AI coding tool (Claude Code, Open Code, Cursor, Roo Code), the /install-maas skill wraps the same script with an interactive, AI-assisted workflow. Clone the repo, open it in your tool, and run:

/install-maas

Or with arguments:

/install-maas --model simulator --with-observability

See AI-Assisted Installation for details.

Final Report

The script ends with a summary: RHOAI version, MaaS API URL, Gateway status, health check, deployed models, and suggested next steps.