diff --git a/content/docs/user-guide/_index.md b/content/docs/user-guide/_index.md index b20b438..0838bc8 100644 --- a/content/docs/user-guide/_index.md +++ b/content/docs/user-guide/_index.md @@ -14,8 +14,8 @@ Learn how to manage DCM resources using the CLI or the web UI. output formats, and shell completion. - **[Authentication](../getting-started/authentication/)** — Log in, use bearer tokens, and work with auth-enabled control planes. -- **[Providers](providers/)** — View registered service providers and their - health status. +- **[Agents](agents/)** — View registered environment agents and their health + status. - **[Service Types](service-types/)** — Browse available service type definitions. - **[Catalog Items](catalog-items/)** — Create and manage reusable resource diff --git a/content/docs/user-guide/agents.md b/content/docs/user-guide/agents.md new file mode 100644 index 0000000..871e4ad --- /dev/null +++ b/content/docs/user-guide/agents.md @@ -0,0 +1,97 @@ +--- +title: Agents +type: docs +weight: 2 +--- + +Environment agents are lightweight processes that run in a target environment +and act as the intermediary between DCM and the service providers deployed +there. Each agent registers with the control plane, reports health via +heartbeats, and routes resource operation requests to the appropriate service +provider. + +Agents typically **self-register** when they start. The CLI exposes +**read-only** list and get operations so you can inspect registered agents and +their health. Manual registration is also available from the +[DCM UI](../ui/#agents) when automatic registration is not used. + +## Listing Agents + +Use `dcm agent list` to display all registered environment agents: + +```bash +dcm agent list +``` + +Example output: + +``` +ID NAME ENVIRONMENT HEALTH CREATED +agent-123 kubevirt-east production ready 2026-03-09T10:00:00Z +agent-456 kubevirt-west staging ready 2026-03-10T14:45:00Z +``` + +### Filtering by Health Status + +Use the `--health-status` flag to show only agents with a specific health status +(`ready`, `congested`, or `unavailable`): + +```bash +dcm agent list --health-status ready +``` + +### Pagination + +For environments with many agents, use pagination flags to control the output: + +- `--page-size` — Maximum number of agents to return per page. +- `--page-token` — Token for retrieving the next page of results (returned in + the previous response). + +```bash +dcm agent list --page-size 10 +``` + +## Getting Agent Details + +Use `dcm agent get` to retrieve detailed information about a single agent: + +```bash +dcm agent get agent-123 +``` + +To view the full details as JSON: + +```bash +dcm agent get agent-123 -o json +``` + +Example JSON output: + +```json +{ + "agent_id": "agent-123", + "name": "kubevirt-east", + "environment": "production", + "service_types": ["vm", "container"], + "cost": "medium", + "topic_name": "dcm.agent.kubevirt-east", + "health_status": "ready", + "last_heartbeat": "2026-03-09T10:05:00Z", + "create_time": "2026-03-09T10:00:00Z", + "update_time": "2026-03-09T10:05:00Z" +} +``` + +## Agent Health + +Each agent reports a **health status** based on its last heartbeat: + +- **`ready`** — The agent is reachable and operating normally. +- **`congested`** — The agent is reachable but its message consumer lag is + elevated. +- **`unavailable`** — The agent has not sent a recent heartbeat or is otherwise + not available for placement. + +These fields are updated automatically as agents send periodic heartbeats to +DCM. diff --git a/content/docs/user-guide/providers.md b/content/docs/user-guide/providers.md deleted file mode 100644 index 04151a9..0000000 --- a/content/docs/user-guide/providers.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Providers -type: docs -weight: 2 ---- - -Providers are infrastructure endpoints registered by service provider instances. -Each provider represents a backend system — such as a KubeVirt-enabled -Kubernetes cluster — that can host virtual machines or other resources managed -through DCM. - -Providers are **read-only** in the CLI. They are created automatically when a -service provider instance connects to DCM and registers its available -infrastructure. - -## Listing Providers - -Use `dcm sp provider list` to display all registered providers: - -```bash -dcm sp provider list -``` - -Example output: - -``` -ID NAME SERVICE TYPE STATUS HEALTH CREATED -3f8a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c kubevirt-cluster-01 vm REGISTERED HEALTHY 2026-01-15T08:30:00Z -a1b2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d kubevirt-cluster-02 vm REGISTERED HEALTHY 2026-02-20T14:45:00Z -``` - -### Filtering by Service Type - -Use the `--type` flag to show only providers of a specific service type: - -```bash -dcm sp provider list --type vm -``` - -### Pagination - -For environments with many providers, use pagination flags to control the -output: - -- `--page-size` — Maximum number of providers to return per page (int32). -- `--page-token` — Token for retrieving the next page of results (returned in - the previous response). - -```bash -dcm sp provider list --page-size 10 -``` - -## Getting Provider Details - -Use `dcm sp provider get` to retrieve detailed information about a single -provider: - -```bash -dcm sp provider get 3f8a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c -``` - -To view the full details as JSON: - -```bash -dcm sp provider get 3f8a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c -o json -``` - -Example JSON output: - -```json -{ - "create_time": "2026-04-15T18:37:45.550963Z", - "endpoint": "http://kubevirt-service-provider-main:8081/api/v1alpha1/vms", - "health_status": "ready", - "status": "registered", - "id": "9a0d35e0-4ed5-4728-a78e-c6ad61cdaab4", - "name": "kubevirt-main", - "schema_version": "v1alpha1", - "service_type": "vm", - "update_time": "2026-04-17T12:12:51.214419Z" -} -``` - -## Provider Status and Health - -Each provider exposes two key fields: - -- **STATUS** — Reflects the provider's registration state within DCM. A status - of `registered` means the provider has been successfully registered and is - recognized by the system. -- **HEALTH** — Reflects the result of the provider's last health check. A health - value of `ready` indicates that the provider is reachable and operating - normally. - -These fields are updated automatically as service provider instances report to -DCM. - -> **Note:** See -> [Register Another Provider](../../getting-started/register-another-provider/) -> for a walkthrough of adding a new provider. diff --git a/content/docs/user-guide/service-provider-resources.md b/content/docs/user-guide/service-provider-resources.md index 9307efd..85c5e13 100644 --- a/content/docs/user-guide/service-provider-resources.md +++ b/content/docs/user-guide/service-provider-resources.md @@ -6,11 +6,10 @@ weight: 7 Service provider resources are the actual infrastructure resources — such as virtual machines, containers, or other services — created on -[providers](../providers/) when -[catalog item instances](../catalog-item-instances/) are provisioned. For -example, when you deploy a catalog item instance for a VM on a KubeVirt -provider, the control plane creates a KubeVirt VirtualMachine resource. That -underlying resource is the SP resource. +[agents](../agents/) when [catalog item instances](../catalog-item-instances/) +are provisioned. For example, when you deploy a catalog item instance for a VM +on a KubeVirt provider, the control plane creates a KubeVirt VirtualMachine +resource. That underlying resource is the SP resource. SP resources are managed entirely by the control plane and are **read-only** in the CLI. Each SP resource is linked to a specific catalog item instance and the diff --git a/content/docs/user-guide/service-types.md b/content/docs/user-guide/service-types.md index ab8989f..3e377d9 100644 --- a/content/docs/user-guide/service-types.md +++ b/content/docs/user-guide/service-types.md @@ -88,8 +88,8 @@ Service types sit at the foundation of the DCM resource model: - **Catalog items** reference a service type and must conform to its schema. See [Catalog Items](../catalog-items/). -- **Providers** register with a specific service type, indicating what kinds of - resources they can host. See [Providers](../providers/). +- **Agents** register with one or more service types, indicating what kinds of + resources they can host. See [Agents](../agents/). - **Catalog item instances** are ultimately deployed according to the schema defined by the service type. See [Catalog Item Instances](../catalog-item-instances/). diff --git a/content/docs/user-guide/ui.md b/content/docs/user-guide/ui.md index ae3393a..b2a69fc 100644 --- a/content/docs/user-guide/ui.md +++ b/content/docs/user-guide/ui.md @@ -61,35 +61,36 @@ All tabs share the following interaction patterns: - **Empty state** — When no data is available, the table shows an empty state with a prompt to create the first resource where applicable. -## Providers +## Agents -The Providers tab lists all infrastructure providers registered with DCM. -Providers are created automatically when service provider instances connect and -register their available infrastructure. +The Agents tab lists all infrastructure environment agents registered with DCM. +Agents become available when they automatically register successfully with DCM +on startup -![Providers tab showing a table of registered providers with columns for display name, name, endpoint, service type, operations, status, and actions](/images/ui/providers-tab.png) +![Agents tab showing a table of registered agents with columns for name, environment, service types, cost, topic, health, and last hearbeat](/images/ui/agents-tab.png) ### Columns -| Column | Description | -| ------------ | ------------------------------------------------------------------------------------- | -| Display name | Human-readable label, with the provider ID shown as a caption below. | -| Name | Unique internal name of the provider. | -| Endpoint | The provider's API endpoint URL, with a copy button. | -| Service type | The service type the provider supports (e.g., `vm`). | -| Operations | Operations the provider exposes, shown as chips. Overflow is shown as a "+N" tooltip. | -| Status | Current health status of the provider. | -| Actions | Edit and delete buttons. | +| Column | Description | +| -------------- | ---------------------------------------------------------------------- | +| Name | Unique internal name of the agent. | +| Environment | Displays the environment label for the agent (e.g., `dev`). | +| Service types | The list of service type the agent supports (e.g., `vm`, `container`). | +| Cost | Shows the cost level of the agent (e.g., `low`) | +| Topic | Topic name associated with the agent. | +| Health | Current health status of the agent. | +| Last heartbeat | Shows the last time a live check was recieved. | ### Actions -- **Register provider** — Opens a dialog to register a new provider (display - name, name, endpoint, service type, operations). -- **Edit** — Opens the edit dialog pre-filled with the current values. -- **Delete** — Opens a confirmation dialog before removing the provider. -- **Copy endpoint** — Copies the provider's API endpoint URL to the clipboard. +- **Register agent** — Opens a dialog to register a new agent ( name, + environment, service types, cost, topic, health and last heartbeat). By + default, the agent automatically self registers with DCM when deployed. The + register agent button can be used as a manual alternative to automatic self + registration. For example, a the self registration code is remove before + deploying the agent. -For CLI equivalent operations, see [Providers](../providers/). +For CLI equivalent operations, see [Agents](../agents/). ## Policies diff --git a/static/images/ui/agents-tab.png b/static/images/ui/agents-tab.png new file mode 100644 index 0000000..37154f5 Binary files /dev/null and b/static/images/ui/agents-tab.png differ diff --git a/static/images/ui/providers-tab.png b/static/images/ui/providers-tab.png deleted file mode 100644 index 97abb78..0000000 Binary files a/static/images/ui/providers-tab.png and /dev/null differ