Skip to content

Commit 2a93b76

Browse files
docs: update Nautobot sync docs for unified Keystone/Neutron/Ironic resync workflow
1 parent f98cc14 commit 2a93b76

5 files changed

Lines changed: 140 additions & 113 deletions

File tree

docs/component-argo-workflows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set of WorkflowTemplates below.
1212
| get-bmc-creds | Get the credentials for the target Device | device_id | secret | * |
1313
| get-bmc-ip | Get BMC IP address for target Device | device_id | ip | |
1414
| bmc-sync-creds | Sync's a devices BMC password with what we have on record | device_id | | |
15-
| resync-ironic-nautobot | Resync Ironic nodes to Nautobot | node (optional) | | |
15+
| resync-nautobot | Resync Keystone, Neutron, and Ironic to Nautobot | | | |
1616

1717
\* WorkflowTemplate which requires a manual / custom implementation.
1818

docs/operator-guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ be the regular project area.
3737

3838
- [Gateway API Migration Guide](gateway-api.md) - Migration from ingress-nginx to Kubernetes Gateway API with Envoy Gateway
3939
- [Argo Workflows](workflows.md) - Workflow orchestration and troubleshooting
40-
- [Ironic to Nautobot Sync](ironic-nautobot-sync.md) - Event-driven sync and bulk resync operations
40+
- [OpenStack to Nautobot Sync](openstack-nautobot-sync.md) - Event-driven sync and bulk resync operations
4141
- [Monitoring Stack](monitoring.md) - Prometheus and Grafana monitoring
4242

4343
[cli]: <../user-guide/openstack-cli.md>

docs/operator-guide/ironic-nautobot-sync.md

