此内容没有您所选择的语言版本。
Chapter 2. Activating the Llama Stack Operator
You can activate the Llama Stack Operator on your OpenShift cluster by setting its managementState to Managed in the OpenShift AI Operator DataScienceCluster custom resource (CR). This setting enables Llama-based model serving without reinstalling or directly editing Operator subscriptions. You can edit the CR in the OpenShift web console or by using the OpenShift CLI (oc).
As an alternative to following the steps in this procedure, you can activate the Llama Stack Operator from the OpenShift CLI (oc) by running the following command:
oc patch datasciencecluster <name> --type=merge -p {"spec":{"components":{"llamastackoperator":{"managementState":"Managed"}}}}
$ oc patch datasciencecluster <name> --type=merge -p {"spec":{"components":{"llamastackoperator":{"managementState":"Managed"}}}}
Replace <name> with your DataScienceCluster name, for example, default-dsc.
Prerequisites
- You have installed OpenShift 4.17 or newer.
- You have cluster administrator privileges.
You have installed the OpenShift CLI (
oc) as described in the appropriate documentation for your cluster:- Installing the OpenShift CLI for OpenShift Container Platform
- Installing the OpenShift CLI for Red Hat OpenShift Service on AWS
- You have installed the Red Hat OpenShift AI Operator on your cluster.
-
You have a
DataScienceClustercustom resource in your environment; the default isdefault-dsc. -
Your infrastructure supports GPU-enabled instance types, for example,
g4dn.xlargeon AWS. - You have enabled GPU support in OpenShift AI, including installing the Node Feature Discovery Operator and NVIDIA GPU Operator. For more information, see Installing the Node Feature Discovery Operator and Enabling NVIDIA GPUs.
-
You have created a
NodeFeatureDiscoveryresource instance on your cluster, as described in Installing the Node Feature Discovery Operator and creating a NodeFeatureDiscovery instance in the NVIDIA documentation. -
You have created a
ClusterPolicyresource instance with default values on your cluster, as described in Creating the ClusterPolicy instance in the NVIDIA documentation.
Procedure
- Log in to the OpenShift web console as a cluster administrator.
-
In the Administrator perspective, click Operators
Installed Operators. - Click the Red Hat OpenShift AI Operator to open its details.
- Click the Data Science Cluster tab.
-
On the DataScienceClusters page, click the
default-dscobject. Click the YAML tab.
An embedded YAML editor opens, displaying the configuration for the
DataScienceClustercustom resource.In the YAML editor, locate the
spec.componentssection. If thellamastackoperatorfield does not exist, add it. Then, set themanagementStatefield toManaged:spec: components: llamastackoperator: managementState: Managedspec: components: llamastackoperator: managementState: ManagedCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Click Save to apply your changes.
Verification
After you activate the Llama Stack Operator, verify that it is running in your cluster:
-
In the OpenShift web console, click Workloads
Pods. -
From the Project list, select the
redhat-ods-applicationsnamespace. -
Confirm that a pod with the label
app.kubernetes.io/name=llama-stack-operatoris displayed and has a status of Running.