From 70b6f065c5410bb39c44613a2e86cc5dbb82e2a1 Mon Sep 17 00:00:00 2001 From: "Nowicki, Mikolaj" Date: Wed, 2 Dec 2026 05:11:53 +0100 Subject: [PATCH 1/2] refactor: rename the erag layer to chatbot Hard rename, no compatibility for existing envs or clusters: repos.chatbot.yaml with layer chatbot, help text, docs, node-scaling guard and unit tests follow. Upgrade docs cover installs of 3.1.0 or later. Signed-off-by: Nowicki, Mikolaj --- README.md | 6 +- .../{repos.erag.yaml => repos.chatbot.yaml} | 10 +- docs/configuration/configuration.md | 4 +- docs/configuration/nri-cpu-balloons.md | 2 +- docs/deployment/install-platform.md | 10 +- docs/deployment/netapp-ontap.md | 24 +- docs/deployment/node-scaling.md | 8 +- docs/deployment/openshift.md | 8 +- docs/deployment/upgrade.md | 89 ++-- .../frequently-asked-questions.md | 2 +- .../troubleshooting.md | 2 +- docs/getting-started/chatbot-toolkit.md | 68 +-- docs/overview/meet.md | 2 +- docs/reference/adding-solutions.md | 4 +- docs/reference/architecture.md | 22 +- docs/reference/cli.md | 32 +- docs/reference/glossary.md | 4 +- docs/reference/labels.md | 6 +- filter_plugins/resolve_components.py | 4 +- run_backup.sh | 8 +- src/tests/unit/test_backup_layer.py | 18 +- src/tests/unit/test_env_repos.py | 24 +- src/tests/unit/test_layer_checks.py | 444 +++++++++--------- src/tests/unit/test_node_scaling_installer.py | 10 +- src/tests/unit/test_ownership_k8s.py | 4 +- src/tests/unit/test_run_backup.py | 6 +- toolkit_manager.sh | 36 +- 27 files changed, 429 insertions(+), 428 deletions(-) rename configs/repos/{repos.erag.yaml => repos.chatbot.yaml} (76%) diff --git a/README.md b/README.md index 56eb8674..633bc754 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The stack is built in **layers**, each on top of the one before. You pick a **ta | 1 | **Infrastructure** | The cluster your machines become | Kubernetes (built with Kubespray) and storage (local-path, NFS, Ceph, NetApp ONTAP, or your own CSI driver) | `infrastructure` | [Quick Start: Layer 1](#layer-1-infrastructure) | | 2 | **Platform** | Shared services every layer uses | Envoy Gateway, Keycloak, cert-manager, Istio ambient mesh, MetalLB, PostgreSQL, SeaweedFS, Grafana with Prometheus, Loki and Tempo, Headlamp | `platform` | [Quick Start: Layer 2](#layer-2-platform) | | 3 | **Intel® Inference Toolkit** | Serves models behind one OpenAI-compatible API | Envoy AI Gateway, KServe, vLLM / OpenVINO™ Model Server, optional LiteLLM and Langfuse | `inference` | [inference-toolkit](https://github.com/intel/inference-toolkit) | -| 4 | **Intel® Chatbot Toolkit** *(optional, on top of 3)* | Chat with your own documents (RAG) | Vector database, document ingestion, RAG pipeline, MCP gateway, chat history, web UI | `erag` | [chatbot-toolkit](https://github.com/intel/chatbot-toolkit) | +| 4 | **Intel® Chatbot Toolkit** *(optional, on top of 3)* | Chat with your own documents (RAG) | Vector database, document ingestion, RAG pipeline, MCP gateway, chat history, web UI | `chatbot` | [chatbot-toolkit](https://github.com/intel/chatbot-toolkit) | | 4 | **Intel® Agent Toolkit** *(optional, on top of 3)* | Run AI agents safely | Agent sandboxes (optionally Kata microVMs), memory stores (Redis Stack, pgvector), LiteLLM virtual keys, guardrails, a hybrid model router; optional KubeRay | `agent-toolkit` | [agent-toolkit](https://github.com/intel/agent-toolkit) | > [!NOTE] @@ -175,8 +175,8 @@ Keep the admin key to yourself; give each application or agent its own virtual k **What you get:** a chat web UI at `https://inteltoolkits.ai` that answers from your own documents: document ingestion, a vector database, the RAG pipeline and chat history. ```bash -./toolkit_manager.sh init erag -./toolkit_manager.sh install erag +./toolkit_manager.sh init chatbot +./toolkit_manager.sh install chatbot ``` More: [Getting Started with Intel® Chatbot Toolkit](docs/getting-started/chatbot-toolkit.md) (prerequisites, sign-in, pipelines). diff --git a/configs/repos/repos.erag.yaml b/configs/repos/repos.chatbot.yaml similarity index 76% rename from configs/repos/repos.erag.yaml rename to configs/repos/repos.chatbot.yaml index 322e0ed9..fad4950b 100644 --- a/configs/repos/repos.erag.yaml +++ b/configs/repos/repos.chatbot.yaml @@ -1,10 +1,10 @@ --- # ============================================================================= -# Layer manifest — erag +# Layer manifest — chatbot # ============================================================================= -# The inference layer eRAG builds on, then eRAG itself, each pinned to the -# rev this layer is validated against. Dependencies first: inference is -# cloned and seeded before erag. +# The inference layer Intel® Chatbot Toolkit builds on, then the toolkit +# itself, each pinned to the rev this layer is validated against. +# Dependencies first: inference is cloned and seeded before chatbot. # # Field reference: docs/reference/adding-solutions.md # ============================================================================= @@ -19,7 +19,7 @@ repos: default_flavour: "" model_catalog: "model_manager/models.yaml" - - layer: "erag" + - layer: "chatbot" url: "https://github.com/intel/chatbot-toolkit" dest: "chatbot-toolkit" rev: "6fa81aa0a9852cbf195317d45bfe8648ebc7a955" # v3.1.0-rc.1 diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index bbc5ccdb..2dc1ba6e 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -576,7 +576,7 @@ Next to `global_config.yaml`, each solution layer has its own config file, creat `init `: - **`env//config.inference.yaml`** — from the inference repository's `config.yaml` -- **`env//config.erag.yaml`** — from the chosen flavour's `config.yaml` (default: `chatqna`) +- **`env//config.chatbot.yaml`** — from the chosen flavour's `config.yaml` (default: `chatqna`) - **`env//config.agent-toolkit.yaml`** — from the Agent Toolkit repository's `config.yaml` These files are **flat** lists of settings, passed to Ansible as they are (`-e @file`). A setting @@ -584,7 +584,7 @@ that holds a nested block replaces the default block entirely; it is not merged installer loads the layer files first (lower layers before higher ones), then `global_config.yaml`, so a value in `global_config.yaml` wins over the same key in a layer's file. -Example: `config.erag.yaml` sets Chatbot Toolkit options such as `ui_enabled`, `edp_enabled` and +Example: `config.chatbot.yaml` sets Chatbot Toolkit options such as `ui_enabled`, `edp_enabled` and `vector_databases_enabled`. Setting the same key in `global_config.yaml` overrides it. --- diff --git a/docs/configuration/nri-cpu-balloons.md b/docs/configuration/nri-cpu-balloons.md index 3618da5f..466a3fdd 100644 --- a/docs/configuration/nri-cpu-balloons.md +++ b/docs/configuration/nri-cpu-balloons.md @@ -86,7 +86,7 @@ nri_deployment_profile: "siblings" ``` `nri_cpu_balloons` is a **platform-layer** component: `install platform` (and -`install inference`/`install erag`, which pull in the platform layer) installs or +`install inference`/`install chatbot`, which pull in the platform layer) installs or re-applies it, and `teardown platform` removes it. `teardown inference` keeps it, because every pod on the node is placed in a balloon, not only model pods. Each of these installs re-applies the role, so a changed `nri_deployment_profile` diff --git a/docs/deployment/install-platform.md b/docs/deployment/install-platform.md index 5207285c..1f755750 100644 --- a/docs/deployment/install-platform.md +++ b/docs/deployment/install-platform.md @@ -17,7 +17,7 @@ The installer sets up these layers automatically, each on top of the one before: Intel GPU device plugin (only on nodes with an Intel GPU); optional: Headlamp, KEDA, Velero 3. Intel® Inference Toolkit — from the inference repository: KServe, the Envoy AI Gateway and the model services (LiteLLM and Langfuse too in LiteLLM mode) -4. Intel® Chatbot Toolkit — opt-in (vector DB, ingestion, chat, UI) — requires init erag + install erag +4. Intel® Chatbot Toolkit — opt-in (vector DB, ingestion, chat, UI) — requires init chatbot + install chatbot ``` You run **one command** and it installs every layer the target needs. `./toolkit_manager.sh show` lists every layer and component. @@ -560,7 +560,7 @@ env//logs/status-cluster-20260817-152000.log ```bash # Environment setup ./toolkit_manager.sh configure # one-time machine prep -./toolkit_manager.sh init --env # create new environment (layer: inference, erag, agent-toolkit) +./toolkit_manager.sh init --env # create new environment (layer: inference, chatbot, agent-toolkit) ./toolkit_manager.sh show # list layers/components # Installation @@ -943,11 +943,11 @@ Intel® Chatbot Toolkit adds document ingestion, vector search, RAG pipelines, a **Quick path:** ```bash -./toolkit_manager.sh init erag --env -./toolkit_manager.sh install erag --env +./toolkit_manager.sh init chatbot --env +./toolkit_manager.sh install chatbot --env ``` -The `init erag` command downloads the inference and Intel® Chatbot Toolkit repositories (dependencies first), creates `env//config.erag.yaml` from the selected pipeline flavour (default: `chatqna`; pick another with `--flavour`), and records the layer in `env//.solutions.yaml`. The `install erag` command first installs whatever it needs that is missing (infrastructure → platform → inference), then installs the RAG application layer. +The `init chatbot` command downloads the inference and Intel® Chatbot Toolkit repositories (dependencies first), creates `env//config.chatbot.yaml` from the selected pipeline flavour (default: `chatqna`; pick another with `--flavour`), and records the layer in `env//.solutions.yaml`. The `install chatbot` command first installs whatever it needs that is missing (infrastructure → platform → inference), then installs the RAG application layer. **See the full guide:** [Getting Started with Intel® Chatbot Toolkit](../getting-started/chatbot-toolkit.md) covers prerequisites, flavour selection, per-layer install and teardown, configuration, and troubleshooting. diff --git a/docs/deployment/netapp-ontap.md b/docs/deployment/netapp-ontap.md index 0efb23b9..01980426 100644 --- a/docs/deployment/netapp-ontap.md +++ b/docs/deployment/netapp-ontap.md @@ -91,12 +91,12 @@ Both flows assume the array side already exists. The installer creates nothing o ./toolkit_manager.sh configure ``` -2. Initialize the `erag` layer. This clones the inference and RAG repositories at their +2. Initialize the `chatbot` layer. This clones the inference and RAG repositories at their pinned revisions and seeds `env/prod/config.inference.yaml`, `env/prod/models.yaml` - and `env/prod/config.erag.yaml` from the default `chatqna` pipeline preset: + and `env/prod/config.chatbot.yaml` from the default `chatqna` pipeline preset: ```bash - ./toolkit_manager.sh init erag --env prod + ./toolkit_manager.sh init chatbot --env prod ``` 3. In `env/prod/global_config.yaml`, the five Flow A values and `storage_backend`, plus @@ -120,7 +120,7 @@ Both flows assume the array side already exists. The installer creates nothing o too whenever the object-store server does not answer on 443, so preflight probes the right port. -4. In `env/prod/config.erag.yaml`, the object-store user credentials: +4. In `env/prod/config.chatbot.yaml`, the object-store user credentials: ```yaml edp_s3_compatible_access_key_id: "" @@ -131,7 +131,7 @@ Both flows assume the array side already exists. The installer creates nothing o `infrastructure`, `platform` and `inference` first, in that order: ```bash - ./toolkit_manager.sh install erag --env prod + ./toolkit_manager.sh install chatbot --env prod ``` ## What the integration provides @@ -193,7 +193,7 @@ The array topology goes in `env//global_config.yaml`, created by `configs/defaults/global_config.yaml` is the same list, commented out, with inline notes. Settings that belong to a solution layer rather than to the array live in that layer's -own config. For Intel® Chatbot Toolkit that is `env//config.erag.yaml`, seeded from the +own config. For Intel® Chatbot Toolkit that is `env//config.chatbot.yaml`, seeded from the pipeline flavour you chose at `init` time. The installer's `global_config.yaml` carries no layer-specific variables. @@ -221,12 +221,12 @@ preflight runs `getent hosts` from each node and reports every unresolvable pair | Variable | Where it goes | Meaning | |---|---|---| | `ontap_s3_data_lif` | `global_config.yaml` | Data LIF of the SVM's object-store server. This is a **different LIF** from `ontap_data_lif`, which is the NFS one. Leaving it empty means the whole S3 path is inactive. | -| `edp_s3_compatible_access_key_id` | `config.erag.yaml` | Access key of the ONTAP object-store user | -| `edp_s3_compatible_secret_access_key` | `config.erag.yaml` | Its secret key | +| `edp_s3_compatible_access_key_id` | `config.chatbot.yaml` | Access key of the ONTAP object-store user | +| `edp_s3_compatible_secret_access_key` | `config.chatbot.yaml` | Its secret key | The array topology is the installer's concern; the credentials belong to the layer that consumes them. For the RAG side, see `docs/customize/object_store.md` in the Intel® Chatbot -Toolkit repository (cloned to `ext/chatbot-toolkit/` by `init erag`). +Toolkit repository (cloned to `ext/chatbot-toolkit/` by `init chatbot`). `ontap_s3_data_lif` is what activates the gateway's dedicated S3 listener and, together with the credentials, the reverse proxy in Intel® Chatbot Toolkit. `edp_rbac_enabled` must stay @@ -285,7 +285,7 @@ component comes with it. This section covers what happens afterwards. Validate at the layer you deployed: ```bash -./toolkit_manager.sh validate inference --env prod # or: validate platform / validate erag +./toolkit_manager.sh validate inference --env prod # or: validate platform / validate chatbot ``` A layer validation includes the storage checks, because `storage` is part of the @@ -300,10 +300,10 @@ Teardown is also a layer operation, and it resolves **upward**: the target plus layer that depends on it. So `teardown infrastructure` removes Intel® Chatbot Toolkit, the serving stack, the platform, the storage backend and then the cluster itself, in that order, and it asks for confirmation first because Kubespray reset destroys the cluster. -Tearing down a single layer, for example `teardown erag`, leaves everything below it +Tearing down a single layer, for example `teardown chatbot`, leaves everything below it running. ```bash -./toolkit_manager.sh teardown erag --env prod # just Intel® Chatbot Toolkit +./toolkit_manager.sh teardown chatbot --env prod # just Intel® Chatbot Toolkit ./toolkit_manager.sh teardown infrastructure --env prod # everything, cluster included ``` diff --git a/docs/deployment/node-scaling.md b/docs/deployment/node-scaling.md index 56830149..466429a2 100644 --- a/docs/deployment/node-scaling.md +++ b/docs/deployment/node-scaling.md @@ -41,13 +41,13 @@ Check these before you run either command: 1. **The cluster was installed by Toolkit Manager.** Both commands need `env//kubeconfig.yaml`, which `install kubernetes` writes. Without it they stop and tell you to install the cluster first. 2. **The installer host reaches the API server** at `https://:6443`, not only the nodes over SSH. Without that access, both stop before Kubespray runs. 3. **The installer host can SSH to the new node** with the node's `ssh_user`/`ssh_key` from `nodes.yaml` (or the file-wide `nodes_ssh_user`/`nodes_ssh_key`), without a password prompt. `add-node` tests this before it asks you to confirm. If it fails, authorize the key (for example with `ssh-copy-id`) and retry. -4. **ERAG is not deployed** (see [What's not supported](#whats-not-supported)). +4. **Intel® Chatbot Toolkit is not deployed** (see [What's not supported](#whats-not-supported)). ## What's supported | Scenario | Supported? | |---|---| -| Installer-managed cluster, no ERAG deployed | Yes | +| Installer-managed cluster, no Chatbot Toolkit deployed | Yes | | Adding worker node(s) via `add-node` | Yes | | A control-plane node that is also a worker (an identical entry under both `nodes_control_plane` and `nodes_workers`) | Yes, as long as it stays in both lists — `add-node`/`remove-node` treat it as control-plane: changing its role (worker on/off) is not something they do, and deleting it from both lists is a control-plane removal (refused) | | Removing worker node(s) via `remove-node` | Yes | @@ -59,7 +59,7 @@ Check these before you run either command: | BYO cluster (`existing_kubernetes` set in `global_config.yaml`) | A bring-your-own cluster is not managed by Kubespray at all | | Adding control-plane/etcd node(s) via `add-node` | Kubespray's `scale.yml` cannot add control-plane/etcd members | | Removing control-plane/etcd node(s) via `remove-node` | Refused: see [Control-plane nodes are not removed](#control-plane-nodes-are-not-removed) | -| Cluster with ERAG deployed | Both actions only ever touch the `kubernetes` component — ERAG's own Helm/pipeline config is never re-applied, so any node-specific placement it relies on isn't accounted for. Both refuse when any ERAG-only namespace (`rag-ui`, `chat-history`, `edp`, `fingerprint`, `vdb`, `erag-gateway`, `auth-apisix`) exists | +| Cluster with Chatbot Toolkit deployed | Both actions only ever touch the `kubernetes` component — its own Helm/pipeline config is never re-applied, so any node-specific placement it relies on isn't accounted for. Both refuse when any Chatbot Toolkit-only namespace (`rag-ui`, `chat-history`, `edp`, `fingerprint`, `vdb`, `erag-gateway`, `auth-apisix`) exists | | Hand-edited inventory (`env//inventory/hosts.yaml`, no `nodes.yaml`) | Both actions find their target node(s), SSH details and control-plane membership from `nodes.yaml`; without it they stop before doing anything. Convert the inventory to `nodes.yaml` first | | Star racks (`topology: star`) | The spokes reach each other through the hub, so a spoke added or removed changes the hub's fabric and every spoke's routes. Both refuse a star rack before doing anything | | On a rack: control-plane, etcd or storage nodes, and an edit that changes the nodes that stay | See [Rack-scale](#rack-scale) | @@ -212,7 +212,7 @@ Not checked, and each would currently only surface as a Kubespray failure partwa - **`nodes.yaml`, the inventory and the cluster must agree.** `add-node` refuses while a joined node is missing from `nodes.yaml` (its prep pass would drop that node from the inventory). `remove-node` refuses a node that is no longer in the inventory (Kubespray could not reach it), and a `nodes.yaml` that also lists nodes not yet joined (its post pass would put them in the inventory and the NFS exports). - **Health after `remove-node`** is judged against the findings from before the removal: only new problems fail the command, and pods the drain evicted get a minute to be scheduled. - **Fails closed when the cluster can't be read.** If `kubectl` can't list the cluster's nodes or namespaces, both actions stop with the error rather than diffing `nodes.yaml` against an empty list. `remove-node` does the same for PodDisruptionBudgets and the preflight simulation: a check that didn't run refuses the removal, it never passes it. -- **ERAG guard** — both actions refuse when ERAG is deployed (see [What's not supported](#whats-not-supported)). +- **Chatbot Toolkit guard** — both actions refuse when Intel® Chatbot Toolkit is deployed (see [What's not supported](#whats-not-supported)). - **Control-plane removal is refused** — see [Control-plane nodes are not removed](#control-plane-nodes-are-not-removed). - Inventory regeneration is deliberately deferred until *after* `remove-node.yml` succeeds, so Kubespray always gets a node it can still reach. - **Workload visibility before you confirm** — lists real (non-DaemonSet, non-static-pod) workloads running on the node(s) about to be removed, so a model or service that's only running there doesn't get evicted as a surprise. diff --git a/docs/deployment/openshift.md b/docs/deployment/openshift.md index fe664a6c..6ea6afbd 100644 --- a/docs/deployment/openshift.md +++ b/docs/deployment/openshift.md @@ -18,7 +18,7 @@ On OpenShift the installer does not provision cluster-wide services. You install | Owner | Installs | Examples | |---|---|---| | **Cluster admin (you), from the marketplace** | Operators, plus the cluster-scoped singleton each one needs | LVMS + `LVMCluster`, cert-manager, Service Mesh 3 + `Istio`/`IstioCNI`/`ZTunnel`, CloudNativePG, Red Hat build of Keycloak, NFD + `NodeFeatureDiscovery`, LWS, Custom Metrics Autoscaler + `KedaController`, OpenShift AI + `DataScienceCluster`, Loki, Logging, Tempo, OpenTelemetry and Grafana operators, user-workload monitoring | -| **Installer (`toolkit_manager.sh`)** | Resources scoped to the application, in namespaces it creates and labels | CNPG `Cluster`, `Keycloak` instance and realm, `ServiceMonitor`/`PodMonitor`, `LokiStack`, `ClusterLogForwarder`, `TempoMonolithic`, `OpenTelemetryCollector`, `Grafana`, LiteLLM, Langfuse, inference models, eRAG applications | +| **Installer (`toolkit_manager.sh`)** | Resources scoped to the application, in namespaces it creates and labels | CNPG `Cluster`, `Keycloak` instance and realm, `ServiceMonitor`/`PodMonitor`, `LokiStack`, `ClusterLogForwarder`, `TempoMonolithic`, `OpenTelemetryCollector`, `Grafana`, LiteLLM, Langfuse, inference models, Intel® Chatbot Toolkit applications | The rule: **the installer never installs, upgrades, or deletes an operator, a CRD, or a cluster singleton that it did not create, and never changes the cluster's configuration** (for example `cluster-monitoring-config`). Anything the installer creates carries the ownership labels (`toolkit-manager.intel.com/env`, `/layer`, `/component`), and teardown removes only labelled objects (see the warning above for the exceptions). @@ -245,7 +245,7 @@ To skip detection, set `cluster_distribution` in `global_config.yaml` to `opensh Create an environment and point it at the cluster. Use a kubeconfig whose context has `cluster-admin`. ```bash -./toolkit_manager.sh init platform --env ocp # init inference / init erag for the layers above +./toolkit_manager.sh init platform --env ocp # init inference / init chatbot for the layers above ``` There is no OpenShift-specific configuration: the same `global_config.yaml` works on Kubernetes and OpenShift. In `env/ocp/global_config.yaml`, set only what describes this cluster: @@ -366,7 +366,7 @@ The installer does not support all of the flow above yet. The blocking items sto | Area | Today | Needed | Blocking | |---|---|---|---| | **Teardown safety** | Teardown deletes only labelled objects, but `teardown: role` components and envs installed before the ownership labels run their roles' own teardowns, some of which delete CRDs by API group; not validated on OpenShift | Validate teardown on OpenShift; never delete CRDs the installer did not create | **Yes**: do not run teardown | -| **SCC** (Security Context Constraints) | Done for the platform layer: SeaweedFS leaves UID/GID unset so `restricted-v2` assigns them, Envoy Gateway's service accounts get `nonroot-v2`, and the NRI balloons chart grants its own SCC. Other charts (the inference and eRAG layers) may still set a fixed `runAsUser`/`fsGroup` | The same treatment for every chart that sets fixed IDs | Depends on the layer | -| **Autoscaling** | `app_hpa` (Prometheus Adapter) and the eRAG HPAs are skipped on OpenShift | HPAs on the Custom Metrics Autoscaler (KEDA) and user-workload monitoring | No | +| **SCC** (Security Context Constraints) | Done for the platform layer: SeaweedFS leaves UID/GID unset so `restricted-v2` assigns them, Envoy Gateway's service accounts get `nonroot-v2`, and the NRI balloons chart grants its own SCC. Other charts (the inference and chatbot layers) may still set a fixed `runAsUser`/`fsGroup` | The same treatment for every chart that sets fixed IDs | Depends on the layer | +| **Autoscaling** | `app_hpa` (Prometheus Adapter) and the Chatbot Toolkit HPAs are skipped on OpenShift | HPAs on the Custom Metrics Autoscaler (KEDA) and user-workload monitoring | No | | **CPU pinning (NRI balloons) and tensor parallelism** | OpenShift AI cannot annotate the pods of an `LLMInferenceService`, so every model pod (`kserve.io/component=workload`) lands in the `model-balloon-tp1` balloon and gets the CPUs of one NUMA node. Only TP=1 models are supported | Pick the balloon by the model's TP size | No (TP>1 models run with too few CPUs) | | **NRI plugin sync** | If a CRI-O sync with the NRI plugin fails (`failed to synchronize plugin` in the CRI-O journal), the plugin gets no container events and new pods run unpinned. The installer restarts the plugin after it applies the node policy, which is when this happens; after a policy change of your own, restart it by hand: `oc delete pod -n kube-system -l app.kubernetes.io/name=nri-resource-policy-balloons` | Detect a failed sync and restart the plugin | No | diff --git a/docs/deployment/upgrade.md b/docs/deployment/upgrade.md index 2a136ab7..c2351fe0 100644 --- a/docs/deployment/upgrade.md +++ b/docs/deployment/upgrade.md @@ -16,25 +16,31 @@ and either goes ahead or refuses with the command that fixes the problem. > for every env in the checkout. A run only loads the repos its env's record names, so the old > folders are ignored and can be deleted once no env uses them. -In short, to upgrade a solution layer such as the Intel® Chatbot Toolkit (`erag`): +In short, to upgrade a solution layer such as the Intel® Chatbot Toolkit (`chatbot`): -1. **Back up** the layer with the release that is installed now: `./run_backup.sh backup erag --env prod` +1. **Back up** the layer with the release that is installed now: `./run_backup.sh backup chatbot --env prod` (see [Backup and restore](#backup-and-restore)). -2. **Move the checkout** to the new release, then run `./toolkit_manager.sh init erag --env prod --upgrade` +2. **Move the checkout** to the new release, then run `./toolkit_manager.sh init chatbot --env prod --upgrade` to move the layer's repositories in `ext/` to the revisions it pins. -3. **Install**: `./toolkit_manager.sh install erag --env prod`. Read the check lines it prints +3. **Install**: `./toolkit_manager.sh install chatbot --env prod`. Read the check lines it prints first; a refusal changes nothing and names the fix. -4. **Check** the result: `./toolkit_manager.sh validate erag --env prod`. +4. **Check** the result: `./toolkit_manager.sh validate chatbot --env prod`. -The [worked example](#worked-example-intel-chatbot-toolkit-300--310) below goes through these -steps with real output. +Upgrades cover installs of 3.1.0 or later. An older install (layer `erag`) needs a fresh reinstall: +tear it down with the release that installed it, then install this one. Its data is not carried over. +In the env, move your settings from `config.erag.yaml` into the `config.chatbot.yaml` that +`init chatbot` seeds, then delete `config.erag.yaml` and remove the `erag` entry under `layers:` in +`.solutions.yaml`. + +The [worked example](#worked-example-intel-chatbot-toolkit-310--320) below goes through these +steps with example output. Upgrade one layer at a time, bottom up — there is no single command that upgrades the whole stack: ```bash ./toolkit_manager.sh install platform --env prod ./toolkit_manager.sh install inference --env prod -./toolkit_manager.sh install erag --env prod +./toolkit_manager.sh install chatbot --env prod ``` --- @@ -80,7 +86,7 @@ there is no saved configuration to compare with yet, and this run saves it. Whether a `blocking` verdict stops the run depends on the layer, not on the check: - A layer that declares `supports.upgrade: true` on its `layers` entry (today: Intel® Chatbot - Toolkit, layer `erag`) is **refused** before anything changes, when the run is an `upgrade`, + Toolkit, layer `chatbot`) is **refused** before anything changes, when the run is an `upgrade`, `downgrade` or `conflict`. The line reads `blocking (gating)`. A `blocking` verdict from the layer's own checks refuses every run class, `fresh` included. - Every other layer — including `infrastructure`, `platform` and `inference` — only **warns**: the @@ -90,7 +96,7 @@ A refusal lists every gating check with its reason and the fix: ```text Upgrade checks refuse this install; nothing was changed. - - erag upgrade-path: erag 3.0.0 is outside upgrade_base_version >=3.1.0,<3.2.0. Resolve: install erag from a release whose upgrade_base_version covers 3.0.0, then this one (--env prod) + - chatbot upgrade-path: chatbot 3.1.0 is outside upgrade_base_version >=3.2.0,<3.3.0. Resolve: install chatbot from a release whose upgrade_base_version covers 3.1.0, then this one (--env prod) To run anyway, add --force; the run is then recorded as forced. ``` @@ -98,8 +104,8 @@ To run anyway, add --force; the run is then recorded as forced. - `install --force` runs past every refusal. All checks still run; the deployment record and the upgrade report then carry `forced: true` and `forcedChecks: [/, …]`. -- `--only` narrows what is installed, never what is checked: `install erag --only` refuses the same - way `install erag` does. +- `--only` narrows what is installed, never what is checked: `install chatbot --only` refuses the same + way `install chatbot` does. - With no Velero deployed there is no backup to find. `-e upgrade_without_velero=true` lets the upgrade run without a restore point; the line reads `blocking (gating, bypassed)` and the run is recorded as forced, as with `--force`. A cluster that does not answer while the backups are looked @@ -118,7 +124,7 @@ layer starts and when it ends: ```yaml version: 3.1.0 # installed version (null until a run completes) -layer: erag +layer: chatbot targetVersion: null # set while a run is in progress status: complete # in-progress | complete | halted | deleting startedAt: '2026-10-28T17:46:10Z' @@ -138,12 +144,9 @@ installedBy: - Only a run that covers the whole layer writes it; `install --only` leaves it alone. - A layer teardown marks it `deleting`, then deletes it. A teardown that fails leaves `deleting` behind, so the next install of that layer is a `conflict` until the teardown is run again. -- A record still written by a solution itself (Intel® Chatbot Toolkit 3.0.0, nested - `deployment:` block) is read as it is; when the solution's newer release declares - `supports.upgrade`, the installer replaces it with this shape on its first write. ```bash -kubectl -n default get configmap erag-deployment-manifest -o jsonpath='{.data.manifest\.yaml}' +kubectl -n default get configmap chatbot-deployment-manifest -o jsonpath='{.data.manifest\.yaml}' ``` ### The upgrade report @@ -179,10 +182,10 @@ beside its `components.yaml` (Intel® Chatbot Toolkit: `deployment/backup_profil own layers have none. ```bash -./run_backup.sh backup erag --env prod -./run_backup.sh list erag --env prod # one line per backup; marks the one restore picks -./run_backup.sh restore erag --env prod # asks first; --force where there is no terminal -./run_backup.sh restore erag --env prod --from +./run_backup.sh backup chatbot --env prod +./run_backup.sh list chatbot --env prod # one line per backup; marks the one restore picks +./run_backup.sh restore chatbot --env prod # asks first; --force where there is no terminal +./run_backup.sh restore chatbot --env prod --from ``` `run_backup.sh` passes the env's configs and kubeconfig the way `toolkit_manager.sh` does, logs to @@ -192,7 +195,7 @@ It runs `playbooks/backup.yaml`, which can also be called directly: ```bash .venv/bin/ansible-playbook -i env/prod/inventory/hosts.yaml \ -e env_dir=$(pwd)/env/prod -e @env/prod/global_config.yaml \ - playbooks/backup.yaml -e target=erag -e backup_action=backup|restore|list \ + playbooks/backup.yaml -e target=chatbot -e backup_action=backup|restore|list \ [-e backup_confirm=yes] [-e velero_restore_from=] [-e backup_force=true] ``` @@ -248,20 +251,20 @@ its pod restarted. --- -## Worked example: Intel® Chatbot Toolkit 3.0.0 → 3.1.0 +## Worked example: Intel® Chatbot Toolkit 3.1.0 → 3.2.0 -Starting point: platform and inference at 1.1.0, `erag` 3.0.0 installed with documents, a chat history -and users; its 3.0.0 record is in the solution's own shape. +Starting point: platform at 1.1.0, inference at 1.2.0, `chatbot` 3.1.0 installed with documents, a +chat history and users. ```bash -# 1. Back up with the installed (3.0.0) checkout -./run_backup.sh backup erag --env prod +# 1. Back up with the installed (3.1.0) checkout +./run_backup.sh backup chatbot --env prod # 2. Move the checkout to the new release -./toolkit_manager.sh init erag --env prod --upgrade +./toolkit_manager.sh init chatbot --env prod --upgrade # 3. Upgrade -./toolkit_manager.sh install erag --env prod +./toolkit_manager.sh install chatbot --env prod ``` Step 3 prints, before anything changes (shortened: the `compatibility` and `config-tracking` lines @@ -272,28 +275,26 @@ infrastructure: reinstall (1.1.0 -> 1.1.0) version-change: pass — reinstall platform: reinstall (1.1.0 -> 1.1.0) version-change: pass — reinstall -inference: fresh (none -> 1.1.0) - version-change: pass — fresh -erag: upgrade (3.0.0 -> 3.1.0) +inference: reinstall (1.2.0 -> 1.2.0) + version-change: pass — reinstall +chatbot: upgrade (3.1.0 -> 3.2.0) version-change: pass — upgrade - upgrade-path: pass — 3.0.0 is in >=3.0.0,<3.1.0 - backup-freshness: pass — backup backup-erag-20261028t183459, completed 2026-10-28T17:36:43Z + upgrade-path: pass — 3.1.0 is in >=3.1.0,<3.2.0 + backup-freshness: pass — backup backup-chatbot-20261028t183459, completed 2026-10-28T17:36:43Z ``` -(`inference` is `fresh` because its earlier release recorded no version.) The run ends with -`erag-deployment-manifest` at `version: 3.1.0, status: complete` in the shape above and one report, -`env/prod/reports/erag-upgrade-report-.yaml`. +The run ends with `chatbot-deployment-manifest` at `version: 3.2.0, status: complete` in the shape +above and one report, `env/prod/reports/chatbot-upgrade-report-.yaml`. -What refuses an `erag` upgrade, before any change and with the records left as they were. Each case -was shown with a release made to trip it, so the versions and ranges in these lines are that release's, -not 3.1.0's (whose `version.yaml` passes, as above): +What refuses a `chatbot` upgrade, before any change and with the records left as they were. The +versions and ranges are examples of a release that trips each check: | Cause | Release installed | Line | |---|---|---| -| a release skipped | 3.2.0, upgrading from `>=3.1.0,<3.2.0`, over 3.0.0 | `upgrade-path: blocking (gating) — erag 3.0.0 is outside upgrade_base_version >=3.1.0,<3.2.0` | -| no backup, or too old | 3.1.0 | `backup-freshness: blocking (gating) — no Completed backup of erag 3.0.0 in the last 6 h` | -| older release | 3.0.9 over 3.1.0 | `version-change: blocking (gating) — downgrade 3.1.0 -> 3.0.9` | -| unfinished run towards another version | 3.1.0, while a run towards 3.1.1 was interrupted | `version-change: blocking (gating) — a run towards 3.1.1 is in-progress; this release is 3.1.0` | +| a release skipped | 3.3.0, upgrading from `>=3.2.0,<3.3.0`, over 3.1.0 | `upgrade-path: blocking (gating) — chatbot 3.1.0 is outside upgrade_base_version >=3.2.0,<3.3.0` | +| no backup, or too old | 3.2.0 | `backup-freshness: blocking (gating) — no Completed backup of chatbot 3.1.0 in the last 6 h` | +| older release | 3.1.9 over 3.2.0 | `version-change: blocking (gating) — downgrade 3.2.0 -> 3.1.9` | +| unfinished run towards another version | 3.2.0, while a run towards 3.2.1 was interrupted | `version-change: blocking (gating) — a run towards 3.2.1 is in-progress; this release is 3.2.0` | An `inference` upgrade from 1.1.0 to 1.2.0 runs with advisory lines only, since `inference` does not declare `supports.upgrade`; it still writes its report. diff --git a/docs/faq-and-troubleshooting/frequently-asked-questions.md b/docs/faq-and-troubleshooting/frequently-asked-questions.md index 96d9f706..7930831c 100644 --- a/docs/faq-and-troubleshooting/frequently-asked-questions.md +++ b/docs/faq-and-troubleshooting/frequently-asked-questions.md @@ -34,7 +34,7 @@ See [CLI Reference](../reference/cli.md). ### Which targets can I pass to `init`? -Any layer: `infrastructure`, `platform`, `inference`, `erag`, or `agent-toolkit`. `inference`, `erag`, and `agent-toolkit` have a repository manifest (`configs/repos/repos..yaml`), so `init` also clones their repositories and seeds their `config..yaml`; `init platform` only creates the environment. Single components are valid targets for `install`, `teardown`, and `validate`, but not for `init`. +Any layer: `infrastructure`, `platform`, `inference`, `chatbot`, or `agent-toolkit`. `inference`, `chatbot`, and `agent-toolkit` have a repository manifest (`configs/repos/repos..yaml`), so `init` also clones their repositories and seeds their `config..yaml`; `init platform` only creates the environment. Single components are valid targets for `install`, `teardown`, and `validate`, but not for `init`. ### How long does a full install take? diff --git a/docs/faq-and-troubleshooting/troubleshooting.md b/docs/faq-and-troubleshooting/troubleshooting.md index 473cb444..7666ab22 100644 --- a/docs/faq-and-troubleshooting/troubleshooting.md +++ b/docs/faq-and-troubleshooting/troubleshooting.md @@ -22,7 +22,7 @@ Three commands, from quickest to most thorough. None of them changes anything. - **`status --health`** is red when a node is not `Ready`, or a pod is crash-looping, cannot pull its image or cannot be scheduled. -- **`validate`** takes a layer (`platform`, `inference`, `agent-toolkit`, `erag`) or a component +- **`validate`** takes a layer (`platform`, `inference`, `agent-toolkit`, `chatbot`) or a component (`keycloak`, `kserve`, ...; `./toolkit_manager.sh show` lists them). It checks that the deployments are ready, the endpoints answer and the expected objects exist, and stops at the first failed check with the reason. diff --git a/docs/getting-started/chatbot-toolkit.md b/docs/getting-started/chatbot-toolkit.md index 3071bf9e..fc9ff597 100644 --- a/docs/getting-started/chatbot-toolkit.md +++ b/docs/getting-started/chatbot-toolkit.md @@ -21,21 +21,21 @@ git clone https://github.com/intel/toolkit-manager.git cd toolkit-manager ./toolkit_manager.sh configure # 1. one-time machine prep; answer y -./toolkit_manager.sh init erag # 2. create env/local/ for erag and its dependencies +./toolkit_manager.sh init chatbot # 2. create env/local/ for chatbot and its dependencies vim env/local/global_config.yaml # 3. optional: base_domain_name, proxy -./toolkit_manager.sh install erag # 4. install everything up to erag +./toolkit_manager.sh install chatbot # 4. install everything up to chatbot ``` 1. `configure` installs Python 3.11+, `yq`, `kubectl` and `helm` with `sudo`, after you confirm. -2. `init erag` clones the inference and Chatbot Toolkit repositories into `ext/` and creates the settings files under `env/local/`. +2. `init chatbot` clones the inference and Chatbot Toolkit repositories into `ext/` and creates the settings files under `env/local/`. 3. The defaults work as they are; the domain is `inteltoolkits.ai` unless you change it. -4. `install erag` builds the cluster and installs infrastructure, platform, inference and erag. It ends with an `INSTALLATION COMPLETE` banner. +4. `install chatbot` builds the cluster and installs infrastructure, platform, inference and chatbot. It ends with an `INSTALLATION COMPLETE` banner. > [!Note] > `--env local` is the default — if your environment is named `local` you can omit it from all commands. -> `init erag` clones every repo in `configs/repos/repos.erag.yaml` (inference first, then erag) and seeds a `config..yaml` per layer. -> `install erag` auto-pulls its dependencies (infrastructure → platform → inference); `--only` runs the target alone. +> `init chatbot` clones every repo in `configs/repos/repos.chatbot.yaml` (inference first, then chatbot) and seeds a `config..yaml` per layer. +> `install chatbot` auto-pulls its dependencies (infrastructure → platform → inference); `--only` runs the target alone. > Component resolving works with traversal, so you can also target individual components directly: `./toolkit_manager.sh install app_pipeline`. After install, point `kubectl` at the cluster and print the line to add to `/etc/hosts` on each machine that opens the UI: @@ -52,19 +52,19 @@ echo "$GATEWAY_IP $DOMAIN keycloak.$DOMAIN s3.$DOMAIN seaweedfs.$DOMAIN grafana Open `https://` in a browser (import `env/local/logs/toolkit-manager-ca.crt` to drop the certificate warning; see [Access the services](quickstart.md#access-the-services)). Get the admin password: ```bash -kubectl get secret -n keycloak erag-credentials \ - -o jsonpath='{.data.KEYCLOAK_ERAG_ADMIN_PASSWORD}' | base64 -d; echo +kubectl get secret -n keycloak chattool-credentials \ + -o jsonpath='{.data.KEYCLOAK_CHATTOOL_ADMIN_PASSWORD}' | base64 -d; echo ``` -Log in with **erag-admin** and that password. The same credentials, plus the `erag-user` and `erag-maintainer` accounts, are in `env/local/logs/rag/default_credentials.txt` (readable only by you). +Log in with **chattool-admin** and that password. The same credentials, plus the `chattool-user` and `chattool-maintainer` accounts, are in `env/local/logs/rag/default_credentials.txt` (readable only by you). --- ## Teardown ```bash -# Remove erag layer only (keeps cluster, platform and inference intact) -./toolkit_manager.sh teardown erag +# Remove chatbot layer only (keeps cluster, platform and inference intact) +./toolkit_manager.sh teardown chatbot # Remove the cluster (and everything on it) ./toolkit_manager.sh teardown infrastructure @@ -83,24 +83,24 @@ The installer deploys in layers, each building on the previous: | **infrastructure** | Kubernetes (Kubespray), storage (local-path / NFS / Ceph) | Cluster foundation | | **platform** | Node Feature Discovery, NRI CPU balloons, cert-manager, Istio, MetalLB, metrics-server, Envoy Gateway, PostgreSQL, Keycloak, object store (SeaweedFS), Observability | Shared services | | **inference** | KServe, Envoy AI Gateway, LLM services (model serving) | Model serving | -| **erag** | models, APISIX, vector DBs, NATS, fingerprint, HPA, pipelines, EDP (document ingestion), MCP gateway, chat history, UI | RAG application | +| **chatbot** | models, APISIX, vector DBs, NATS, fingerprint, HPA, pipelines, EDP (document ingestion), MCP gateway, chat history, UI | RAG application | -The **erag** layer is opt-in — it lives in `ext/chatbot-toolkit/deployment/components.yaml` and only appears in the -registry once the env was initialized with `init erag`. +The **chatbot** layer is opt-in — it lives in `ext/chatbot-toolkit/deployment/components.yaml` and only appears in the +registry once the env was initialized with `init chatbot`. ### Layer-Level Install and Teardown You don't have to deploy everything at once. Target individual layers: ```bash -# Install up to inference (skip erag) — deps are pulled in automatically +# Install up to inference (skip chatbot) — deps are pulled in automatically ./toolkit_manager.sh install inference -# Add erag later -./toolkit_manager.sh install erag +# Add chatbot later +./toolkit_manager.sh install chatbot -# Tear down only erag -./toolkit_manager.sh teardown erag +# Tear down only chatbot +./toolkit_manager.sh teardown chatbot # Tear down inference (removes models, KServe) but keep platform ./toolkit_manager.sh teardown inference @@ -126,38 +126,38 @@ You can also target individual components directly — component resolving trave ### Pipeline Flavours (`init --flavour`) -A flavour is the preset `init` seeds `config..yaml` from. For `erag` they are the +A flavour is the preset `init` seeds `config..yaml` from. For `chatbot` they are the directories under `ext/chatbot-toolkit/deployment/pipelines/` — `chatqna` (the default), `chatqna_intel_gpu`, `docsum`, `translation`, `audioqna`, `pl_chatqna`: ```bash -./toolkit_manager.sh init erag --flavour docsum +./toolkit_manager.sh init chatbot --flavour docsum ``` Passing an unknown name lists what is available. `--flavour` applies to `init` only, and only to layers that declare a `config_dir` in `configs/repos/repos..yaml` — `init inference --flavour x` is an error. Switching flavour on an existing env is refused rather than -overwriting your edits: use a fresh `--env`, or delete `env//config.erag.yaml` to reseed. +overwriting your edits: use a fresh `--env`, or delete `env//config.chatbot.yaml` to reseed. ### Multiple Environments The installer supports multiple named environments side by side. The `local` environment is used by default when `--env` is omitted. ```bash -./toolkit_manager.sh init erag --env dev -./toolkit_manager.sh init erag --env staging +./toolkit_manager.sh init chatbot --env dev +./toolkit_manager.sh init chatbot --env staging # Each has independent config under env// vim env/dev/global_config.yaml vim env/staging/global_config.yaml # Deploy into a specific env (--env required for non-local envs) -./toolkit_manager.sh install erag --env dev -./toolkit_manager.sh install erag --env staging +./toolkit_manager.sh install chatbot --env dev +./toolkit_manager.sh install chatbot --env staging ``` All envs share one `ext/` checkout, so they cannot be pinned to different repo revisions — -`init` warns when another env wants a different rev. `init erag --upgrade` moves `ext/` onto +`init` warns when another env wants a different rev. `init chatbot --upgrade` moves `ext/` onto the revs the manifests pin now (refuses on local changes, never rewrites your configs). ### BYO Kubernetes Cluster @@ -169,7 +169,7 @@ If you already have a cluster, skip infrastructure provisioning: existing_kubernetes: "/path/to/your/kubeconfig" ``` -The installer skips Kubespray entirely and deploys platform + inference + erag on your existing cluster. +The installer skips Kubespray entirely and deploys platform + inference + chatbot on your existing cluster. ### Multi-Node / Remote Deployment @@ -180,7 +180,7 @@ For remote nodes, list them in `env//nodes.yaml`; the installer generates Pass extra variables or increase verbosity via `--`: ```bash -./toolkit_manager.sh install erag -- -vvv -e edp_enabled=false +./toolkit_manager.sh install chatbot -- -vvv -e edp_enabled=false ``` Or set `TKM_LOG_LEVEL=debug` (verbose logs + ansible `-vvv`) / `trace` (+ bash xtrace). @@ -188,7 +188,7 @@ Or set `TKM_LOG_LEVEL=debug` (verbose logs + ansible `-vvv`) / `trace` (+ bash x ### Validation ```bash -./toolkit_manager.sh validate erag +./toolkit_manager.sh validate chatbot ``` Runs validation playbooks against deployed components to verify health. @@ -212,7 +212,7 @@ The `env//` directory is the single source of truth for an environment. Ev | File | Purpose | |------|---------| | `global_config.yaml` | Domain, TLS, proxy, component toggles | -| `config.erag.yaml` | RAG-specific: registry, models, feature flags, pipeline config (seeded from a flavour) | +| `config.chatbot.yaml` | RAG-specific: registry, models, feature flags, pipeline config (seeded from a flavour) | | `config.inference.yaml` | Inference: KServe, CPU policy, model serving, API auth (`auth_type`), LiteLLM/Langfuse | | `models.yaml` | Model catalog, seeded from `ext/inference-toolkit/model_manager/models.yaml` | | `nodes.yaml` | Node definitions for remote deployments | @@ -223,7 +223,7 @@ The `env//` directory is the single source of truth for an environment. Ev ### Changing Models -Edit `env/local/config.erag.yaml`: +Edit `env/local/config.chatbot.yaml`: ```yaml inference_namespace: "llm-inference" @@ -236,12 +236,12 @@ inference_models: role: reranking ``` -Each `name` must match an entry in `env/local/models.yaml` (copied from the inference repo's `model_manager/models.yaml`); `role` is `llm`, `embedding` or `reranking`. Re-run `./toolkit_manager.sh install erag` to apply the change. +Each `name` must match an entry in `env/local/models.yaml` (copied from the inference repo's `model_manager/models.yaml`); `role` is `llm`, `embedding` or `reranking`. Re-run `./toolkit_manager.sh install chatbot` to apply the change. ### Pipeline Configuration Seeded by the flavour (see [Pipeline Flavours](#pipeline-flavours-init---flavour)), then editable -in `env/local/config.erag.yaml`: +in `env/local/config.chatbot.yaml`: ```yaml pipeline_type: "chatqna" # also the pipeline namespace unless pipeline_namespace is set diff --git a/docs/overview/meet.md b/docs/overview/meet.md index ee0c2419..fec51387 100644 --- a/docs/overview/meet.md +++ b/docs/overview/meet.md @@ -83,7 +83,7 @@ Prometheus, Grafana, Loki, Tempo and OpenTelemetry provide infrastructure and AI | Layer | What it provides | How to deploy | |---|---|---| | **Intel® Inference Toolkit** | Model serving, routing, authentication, OpenAI-compatible endpoints | `init inference` + `install inference` (pulls infrastructure + platform automatically) | -| **Intel® Chatbot Toolkit** | Document ingestion, vector search, grounded chat, chat history, UI | `init erag` + `install erag` (pulls infrastructure + platform + inference) | +| **Intel® Chatbot Toolkit** | Document ingestion, vector search, grounded chat, chat history, UI | `init chatbot` + `install chatbot` (pulls infrastructure + platform + inference) | | **Intel® Agent Toolkit** | Agent memory (Redis Stack, pgvector), sandboxed code execution (Agent Sandbox, optionally in Kata microVMs, and OpenShell), an agent realm in Keycloak, optional KubeRay | `init agent-toolkit` + `install agent-toolkit` (pulls infrastructure + platform + inference) | Each layer builds on the one below it. Deploy what you need today and add layers as your use case evolves. **Intel® Chatbot Toolkit and Intel® Agent Toolkit are opt-in** — installing `inference` brings neither; you must initialize and install them explicitly. diff --git a/docs/reference/adding-solutions.md b/docs/reference/adding-solutions.md index 8d6d030e..6350ce42 100644 --- a/docs/reference/adding-solutions.md +++ b/docs/reference/adding-solutions.md @@ -452,9 +452,9 @@ What this means for a role: ```yaml - name: app_keycloak_config - layer: erag + layer: chatbot ownership_declared: - - {kind: Secret, name: erag-credentials} # the configurator Job's kubectl apply + - {kind: Secret, name: chattool-credentials} # the configurator Job's kubectl apply ``` --- diff --git a/docs/reference/architecture.md b/docs/reference/architecture.md index 9295637a..207f6dce 100644 --- a/docs/reference/architecture.md +++ b/docs/reference/architecture.md @@ -14,7 +14,7 @@ This repository provides: Solution repositories contribute the layers above platform: - **Inference layer** (inference-toolkit) — KServe, model serving (`llm_services` + `model-manager`), Envoy AI Gateway, LiteLLM (proxy + virtual keys), Langfuse (LLM observability), Keycloak realm setup, opt-in vLLM Semantic Router -- **Application layers** (opt-in) — Intel® Chatbot Toolkit (`erag`: RAG pipelines, UI, vector databases) and Intel® Agent Toolkit (`agent-toolkit`) +- **Application layers** (opt-in) — Intel® Chatbot Toolkit (`chatbot`: RAG pipelines, UI, vector databases) and Intel® Agent Toolkit (`agent-toolkit`) **Auth modes:** Keycloak is deployed by default (`keycloak_enabled: true`) and people sign in to every web UI through it. `auth_type` in `env//config.inference.yaml` selects the credential API clients send: - `jwt` (default) — a Keycloak access token (client credentials) on `inference.`; LiteLLM + Langfuse optional (`litellm_enabled: true`) @@ -29,7 +29,7 @@ The gateway `SecurityPolicy` is deny-by-default in both modes: a route without i A **layer** is a group of components installed together; a **component** is one Ansible role. Toolkit Manager installs in ordered layers, each depending on the ones below it: ``` -infrastructure → platform → inference → erag / agent-toolkit (opt-in) +infrastructure → platform → inference → chatbot / agent-toolkit (opt-in) ``` | Layer | Components (in [configs/components.yaml](../../configs/components.yaml) unless noted) | Installed by | @@ -37,11 +37,11 @@ infrastructure → platform → inference → erag / agent-toolkit (opt-in | `infrastructure` | `kubernetes`, `storage`; `kata_containers` (`kata_containers_enabled`); rack-scale only (`rack_scale_enabled`): `fabric_inventory`, `fabric_netplan`, `fabric_sysctl`, `fabric_bgp`, `fabric_validate` | `install` of any layer | | `platform` | `node_feature_discovery`, `nri_cpu_balloons`, `intel_gpu_plugin`, `cert_manager`, `istio`, `metallb`, `metrics_server`, `gateway` (alias `envoy_gateway`), `postgresql`, `keycloak`, `object_store`, `seaweedfs`, `observability`, `headlamp`; opt-in: `keda`, `velero`; rack-scale: `nvidia_gpu_operator`, `gpu_observability` | `install` of `platform` or any layer above | | `inference` | from inference-toolkit's `components.yaml`: `keycloak_config`, `envoy_ai_gateway`, `kserve`, `litellm`, `langfuse`, `llm_services`, `vllm_sr` (opt-in) | `install inference`, or a layer above it | -| `erag` | from chatbot-toolkit's `components.yaml` (the `app_*` roles) | `install erag`, after `init erag` | +| `chatbot` | from chatbot-toolkit's `components.yaml` (the `app_*` roles) | `install chatbot`, after `init chatbot` | | `agent-toolkit` | from agent-toolkit's `components.yaml` | `install agent-toolkit`, after `init agent-toolkit` | - **`install inference`** installs infrastructure + platform + inference (dependencies auto-pull) -- **`install erag`** and **`install agent-toolkit`** must be explicitly targeted, after `init` of that layer +- **`install chatbot`** and **`install agent-toolkit`** must be explicitly targeted, after `init` of that layer - Each component's `enabled:` expression decides whether it runs; for example `nri_cpu_balloons` runs only with `kubernetes_cpu_policy: nri-balloons` and `kubernetes_accelerator: cpu`. `./toolkit_manager.sh show` prints the merged list for your checkout. --- @@ -225,7 +225,7 @@ Adding a new action takes CLI support, an entry in `VALID_ACTIONS`, and a `tasks ### Cross-Repo Role Discovery -External repos are declared in per-layer manifests at `configs/repos/repos..yaml`; `init ` clones each one to `ext//` (`install` never clones). For example, [`configs/repos/repos.erag.yaml`](../../configs/repos/repos.erag.yaml) declares both the inference and Intel® Chatbot Toolkit repositories needed for that layer. Each entry may set `deployment_subdir` to locate the Ansible tree inside the repo: +External repos are declared in per-layer manifests at `configs/repos/repos..yaml`; `init ` clones each one to `ext//` (`install` never clones). For example, [`configs/repos/repos.chatbot.yaml`](../../configs/repos/repos.chatbot.yaml) declares both the inference and Intel® Chatbot Toolkit repositories needed for that layer. Each entry may set `deployment_subdir` to locate the Ansible tree inside the repo: ```yaml repos: @@ -233,7 +233,7 @@ repos: url: "https://github.com/intel/inference-toolkit" dest: "inference-toolkit" deployment_subdir: "" # roles/, components.yaml, config.yaml at repo root - - layer: "erag" + - layer: "chatbot" url: "https://github.com/intel/chatbot-toolkit" dest: "chatbot-toolkit" deployment_subdir: "deployment" # Ansible tree lives under deployment/ @@ -266,11 +266,11 @@ So a value in `global_config.yaml` overrides the same key in a layer config. Thi ### Component Resolution and Layers Components are defined in `components.yaml` files (this repo + ext repos). Each component specifies: -- `layer` (`infrastructure`, `platform`, `inference`, or a solution layer such as `erag`) +- `layer` (`infrastructure`, `platform`, `inference`, or a solution layer such as `chatbot`) - `depends_on` (the components it needs; execution order within a layer comes from these, and the order in the file only breaks ties) - `enabled` (an expression; disabled components are skipped) -The layers and their components are listed under [Layer Architecture](#layer-architecture). The `erag` and `agent-toolkit` layers must be explicitly targeted, after `init` of that layer. See [../../ext/chatbot-toolkit/docs/README.md](../../ext/chatbot-toolkit/docs/README.md) (exists after `init erag` clones the repo) for RAG-layer documentation. +The layers and their components are listed under [Layer Architecture](#layer-architecture). The `chatbot` and `agent-toolkit` layers must be explicitly targeted, after `init` of that layer. See [../../ext/chatbot-toolkit/docs/README.md](../../ext/chatbot-toolkit/docs/README.md) (exists after `init chatbot` clones the repo) for RAG-layer documentation. Component resolution happens in `playbooks/includes/resolve_target.yaml`, through `filter_plugins/resolve_components.py`: 1. A **layer** target pulls in the layers it depends on (`install`) or the layers that depend on it (`teardown`). `--only` turns that off. @@ -549,10 +549,10 @@ All Toolkit Manager commands run from the repository root. Every flag is in the ./toolkit_manager.sh init inference # Create environment with the Intel® Chatbot Toolkit solution -./toolkit_manager.sh init erag --env myenv +./toolkit_manager.sh init chatbot --env myenv # Create environment with a specific Intel® Chatbot Toolkit pipeline flavour -./toolkit_manager.sh init erag --flavour docsum +./toolkit_manager.sh init chatbot --flavour docsum # Show available layers and components ./toolkit_manager.sh show @@ -570,7 +570,7 @@ All Toolkit Manager commands run from the repository root. Every flag is in the ./toolkit_manager.sh install platform --env local # Install opt-in Intel® Chatbot Toolkit -./toolkit_manager.sh install erag --env myenv +./toolkit_manager.sh install chatbot --env myenv # Teardown everything (cluster included; asks first) ./toolkit_manager.sh teardown infrastructure --env local diff --git a/docs/reference/cli.md b/docs/reference/cli.md index d8378725..83214efd 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -73,16 +73,16 @@ hand. Create a new environment directory (`env//`, everything one deployment needs) and seed it with configuration for the specified layer. It also downloads (clones) the repositories the layer -comes from into `ext/`. The layer name (`inference`, `erag`, `agent-toolkit`: the ones with a +comes from into `ext/`. The layer name (`inference`, `chatbot`, `agent-toolkit`: the ones with a manifest in `configs/repos/`) determines which repositories are cloned and which configs are seeded; an unknown name is refused with the list of valid ones. ```bash ./toolkit_manager.sh init inference # standard inference stack -./toolkit_manager.sh init erag # inference + Intel® Chatbot Toolkit (default chatqna flavour) -./toolkit_manager.sh init erag --flavour docsum # Intel® Chatbot Toolkit with the docsum pipeline preset +./toolkit_manager.sh init chatbot # inference + Intel® Chatbot Toolkit (default chatqna flavour) +./toolkit_manager.sh init chatbot --flavour docsum # Intel® Chatbot Toolkit with the docsum pipeline preset ./toolkit_manager.sh init agent-toolkit # inference + Intel® Agent Toolkit -./toolkit_manager.sh init erag --env prod # create env/prod/ instead of env/local/ +./toolkit_manager.sh init chatbot --env prod # create env/prod/ instead of env/local/ ./toolkit_manager.sh init inference --upgrade # move already-cloned repos to the revisions pinned now ``` @@ -90,9 +90,9 @@ Creates (a file that already exists is never overwritten; you see `exists, skipp - `env//global_config.yaml` — main settings; edit this before installing - `env//nodes.yaml` — the machines to install on (IPs, SSH user and key); edit it for more than one node - `env//inventory/hosts.yaml` — Ansible inventory; points at this machine by default -- `env//config..yaml` — one per layer the environment holds (for example `config.inference.yaml`, `config.erag.yaml`, `config.agent-toolkit.yaml`) +- `env//config..yaml` — one per layer the environment holds (for example `config.inference.yaml`, `config.chatbot.yaml`, `config.agent-toolkit.yaml`) - `env//models.yaml` — the model catalog `model-manager` reads, copied from the inference repository -- `env//.solutions.yaml` — records which layers this env was created for; do not edit it +- `env//.solutions.yaml` — records which layers this env was created for; do not edit it (one exception: [moving an `erag` install](../deployment/upgrade.md)) - `env//logs/` — where every later command writes its log Running `init` again for another layer adds that layer to the same environment. `--flavour` picks a @@ -123,8 +123,8 @@ Deploy components. Dependencies are resolved automatically. # A single component on its own, nothing else ./toolkit_manager.sh install metallb --only --env local -# Opt-in Intel® Chatbot Toolkit (run `init erag` first) -./toolkit_manager.sh install erag --env local +# Opt-in Intel® Chatbot Toolkit (run `init chatbot` first) +./toolkit_manager.sh install chatbot --env local # Opt-in Intel® Agent Toolkit (run `init agent-toolkit` first) ./toolkit_manager.sh install agent-toolkit --env local @@ -136,12 +136,12 @@ Deploy components. Dependencies are resolved automatically. ./toolkit_manager.sh install inference --env local -- -vvv # Run past a refusing upgrade check (the run is recorded as forced) -./toolkit_manager.sh install erag --env local --force +./toolkit_manager.sh install chatbot --env local --force ``` What happens: -1. The installer checks the target exists. A solution layer (`erag`, `agent-toolkit`, …) must have +1. The installer checks the target exists. A solution layer (`chatbot`, `agent-toolkit`, …) must have been added to this environment with `init` first, or it stops and tells you the `init` command. 2. If there is no cluster yet (no `env//kubeconfig.yaml`), it builds one with Kubespray first. On later runs it finds the cluster and skips that step. @@ -166,7 +166,7 @@ refuses a blocking verdict. See [Upgrade a Layer](../deployment/upgrade.md). | `infrastructure` | `kubernetes`, `storage`; plus `kata_containers` (`kata_containers_enabled`) and the `fabric_*` rack-scale networking components (`rack_scale_enabled`) when switched on | | `platform` | `cert_manager`, `istio`, `metallb`, `gateway` (also accepted as `envoy_gateway`), `postgresql`, `keycloak`, `object_store`, `seaweedfs`, `observability`, `metrics_server`, `node_feature_discovery`, `nri_cpu_balloons`, `intel_gpu_plugin` (Intel GPU nodes only); plus `headlamp`, `keda` and `velero` when switched on, and `nvidia_gpu_operator` / `gpu_observability` on rack-scale | | `inference` | `keycloak_config`, `envoy_ai_gateway`, `kserve`, `llm_services`; plus `litellm` and `langfuse` (with `auth_type: litellm_vkey` or `litellm_enabled: true`), and `vllm_sr` when switched on. Comes from the inference repository | -| `erag` | The Intel® Chatbot Toolkit components (vector databases, document ingestion, chat UI, …). Comes from its repository; opt-in | +| `chatbot` | The Intel® Chatbot Toolkit components (vector databases, document ingestion, chat UI, …). Comes from its repository; opt-in | | `agent-toolkit` | The Intel® Agent Toolkit components (agent sandboxes, memory stores, …). Comes from its repository; opt-in | | `` | Any single component name, for example `kserve`, `observability` or `metallb` | @@ -194,10 +194,10 @@ Teardown deletes what `install` labelled with `toolkit-manager.intel.com/env` an ./toolkit_manager.sh teardown keycloak --only --env local # Remove the Intel® Chatbot Toolkit (keeps platform and inference) -./toolkit_manager.sh teardown erag --env local +./toolkit_manager.sh teardown chatbot --env local -# Destroy the cluster without uninstalling erag from it first -./toolkit_manager.sh teardown infrastructure --skip erag --env local +# Destroy the cluster without uninstalling chatbot from it first +./toolkit_manager.sh teardown infrastructure --skip chatbot --env local ``` What to expect: @@ -221,7 +221,7 @@ It changes nothing. ```bash ./toolkit_manager.sh validate inference --env local ./toolkit_manager.sh validate kserve --env local -./toolkit_manager.sh validate erag --env local +./toolkit_manager.sh validate chatbot --env local ``` Checks are implemented per-component as `tasks/validate.yaml` (asserts, connectivity, replica @@ -331,7 +331,7 @@ See [Upgrade a Layer](../deployment/upgrade.md#backup-and-restore). | `--flavour ` | (init only) Select a preset for the layer being inited (e.g., `chatqna`, `docsum`) | | `--upgrade` | (init only) Move already-cloned `ext/` repos onto the revisions the manifests pin now. Refuses on local changes; never rewrites your configs | | `--only` | (`install`, `teardown`, `validate`) Act on the target alone, without the components it depends on (install) or that depend on it (teardown) | -| `--skip ` | (`install`, `teardown`, `validate`) Comma-separated layers or components to leave out of the plan (e.g., `--skip erag` to tear down the cluster without uninstalling erag first) | +| `--skip ` | (`install`, `teardown`, `validate`) Comma-separated layers or components to leave out of the plan (e.g., `--skip chatbot` to tear down the cluster without uninstalling chatbot first) | | `--force` | (`install`, `teardown`, `add-node`, `remove-node`) Skip the confirmation prompt (required in CI, where there is no terminal to answer it). On `install`, also run past a refusing upgrade check, recorded as forced | | `--dry-run` | (`add-node`/`remove-node` only) Print the computed node changes and the Kubespray command, then exit. `remove-node` also prints where each pod would move | | `--node-lost` | (`remove-node` only) For a node that is already `NotReady`: no PodDisruptionBudget check, the drain is given up after 60 s, and the node is not reset over SSH. The capacity check still runs. Refused if the node is still `Ready` | diff --git a/docs/reference/glossary.md b/docs/reference/glossary.md index 65bf7a8d..c9f2b33e 100644 --- a/docs/reference/glossary.md +++ b/docs/reference/glossary.md @@ -44,7 +44,7 @@ Terms used across this documentation, in alphabetical order. **Langfuse.** LLM observability (traces, prompts, token usage), deployed whenever LiteLLM is, unless `langfuse_enabled: false`. -**Layer.** A group of components installed as a unit, in dependency order: `infrastructure`, `platform`, `inference`, and the opt-in `erag` and `agent-toolkit`. Installing a layer pulls in the layers it depends on. +**Layer.** A group of components installed as a unit, in dependency order: `infrastructure`, `platform`, `inference`, and the opt-in `chatbot` and `agent-toolkit`. Installing a layer pulls in the layers it depends on. **LiteLLM.** An OpenAI-compatible proxy that issues virtual API keys with per-key budgets. Always deployed with `auth_type: litellm_vkey`; optional with `jwt` (`litellm_enabled: true`). @@ -72,7 +72,7 @@ Terms used across this documentation, in alphabetical order. **Storage backend.** Where persistent data lives: `local-path` (single node), `nfs`, `ceph`, `netapp-trident`, or `custom` (a StorageClass your own CSI driver already provides). Set with `storage_backend`. -**Target.** What an action applies to: a layer such as `platform` or `erag`, or a component such as `istio`. Dependencies resolve automatically unless you pass `--only`. +**Target.** What an action applies to: a layer such as `platform` or `chatbot`, or a component such as `istio`. Dependencies resolve automatically unless you pass `--only`. **Virtual key.** A scoped API key issued by LiteLLM, with its own budget and rate limits, used instead of a Keycloak JWT when `auth_type: litellm_vkey`. diff --git a/docs/reference/labels.md b/docs/reference/labels.md index 80b50df8..38de9860 100644 --- a/docs/reference/labels.md +++ b/docs/reference/labels.md @@ -82,7 +82,7 @@ The NRI CPU balloons and Kata Containers components install into `kube-system`, ## Intel® Chatbot Toolkit (`chatbot-toolkit`) -These namespaces only exist once `install erag` has run; `install inference` does not create them. The eRAG repo sets their labels, so check that repo for the current values. +These namespaces only exist once `install chatbot` has run; `install inference` does not create them. The chatbot-toolkit repo sets their labels, so check that repo for the current values. | Namespace | PSA enforce | PSA audit | PSA warn | Istio | Role | |---|---|---|---|---|---| @@ -130,8 +130,8 @@ These namespaces only exist once `install erag` has run; `install inference` doe | `node-feature-discovery` | Per-node agents that only label nodes; they serve no mesh traffic. | | `csi-driver-nfs`, `rook-ceph` | Storage drivers that run on the host network. | | `vllm-semantic-router-system` | The role sets no Istio label on it. | -| `system` (eRAG) | Internal pipeline orchestration; no east-west mTLS needed between its co-located parts. | -| `nri-balloons-controller` (eRAG) | Host-level CPU pinning daemon; not a mesh service. | +| `system` (Chatbot Toolkit) | Internal pipeline orchestration; no east-west mTLS needed between its co-located parts. | +| `nri-balloons-controller` (Chatbot Toolkit) | Host-level CPU pinning daemon; not a mesh service. | --- diff --git a/filter_plugins/resolve_components.py b/filter_plugins/resolve_components.py index 513cbd32..05993c94 100644 --- a/filter_plugins/resolve_components.py +++ b/filter_plugins/resolve_components.py @@ -287,8 +287,8 @@ def resolve_components(components, layers, target, action="install", if c["name"] in names] # Skip filter - # A skip entry may name a component or a whole layer: "skip erag" is the useful - # request, and expanding it to erag's component list is the caller's job otherwise. + # A skip entry may name a component or a whole layer: "skip chatbot" is the useful + # request, and expanding it to chatbot's component list is the caller's job otherwise. skip_names = {alias.get(s.strip(), s.strip()) for s in (skip or "").split(",") if s.strip()} if skip_names: pool = [c for c in pool diff --git a/run_backup.sh b/run_backup.sh index 0469db60..ca872047 100755 --- a/run_backup.sh +++ b/run_backup.sh @@ -39,10 +39,10 @@ backup_usage() { TKM_LOG_LEVEL info (default) | debug | trace, as for toolkit_manager.sh Examples: - $me backup erag --env prod - $me list erag --env prod - $me restore erag --env prod - $me restore erag --env prod --from --force + $me backup chatbot --env prod + $me list chatbot --env prod + $me restore chatbot --env prod + $me restore chatbot --env prod --from --force EOF } diff --git a/src/tests/unit/test_backup_layer.py b/src/tests/unit/test_backup_layer.py index f6cb7101..38ea9656 100644 --- a/src/tests/unit/test_backup_layer.py +++ b/src/tests/unit/test_backup_layer.py @@ -18,15 +18,15 @@ restore_layer_selector, ) -LAYERS = ["infrastructure", "platform", "inference", "erag"] +LAYERS = ["infrastructure", "platform", "inference", "chatbot"] LAYER_DIRS = { "inference": "/repo/ext/inference-toolkit", - "erag": "/repo/ext/chatbot-toolkit/deployment", + "chatbot": "/repo/ext/chatbot-toolkit/deployment", } def test_profile_sits_beside_the_layers_components_yaml(): - assert backup_profile_path("erag", LAYER_DIRS) == "/repo/ext/chatbot-toolkit/deployment/backup_profile.yaml" + assert backup_profile_path("chatbot", LAYER_DIRS) == "/repo/ext/chatbot-toolkit/deployment/backup_profile.yaml" assert backup_profile_path("inference", LAYER_DIRS) == "/repo/ext/inference-toolkit/backup_profile.yaml" @@ -36,11 +36,11 @@ def test_layer_without_its_own_repository_has_no_profile_path(layer): def test_no_ext_directory_means_no_profile_path(): - assert backup_profile_path("erag", None) == "" + assert backup_profile_path("chatbot", None) == "" def test_restore_leaves_every_other_layer_out(): - selector = restore_layer_selector("erag", LAYERS, "toolkit-manager.intel.com/layer") + selector = restore_layer_selector("chatbot", LAYERS, "toolkit-manager.intel.com/layer") assert selector == {"matchExpressions": [{ "key": "toolkit-manager.intel.com/layer", "operator": "NotIn", @@ -49,8 +49,8 @@ def test_restore_leaves_every_other_layer_out(): def test_restore_of_the_only_layer_needs_no_selector(): - assert restore_layer_selector("erag", ["erag"], "k") is None - assert restore_layer_selector("erag", [], "k") is None + assert restore_layer_selector("chatbot", ["chatbot"], "k") is None + assert restore_layer_selector("chatbot", [], "k") is None @pytest.mark.parametrize("recorded, checkout, matches", [ @@ -68,7 +68,7 @@ def test_checkout_matches_record(recorded, checkout, matches): assert checkout_matches_record(recorded, checkout) is matches -VERSION_LABEL = "erag.example/version" +VERSION_LABEL = "chatbot.example/version" def _backup(name, completed, version="3.0.0", phase="Completed"): @@ -179,7 +179,7 @@ def test_backup_checks_the_version_it_labels_the_backup_with(tmp_path, version_y resolve = Path(__file__).resolve().parents[3] / "roles" / "backup" / "tasks" / "resolve_version.yaml" result = _run_play(tmp_path, { "hosts": "localhost", "connection": "local", "gather_facts": False, - "vars": {"backup_profile": profile, "backup_layer": "erag", "component_action": "backup", + "vars": {"backup_profile": profile, "backup_layer": "chatbot", "component_action": "backup", "_bk_recorded_version": "3.0.0", "backup_force": force, "backup_labels": {}, "backup_checkout_bypass_label_key": BYPASS_LABEL, "backup_manage_command_prefix": "run %s"}, "tasks": [{"ansible.builtin.include_tasks": str(resolve)}] + guard + diff --git a/src/tests/unit/test_env_repos.py b/src/tests/unit/test_env_repos.py index fc808fd4..f2161ea5 100644 --- a/src/tests/unit/test_env_repos.py +++ b/src/tests/unit/test_env_repos.py @@ -34,19 +34,19 @@ def setup(tmp_path, recorded, clones): for dest, layer in clones.items(): clone(tmp_path, dest, layer) (tmp_path / "repos").mkdir() - (tmp_path / "repos/repos.erag.yaml").write_text( + (tmp_path / "repos/repos.chatbot.yaml").write_text( "repos:\n - {layer: inference, url: u, dest: inference-toolkit}\n" - " - {layer: erag, url: u, dest: chatbot-toolkit}\n") + " - {layer: chatbot, url: u, dest: chatbot-toolkit}\n") env = tmp_path / "env/e" env.mkdir(parents=True) - rows = "".join(f" - {{name: {n}, repo: {r}, seeded_by: erag}}\n" for n, r in recorded.items()) + rows = "".join(f" - {{name: {n}, repo: {r}, seeded_by: chatbot}}\n" for n, r in recorded.items()) (env / ".solutions.yaml").write_text(f"schema: 2\nlayers:\n{rows}") def test_roles_and_registry_come_only_from_recorded_repos(tmp_path): - setup(tmp_path, {"inference": "inference-toolkit", "erag": "chatbot-toolkit"}, - {"inference-toolkit": "inference", "chatbot-toolkit": "erag", "enterprise.ai-erag": "erag", "other": "x"}) - r = sh(tmp_path, 'ensure_repos erag; echo "$ANSIBLE_ROLES_PATH"; echo "$ENV_REPOS"; ' + setup(tmp_path, {"inference": "inference-toolkit", "chatbot": "chatbot-toolkit"}, + {"inference-toolkit": "inference", "chatbot-toolkit": "chatbot", "enterprise.ai-erag": "chatbot", "other": "x"}) + r = sh(tmp_path, 'ensure_repos chatbot; echo "$ANSIBLE_ROLES_PATH"; echo "$ENV_REPOS"; ' "_merged_components | yq -r '.components[].name' | grep '^c_'") assert r.returncode == 0, r.stderr roles, repos, *names = r.stdout.splitlines() @@ -71,19 +71,19 @@ def test_a_run_without_a_record_reads_no_clone(tmp_path): def test_record_on_a_moved_repo_names_the_init_that_fixes_it(tmp_path): - setup(tmp_path, {"inference": "inference-toolkit", "erag": "enterprise.ai-erag"}, - {"inference-toolkit": "inference", "enterprise.ai-erag": "erag"}) + setup(tmp_path, {"inference": "inference-toolkit", "chatbot": "enterprise.ai-erag"}, + {"inference-toolkit": "inference", "enterprise.ai-erag": "chatbot"}) r = sh(tmp_path, "ensure_repos inference") assert r.returncode == 1 - assert "ext/enterprise.ai-erag for layer 'erag', but this release clones it into ext/chatbot-toolkit" in r.stderr - assert "init erag --upgrade --env e" in r.stderr + assert "ext/enterprise.ai-erag for layer 'chatbot', but this release clones it into ext/chatbot-toolkit" in r.stderr + assert "init chatbot --upgrade --env e" in r.stderr def test_missing_repo_names_the_layer_that_seeded_it(tmp_path): - setup(tmp_path, {"inference": "inference-toolkit", "erag": "chatbot-toolkit"}, {"inference-toolkit": "inference"}) + setup(tmp_path, {"inference": "inference-toolkit", "chatbot": "chatbot-toolkit"}, {"inference-toolkit": "inference"}) (tmp_path / "repos/repos.inference.yaml").write_text("repos:\n - {layer: inference, url: u, dest: inference-toolkit}\n") r = sh(tmp_path, "ensure_repos inference") - assert r.returncode == 1 and "init erag --env e" in r.stderr + assert r.returncode == 1 and "init chatbot --env e" in r.stderr @pytest.fixture diff --git a/src/tests/unit/test_layer_checks.py b/src/tests/unit/test_layer_checks.py index d44c7a6a..43ed233f 100644 --- a/src/tests/unit/test_layer_checks.py +++ b/src/tests/unit/test_layer_checks.py @@ -102,7 +102,7 @@ def render(layer): lookup=lambda _plugin, path: open(path).read()) assert render("platform") == "{}" - assert render("erag") == "{'solution_version': '3.1.0'}" + assert render("chatbot") == "{'solution_version': '3.1.0'}" def test_classify_run_does_not_crash_on_an_unparseable_target_version(): @@ -205,17 +205,17 @@ def test_supports_upgrade_is_coerced_once_for_gate_and_record(): env = Environment() env.filters.update(CoreFilters().filters(), **MathFilters().filters()) layers = [{"name": "platform", "supports": {"upgrade": "False"}}, - {"name": "erag", "supports": {"upgrade": "True"}}, + {"name": "chatbot", "supports": {"upgrade": "True"}}, {"name": "inference"}] rendered = env.from_string(task["ansible.builtin.set_fact"]["_layer_supports_upgrade"].strip()).render( layers=layers) supports = yaml.safe_load(rendered.replace("'", '"')) - assert supports == {"platform": False, "erag": True, "inference": False} + assert supports == {"platform": False, "chatbot": True, "inference": False} blocking = [dict(DOWNGRADE, layer=name) for name in supports] - assert upgrade_gate(blocking, supports)["refused"] == ["erag/version-change"] + assert upgrade_gate(blocking, supports)["refused"] == ["chatbot/version-change"] -@pytest.mark.parametrize("planned, refuses", [(["platform", "erag"], True), (["platform"], False)]) +@pytest.mark.parametrize("planned, refuses", [(["platform", "chatbot"], True), (["platform"], False)]) def test_probe_warning_names_the_refusal_only_with_a_gating_layer_planned(planned, refuses): from ansible.plugins.filter.core import FilterModule as CoreFilters from ansible.plugins.filter.mathstuff import FilterModule as MathFilters @@ -228,7 +228,7 @@ def test_probe_warning_names_the_refusal_only_with_a_gating_layer_planned(planne msg = env.from_string(task["ansible.builtin.debug"]["msg"]).render( kubernetes_kubeconfig="/k", _record_probe={"msg": "timeout"}, _active_components=[{"name": n, "layer": n} for n in planned], - _layer_supports_upgrade={"platform": False, "erag": True}) + _layer_supports_upgrade={"platform": False, "chatbot": True}) assert ("still refuses this run" in msg) == refuses @@ -253,9 +253,9 @@ def test_layer_release_version(data, expected): ("unversioned", "skipped"), ("downgrade", "blocking"), ("conflict", "blocking"), ]) def test_version_change_verdict(run_class, verdict): - v = version_change_verdict(run_class, "erag", record(version="3.1.0", target="3.2.0"), "3.0.0", "dev") + v = version_change_verdict(run_class, "chatbot", record(version="3.1.0", target="3.2.0"), "3.0.0", "dev") assert v["verdict"] == verdict - assert v["check"] == "version-change" and v["layer"] == "erag" + assert v["check"] == "version-change" and v["layer"] == "chatbot" if verdict != "pass": assert v["reason"] if verdict == "blocking": @@ -263,17 +263,17 @@ def test_version_change_verdict(run_class, verdict): def test_conflict_on_deleting_names_the_teardown(): - v = version_change_verdict("conflict", "erag", record(status="deleting"), "3.0.0", "dev") - assert v["resolve"] == "./toolkit_manager.sh teardown erag --env dev" + v = version_change_verdict("conflict", "chatbot", record(status="deleting"), "3.0.0", "dev") + assert v["resolve"] == "./toolkit_manager.sh teardown chatbot --env dev" def test_an_always_gates_verdict_gates_a_plain_install(): # The runner passes each layer's run class; a resume is otherwise never refused. - classes = {"erag": "resume"} - blocking = {"layer": "erag", "check": "compatibility", "verdict": "blocking", "reason": "r", "resolve": None} - assert upgrade_gate([dict(blocking, always_gates=True)], {"erag": True}, layer_class=classes)["refused"] == [ - "erag/compatibility"] - assert upgrade_gate([blocking], {"erag": True}, layer_class=classes)["refused"] == [] + classes = {"chatbot": "resume"} + blocking = {"layer": "chatbot", "check": "compatibility", "verdict": "blocking", "reason": "r", "resolve": None} + assert upgrade_gate([dict(blocking, always_gates=True)], {"chatbot": True}, layer_class=classes)["refused"] == [ + "chatbot/compatibility"] + assert upgrade_gate([blocking], {"chatbot": True}, layer_class=classes)["refused"] == [] def _tasks(tasks): @@ -301,64 +301,64 @@ def test_the_tracked_configuration_is_saved_after_the_record_end(): < names.index("Save or delete the {{ layer }} tracked configuration")) -DOWNGRADE = version_change_verdict("downgrade", "erag", record(version="3.1.0"), "3.0.0") +DOWNGRADE = version_change_verdict("downgrade", "chatbot", record(version="3.1.0"), "3.0.0") PASS = version_change_verdict("reinstall", "platform", record(), "1.1.0") def test_blocking_is_advisory_without_supports_upgrade(): - gate = upgrade_gate([DOWNGRADE, PASS], {"erag": False}) + gate = upgrade_gate([DOWNGRADE, PASS], {"chatbot": False}) assert gate["refused"] == [] and gate["forced"] is False assert [c["gating"] for c in gate["checks"]] == [False, False] def test_blocking_refuses_with_supports_upgrade(): - gate = upgrade_gate([DOWNGRADE, PASS], {"erag": True, "platform": False}) - assert gate["refused"] == ["erag/version-change"] + gate = upgrade_gate([DOWNGRADE, PASS], {"chatbot": True, "platform": False}) + assert gate["refused"] == ["chatbot/version-change"] assert gate["forced"] is False and gate["forcedChecks"] == [] assert [c["gating"] for c in gate["checks"]] == [True, False] def test_forced_bypass_is_recorded(): - gate = upgrade_gate([DOWNGRADE], {"erag": True}, forced=True) + gate = upgrade_gate([DOWNGRADE], {"chatbot": True}, forced=True) assert gate["refused"] == [] - assert gate["forced"] is True and gate["forcedChecks"] == ["erag/version-change"] + assert gate["forced"] is True and gate["forcedChecks"] == ["chatbot/version-change"] def test_force_without_a_gating_verdict_is_not_forced(): - gate = upgrade_gate([DOWNGRADE, PASS], {"erag": False}, forced=True) + gate = upgrade_gate([DOWNGRADE, PASS], {"chatbot": False}, forced=True) assert gate["forced"] is False and gate["forcedChecks"] == [] -LAYER_CHECK = {"layer": "erag", "check": "tag-check", "verdict": "blocking", +LAYER_CHECK = {"layer": "chatbot", "check": "tag-check", "verdict": "blocking", "reason": "tag mismatch", "resolve": "fix the tag", "always_gates": True} def test_layer_check_blocks_a_fresh_install_for_a_gating_layer(): - gate = upgrade_gate([LAYER_CHECK], {"erag": True}, False, {"erag": "fresh"}) - assert gate["refused"] == ["erag/tag-check"] + gate = upgrade_gate([LAYER_CHECK], {"chatbot": True}, False, {"chatbot": "fresh"}) + assert gate["refused"] == ["chatbot/tag-check"] assert gate["checks"][0]["gating"] is True def test_layer_check_is_advisory_for_a_non_gating_layer(): - gate = upgrade_gate([LAYER_CHECK], {"erag": False}, False, {"erag": "fresh"}) + gate = upgrade_gate([LAYER_CHECK], {"chatbot": False}, False, {"chatbot": "fresh"}) assert gate["refused"] == [] assert gate["checks"][0]["gating"] is False def test_layer_check_force_bypass_is_recorded(): - gate = upgrade_gate([LAYER_CHECK], {"erag": True}, True, {"erag": "fresh"}) + gate = upgrade_gate([LAYER_CHECK], {"chatbot": True}, True, {"chatbot": "fresh"}) assert gate["refused"] == [] - assert gate["forcedChecks"] == ["erag/tag-check"] + assert gate["forcedChecks"] == ["chatbot/tag-check"] def test_core_check_on_a_plain_install_stays_advisory(): - core_check = {"layer": "erag", "check": "compatibility", "verdict": "blocking", + core_check = {"layer": "chatbot", "check": "compatibility", "verdict": "blocking", "reason": "x", "resolve": "y"} - gate = upgrade_gate([core_check], {"erag": True}, False, {"erag": "fresh"}) + gate = upgrade_gate([core_check], {"chatbot": True}, False, {"chatbot": "fresh"}) assert gate["refused"] == [] assert gate["checks"][0]["gating"] is False # without layer_class, nothing restricts it to upgrade/downgrade (back-compat) - assert upgrade_gate([core_check], {"erag": True})["refused"] == ["erag/compatibility"] + assert upgrade_gate([core_check], {"chatbot": True})["refused"] == ["chatbot/compatibility"] @pytest.mark.parametrize("run_class, due", [ @@ -387,26 +387,26 @@ def test_record_dependencies(): assert record_dependencies(records, None) == {} -CORE = [{"layer": "erag", "check": "a", "verdict": "pass"}, {"layer": "platform", "check": "b", "verdict": "pass"}] +CORE = [{"layer": "chatbot", "check": "a", "verdict": "pass"}, {"layer": "platform", "check": "b", "verdict": "pass"}] def test_mark_always_gates_does_nothing_when_none_were_added(): - assert mark_always_gates(list(CORE), CORE, "erag", "x.yaml") == CORE + assert mark_always_gates(list(CORE), CORE, "chatbot", "x.yaml") == CORE def test_mark_always_gates_marks_only_the_verdicts_the_file_appended(): - added = {"layer": "erag", "check": "c", "verdict": "blocking"} - assert mark_always_gates(CORE + [added], CORE, "erag", "x.yaml") == CORE + [dict(added, always_gates=True)] + added = {"layer": "chatbot", "check": "c", "verdict": "blocking"} + assert mark_always_gates(CORE + [added], CORE, "chatbot", "x.yaml") == CORE + [dict(added, always_gates=True)] def test_mark_always_gates_overwrites_a_files_own_mark(): - added = {"layer": "erag", "check": "c", "verdict": "blocking", "always_gates": False} - assert mark_always_gates([added], [], "erag", "x.yaml") == [dict(added, always_gates=True)] + added = {"layer": "chatbot", "check": "c", "verdict": "blocking", "always_gates": False} + assert mark_always_gates([added], [], "chatbot", "x.yaml") == [dict(added, always_gates=True)] def test_a_layer_check_file_verdict_needs_layer_check_and_verdict(): with pytest.raises(ValueError, match="x.yaml appended a verdict without layer, check and verdict"): - mark_always_gates([{"layer": "erag", "check": "c"}], [], "erag", "x.yaml") + mark_always_gates([{"layer": "chatbot", "check": "c"}], [], "chatbot", "x.yaml") def test_the_default_deny_patterns_leave_out_common_secret_key_names(): @@ -416,50 +416,50 @@ def test_the_default_deny_patterns_leave_out_common_secret_key_names(): def test_a_layer_check_file_may_only_append_verdicts_for_its_own_layer(): - with pytest.raises(ValueError, match="x.yaml .layer erag. appended verdicts for platform"): - mark_always_gates(CORE + [{"layer": "platform", "check": "c", "verdict": "pass"}], CORE, "erag", "x.yaml") + with pytest.raises(ValueError, match="x.yaml .layer chatbot. appended verdicts for platform"): + mark_always_gates(CORE + [{"layer": "platform", "check": "c", "verdict": "pass"}], CORE, "chatbot", "x.yaml") with pytest.raises(ValueError, match="x.yaml changed the verdicts before it"): - mark_always_gates(CORE[:1] + [{"layer": "erag", "check": "c", "verdict": "pass"}], CORE, "erag", "x.yaml") + mark_always_gates(CORE[:1] + [{"layer": "chatbot", "check": "c", "verdict": "pass"}], CORE, "chatbot", "x.yaml") def test_only_every_class_checks_judge_a_fresh_install(): - classes = {"infrastructure": "fresh", "platform": "upgrade", "erag": "downgrade", "inference": "reinstall"} + classes = {"infrastructure": "fresh", "platform": "upgrade", "chatbot": "downgrade", "inference": "reinstall"} every_class = ["version_change"] assert check_layers(classes, "version_change", every_class) == list(classes) - assert check_layers(classes, "backup", every_class) == ["platform", "erag"] + assert check_layers(classes, "backup", every_class) == ["platform", "chatbot"] assert check_layers({"platform": "fresh"}, "backup", every_class) == [] def test_resume_inherits_the_interrupted_records_forced_checks(): - raw = {"forcedChecks": ["erag/version-change"]} - assert record_forced(raw, ["erag/backup-freshness"], "resume", "erag") == [ - "erag/backup-freshness", "erag/version-change"] + raw = {"forcedChecks": ["chatbot/version-change"]} + assert record_forced(raw, ["chatbot/backup-freshness"], "resume", "chatbot") == [ + "chatbot/backup-freshness", "chatbot/version-change"] def test_resume_of_a_non_forced_record_stays_unforced(): - assert record_forced({}, [], "resume", "erag") == [] - assert record_forced({"forcedChecks": []}, [], "resume", "erag") == [] + assert record_forced({}, [], "resume", "chatbot") == [] + assert record_forced({"forcedChecks": []}, [], "resume", "chatbot") == [] def test_non_resume_ignores_the_old_records_forced(): - raw = {"forcedChecks": ["erag/version-change"]} - assert record_forced(raw, ["erag/backup-freshness"], "upgrade", "erag") == ["erag/backup-freshness"] - assert record_forced(raw, [], "fresh", "erag") == [] + raw = {"forcedChecks": ["chatbot/version-change"]} + assert record_forced(raw, ["chatbot/backup-freshness"], "upgrade", "chatbot") == ["chatbot/backup-freshness"] + assert record_forced(raw, [], "fresh", "chatbot") == [] def test_record_forced_drops_other_layers_checks(): - raw = {"forcedChecks": ["erag/version-change", "platform/version-change"]} - forced = record_forced(raw, ["erag/backup-freshness", "platform/backup-freshness"], "resume", "erag") - assert forced == ["erag/backup-freshness", "erag/version-change"] + raw = {"forcedChecks": ["chatbot/version-change", "platform/version-change"]} + forced = record_forced(raw, ["chatbot/backup-freshness", "platform/backup-freshness"], "resume", "chatbot") + assert forced == ["chatbot/backup-freshness", "chatbot/version-change"] def test_claim_layer_dirs(): - erag = {"layers": [{"name": "erag"}], "components": [{"name": "edp", "layer": "erag"}]} + chatbot = {"layers": [{"name": "chatbot"}], "components": [{"name": "edp", "layer": "chatbot"}]} inference = {"components": [{"name": "vllm", "layer": "inference"}]} - dirs = claim_layer_dirs({}, erag, "ext/erag/deployment") - assert dirs == {"erag": "ext/erag/deployment"} + dirs = claim_layer_dirs({}, chatbot, "ext/chatbot/deployment") + assert dirs == {"chatbot": "ext/chatbot/deployment"} dirs = claim_layer_dirs(dirs, inference, "ext/ai-inference") - assert dirs == {"erag": "ext/erag/deployment", "inference": "ext/ai-inference"} + assert dirs == {"chatbot": "ext/chatbot/deployment", "inference": "ext/ai-inference"} # an earlier component-only claim yields to a later declaration, never to a later component assert claim_layer_dirs(dirs, {"components": [{"name": "x", "layer": "inference"}]}, "ext/other")["inference"] == "ext/ai-inference" assert claim_layer_dirs(dirs, {"layers": [{"name": "inference"}]}, "ext/other")["inference"] == "ext/other" @@ -488,26 +488,26 @@ def test_installer_commit_computed_once_with_argv(): def test_cluster_probe_verdict_is_blocking(): - v = cluster_probe_verdict("erag", "Forbidden") - assert v["check"] == "cluster-probe" and v["layer"] == "erag" + v = cluster_probe_verdict("chatbot", "Forbidden") + assert v["check"] == "cluster-probe" and v["layer"] == "chatbot" assert v["verdict"] == "blocking" assert "Forbidden" in v["reason"] assert v["resolve"] def test_cluster_probe_refuses_only_a_layer_that_declares_supports_upgrade(): - probed = [cluster_probe_verdict("erag", "no error text"), cluster_probe_verdict("platform", "no error text")] - gate = upgrade_gate(probed, {"erag": True, "platform": False}) - assert gate["refused"] == ["erag/cluster-probe"] - forced_gate = upgrade_gate(probed, {"erag": True, "platform": False}, forced=True) - assert forced_gate["refused"] == [] and forced_gate["forcedChecks"] == ["erag/cluster-probe"] + probed = [cluster_probe_verdict("chatbot", "no error text"), cluster_probe_verdict("platform", "no error text")] + gate = upgrade_gate(probed, {"chatbot": True, "platform": False}) + assert gate["refused"] == ["chatbot/cluster-probe"] + forced_gate = upgrade_gate(probed, {"chatbot": True, "platform": False}, forced=True) + assert forced_gate["refused"] == [] and forced_gate["forcedChecks"] == ["chatbot/cluster-probe"] def test_cluster_probe_refuses_although_every_layer_is_classed_fresh(): # The failed probe classes every layer fresh, a plain install the gate otherwise never refuses. - probed = [cluster_probe_verdict("erag", "no error text")] - gate = upgrade_gate(probed, {"erag": True}, layer_class={"erag": "fresh"}) - assert gate["refused"] == ["erag/cluster-probe"] + probed = [cluster_probe_verdict("chatbot", "no error text")] + gate = upgrade_gate(probed, {"chatbot": True}, layer_class={"chatbot": "fresh"}) + assert gate["refused"] == ["chatbot/cluster-probe"] def test_cluster_probe_does_not_refuse_with_no_gating_layer_planned(): @@ -652,18 +652,18 @@ def test_deployment_records_read_failure_gives_the_recovery_hint_not_the_raw_err ]) def test_upgrade_path_verdict(recorded, base, verdict): v = upgrade_path_verdict({"solution_version": "3.1.0", "upgrade_base_version": base}, - "erag", record(version=recorded), "upgrade", "3.1.0", "dev") + "chatbot", record(version=recorded), "upgrade", "3.1.0", "dev") assert v["verdict"] == verdict - assert v["check"] == "upgrade-path" and v["layer"] == "erag" + assert v["check"] == "upgrade-path" and v["layer"] == "chatbot" assert v["reason"] assert bool(v["resolve"]) is (verdict == "blocking") def test_upgrade_path_names_the_range_it_refuses(): - v = upgrade_path_verdict({"upgrade_base_version": ">=3.0.0,<3.1.0"}, "erag", record(version="2.3.0"), "upgrade", None, "dev") + v = upgrade_path_verdict({"upgrade_base_version": ">=3.0.0,<3.1.0"}, "chatbot", record(version="2.3.0"), "upgrade", None, "dev") assert "2.3.0" in v["reason"] and ">=3.0.0,<3.1.0" in v["reason"] - assert "erag" in v["resolve"] and "dev" in v["resolve"] - v = upgrade_path_verdict({"upgrade_base_version": "3.x"}, "erag", record(version="2.3.0"), "upgrade", None, "dev") + assert "chatbot" in v["resolve"] and "dev" in v["resolve"] + v = upgrade_path_verdict({"upgrade_base_version": "3.x"}, "chatbot", record(version="2.3.0"), "upgrade", None, "dev") assert "'3.x'" in v["reason"] and "not a range" in v["reason"] @@ -673,25 +673,25 @@ def test_upgrade_path_skips_a_layer_without_version_yaml(): def test_upgrade_path_gates_only_a_supports_upgrade_layer(): - v = upgrade_path_verdict({"upgrade_base_version": ">=3.0.0,<3.1.0"}, "erag", record(version="2.3.0"), "upgrade", None) - assert upgrade_gate([v], {"erag": True})["refused"] == ["erag/upgrade-path"] - assert upgrade_gate([v], {"erag": False})["refused"] == [] - assert upgrade_gate([v], {"erag": True}, forced=True)["forcedChecks"] == ["erag/upgrade-path"] + v = upgrade_path_verdict({"upgrade_base_version": ">=3.0.0,<3.1.0"}, "chatbot", record(version="2.3.0"), "upgrade", None) + assert upgrade_gate([v], {"chatbot": True})["refused"] == ["chatbot/upgrade-path"] + assert upgrade_gate([v], {"chatbot": False})["refused"] == [] + assert upgrade_gate([v], {"chatbot": True}, forced=True)["forcedChecks"] == ["chatbot/upgrade-path"] def test_upgrade_path_judges_upgrades_downgrades_and_conflicts(): - classes = {"platform": "reinstall", "inference": "fresh", "erag": "upgrade", "x": "downgrade"} - assert check_layers(classes, "upgrade_path", ["version_change"]) == ["erag", "x"] + classes = {"platform": "reinstall", "inference": "fresh", "chatbot": "upgrade", "x": "downgrade"} + assert check_layers(classes, "upgrade_path", ["version_change"]) == ["chatbot", "x"] classes["y"] = "conflict" - assert check_layers(classes, "upgrade_path", ["version_change"], ["conflict"]) == ["erag", "x", "y"] + assert check_layers(classes, "upgrade_path", ["version_change"], ["conflict"]) == ["chatbot", "x", "y"] def test_upgrade_path_skips_a_downgrade(): data = {"solution_version": "3.0.0", "upgrade_base_version": ">=3.1.0"} - v = upgrade_path_verdict(data, "erag", record(version="3.1.0"), "downgrade", "3.0.0") + v = upgrade_path_verdict(data, "chatbot", record(version="3.1.0"), "downgrade", "3.0.0") assert v["verdict"] == "skipped" and "3.1.0 -> 3.0.0" in v["reason"] - downgrade = version_change_verdict("downgrade", "erag", record(version="3.1.0"), "3.0.0") - assert upgrade_gate([downgrade, v], {"erag": True}, forced=True)["forcedChecks"] == ["erag/version-change"] + downgrade = version_change_verdict("downgrade", "chatbot", record(version="3.1.0"), "3.0.0") + assert upgrade_gate([downgrade, v], {"chatbot": True}, forced=True)["forcedChecks"] == ["chatbot/version-change"] @pytest.mark.parametrize("recorded, release, verdict", [ @@ -702,16 +702,16 @@ def test_upgrade_path_skips_a_downgrade(): def test_upgrade_path_judges_a_conflict_from_the_recorded_version(recorded, release, verdict): halted = record(version=recorded, status="halted", target="3.1.0") data = {"solution_version": release, "upgrade_base_version": ">=3.0.0"} - assert classify_run(halted, release, "erag") == "conflict" - assert upgrade_path_verdict(data, "erag", halted, "conflict", release)["verdict"] == verdict + assert classify_run(halted, release, "chatbot") == "conflict" + assert upgrade_path_verdict(data, "chatbot", halted, "conflict", release)["verdict"] == verdict @pytest.mark.parametrize("rec, reason", [ - (record(version=None, status="halted", target="3.1.0"), "erag has no recorded version to upgrade from"), - (record(status="deleting"), "a teardown of erag did not finish"), + (record(version=None, status="halted", target="3.1.0"), "chatbot has no recorded version to upgrade from"), + (record(status="deleting"), "a teardown of chatbot did not finish"), ]) def test_upgrade_path_skips_a_conflict_it_cannot_judge(rec, reason): - v = upgrade_path_verdict({"solution_version": "3.2.0", "upgrade_base_version": ">=3.0.0"}, "erag", rec, "conflict", "3.2.0") + v = upgrade_path_verdict({"solution_version": "3.2.0", "upgrade_base_version": ">=3.0.0"}, "chatbot", rec, "conflict", "3.2.0") assert (v["verdict"], v["reason"]) == ("skipped", reason) @@ -719,12 +719,12 @@ def test_upgrade_path_skips_a_conflict_it_cannot_judge(rec, reason): def test_upgrade_path_blocks_a_conflict_whose_recorded_version_does_not_parse(status): # Preflight does not parse an unfinished record's version; this check refuses it for that layer only. unfinished = record(version="3.1.0-SNAPSHOT", status=status, target="3.1.0") - assert classify_run(unfinished, "3.2.0", "erag") == "conflict" + assert classify_run(unfinished, "3.2.0", "chatbot") == "conflict" v = upgrade_path_verdict({"solution_version": "3.2.0", "upgrade_base_version": ">=3.0.0"}, - "erag", unfinished, "conflict", "3.2.0") + "chatbot", unfinished, "conflict", "3.2.0") assert v["verdict"] == "blocking" - assert v["reason"] == "recorded version: layer erag: '3.1.0-SNAPSHOT' is not a version" - assert v["resolve"] == ("install erag from a release whose upgrade_base_version covers" + assert v["reason"] == "recorded version: layer chatbot: '3.1.0-SNAPSHOT' is not a version" + assert v["resolve"] == ("install chatbot from a release whose upgrade_base_version covers" " 3.1.0-SNAPSHOT, then this one (--env )") @@ -746,7 +746,7 @@ def test_old_upgrade_reports_are_pruned_like_env_log_dir(): from layer_checks import backup_freshness_verdict, fresh_backups # noqa: E402 NOW = "2026-10-28T12:00:00Z" -LABEL = "erag.example/version" +LABEL = "chatbot.example/version" BYPASS = "toolkit-manager.intel.com/checkout-bypass" @@ -787,31 +787,31 @@ def test_fresh_backups_does_not_raise_on_a_recorded_version_that_does_not_parse( assert fresh_backups(backups, LABEL, "main", NOW, 6, BYPASS) == [] -FOUND = {"profile": "/ext/erag/deployment/backup_profile.yaml", "namespace": "velero", "max_age_hours": 6, +FOUND = {"profile": "/ext/chatbot/deployment/backup_profile.yaml", "namespace": "velero", "max_age_hours": 6, "found": True, "enabled": True, "version_label": LABEL, "velero": True, - "fresh": [{"name": "backup-erag-1", "completionTimestamp": "2026-10-28T11:00:00Z"}], + "fresh": [{"name": "backup-chatbot-1", "completionTimestamp": "2026-10-28T11:00:00Z"}], "server": True, "readable": True} def _freshness(without_velero=False, **facts): - return backup_freshness_verdict(dict(FOUND, **facts), "erag", "3.0.0", without_velero, "prod") + return backup_freshness_verdict(dict(FOUND, **facts), "chatbot", "3.0.0", without_velero, "prod") def test_backup_freshness_passes_on_a_fresh_readable_backup(): verdict = _freshness() - assert verdict["verdict"] == "pass" and "backup-erag-1" in verdict["reason"] + assert verdict["verdict"] == "pass" and "backup-chatbot-1" in verdict["reason"] assert verdict["check"] == "backup-freshness" and verdict["resolve"] is None assert "bypassed" not in verdict @pytest.mark.parametrize("facts, reason", [ - ({"found": False}, "no backup profile (/ext/erag/deployment/backup_profile.yaml)"), - ({"found": False, "profile": ""}, "erag has no backup profile"), + ({"found": False}, "no backup profile (/ext/chatbot/deployment/backup_profile.yaml)"), + ({"found": False, "profile": ""}, "chatbot has no backup profile"), ({"enabled": False}, "not enabled"), ({"version_label": ""}, "sets no version_label"), - ({"fresh": []}, "no Completed backup of erag 3.0.0 in the last 6 h"), - ({"server": False}, "no running Velero server to read backup backup-erag-1"), - ({"readable": False}, "backup backup-erag-1 exists but its contents cannot be read"), + ({"fresh": []}, "no Completed backup of chatbot 3.0.0 in the last 6 h"), + ({"server": False}, "no running Velero server to read backup backup-chatbot-1"), + ({"readable": False}, "backup backup-chatbot-1 exists but its contents cannot be read"), ({"velero": False}, "Velero is not deployed"), ]) def test_backup_freshness_blocks_without_a_verified_fresh_backup(facts, reason): @@ -822,7 +822,7 @@ def test_backup_freshness_blocks_without_a_verified_fresh_backup(facts, reason): def test_backup_freshness_resolve_names_the_backup_command(): resolve = _freshness(fresh=[])["resolve"] - assert resolve == "./run_backup.sh backup erag --env prod" + assert resolve == "./run_backup.sh backup chatbot --env prod" assert "upgrade_without_velero: true" in _freshness(velero=False)["resolve"] assert _freshness(velero=False)["resolve"].startswith( "set velero_enabled: true in env/prod/global_config.yaml, run ./toolkit_manager.sh install velero") @@ -839,52 +839,52 @@ def test_backup_freshness_without_velero_flag_is_ignored_where_velero_is_deploye assert _freshness(without_velero=True)["verdict"] == "pass" -BYPASSED = {"layer": "erag", "check": "backup-freshness", "verdict": "blocking", "reason": "r", +BYPASSED = {"layer": "chatbot", "check": "backup-freshness", "verdict": "blocking", "reason": "r", "resolve": None, "bypassed": True} def test_upgrade_gate_records_a_bypassed_gating_verdict_as_forced_without_refusing(): - gate = upgrade_gate([BYPASSED], {"erag": True}) - assert gate["refused"] == [] and gate["forcedChecks"] == ["erag/backup-freshness"] + gate = upgrade_gate([BYPASSED], {"chatbot": True}) + assert gate["refused"] == [] and gate["forcedChecks"] == ["chatbot/backup-freshness"] assert gate["forced"] is True def test_upgrade_gate_still_refuses_the_other_gating_verdicts_next_to_a_bypassed_one(): - gate = upgrade_gate([BYPASSED, DOWNGRADE], {"erag": True}) - assert gate["refused"] == ["erag/version-change"] - assert gate["forcedChecks"] == ["erag/backup-freshness"] + gate = upgrade_gate([BYPASSED, DOWNGRADE], {"chatbot": True}) + assert gate["refused"] == ["chatbot/version-change"] + assert gate["forcedChecks"] == ["chatbot/backup-freshness"] def test_upgrade_gate_bypassed_verdict_of_an_advisory_layer_is_not_forced(): - gate = upgrade_gate([BYPASSED], {"erag": False}) + gate = upgrade_gate([BYPASSED], {"chatbot": False}) assert gate["refused"] == [] and gate["forcedChecks"] == [] def test_upgrade_gate_force_lists_bypassed_and_forced_checks_once(): - gate = upgrade_gate([BYPASSED, DOWNGRADE], {"erag": True}, forced=True) - assert gate["refused"] == [] and gate["forcedChecks"] == ["erag/backup-freshness", "erag/version-change"] + gate = upgrade_gate([BYPASSED, DOWNGRADE], {"chatbot": True}, forced=True) + assert gate["refused"] == [] and gate["forcedChecks"] == ["chatbot/backup-freshness", "chatbot/version-change"] def test_backup_freshness_judges_only_upgrade_and_downgrade_runs(): - classes = {"erag": "upgrade", "inference": "reinstall", "platform": "downgrade", "x": "fresh"} - assert check_layers(classes, "backup_freshness", ["version_change"]) == ["erag", "platform"] + classes = {"chatbot": "upgrade", "inference": "reinstall", "platform": "downgrade", "x": "fresh"} + assert check_layers(classes, "backup_freshness", ["version_change"]) == ["chatbot", "platform"] def test_upgrade_gate_labels_how_each_verdict_is_printed(): - gate = upgrade_gate([BYPASSED, DOWNGRADE, PASS], {"erag": True}) + gate = upgrade_gate([BYPASSED, DOWNGRADE, PASS], {"chatbot": True}) assert [c["label"] for c in gate["checks"]] == ["gating, bypassed", "gating", ""] - assert upgrade_gate([DOWNGRADE], {"erag": False})["checks"][0]["label"] == "advisory" + assert upgrade_gate([DOWNGRADE], {"chatbot": False})["checks"][0]["label"] == "advisory" # Compatibility -ERAG_REQUIRES = {"erag": {"platform": ">=1.1.0,<1.2.0", "inference": ">=1.1.0,<1.2.0", - "installer": ">=1.1.0,<2.0.0"}} +CHATBOT_REQUIRES = {"chatbot": {"platform": ">=1.1.0,<1.2.0", "inference": ">=1.1.0,<1.2.0", + "installer": ">=1.1.0,<2.0.0"}} INSTALLED = {"infrastructure": record(version="1.1.0"), "platform": record(version="1.1.0"), - "inference": record(version="1.1.0"), "erag": record(version="3.0.0")} + "inference": record(version="1.1.0"), "chatbot": record(version="3.0.0")} -def compat(classes, records=INSTALLED, requires=ERAG_REQUIRES, release=None, installer="1.1.0", - layer="erag", depends_on=("inference", "platform"), layer_order=()): - release = release if release is not None else {name: "3.1.0" if name == "erag" else "1.1.0" for name in classes} +def compat(classes, records=INSTALLED, requires=CHATBOT_REQUIRES, release=None, installer="1.1.0", + layer="chatbot", depends_on=("inference", "platform"), layer_order=()): + release = release if release is not None else {name: "3.1.0" if name == "chatbot" else "1.1.0" for name in classes} versions = versions_after_run(records, release, installer) return compatibility_verdict(layer, classes, requires, records, versions, list(depends_on), "dev", layer_order=layer_order) @@ -892,12 +892,12 @@ def compat(classes, records=INSTALLED, requires=ERAG_REQUIRES, release=None, ins def test_versions_after_run(): versions = versions_after_run({"platform": record(version="1.1.0"), "inference": {}}, - {"platform": "1.2.0", "erag": None}, "1.1.0") - assert versions == {"platform": "1.2.0", "inference": None, "erag": None, "installer": "1.1.0"} + {"platform": "1.2.0", "chatbot": None}, "1.1.0") + assert versions == {"platform": "1.2.0", "inference": None, "chatbot": None, "installer": "1.1.0"} def test_compatibility_pass(): - v = compat({"erag": "upgrade"}) + v = compat({"chatbot": "upgrade"}) assert (v["check"], v["verdict"], v["reason"], v["resolve"]) == ("compatibility", "pass", "requires met", None) assert compat({"platform": "reinstall"}, layer="platform", depends_on=["infrastructure"])["reason"] == \ "nothing required" @@ -908,15 +908,15 @@ def test_compatibility_pass(): ("inference", "1.0.0", "blocking"), ("inference", "2.0.0", "advisory"), ]) def test_compatibility_lower_bound_blocks_upper_bound_advises(dep, version, verdict): - v = compat({"erag": "upgrade"}, records=dict(INSTALLED, **{dep: record(version=version)})) + v = compat({"chatbot": "upgrade"}, records=dict(INSTALLED, **{dep: record(version=version)})) assert v["verdict"] == verdict - assert v["reason"] == "erag 3.1.0 requires %s >=1.1.0,<1.2.0, %s is %s" % (dep, dep, version) + assert v["reason"] == "chatbot 3.1.0 requires %s >=1.1.0,<1.2.0, %s is %s" % (dep, dep, version) assert v["resolve"] == "./toolkit_manager.sh install %s --env dev from a release within >=1.1.0,<1.2.0" % dep @pytest.mark.parametrize("installer, verdict", [("1.0.0", "blocking"), ("2.0.0", "advisory"), ("1.9.3", "pass")]) def test_compatibility_installer_range(installer, verdict): - v = compat({"erag": "upgrade"}, installer=installer) + v = compat({"chatbot": "upgrade"}, installer=installer) assert v["verdict"] == verdict if verdict != "pass": assert v["resolve"] == "use an installer release within >=1.1.0,<2.0.0" @@ -929,29 +929,29 @@ def test_compatibility_bare_version_and_other_operators(): (">1.1.0", "1.1.0", "blocking"), (">1.1.0", "1.0.0", "blocking"), (">=1.1.0,<2.0.0", "1.2.0rc1", "pass"), (">=1.1.0", "1.1.0rc1", "blocking"), (">=1.1.0,<1.2.0", "1.2.0rc1", "advisory"), ("<=1.1.0", "1.1.1rc1", "advisory")]: - v = compat({"erag": "upgrade"}, records=dict(INSTALLED, platform=record(version=version)), - requires={"erag": {"platform": expr}}) + v = compat({"chatbot": "upgrade"}, records=dict(INSTALLED, platform=record(version=version)), + requires={"chatbot": {"platform": expr}}) assert v["verdict"] == verdict, (expr, version) def test_compatibility_missing_dependency_versions_block(): no_inference = {k: v for k, v in INSTALLED.items() if k != "inference"} - v = compat({"erag": "upgrade"}, records=no_inference) + v = compat({"chatbot": "upgrade"}, records=no_inference) assert v["verdict"] == "blocking" assert v["reason"] == "inference has no version (no deployment record)" assert v["resolve"] == "./toolkit_manager.sh install inference --env dev" - v = compat({"erag": "upgrade"}, records=dict(INSTALLED, inference={"layer": "inference", "version": None})) + v = compat({"chatbot": "upgrade"}, records=dict(INSTALLED, inference={"layer": "inference", "version": None})) assert v["reason"] == "inference has no version (its record has no version)" # planned in the same run, without a version.yaml - v = compat({"inference": "unversioned", "erag": "upgrade"}, release={"inference": None, "erag": "3.1.0"}) + v = compat({"inference": "unversioned", "chatbot": "upgrade"}, release={"inference": None, "chatbot": "3.1.0"}) assert v["reason"] == "inference has no version (it declares no version.yaml)" # a depends_on layer the requires do not name still needs a version - v = compat({"erag": "upgrade"}, records=no_inference, requires={"erag": {"platform": ">=1.1.0"}}) + v = compat({"chatbot": "upgrade"}, records=no_inference, requires={"chatbot": {"platform": ">=1.1.0"}}) assert v["verdict"] == "blocking" and v["reason"].startswith("inference has no version") def test_compatibility_judges_a_planned_dependency_at_its_release(): - v = compat({"platform": "upgrade", "erag": "upgrade"}, release={"platform": "1.2.0", "erag": "3.1.0"}) + v = compat({"platform": "upgrade", "chatbot": "upgrade"}, release={"platform": "1.2.0", "chatbot": "3.1.0"}) assert v["verdict"] == "advisory" and "platform is 1.2.0" in v["reason"] @@ -959,14 +959,14 @@ def test_compatibility_reverse_direction_is_advisory(): v = compat({"platform": "upgrade"}, release={"platform": "1.2.0"}, layer="platform", depends_on=["infrastructure"]) assert v["verdict"] == "advisory" - assert v["reason"] == ("erag (installed 3.0.0; range from its checkout) requires platform >=1.1.0,<1.2.0," + assert v["reason"] == ("chatbot (installed 3.0.0; range from its checkout) requires platform >=1.1.0,<1.2.0," " platform is now 1.2.0") - assert v["resolve"] == ("install platform within >=1.1.0,<1.2.0, or upgrade erag first:" - " ./toolkit_manager.sh init erag --upgrade --env dev") + assert v["resolve"] == ("install platform within >=1.1.0,<1.2.0, or upgrade chatbot first:" + " ./toolkit_manager.sh init chatbot --upgrade --env dev") # a planned dependant judges itself; an uninstalled one does not count; a reinstall changes nothing - assert compat({"platform": "upgrade", "erag": "upgrade"}, release={"platform": "1.2.0", "erag": "3.1.0"}, + assert compat({"platform": "upgrade", "chatbot": "upgrade"}, release={"platform": "1.2.0", "chatbot": "3.1.0"}, layer="platform", depends_on=["infrastructure"])["verdict"] == "pass" - assert compat({"platform": "upgrade"}, records={k: v for k, v in INSTALLED.items() if k != "erag"}, + assert compat({"platform": "upgrade"}, records={k: v for k, v in INSTALLED.items() if k != "chatbot"}, release={"platform": "1.2.0"}, layer="platform", depends_on=["infrastructure"])["verdict"] == "pass" assert compat({"platform": "reinstall"}, records=dict(INSTALLED, platform=record(version="1.2.0")), release={"platform": "1.2.0"}, layer="platform", depends_on=["infrastructure"])["verdict"] == "pass" @@ -976,55 +976,55 @@ def test_compatibility_resolve_orders_bottom_up_on_mixed_input(): # requires names inference before infrastructure; bottom-up still puts infrastructure first order = ["infrastructure", "platform", "inference"] no_versions = {k: v for k, v in INSTALLED.items() if k not in ("inference", "infrastructure")} - v = compat({"erag": "upgrade"}, records=no_versions, - requires={"erag": {"inference": ">=1.1.0", "infrastructure": ">=1.1.0"}}, + v = compat({"chatbot": "upgrade"}, records=no_versions, + requires={"chatbot": {"inference": ">=1.1.0", "infrastructure": ">=1.1.0"}}, depends_on=(), layer_order=order) assert v["resolve"] == ("1. ./toolkit_manager.sh install infrastructure --env dev" " 2. ./toolkit_manager.sh install inference --env dev") # without a layer_order nothing is reordered: requires's own key order comes through - assert compat({"erag": "upgrade"}, records=no_versions, - requires={"erag": {"inference": ">=1.1.0", "infrastructure": ">=1.1.0"}}, + assert compat({"chatbot": "upgrade"}, records=no_versions, + requires={"chatbot": {"inference": ">=1.1.0", "infrastructure": ">=1.1.0"}}, depends_on=())["resolve"] == ("1. ./toolkit_manager.sh install inference --env dev" " 2. ./toolkit_manager.sh install infrastructure --env dev") def test_compatibility_resolve_forward_and_reverse_combined_order(): - requires = {"platform": {"infrastructure": ">=1.1.0"}, **ERAG_REQUIRES} + requires = {"platform": {"infrastructure": ">=1.1.0"}, **CHATBOT_REQUIRES} kwargs = dict(records=dict(INSTALLED, infrastructure=record(version="1.0.0")), requires=requires, release={"platform": "1.2.0"}, layer="platform", depends_on=["infrastructure"]) forward_fix = "./toolkit_manager.sh install infrastructure --env dev from a release within >=1.1.0" - reverse_fix = ("install platform within >=1.1.0,<1.2.0, or upgrade erag first:" - " ./toolkit_manager.sh init erag --upgrade --env dev") + reverse_fix = ("install platform within >=1.1.0,<1.2.0, or upgrade chatbot first:" + " ./toolkit_manager.sh init chatbot --upgrade --env dev") - v = compat({"platform": "upgrade"}, layer_order=["infrastructure", "platform", "inference", "erag"], **kwargs) + v = compat({"platform": "upgrade"}, layer_order=["infrastructure", "platform", "inference", "chatbot"], **kwargs) assert v["resolve"] == "1. %s 2. %s" % (forward_fix, reverse_fix) # a layer_order that ranks the reverse finding's layer first reorders the fixes to match - v2 = compat({"platform": "upgrade"}, layer_order=["erag", "infrastructure", "platform", "inference"], **kwargs) + v2 = compat({"platform": "upgrade"}, layer_order=["chatbot", "infrastructure", "platform", "inference"], **kwargs) assert v2["resolve"] == "1. %s 2. %s" % (reverse_fix, forward_fix) - # a layer_order that omits erag still sorts it after every named layer, not before + # a layer_order that omits chatbot still sorts it after every named layer, not before v3 = compat({"platform": "upgrade"}, layer_order=["infrastructure", "platform", "inference"], **kwargs) assert v3["resolve"] == v["resolve"] def test_compatibility_dependants_filter(): - found = compatibility_dependants("platform", {"erag": {"platform": ">=1.1.0,<1.2.0"}}, - {"erag": record(version="3.0.0")}, "1.2.0", "dev") + found = compatibility_dependants("platform", {"chatbot": {"platform": ">=1.1.0,<1.2.0"}}, + {"chatbot": record(version="3.0.0")}, "1.2.0", "dev") assert found == [{ - "dependant": "erag", - "reason": "erag (installed 3.0.0; range from its checkout) requires platform >=1.1.0,<1.2.0," + "dependant": "chatbot", + "reason": "chatbot (installed 3.0.0; range from its checkout) requires platform >=1.1.0,<1.2.0," " platform is now 1.2.0", - "resolve": "install platform within >=1.1.0,<1.2.0, or upgrade erag first:" - " ./toolkit_manager.sh init erag --upgrade --env dev", + "resolve": "install platform within >=1.1.0,<1.2.0, or upgrade chatbot first:" + " ./toolkit_manager.sh init chatbot --upgrade --env dev", }] # within range: nothing found - assert compatibility_dependants("platform", {"erag": {"platform": ">=1.1.0,<1.2.0"}}, - {"erag": record(version="3.0.0")}, "1.1.5", "dev") == [] + assert compatibility_dependants("platform", {"chatbot": {"platform": ">=1.1.0,<1.2.0"}}, + {"chatbot": record(version="3.0.0")}, "1.1.5", "dev") == [] # not installed: skipped - assert compatibility_dependants("platform", {"erag": {"platform": ">=1.1.0,<1.2.0"}}, {}, "1.2.0", "dev") == [] + assert compatibility_dependants("platform", {"chatbot": {"platform": ">=1.1.0,<1.2.0"}}, {}, "1.2.0", "dev") == [] # no requires on this layer at all: skipped - assert compatibility_dependants("platform", {"erag": {}}, {"erag": record(version="3.0.0")}, + assert compatibility_dependants("platform", {"chatbot": {}}, {"chatbot": record(version="3.0.0")}, "1.2.0", "dev") == [] # layer_class names a dependant to exclude it: a layer this run judges itself assert compatibility_dependants("platform", {"platform": {"platform": ">=1.3.0"}}, @@ -1033,63 +1033,63 @@ def test_compatibility_dependants_filter(): def test_compatibility_names_the_layer_of_a_bad_range(): - with pytest.raises(ValueError, match="layer erag: requires.platform"): - compat({"erag": "upgrade"}, requires={"erag": {"platform": ">=one"}}) - with pytest.raises(ValueError, match="layer erag: requires is not a mapping"): - compat({"erag": "upgrade"}, requires={"erag": ["platform"]}) + with pytest.raises(ValueError, match="layer chatbot: requires.platform"): + compat({"chatbot": "upgrade"}, requires={"chatbot": {"platform": ">=one"}}) + with pytest.raises(ValueError, match="layer chatbot: requires is not a mapping"): + compat({"chatbot": "upgrade"}, requires={"chatbot": ["platform"]}) # unquoted, YAML reads 1.10 as the float 1.1: refused rather than read as >=1.1 - with pytest.raises(ValueError, match="layer erag: requires.platform 1.1 is not a range"): - compat({"erag": "upgrade"}, requires={"erag": {"platform": 1.10}}) - with pytest.raises(ValueError, match="layer erag: requires.platform '===1.1.0' is not a range"): - compat({"erag": "upgrade"}, requires={"erag": {"platform": "===1.1.0"}}) + with pytest.raises(ValueError, match="layer chatbot: requires.platform 1.1 is not a range"): + compat({"chatbot": "upgrade"}, requires={"chatbot": {"platform": 1.10}}) + with pytest.raises(ValueError, match="layer chatbot: requires.platform '===1.1.0' is not a range"): + compat({"chatbot": "upgrade"}, requires={"chatbot": {"platform": "===1.1.0"}}) # SpecifierSet("") matches every version for blank in ("", " "): - with pytest.raises(ValueError, match="layer erag: requires.platform '%s' is not a range" % blank): - compat({"erag": "upgrade"}, requires={"erag": {"platform": blank}}) + with pytest.raises(ValueError, match="layer chatbot: requires.platform '%s' is not a range" % blank): + compat({"chatbot": "upgrade"}, requires={"chatbot": {"platform": blank}}) def test_compatibility_names_an_installed_dependant_whose_requires_is_not_a_mapping(): - with pytest.raises(ValueError, match="layer erag: requires is not a mapping"): - compatibility_dependants("platform", {"erag": ["platform"]}, {"erag": record(version="3.0.0")}, "1.2.0", "dev") + with pytest.raises(ValueError, match="layer chatbot: requires is not a mapping"): + compatibility_dependants("platform", {"chatbot": ["platform"]}, {"chatbot": record(version="3.0.0")}, "1.2.0", "dev") def test_compatibility_names_an_unversioned_release_as_such(): - v = compatibility_verdict("erag", {"erag": "fresh"}, {"erag": {"platform": ">=2.0.0"}}, + v = compatibility_verdict("chatbot", {"chatbot": "fresh"}, {"chatbot": {"platform": ">=2.0.0"}}, {"platform": record(version="1.1.0")}, {"platform": "1.1.0"}, [], "dev") - assert v["reason"].startswith("erag (unversioned) requires platform >=2.0.0") + assert v["reason"].startswith("chatbot (unversioned) requires platform >=2.0.0") def test_compatibility_accepts_a_pre_release_dependant_range(): - assert compatibility_dependants("platform", {"erag": {"platform": ">=1.1.0,<2.0.0"}}, - {"erag": record(version="3.0.0")}, "1.2.0rc1", "dev") == [] + assert compatibility_dependants("platform", {"chatbot": {"platform": ">=1.1.0,<2.0.0"}}, + {"chatbot": record(version="3.0.0")}, "1.2.0rc1", "dev") == [] -BELOW = compat({"erag": "upgrade"}, records=dict(INSTALLED, platform=record(version="1.0.0"))) +BELOW = compat({"chatbot": "upgrade"}, records=dict(INSTALLED, platform=record(version="1.0.0"))) @pytest.mark.parametrize("run_class, gating", [ ("fresh", False), ("reinstall", False), ("resume", False), ("upgrade", True), ("downgrade", True), ]) def test_gate_never_refuses_a_plain_install(run_class, gating): - gate = upgrade_gate([BELOW], {"erag": True}, False, {"erag": run_class}) + gate = upgrade_gate([BELOW], {"chatbot": True}, False, {"chatbot": run_class}) assert gate["checks"][0]["gating"] is gating - assert gate["refused"] == (["erag/compatibility"] if gating else []) - forced = upgrade_gate([BELOW], {"erag": True}, True, {"erag": run_class}) - assert forced["forcedChecks"] == (["erag/compatibility"] if gating else []) + assert gate["refused"] == (["chatbot/compatibility"] if gating else []) + forced = upgrade_gate([BELOW], {"chatbot": True}, True, {"chatbot": run_class}) + assert forced["forcedChecks"] == (["chatbot/compatibility"] if gating else []) def test_gate_keeps_refusing_other_checks(): for run_class in ("downgrade", "conflict"): - verdict = version_change_verdict(run_class, "erag", record(version="3.1.0", target="3.2.0"), "3.0.0") - assert upgrade_gate([verdict], {"erag": True}, False, {"erag": run_class})["refused"] == \ - ["erag/version-change"] + verdict = version_change_verdict(run_class, "chatbot", record(version="3.1.0", target="3.2.0"), "3.0.0") + assert upgrade_gate([verdict], {"chatbot": True}, False, {"chatbot": run_class})["refused"] == \ + ["chatbot/version-change"] # without supports.upgrade nothing refuses, and without classes the gate is as before - assert upgrade_gate([BELOW], {"erag": False}, False, {"erag": "upgrade"})["refused"] == [] - assert upgrade_gate([BELOW], {"erag": True})["refused"] == ["erag/compatibility"] + assert upgrade_gate([BELOW], {"chatbot": False}, False, {"chatbot": "upgrade"})["refused"] == [] + assert upgrade_gate([BELOW], {"chatbot": True})["refused"] == ["chatbot/compatibility"] def test_compatibility_judges_every_class(): - classes = {"infrastructure": "fresh", "platform": "reinstall", "erag": "resume"} + classes = {"infrastructure": "fresh", "platform": "reinstall", "chatbot": "resume"} assert check_layers(classes, "compatibility", ["version_change", "compatibility"]) == list(classes) @@ -1098,17 +1098,17 @@ def test_compatibility_judges_every_class(): DENY = yaml.safe_load(open(os.path.join( os.path.dirname(__file__), "..", "..", "..", "roles", "layer_checks", "defaults", "main.yaml")))["config_tracking_deny"] TRACKING = """ -files: [config.erag.yaml, models-rag.yaml] +files: [config.chatbot.yaml, models-rag.yaml] rules: - id: EMBEDDING_MODEL_CHANGED - key: config.erag.yaml:inference_models[role=embedding].name + key: config.chatbot.yaml:inference_models[role=embedding].name message: "Embedding model changed from '{old}' to '{new}'" sets: {embedding_migration_required: "true", embedding_migration_old_model: "{old}"} - id: VECTOR_DIMS_CHANGED key: vector_dims verdict: blocking """ -ERAG_CONFIG = { +CHATBOT_CONFIG = { "vector_dims": 768, "replicas": 1, "admin_password": "x", "inference_models": [{"role": "embedding", "name": "bge-base"}, {"role": "llm", "name": "llama"}], } @@ -1121,16 +1121,16 @@ def layer(tmp_path): layer_dir.mkdir() env_dir.mkdir() (layer_dir / "config_tracking.yaml").write_text(TRACKING) - (env_dir / "config.erag.yaml").write_text(yaml.safe_dump(ERAG_CONFIG)) + (env_dir / "config.chatbot.yaml").write_text(yaml.safe_dump(CHATBOT_CONFIG)) return str(layer_dir), str(env_dir) def saved(config): - return yaml.safe_dump({"layer": "erag", "files": {"config.erag.yaml": config_tracking_strip(config, DENY)}}) + return yaml.safe_dump({"layer": "chatbot", "files": {"config.chatbot.yaml": config_tracking_strip(config, DENY)}}) def changed(**values): - return dict(ERAG_CONFIG, **values) + return dict(CHATBOT_CONFIG, **values) def test_strip_drops_denied_keys_at_any_depth(): @@ -1147,8 +1147,8 @@ def test_capture_without_tracking_file_is_none(tmp_path): def test_capture_skips_missing_files_and_secrets(layer): layer_dir, env_dir = layer captured = config_tracking_capture(layer_dir, env_dir, DENY) - assert list(captured) == ["config.erag.yaml"] - assert "admin_password" not in captured["config.erag.yaml"] + assert list(captured) == ["config.chatbot.yaml"] + assert "admin_password" not in captured["config.chatbot.yaml"] def test_capture_of_an_empty_file(layer): @@ -1158,49 +1158,49 @@ def test_capture_of_an_empty_file(layer): def test_no_saved_state_is_baseline(layer): - result = config_tracking_verdict(*layer, None, DENY, "erag") + result = config_tracking_verdict(*layer, None, DENY, "chatbot") assert result["check"]["verdict"] == "baseline" and result["facts"] == {} def test_layer_without_tracking_file_is_skipped(tmp_path): - result = config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "erag") - assert result["check"] == {"layer": "erag", "check": "config-tracking", "verdict": "skipped", + result = config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "chatbot") + assert result["check"] == {"layer": "chatbot", "check": "config-tracking", "verdict": "skipped", "reason": "no config_tracking.yaml", "resolve": None} - assert config_tracking_verdict(None, str(tmp_path), None, DENY, "erag")["check"]["verdict"] == "skipped" + assert config_tracking_verdict(None, str(tmp_path), None, DENY, "chatbot")["check"]["verdict"] == "skipped" def test_layer_supporting_upgrade_without_tracking_file_is_blocking(tmp_path): - check = config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "erag", "local", True)["check"] + check = config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "chatbot", "local", True)["check"] assert check["verdict"] == "blocking" - assert check["reason"] == "erag declares supports.upgrade but ships no config_tracking.yaml" - assert check["resolve"] == "add config_tracking.yaml beside erag's components.yaml, or rerun with --force" - assert upgrade_gate([check], {"erag": True})["refused"] == ["erag/config-tracking"] + assert check["reason"] == "chatbot declares supports.upgrade but ships no config_tracking.yaml" + assert check["resolve"] == "add config_tracking.yaml beside chatbot's components.yaml, or rerun with --force" + assert upgrade_gate([check], {"chatbot": True})["refused"] == ["chatbot/config-tracking"] def test_non_gating_layer_without_tracking_file_stays_skipped(tmp_path): - check = config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "erag", "local", False)["check"] + check = config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "chatbot", "local", False)["check"] assert check["verdict"] == "skipped" def test_unchanged_passes(layer): - check = config_tracking_verdict(*layer, saved(ERAG_CONFIG), DENY, "erag")["check"] + check = config_tracking_verdict(*layer, saved(CHATBOT_CONFIG), DENY, "chatbot")["check"] assert (check["verdict"], check["reason"]) == ("pass", "no tracked change") def test_change_without_rule_passes_and_is_named(layer): - check = config_tracking_verdict(*layer, saved(changed(replicas=3)), DENY, "erag")["check"] + check = config_tracking_verdict(*layer, saved(changed(replicas=3)), DENY, "chatbot")["check"] assert check["verdict"] == "pass" - assert check["reason"] == "changed, no rule: config.erag.yaml:replicas" + assert check["reason"] == "changed, no rule: config.chatbot.yaml:replicas" def test_secret_change_is_not_seen(layer): - check = config_tracking_verdict(*layer, saved(changed(admin_password="y")), DENY, "erag")["check"] + check = config_tracking_verdict(*layer, saved(changed(admin_password="y")), DENY, "chatbot")["check"] assert check["reason"] == "no tracked change" def test_advisory_rule_with_list_selection_sets_facts(layer): old = changed(inference_models=[{"role": "embedding", "name": "e5"}, {"role": "llm", "name": "llama"}]) - result = config_tracking_verdict(*layer, saved(old), DENY, "erag") + result = config_tracking_verdict(*layer, saved(old), DENY, "chatbot") assert result["check"]["verdict"] == "advisory" assert result["check"]["reason"] == "EMBEDDING_MODEL_CHANGED: Embedding model changed from 'e5' to 'bge-base'" assert result["check"]["resolve"] is None @@ -1209,16 +1209,16 @@ def test_advisory_rule_with_list_selection_sets_facts(layer): def test_blocking_wins_and_names_the_value_to_set_back(layer): old = changed(vector_dims=384, inference_models=[{"role": "embedding", "name": "e5"}]) - check = config_tracking_verdict(*layer, saved(old), DENY, "erag", "prod")["check"] + check = config_tracking_verdict(*layer, saved(old), DENY, "chatbot", "prod")["check"] assert check["verdict"] == "blocking" assert "VECTOR_DIMS_CHANGED: vector_dims '384' -> '768'" in check["reason"] assert check["resolve"] == "in env/prod set back vector_dims to '384'" def test_blocking_refuses_only_a_layer_that_supports_upgrade(layer): - check = config_tracking_verdict(*layer, saved(changed(vector_dims=384)), DENY, "erag")["check"] - assert upgrade_gate([check], {"erag": False})["refused"] == [] - assert upgrade_gate([check], {"erag": True})["refused"] == ["erag/config-tracking"] + check = config_tracking_verdict(*layer, saved(changed(vector_dims=384)), DENY, "chatbot")["check"] + assert upgrade_gate([check], {"chatbot": False})["refused"] == [] + assert upgrade_gate([check], {"chatbot": True})["refused"] == ["chatbot/config-tracking"] @pytest.mark.parametrize("when, old, new, fires", [ @@ -1247,7 +1247,7 @@ def test_saved_but_empty_state_is_compared_not_baseline(): @pytest.mark.parametrize("tracking", [ - "files: config.erag.yaml", + "files: config.chatbot.yaml", "files: []\nrules: [{key: k}]", "files: []\nrules: [{id: R}]", "files: []\nrules: [{id: R, key: a}, {id: R, key: b}]", @@ -1264,20 +1264,20 @@ def test_saved_but_empty_state_is_compared_not_baseline(): "files: []\nrules: [{id: R, key: .a}]", "files: []\nrules: [{id: R, key: 'f.yaml:'}]", "files: []\nrules: [{id: R, key: 'endpoints[url=http://x].name'}]", - "files: []\nrules: [{id: R, key: 'config.erag.yaml:llm.max_tokens'}]", + "files: []\nrules: [{id: R, key: 'config.chatbot.yaml:llm.max_tokens'}]", "files: []\nrules: [{id: R, key: 'db.Primary_Key'}]", "files: []\nrules: [{id: R, key: 'users[token=x].name'}]", ]) def test_malformed_tracking_file_is_refused(tmp_path, tracking): (tmp_path / "config_tracking.yaml").write_text(tracking) with pytest.raises(ValueError, match="config_tracking.yaml"): - config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "erag") + config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "chatbot") def test_a_rule_may_select_a_list_entry_by_a_value_the_deny_list_matches(tmp_path): (tmp_path / "config_tracking.yaml").write_text( "files: []\nrules: [{id: R, key: 'models[name=token].dims'}, {id: S, key: 'models[name=api_key.v2].dims'}]") - assert config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "erag")["check"]["verdict"] == "baseline" + assert config_tracking_verdict(str(tmp_path), str(tmp_path), None, DENY, "chatbot")["check"]["verdict"] == "baseline" def test_message_values_are_not_substituted_again(): @@ -1287,9 +1287,9 @@ def test_message_values_are_not_substituted_again(): def test_two_layers_setting_one_fact_are_refused(): - merged = config_tracking_merge_facts({}, "erag", {"flag": "true"}) - assert config_tracking_merge_facts(merged, "erag", {"flag": "false"})["flag"] == {"layer": "erag", "value": "false"} - with pytest.raises(ValueError, match="erag and other both set flag"): + merged = config_tracking_merge_facts({}, "chatbot", {"flag": "true"}) + assert config_tracking_merge_facts(merged, "chatbot", {"flag": "false"})["flag"] == {"layer": "chatbot", "value": "false"} + with pytest.raises(ValueError, match="chatbot and other both set flag"): config_tracking_merge_facts(merged, "other", {"flag": "true", "own": "x"}) @@ -1297,9 +1297,9 @@ def test_config_tracking_judges_the_resume_of_a_failed_upgrade(): # The save runs only after a successful run, so the resume must set the fired rules' facts again. defaults = yaml.safe_load(open(os.path.join(os.path.dirname(__file__), "..", "..", "..", "roles", "layer_checks", "defaults", "main.yaml"))) - classes = {"erag": "resume", "inference": "reinstall"} + classes = {"chatbot": "resume", "inference": "reinstall"} assert check_layers(classes, "config_tracking", defaults["upgrade_checks_every_class"], - defaults["upgrade_checks_also_classes"]["config_tracking"]) == ["erag"] + defaults["upgrade_checks_also_classes"]["config_tracking"]) == ["chatbot"] def test_tracked_configuration_is_kept_in_a_secret(): diff --git a/src/tests/unit/test_node_scaling_installer.py b/src/tests/unit/test_node_scaling_installer.py index 044d770f..37c46d25 100644 --- a/src/tests/unit/test_node_scaling_installer.py +++ b/src/tests/unit/test_node_scaling_installer.py @@ -354,7 +354,7 @@ def test_remove_node_with_nothing_to_remove(cluster): # --------------------------------------------------------------------------- -# Guards: ERAG, PodDisruptionBudgets +# Guards: Chatbot Toolkit, PodDisruptionBudgets # --------------------------------------------------------------------------- def pdb(name, allowed, selector): @@ -362,13 +362,13 @@ def pdb(name, allowed, selector): "status": {"disruptionsAllowed": allowed}} -def test_erag_namespaces_are_found(cluster): +def test_chatbot_namespaces_are_found(cluster): cluster.namespaces(["default", "edp", "rag-ui", "seaweedfs"]) - assert cluster.run("_erag_namespaces_present").stdout.split() == ["rag-ui", "edp"] + assert cluster.run("_chatbot_namespaces_present").stdout.split() == ["rag-ui", "edp"] -def test_erag_check_fails_closed(cluster): - result = cluster.run("_erag_namespaces_present", kubectl_fail=True) +def test_chatbot_check_fails_closed(cluster): + result = cluster.run("_chatbot_namespaces_present", kubectl_fail=True) assert result.returncode == 1 assert "cannot list namespaces" in result.stderr diff --git a/src/tests/unit/test_ownership_k8s.py b/src/tests/unit/test_ownership_k8s.py index 9f05ba4a..aa52afb0 100644 --- a/src/tests/unit/test_ownership_k8s.py +++ b/src/tests/unit/test_ownership_k8s.py @@ -192,7 +192,7 @@ def test_u1_labels_exactly_what_the_component_created(tmp_path): cm = api.add("ConfigMap", "app-cm", "app") secret = api.add("Secret", "app-secret", "app") deploy = api.add("Deployment", "web", "app") - declared = api.add("Secret", "erag-credentials", "app") + declared = api.add("Secret", "chattool-credentials", "app") other = api.add("ConfigMap", "other-cm", "app") cron = api.add("Secret", "cron-made", "app") manifest = doc("ConfigMap", "chart-cm", "app") @@ -212,7 +212,7 @@ def test_u1_labels_exactly_what_the_component_created(tmp_path): record(p, type="release", name="app", namespace="app") with open(own._record_file(p["state_file"]), "a") as f: f.write(json.dumps({"type": "object", "uid": other, "component": "other"}) + "\n") - p["declared"] = {"app": [{"kind": "Secret", "name": "erag-credentials"}]} + p["declared"] = {"app": [{"kind": "Secret", "name": "chattool-credentials"}]} result = own.label(api, p, Module()) diff --git a/src/tests/unit/test_run_backup.py b/src/tests/unit/test_run_backup.py index 5331574f..e0970e2a 100644 --- a/src/tests/unit/test_run_backup.py +++ b/src/tests/unit/test_run_backup.py @@ -44,11 +44,11 @@ def tree(tmp_path): (env / "inventory" / "hosts.yaml").write_text("all: {}\n") (env / "global_config.yaml").write_text("{}\n") (env / "config.inference.yaml").write_text("{}\n") - (env / "config.erag.yaml").write_text("{}\n") + (env / "config.chatbot.yaml").write_text("{}\n") (env / ".solutions.yaml").write_text( "schema: 2\ninited: []\nlayers:\n" " - {name: inference, config: config.inference.yaml}\n" - " - {name: erag, config: config.erag.yaml}\n" + " - {name: chatbot, config: config.chatbot.yaml}\n" ) return tmp_path @@ -78,7 +78,7 @@ def test_backup_passes_env_configs_in_record_order(tree): assert argv[argv.index("-i") + 1] == str(env / "inventory" / "hosts.yaml") assert str(tree / "playbooks" / "backup.yaml") in argv cfgs = [v for v in ev if v.startswith("@")] - assert cfgs == [f"@{env}/config.inference.yaml", f"@{env}/config.erag.yaml", f"@{env}/global_config.yaml"] + assert cfgs == [f"@{env}/config.inference.yaml", f"@{env}/config.chatbot.yaml", f"@{env}/global_config.yaml"] assert f"env_dir={env}" in ev assert f"kubernetes_kubeconfig={env}/kubeconfig.yaml" in ev assert "target=platform" in ev and "backup_action=backup" in ev diff --git a/toolkit_manager.sh b/toolkit_manager.sh index cf1f6e35..31473b1e 100755 --- a/toolkit_manager.sh +++ b/toolkit_manager.sh @@ -64,10 +64,10 @@ readonly -a ACTIONS=(configure show init install teardown validate status add-no # it is an unfinished add-node; re-running add-node resumes it. readonly ADD_NODE_PENDING_TAINT="ei.intel.com/add-node-pending" -# ERAG-only namespaces (docs/reference/labels.md). Namespaces ERAG shares +# Chatbot Toolkit-only namespaces (docs/reference/labels.md). Namespaces it shares # with other layers (seaweedfs, system) or that depend on the pipeline type -# (chatqa) are left out, so a cluster without ERAG never matches. -readonly -a ERAG_NAMESPACES=(rag-ui chat-history edp fingerprint vdb erag-gateway auth-apisix) +# (chatqa) are left out, so a cluster without it never matches. +readonly -a CHATBOT_NAMESPACES=(rag-ui chat-history edp fingerprint vdb erag-gateway auth-apisix) # ============================================================================= # Mutable globals — every one of these, and nothing else, is written after startup @@ -201,7 +201,7 @@ usage() { is no terminal to answer it); on install, also run past a refusing upgrade check, recorded as forced --skip comma-separated layers or components to leave out of the - plan, e.g. --skip erag to tear down the cluster without + plan, e.g. --skip chatbot to tear down the cluster without uninstalling it first --dry-run (add-node/remove-node) print the computed node diff and the Kubespray command that would run, then exit. For @@ -235,11 +235,11 @@ usage() { $me show # list layers/components $me configure # one-time machine prep $me init inference # seed env/local/ for inference - $me init erag # seed env/local/ for erag (+ deps) - $me init erag --flavour docsum # erag + docsum pipeline preset - $me init erag --env prod # seed env/prod/ for erag - $me init erag --upgrade # move ext/ to the revs pinned now - $me install erag # install just the erag layer + $me init chatbot # seed env/local/ for chatbot (+ deps) + $me init chatbot --flavour docsum # chatbot + docsum pipeline preset + $me init chatbot --env prod # seed env/prod/ for chatbot + $me init chatbot --upgrade # move ext/ to the revs pinned now + $me install chatbot # install just the chatbot layer $me status # see what's installed (env=local) $me install --env prod platform # multi-env on one bastion $me install metallb --only -- -vvv @@ -1539,15 +1539,15 @@ _require_live_nodes() { sort -u <<< "$out" } -# _erag_namespaces_present — the ERAG_NAMESPACES that exist in the cluster, +# _chatbot_namespaces_present — the CHATBOT_NAMESPACES that exist in the cluster, # one per line. err() if namespaces can't be listed, so "can't tell" never # reads as "not deployed". -_erag_namespaces_present() { +_chatbot_namespaces_present() { local out ns out=$(kubectl get namespaces -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' 2>&1) \ - || err "${ACTION}: cannot list namespaces to check for an ERAG deployment: + || err "${ACTION}: cannot list namespaces to check for a Chatbot Toolkit deployment: ${out}" - for ns in "${ERAG_NAMESPACES[@]}"; do + for ns in "${CHATBOT_NAMESPACES[@]}"; do grep -qxF -- "$ns" <<< "$out" && echo "$ns" done return 0 @@ -2246,12 +2246,12 @@ main() { || err "No kubeconfig at ${KUBE_CFG} — install the cluster first: ./$(basename "$0") install --env ${ENV_NAME} kubernetes" [[ "$IS_BYO" == "false" ]] \ || err "${ACTION} is not supported for a BYO cluster (existing_kubernetes is set in global_config.yaml)." - # Only the kubernetes component is ever run, so ERAG's node-specific + # Only the kubernetes component is ever run, so the Chatbot Toolkit's node-specific # placement would not be re-applied (docs/deployment/node-scaling.md). - local _erag_ns; _erag_ns=$(_erag_namespaces_present) - [[ -z "$_erag_ns" ]] \ - || err "${ACTION} is not supported on a cluster with ERAG deployed (found namespace(s): ${_erag_ns//$'\n'/, }). - Tear it down first (./$(basename "$0") teardown --env ${ENV_NAME} erag), then retry." + local _chatbot_ns; _chatbot_ns=$(_chatbot_namespaces_present) + [[ -z "$_chatbot_ns" ]] \ + || err "${ACTION} is not supported on a cluster with Intel® Chatbot Toolkit deployed (found namespace(s): ${_chatbot_ns//$'\n'/, }). + Tear it down first (./$(basename "$0") teardown --env ${ENV_NAME} chatbot), then retry." TARGET="kubernetes" _node_scaling_vars vars case "$ACTION" in From b81b095ceb5facf3d19956ee4fe3a6935bec9010 Mon Sep 17 00:00:00 2001 From: "Nowicki, Mikolaj" Date: Wed, 2 Dec 2026 05:11:53 +0100 Subject: [PATCH 2/2] chore: pin chatbot-toolkit to release-3.1 in repos.chatbot.yaml Branch pin for now, until the rename lands in chatbot-toolkit; replace with a release SHA before the release. Signed-off-by: Nowicki, Mikolaj --- configs/repos/repos.chatbot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/repos/repos.chatbot.yaml b/configs/repos/repos.chatbot.yaml index fad4950b..399ec958 100644 --- a/configs/repos/repos.chatbot.yaml +++ b/configs/repos/repos.chatbot.yaml @@ -22,7 +22,7 @@ repos: - layer: "chatbot" url: "https://github.com/intel/chatbot-toolkit" dest: "chatbot-toolkit" - rev: "6fa81aa0a9852cbf195317d45bfe8648ebc7a955" # v3.1.0-rc.1 + rev: "release-3.1" deployment_subdir: "deployment" config_dir: "pipelines" default_flavour: "chatqna"