Chapter 1. Llama Stack to OGX migration
Starting in OpenShift AI version 3.5EA1, Llama Stack is being fully renamed to OGX. This creates breaking changes in any applications created with the Llama Stack Operator.
The following charts show the naming changes of the components, environment variables, and field changes.
| Component | Previous name | New name |
|---|---|---|
| API Group |
|
|
| API Version |
|
|
| Kind |
|
|
| Plural |
|
|
| Short Name |
|
|
| Container Name |
|
|
| App Label |
|
|
| Managed-by |
|
|
| Watch Label |
|
|
| Mount Path |
|
|
| Leader Election ID |
|
|
| Previous name | New name | Additional details |
|---|---|---|
|
|
| Container port for the server |
|
|
| Number of uvicorn worker processes |
|
|
| Path to the server config file |
| Old Path | New Path |
|---|---|
|
|
|
|
|
|
The following YAML examples display the changes in specifications. For example: OGXServer CRs, network configurations, and workload configurations.
Workload Configuration
Previous workload configuration (flat on spec):
spec:
replicas: 2
server:
distribution:
name: rh-dev
containerSpec:
env:
- name: MY_VAR
value: "hello"
storage:
size: "20Gi"
New workload configuration (grouped under spec.workload):
spec:
distribution:
name: rh-dev
workload:
replicas: 2
storage:
size: "20Gi"
overrides:
env:
- name: MY_VAR
value: "hello"
Network Configurations
Previous network configurations (spec.network):
spec:
network:
exposeRoute: true
allowedFrom:
namespaces: ["my-app"]
labels: ["team=frontend"]
New network configurations(spec.network):
spec:
network:
externalAccess:
enabled: true
policy:
enabled: true
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: my-app
- namespaceSelector:
matchLabels:
team: frontend
ports:
- protocol: TCP
port: 8321
1.1. Migrating from Llama Stack to OGX Copy linkLink copied to clipboard!
In order to migrate to the newly named ogx-operator, you must remove the Llama Stack Operator and create new OGXServer custom resources (CRs).
Prerequisites
- You have the Llama Stack Operator installed on your OpenShift AI cluster.
-
You have custom
LlamaStackDistributionapplications. - You have cluster administrator permissions.
-
You have installed the OpenShift CLI (
oc).
Procedure
Remove the Llama Stack Operator from your environment. You can remove the Llama Stack Operator by setting the component spec:
$ dsc.spec.components.lls = "Removed"Install the new OGX operator by setting the component spec:
$ dsc.spec.components.ogx = "Managed"Create the
OGXServercustom resource (CR).apiVersion: ogx.io/v1beta1 kind: OGXServer metadata: name: my-server spec: distribution: name: rh-dev workload: replicas: 1 storage: size: "20Gi" overrides: env: - name: OLLAMA_INFERENCE_MODEL value: "llama3.2:1b" - name: OLLAMA_URL value: "http://ollama-server-service.ollama-dist.svc.cluster.local:11434"Apply the
OGXServerCR to the cluster:$ oc apply -f ogxserver.yaml
Verification
Verify the pod deployment with the following command:
# Check the new CRD is registered $ oc get crd ogxservers.ogx.io # List OGXServer resources $ oc get ogxserver # Check conditions for adoption status $ oc get ogxserver my-server -o jsonpath='{.status.conditions}' # Verify the server is ready $ oc get ogxserver my-server -o jsonpath='{.status.phase}'You can then clean up the legacy resources when the new OGXServer is verified.
Remove the
LlamaStackDistributionCR resources:$ oc delete llamastackdistribution <old-llsd-name> -n <namespace>
(Optional) Adopting existing PVC.
To preserve existing data by adopting the PVC from the old
LlamaStackDistribution, set theannotationsparameter similar to the following:metadata: annotations: ogx.io/adopt-storage: "<old-llsd-name>"The operator strips the old
ownerReffrom the PVC and labels it for discovery. The adopted PVC intentionally has noownerReferenceto the OGXServer.
(Optional) Adopting existing Service and Ingress
To preserve ClusterIP and external endpoints, set the
annotationssimilar to the following:metadata: annotations: ogx.io/adopt-storage: "<old-llsd-name>" ogx.io/adopt-networking: "<old-llsd-name>"
The operator adopts the orphaned Service + Ingress, replaces Service selectors with new pod labels: app: ogx, app.kubernetes.io/instance: <name>, and sets ownerReferences.