Automates the full RHOAI installation on a ROSA cluster: prerequisites check, pull secret creation, Kyverno setup, CatalogSource, operator installation, and DataScienceCluster creation.
ocandjqinstalled- Logged into an OpenShift cluster with cluster-admin permissions (
oc login) - A container registry auth config with credentials for pulling RHOAI images (defaults to
~/.config/containers/auth.json) - No existing RHOAI/ODH installation on the cluster
./install-rhoai.sh| Flag | Description |
|---|---|
--catalog-image IMAGE |
Custom catalog image (default: quay.io/rhoai/rhoai-fbc-fragment:rhoai-3.4) |
--auth-config PATH |
Path to container registry auth config (default: ~/.config/containers/auth.json) |
--skip-kyverno |
Skip Kyverno installation (if already installed) |
--minimal |
Install only Dashboard, KServe, and Workbenches (saves resources) |
--wait |
Block until the DataScienceCluster reaches Ready state |
--help |
Show help |
All flags can also be set via environment variables: CATALOG_IMAGE, AUTH_CONFIG, SKIP_KYVERNO, MINIMAL_INSTALL, WAIT_READY.
# Default install
./install-rhoai.sh
# Minimal install with a specific catalog image, wait for readiness
./install-rhoai.sh --minimal --wait --catalog-image quay.io/rhoai/rhoai-fbc-fragment:rhoai-3.5
# Skip Kyverno (already installed), custom auth config
./install-rhoai.sh --skip-kyverno --auth-config /path/to/auth.json- Prerequisites check — verifies
oc/jqare available, cluster access, admin permissions, no prior RHOAI install - Pull secret — creates
pull-secret-brewinopenshift-configfrom your auth config - Kyverno — installs Kyverno and creates CRDs for ClusterPolicy/Policy
- Kyverno policies — sets up RBAC and two policies: secret sync (copies the pull secret to every namespace) and imagePullSecret injection (adds the secret to every pod)
- CatalogSource — creates an
rhoai-catalogCatalogSource inopenshift-marketplace - Operator — creates an OperatorGroup and Subscription in
redhat-ods-operator, waits for the CSV to succeed - DataScienceCluster — creates
default-dscwith all components managed (or minimal subset with--minimal) - Wait & optimize — in
--minimalmode, scales down replicas and reduces resource requests; optionally waits for readiness - Summary — prints operator version, pod status, dashboard URL, and useful commands
Deploys a model on RHOAI using KServe InferenceService + vLLM. Supports two storage modes and includes automatic GPU detection and fallback config support.
ocandjqinstalled- Logged into an OpenShift cluster (
oc login) - RHOAI already installed (KServe must be available)
- A
.conffile describing the model (see below)
./deploy-model.sh <config.conf>| Flag | Description |
|---|---|
-d |
Undeploy: delete all resources created by a previous deployment |
--help |
Show help |
A second positional argument can be passed as a fallback config — used if the primary config is not compatible with the cluster (e.g., requires a GPU type not available).
| Variable | Description | Default |
|---|---|---|
MODEL_NAMESPACE |
Target namespace | llm |
CPU_ONLY |
Force CPU-only mode | false |
DEPLOY_OUTPUT_FILE |
Write deployment info (CONFIG_FILE, MODEL_URL, MODEL_NAME) to this file | — |
The mode is auto-detected from the config file:
- ModelCar — Config sets
MODELCAR_IMAGE. The model is pulled as an OCI container image. Usesoci://storage URI. - PVC — Config sets
PVC_NAMEandPVC_SIZE. The model is downloaded from HuggingFace into a PersistentVolumeClaim using a download Job.
Config files are shell-sourced .conf files. Required and optional variables:
Required:
MODEL_DISPLAY_NAME— Human-readable nameMODEL_ID— HuggingFace model identifier (e.g.,ibm-granite/granite-3.3-8b-instruct)ISVC_NAME— Kubernetes InferenceService name
ModelCar mode:
MODELCAR_IMAGE— OCI image URI
PVC mode:
PVC_NAME— PVC namePVC_SIZE— Storage size (e.g.,30Gi)
GPU settings (required when GPU_REQUIRED is not false):
GPU_TYPE— Node instance type (e.g.,g5.2xlarge)GPU_COUNT— Number of GPUs (default:1)TENSOR_PARALLEL— Tensor parallelism degree (default:1)
Resources:
SR_CPU_REQ/SR_CPU_LIMIT— CPU request/limit (defaults:100m/2)SR_MEM_REQ/SR_MEM_LIMIT— Memory request/limit (defaults:2Gi/4Gi)SHM_SIZE— Shared memory size (default:2Gi)
Optional:
GPU_REQUIRED— Set tofalsefor CPU-only (default:true)MODEL_ROLE— Label value:llm,embedding, ormodel(default:model)VLLM_IMAGE— Override vLLM runtime imageVLLM_EXTRA_ENV— Space-separatedKEY=VALUEpairs for extra env varsMAX_MODEL_LEN— Maximum model context lengthMIN_REPLICAS— Minimum pod replicas (default:1)DOWNLOAD_TIMEOUT— HuggingFace download timeout in seconds (default:1200)
# Deploy a GPU model
./deploy-model.sh models/granite-3-3-8b-instruct.conf
# Deploy with a CPU fallback (if the cluster has no matching GPU)
./deploy-model.sh models/granite-3-3-8b-instruct.conf models/granite-3-3-2b-instruct-cpu.conf
# Force CPU-only mode
CPU_ONLY=true ./deploy-model.sh models/granite-3-3-2b-instruct-cpu.conf
# Deploy to a custom namespace
MODEL_NAMESPACE=my-models ./deploy-model.sh models/granite-3-3-8b-instruct.conf
# Undeploy a model (removes InferenceService, ServingRuntime, Secret, PVC/Job)
./deploy-model.sh -d models/granite-3-3-8b-instruct.confMODEL_DISPLAY_NAME="Granite 3.3 8B Instruct"
MODEL_ID="ibm-granite/granite-3.3-8b-instruct"
ISVC_NAME="granite-3-3-8b-instruct"
PVC_NAME="granite-3-3-8b-instruct"
PVC_SIZE="30Gi"
GPU_TYPE="g5.2xlarge"
GPU_COUNT="1"
TENSOR_PARALLEL="1"
MAX_MODEL_LEN="4096"
MIN_REPLICAS="0"
SHM_SIZE="2Gi"
DOWNLOAD_TIMEOUT="1200"MODEL_DISPLAY_NAME="Granite 3.3 2B Instruct (CPU)"
MODEL_ID="ibm-granite/granite-3.3-2b-instruct"
ISVC_NAME="granite-3-3-2b-instruct"
PVC_NAME="granite-3-3-2b-instruct"
PVC_SIZE="10Gi"
GPU_REQUIRED="false"
VLLM_IMAGE="quay.io/pierdipi/vllm-cpu:latest"
SR_CPU_REQ="2"
SR_CPU_LIMIT="6"
SR_MEM_REQ="8Gi"
SR_MEM_LIMIT="20Gi"
MAX_MODEL_LEN="4096"
MIN_REPLICAS="0"
SHM_SIZE="2Gi"
DOWNLOAD_TIMEOUT="600"- Config selection — auto-detects GPU availability, picks primary or fallback config
- Namespace — creates the target namespace (default
llm) with required labels - Skip if exists — if the InferenceService already exists, prints its status and exits
- (PVC mode) Create PVC — provisions storage for the model
- (PVC mode) Download model — runs a Job to download the model from HuggingFace into the PVC
- ServingRuntime — creates a vLLM-based ServingRuntime with the configured resources and GPU/CPU settings
- InferenceService — creates the KServe InferenceService in
RawDeploymentmode - ServiceAccount token — creates a token secret for authentication
- Wait for readiness — waits up to 15 minutes for the model pod to be ready
- Smoke test — calls
/v1/modelson the running pod to verify the model is serving - Summary — prints the model endpoint URL, auth token, and useful commands