# rackerlabs/understack architecture

> Architecture diagram of the GitHub repository rackerlabs/understack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rackerlabs/understack
- Repository: https://github.com/rackerlabs/understack

## Overview

UnderStack is a Kubernetes-hosted, opinionated OpenStack stack for bringing bare-metal systems into Ironic so they can be consumed by OpenStack. Its broad user workflow is cluster bootstrap and deployment, followed by hardware enrollment and provisioning; the README establishes that product flow but does not specify every runtime handoff. The repository also contains controllers, sync tooling, networking extensions, workflows, and operational CLIs. Edges below are limited to relationships visible in the README or sampled-source index/excerpts; some major subsystems have no evidenced connection to the overall provisioning flow.

Main entry points: [`python/understack-workflows/understack_workflows/netapp/manager.py`](https://github.com/rackerlabs/understack/blob/main/python/understack-workflows/understack_workflows/netapp/manager.py) (NetApp Manager), [`go/understackctl/cmd/root/root.go`](https://github.com/rackerlabs/understack/blob/main/go/understackctl/cmd/root/root.go) (Stack Operator), [`python/kubectl-us/us_cli/osclient.py`](https://github.com/rackerlabs/understack/blob/main/python/kubectl-us/us_cli/osclient.py) (OpenStack Router Client), [`go/understackctl/main.go`](https://github.com/rackerlabs/understack/blob/main/go/understackctl/main.go) (UnderStack CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deploy["Deployment and CLI"]
  node_operator["Stack Operator<br/>[root.go]"]
  node_ctl["UnderStack CLI<br/>[main.go]"]
end

subgraph group_baremetal["Bare Metal Provisioning"]
  node_workflows["Provisioning Workflows"]
  node_ironic["Ironic Integration"]
  node_nova["Nova Integration<br/>[driver.py]"]
  node_exporter["Hardware Metrics Exporter<br/>[main.go]"]
  node_metrics[("Metrics Cache and API<br/>[server.go]")]
end

subgraph group_network["Networking"]
  node_neutron["Neutron Extensions<br/>[routers.py]"]
  node_routercli["Router Health CLI<br/>[router_health.py]"]
  node_routerclient["OpenStack Router Client<br/>[osclient.py]"]
end

subgraph group_sync["Inventory and Sync"]
  node_nautobotop["Nautobot Operator"]
  node_nautobotsync["Nautobot Sync Services"]
  node_diff["Inventory Diff<br/>[main.py]"]
  node_opensync["OpenStack Sync Hooks<br/>[router_flavors.py]"]
  node_syncplugin["Router Flavor Reconcile<br/>[reconcile.py]"]
end

subgraph group_platform["Platform Services"]
  node_dexop["Dex Client Operator"]
  node_dex["Dex Service Client<br/>[client.go]"]
  node_netapp["NetApp Manager<br/>[manager.py]"]
  node_netappclient["ONTAP Client<br/>[client.py]"]
  node_lif["Network Interface Service<br/>[lif_service.py]"]
end

node_user(("Operator"))
node_hardware["Bare Metal"]

node_user -.->|"bootstraps"| node_operator
node_operator -.->|"enables provisioning"| node_hardware
node_hardware -.->|"ingested by"| node_ironic
node_ctl -->|"executes commands"| node_operator
node_exporter -->|"updates cache"| node_metrics
node_nautobotop -->|"invokes sync"| node_nautobotsync
node_diff -.-> node_routerclient
node_opensync -->|"reconciles flavors"| node_syncplugin
node_routercli -->|"uses connection"| node_routerclient
node_dexop -->|"manages clients"| node_dex
node_workflows -.-> node_netapp
node_netapp -->|"delegates operations"| node_netappclient
node_netapp -->|"delegates interface work"| node_lif

click node_operator "https://github.com/rackerlabs/understack/blob/main/go/understackctl/cmd/root/root.go"
click node_ctl "https://github.com/rackerlabs/understack/blob/main/go/understackctl/main.go"
click node_workflows "https://github.com/rackerlabs/understack/tree/main/python/understack-workflows/understack_workflows/main"
click node_ironic "https://github.com/rackerlabs/understack/tree/main/python/ironic-understack/ironic_understack/drivers"
click node_nova "https://github.com/rackerlabs/understack/blob/main/python/nova-understack/ironic_understack/driver.py"
click node_exporter "https://github.com/rackerlabs/understack/blob/main/go/ironic-hardware-exporter/cmd/main.go"
click node_metrics "https://github.com/rackerlabs/understack/blob/main/go/ironic-hardware-exporter/internal/server/server.go"
click node_neutron "https://github.com/rackerlabs/understack/blob/main/python/neutron-understack/neutron_understack/routers.py"
click node_routercli "https://github.com/rackerlabs/understack/blob/main/python/kubectl-us/us_cli/commands/router_health.py"
click node_routerclient "https://github.com/rackerlabs/understack/blob/main/python/kubectl-us/us_cli/osclient.py"
click node_nautobotop "https://github.com/rackerlabs/understack/blob/main/go/nautobotop/internal/controller/nautobot_controller.go"
click node_nautobotsync "https://github.com/rackerlabs/understack/tree/main/go/nautobotop/internal/nautobot/sync"
click node_diff "https://github.com/rackerlabs/understack/blob/main/python/diff-nautobot-understack/diff_nautobot_understack/project/main.py"
click node_opensync "https://github.com/rackerlabs/understack/blob/main/python/openstack-sync/openstack_sync/hooks/router_flavors.py"
click node_syncplugin "https://github.com/rackerlabs/understack/blob/main/python/openstack-sync/openstack_sync/plugins/neutron/router_flavors/reconcile.py"
click node_dexop "https://github.com/rackerlabs/understack/blob/main/go/dexop/internal/controller/client_controller.go"
click node_dex "https://github.com/rackerlabs/understack/blob/main/go/dexop/dex/client.go"
click node_netapp "https://github.com/rackerlabs/understack/blob/main/python/understack-workflows/understack_workflows/netapp/manager.py"
click node_netappclient "https://github.com/rackerlabs/understack/blob/main/python/understack-workflows/understack_workflows/netapp/client.py"
click node_lif "https://github.com/rackerlabs/understack/blob/main/python/understack-workflows/understack_workflows/netapp/lif_service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_operator,node_ctl toneBlue
class node_workflows,node_ironic,node_nova,node_exporter,node_metrics toneAmber
class node_neutron,node_routercli,node_routerclient toneMint
class node_nautobotop,node_nautobotsync,node_diff,node_opensync,node_syncplugin toneRose
class node_dexop,node_dex,node_netapp,node_netappclient,node_lif,node_user,node_hardware toneIndigo
```

## Components

### Deployment and CLI

- [Stack Operator](https://github.com/rackerlabs/understack/blob/main/go/understackctl/cmd/root/root.go): `go/understackctl/cmd/root/root.go`
- [UnderStack CLI](https://github.com/rackerlabs/understack/blob/main/go/understackctl/main.go): `go/understackctl/main.go`

### Bare Metal Provisioning

- [Provisioning Workflows](https://github.com/rackerlabs/understack/tree/main/python/understack-workflows/understack_workflows/main): `python/understack-workflows/understack_workflows/main`
- [Ironic Integration](https://github.com/rackerlabs/understack/tree/main/python/ironic-understack/ironic_understack/drivers): `python/ironic-understack/ironic_understack/drivers`
- [Nova Integration](https://github.com/rackerlabs/understack/blob/main/python/nova-understack/ironic_understack/driver.py): `python/nova-understack/ironic_understack/driver.py`
- [Hardware Metrics Exporter](https://github.com/rackerlabs/understack/blob/main/go/ironic-hardware-exporter/cmd/main.go): `go/ironic-hardware-exporter/cmd/main.go`
- [Metrics Cache and API](https://github.com/rackerlabs/understack/blob/main/go/ironic-hardware-exporter/internal/server/server.go): `go/ironic-hardware-exporter/internal/server/server.go`

### Networking

- [Neutron Extensions](https://github.com/rackerlabs/understack/blob/main/python/neutron-understack/neutron_understack/routers.py): `python/neutron-understack/neutron_understack/routers.py`
- [Router Health CLI](https://github.com/rackerlabs/understack/blob/main/python/kubectl-us/us_cli/commands/router_health.py): `python/kubectl-us/us_cli/commands/router_health.py`
- [OpenStack Router Client](https://github.com/rackerlabs/understack/blob/main/python/kubectl-us/us_cli/osclient.py): `python/kubectl-us/us_cli/osclient.py`

### Inventory and Sync

- [Nautobot Operator](https://github.com/rackerlabs/understack/blob/main/go/nautobotop/internal/controller/nautobot_controller.go): `go/nautobotop/internal/controller/nautobot_controller.go`
- [Nautobot Sync Services](https://github.com/rackerlabs/understack/tree/main/go/nautobotop/internal/nautobot/sync): `go/nautobotop/internal/nautobot/sync`
- [Inventory Diff](https://github.com/rackerlabs/understack/blob/main/python/diff-nautobot-understack/diff_nautobot_understack/project/main.py): `python/diff-nautobot-understack/diff_nautobot_understack/project/main.py`
- [OpenStack Sync Hooks](https://github.com/rackerlabs/understack/blob/main/python/openstack-sync/openstack_sync/hooks/router_flavors.py): `python/openstack-sync/openstack_sync/hooks/router_flavors.py`
- [Router Flavor Reconcile](https://github.com/rackerlabs/understack/blob/main/python/openstack-sync/openstack_sync/plugins/neutron/router_flavors/reconcile.py): `python/openstack-sync/openstack_sync/plugins/neutron/router_flavors/reconcile.py`

### Platform Services

- [Dex Client Operator](https://github.com/rackerlabs/understack/blob/main/go/dexop/internal/controller/client_controller.go): `go/dexop/internal/controller/client_controller.go`
- [Dex Service Client](https://github.com/rackerlabs/understack/blob/main/go/dexop/dex/client.go): `go/dexop/dex/client.go`
- [NetApp Manager](https://github.com/rackerlabs/understack/blob/main/python/understack-workflows/understack_workflows/netapp/manager.py): `python/understack-workflows/understack_workflows/netapp/manager.py`
- [ONTAP Client](https://github.com/rackerlabs/understack/blob/main/python/understack-workflows/understack_workflows/netapp/client.py): `python/understack-workflows/understack_workflows/netapp/client.py`
- [Network Interface Service](https://github.com/rackerlabs/understack/blob/main/python/understack-workflows/understack_workflows/netapp/lif_service.py): `python/understack-workflows/understack_workflows/netapp/lif_service.py`

### Other components

- **Operator**
- **Bare Metal**

## Connections

- Operator → Stack Operator: bootstraps
- Stack Operator → Bare Metal: enables provisioning
- Bare Metal → Ironic Integration: ingested by
- UnderStack CLI → Stack Operator: executes commands (evidence: `go/understackctl/main.go`)
- Hardware Metrics Exporter → Metrics Cache and API: updates cache (evidence: `go/ironic-hardware-exporter/cmd/main.go`)
- Nautobot Operator → Nautobot Sync Services: invokes sync (evidence: `go/nautobotop/internal/controller/nautobot_controller.go`)
- Inventory Diff → OpenStack Router Client
- OpenStack Sync Hooks → Router Flavor Reconcile: reconciles flavors (evidence: `python/openstack-sync/openstack_sync/hooks/router_flavors.py`)
- Router Health CLI → OpenStack Router Client: uses connection (evidence: `python/kubectl-us/us_cli/commands/router_health.py`)
- Dex Client Operator → Dex Service Client: manages clients (evidence: `go/dexop/internal/controller/client_controller.go`)
- Provisioning Workflows → NetApp Manager
- NetApp Manager → ONTAP Client: delegates operations (evidence: `python/understack-workflows/understack_workflows/netapp/manager.py`)
- NetApp Manager → Network Interface Service: delegates interface work (evidence: `python/understack-workflows/understack_workflows/netapp/manager.py`)