Lines changed: 0 additions & 110 deletions
This file was deleted.
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# OpenStack to Nautobot Synchronization
2+
3+
This guide explains how OpenStack data (Keystone, Neutron, Ironic) is
4+
synchronized to Nautobot and how to handle situations when they get out of sync.
5+
6+
## Event-Driven Sync
7+
8+
Under normal operation, OpenStack data is automatically synchronized to Nautobot
9+
via Oslo notifications. When changes occur, events are published to RabbitMQ
10+
and processed by Argo Events workflows.
11+
12+
### How It Works
13+
14+
1. OpenStack services publish Oslo notifications to RabbitMQ when resources change
15+
2. Argo Events EventSources consume messages from the queues
16+
3. Sensors filter for relevant events and trigger workflows
17+
4. The `openstack-oslo-event` workflow processes the event and updates Nautobot
18+
19+
### Supported Events
20+
21+
The following events trigger Nautobot updates:
22+
23+
| Service | Event Type | Action |
24+
|---------|------------|--------|
25+
| Keystone | `identity.project.created` | Creates tenant in Nautobot |
26+
| Keystone | `identity.project.updated` | Updates tenant in Nautobot |
27+
| Keystone | `identity.project.deleted` | Deletes tenant from Nautobot |
28+
| Neutron | `network.create.end` | Creates UCVNI in Nautobot |
29+
| Neutron | `network.update.end` | Updates UCVNI in Nautobot |
30+
| Neutron | `network.delete.end` | Deletes UCVNI from Nautobot |
31+
| Neutron | `subnet.create.end` | Creates IPAM namespace/prefix in Nautobot |
32+
| Neutron | `subnet.update.end` | Updates IPAM namespace/prefix in Nautobot |
33+
| Neutron | `subnet.delete.end` | Deletes IPAM namespace/prefix from Nautobot |
34+
| Ironic | `baremetal.node.update.end` | Updates device in Nautobot |
35+
| Ironic | `baremetal.node.delete.end` | Deletes device from Nautobot |
36+
| Ironic | `baremetal.node.provision_set.end` | Updates device status and syncs inspection data |
37+
| Ironic | `baremetal.port.create.end` | Creates interface in Nautobot |
38+
| Ironic | `baremetal.port.update.end` | Updates interface in Nautobot |
39+
| Ironic | `baremetal.port.delete.end` | Deletes interface from Nautobot |
40+
| Ironic | `baremetal.portgroup.create.end` | Creates interface in Nautobot |
41+
| Ironic | `baremetal.portgroup.update.end` | Updates interface in Nautobot |
42+
| Ironic | `baremetal.portgroup.delete.end` | Deletes interface from Nautobot |
43+
44+
### Data Synchronized
45+
46+
**Keystone Projects → Nautobot Tenants:**
47+
48+
- Tenant name and description
49+
50+
**Neutron Networks → Nautobot UCVNIs:**
51+
52+
- UCVNI identifier and VLAN segmentation ID
53+
- Associated tenant
54+
55+
**Neutron Subnets → Nautobot IPAM:**
56+
57+
- IPAM namespace per network
58+
- Prefix with CIDR
59+
60+
**Ironic Nodes → Nautobot Devices:**
61+
62+
- Device name (generated from manufacturer and service tag)
63+
- Serial number
64+
- Manufacturer and model
65+
- Hardware specs (memory, CPUs, local storage)
66+
- Provision state (mapped to Nautobot status)
67+
- Location and rack (derived from connected switches)
68+
- Tenant (from Ironic lessee field)
69+
- Network interfaces and their connections
70+
71+
## Bulk Resync
72+
73+
When Nautobot gets out of sync with OpenStack (e.g., after database restore,
74+
missed events, or manual changes), you can perform a bulk resync.
75+
76+
### Resync Order
77+
78+
The resync workflow runs three steps sequentially in dependency order:
79+
80+
1. **Keystone** - Syncs projects as tenants (must exist before devices reference them)
81+
2. **Neutron** - Syncs networks as UCVNIs and subnets as IPAM namespaces/prefixes
82+
3. **Ironic** - Syncs nodes as devices with interfaces
83+
84+
Each step continues even if the previous step fails.
85+
86+
### Scheduled Resync (CronWorkflow)
87+
88+
A CronWorkflow runs daily at 2:00 AM UTC to catch any drift between OpenStack
89+
and Nautobot. This provides a safety net for missed events.
90+
91+
Check the schedule:
92+
93+
```bash
94+
argo -n argo-events cron list
95+
```
96+
97+
Manually trigger the scheduled workflow:
98+
99+
```bash
100+
argo -n argo-events submit --from cronworkflow/resync-nautobot
101+
```
102+
103+
Suspend/resume the schedule:
104+
105+
```bash
106+
argo -n argo-events cron suspend resync-nautobot
107+
argo -n argo-events cron resume resync-nautobot
108+
```
109+
110+
### On-Demand Resync (WorkflowTemplate)
111+
112+
Resync all OpenStack resources:
113+
114+
```bash
115+
argo -n argo-events submit --from workflowtemplate/resync-nautobot
116+
```
117+
118+
### Using CLI Directly
119+
120+
For debugging or running outside the cluster:
121+
122+
```bash
123+
# Resync all Keystone projects
124+
resync-keystone-nautobot \
125+
--nautobot_url https://nautobot.example.com \
126+
--nautobot_token <token>
127+
128+
# Resync all Neutron networks and subnets
129+
resync-neutron-nautobot \
130+
--nautobot_url https://nautobot.example.com \
131+
--nautobot_token <token>
132+
133+
# Resync all Ironic nodes
134+
resync-ironic-nautobot \
135+
--nautobot_url https://nautobot.example.com \
136+
--nautobot_token <token>
137+
```

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ nav:
174174
- 'Infrastructure':
175175
- operator-guide/argocd-helm-chart.md
176176
- operator-guide/workflows.md
177-
- operator-guide/ironic-nautobot-sync.md
177+
- operator-guide/openstack-nautobot-sync.md
178178
- operator-guide/monitoring.md
179179
- operator-guide/gateway-api.md
180180
- operator-guide/bmc-password.md

0 commit comments

Comments
 (0)