|
| 1 | +# SNO-NXSW-NETCONF Scenario |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +The `sno-nxsw-netconf` scenario is a Single Node OpenShift (SNO) deployment scenario |
| 6 | +for HotStack that deploys OpenStack on OpenShift with ironic bare metal |
| 7 | +provisioning capabilities and network switch integration using networking-baremetal's |
| 8 | +netconf-openconfig ML2 driver. |
| 9 | + |
| 10 | +## Architecture |
| 11 | + |
| 12 | +This scenario provisions: |
| 13 | + |
| 14 | +- **1x Controller Node**: Management and DNS/DHCP services |
| 15 | +- **1x OpenShift Master Node**: Single node OpenShift cluster running OpenStack services |
| 16 | +- **1x Switch Node**: NXSW switch with trunk ports for tenant VLAN networks |
| 17 | +- **2x Ironic Nodes**: Virtual bare metal nodes for testing Ironic provisioning workflows |
| 18 | + |
| 19 | +## Features |
| 20 | + |
| 21 | +- **Complete OpenStack Stack**: Full OpenStack deployment with ironic bare |
| 22 | + metal service |
| 23 | +- **Network Switch Integration**: Automated switch configuration with |
| 24 | + POAP (Power-On Auto Provisioning) and networking-baremetal netconf-openconfig driver |
| 25 | +- **NETCONF/OpenConfig**: Uses standard NETCONF protocol and vendor-neutral |
| 26 | + OpenConfig YANG models for switch configuration |
| 27 | +- **Complete Networking**: All OpenStack service networks with dedicated |
| 28 | + ironic networks |
| 29 | +- **SNO Deployment**: Single node OpenShift optimized for OpenStack services |
| 30 | +- **Development Ready**: Ideal for testing and development environments |
| 31 | +- **Bare Metal Provisioning**: Ironic service with 2 nodes for testing bare |
| 32 | + metal workflows |
| 33 | +- **Ironic Neutron Agent**: Includes ironic-neutron-agent for handling port |
| 34 | + binding notifications from Ironic to Neutron |
| 35 | + |
| 36 | +## Networks |
| 37 | + |
| 38 | +- **machine-net**: 192.168.32.0/24 - External access network |
| 39 | +- **ctlplane-net**: 192.168.122.0/24 - Control plane network |
| 40 | +- **internal-api-net**: 172.17.0.0/24 - OpenStack internal API network |
| 41 | +- **storage-net**: 172.18.0.0/24 - Storage network |
| 42 | +- **tenant-net**: 172.19.0.0/24 - Tenant network for OpenStack workloads |
| 43 | +- **ironic-net**: 172.20.1.0/24 - Ironic network for bare metal provisioning |
| 44 | +- **tenant-vlan103**: 172.20.3.0/24 - Tenant VLAN network (VLAN 103) |
| 45 | +- **tenant-vlan104**: 172.20.4.0/24 - Tenant VLAN network (VLAN 104) |
| 46 | +- **ironic0-br-net**: 172.20.5.0/29 - Ironic0 bridge network |
| 47 | +- **ironic1-br-net**: 172.20.5.8/29 - Ironic1 bridge network |
| 48 | + |
| 49 | +## Switch Instance Configuration |
| 50 | + |
| 51 | +The switch instance provides network switching capabilities with the following |
| 52 | +interface configuration: |
| 53 | + |
| 54 | +### Network Interface Summary |
| 55 | + |
| 56 | +```text |
| 57 | +Switch Instance: |
| 58 | +├── eth0: machine-net (management interface) |
| 59 | +├── eth1: trunk (ironic:101, tenant-vlan103:103, tenant-vlan104:104) |
| 60 | +├── eth2: ironic0-br-net (ironic bridge network) |
| 61 | +└── eth3: ironic1-br-net (ironic bridge network) |
| 62 | +``` |
| 63 | + |
| 64 | +### VLAN Mapping |
| 65 | + |
| 66 | +- **VLAN 101**: ironic (172.20.1.0/24) |
| 67 | +- **VLAN 102**: Default native VLAN |
| 68 | +- **VLAN 103**: tenant-vlan103 (172.20.3.0/24) |
| 69 | +- **VLAN 104**: tenant-vlan104 (172.20.4.0/24) |
| 70 | + |
| 71 | +The switch uses the `nxsw` image and provides dual trunk ports for redundancy |
| 72 | +and high availability. |
| 73 | + |
| 74 | +### POAP (Power-On Auto Provisioning) |
| 75 | + |
| 76 | +POAP is a Cisco NX-OS feature that automates the initial configuration of |
| 77 | +network switches. When the switch boots up, it automatically: |
| 78 | + |
| 79 | +1. **Downloads Configuration**: Fetches the switch configuration from a |
| 80 | + TFTP/HTTP server |
| 81 | +2. **Applies Settings**: Automatically configures interfaces, VLANs, and |
| 82 | + network settings |
| 83 | +3. **Enables Services**: Activates required network services (NETCONF, LACP, LLDP) |
| 84 | +4. **Validates Setup**: Performs integrity checks using MD5 checksums |
| 85 | + |
| 86 | +In this scenario, POAP enables zero-touch deployment of the NX-OS switch with pre-configured: |
| 87 | + |
| 88 | +- **Interface Configuration**: Trunk and access ports for tenant VLANs |
| 89 | +- **VLAN Setup**: VLANs for network segmentation |
| 90 | +- **Management Settings**: IP addressing, DNS, and routing configuration |
| 91 | +- **Security**: User accounts and access control |
| 92 | + |
| 93 | +## Ironic Nodes |
| 94 | + |
| 95 | +The scenario includes 2 virtual bare metal nodes for testing Ironic provisioning: |
| 96 | + |
| 97 | +### Ironic Node 0 |
| 98 | + |
| 99 | +- **Network**: ironic0-br-net (172.20.5.0/29) |
| 100 | +- **Purpose**: Bare metal provisioning testing |
| 101 | +- **Configuration**: Virtual media boot capable with sushy-tools |
| 102 | + |
| 103 | +### Ironic Node 1 |
| 104 | + |
| 105 | +- **Network**: ironic1-br-net (172.20.5.8/29) |
| 106 | +- **Purpose**: Bare metal provisioning testing |
| 107 | +- **Configuration**: Virtual media boot capable with sushy-tools |
| 108 | + |
| 109 | +## Networking-Baremetal Integration |
| 110 | + |
| 111 | +This scenario uses the `networking-baremetal` ML2 mechanism driver with the |
| 112 | +`netconf-openconfig` device driver. This provides: |
| 113 | + |
| 114 | +### NETCONF/OpenConfig Driver Features |
| 115 | + |
| 116 | +- **Standards-Based**: Uses NETCONF protocol (RFC 6241) and OpenConfig YANG models |
| 117 | +- **Vendor Support**: Tested with Cisco NXOS and Arista EOS switches |
| 118 | +- **LACP Support**: Can manage Link Aggregation Control Protocol (LACP) port channels |
| 119 | +- **VLAN Management**: Automatic VLAN creation and port configuration |
| 120 | +- **Port MTU**: Supports configuring MTU on switch ports |
| 121 | +- **SSH Key Authentication**: Supports password and SSH key authentication |
| 122 | + |
| 123 | +### Configuration |
| 124 | + |
| 125 | +The switch configuration is defined in `manifests/networking-baremetal/config.yaml`: |
| 126 | + |
| 127 | +- **Driver**: `netconf-openconfig` - Uses NETCONF with OpenConfig YANG models |
| 128 | +- **Device Parameters**: `name:nexus` - ncclient device handler for Cisco NXOS |
| 129 | +- **Switch ID**: MAC address of the switch for identification |
| 130 | +- **Physical Networks**: Maps OpenStack physical networks to the device |
| 131 | +- **LACP Management**: Configures automatic management of LACP aggregates |
| 132 | +- **Port ID Substitution**: Converts LLDP port names to NETCONF port format |
| 133 | + |
| 134 | +### Ironic Neutron Agent |
| 135 | + |
| 136 | +The `ironic-neutron-agent` service handles communication between Ironic and Neutron: |
| 137 | + |
| 138 | +- Listens for port binding notifications from Neutron |
| 139 | +- Triggers switch port configuration when Ironic nodes are provisioned |
| 140 | +- Manages VLAN assignment and port activation |
| 141 | + |
| 142 | +## Usage |
| 143 | + |
| 144 | +This scenario is ideal for: |
| 145 | + |
| 146 | +- Testing OpenStack deployments with networking-baremetal ML2 driver |
| 147 | +- Validating bare metal provisioning workflows with Ironic |
| 148 | +- Network switch integration testing with NETCONF/OpenConfig |
| 149 | +- Development and testing of networking-baremetal functionality |
| 150 | +- Evaluating vendor-neutral network automation with OpenConfig |
| 151 | + |
| 152 | +## Files |
| 153 | + |
| 154 | +- `bootstrap_vars.yml`: Main configuration variables |
| 155 | +- `heat_template.yaml`: OpenStack Heat template for infrastructure |
| 156 | +- `automation-vars.yml`: Automation pipeline definition |
| 157 | +- `manifests/`: OpenShift/Kubernetes manifests |
| 158 | +- `test-operator/`: Test automation configuration |
| 159 | + |
| 160 | +## Switch image preparation |
| 161 | + |
| 162 | +Due to an issue with some virtual hardware, where the EEPROM checksum is |
| 163 | +incorrect for the e1000 NIC the NXOS image must be modified to include a kernel |
| 164 | +module option `eeprom_bad_csum_allow=1` for the virtual e1000 network interface |
| 165 | +to work. |
| 166 | + |
| 167 | +```bash |
| 168 | +guestfish --rw --add <nxos-img> --mount /dev/sda6:/ edit /boot/grub/menu.lst.local |
| 169 | +``` |
| 170 | + |
| 171 | +Add the module parameter `e1000.eeprom_bad_csum_allow=1` at the end of the |
| 172 | +line starting with `cmdline`. |
| 173 | + |
| 174 | +> **NOTE**: The eeprom_bad_csum_allow only works on v.9.x.x images, the module |
| 175 | +> option does not seem to exist on later kernels? |
| 176 | +
|
| 177 | +## Upload switch image to cloud |
| 178 | + |
| 179 | +The images are very particular when it comes to what hardware is supported, |
| 180 | +when the image ensure to set the properties as shown in the example below. |
| 181 | + |
| 182 | +```bash |
| 183 | +openstack image create nexus9300v.9.3.15 \ |
| 184 | + --disk-format qcow2 \ |
| 185 | + --file nexus9300v.9.3.15.qcow2 \ |
| 186 | + --public \ |
| 187 | + --property hw_disk_bus=sata \ |
| 188 | + --property hw_vif_model=e1000 \ |
| 189 | + --property hw_video_model=none \ |
| 190 | + --property hw_firmware_type=uefi \ |
| 191 | + --property hw_machine_type=q35 \ |
| 192 | + --property os_type=linux \ |
| 193 | + --property hw_boot_menu=true |
| 194 | +``` |
| 195 | + |
| 196 | +## Switch NETCONF Configuration |
| 197 | + |
| 198 | +NETCONF is automatically enabled on the NXOS switch via the POAP (Power-On Auto |
| 199 | +Provisioning) configuration file (`poap.cfg`). The following features are enabled: |
| 200 | + |
| 201 | +- `feature netconf` - Enables NETCONF protocol on port 830 |
| 202 | +- `feature lacp` - Enables Link Aggregation Control Protocol |
| 203 | + |
| 204 | +After the switch boots and applies the POAP configuration, you can verify NETCONF |
| 205 | +is running: |
| 206 | + |
| 207 | +```bash |
| 208 | +switch# show netconf status |
| 209 | +``` |
| 210 | + |
| 211 | +## Container Image Requirements |
| 212 | + |
| 213 | +The standard OpenStack operator images include the required networking-baremetal |
| 214 | +components: |
| 215 | + |
| 216 | +- `networking-baremetal` - ML2 mechanism driver and ironic-neutron-agent |
| 217 | +- `ncclient` - Python NETCONF client library |
| 218 | +- `pyangbind` - Python bindings for YANG models |
| 219 | +- OpenConfig Python bindings - For OpenConfig YANG models |
| 220 | + |
| 221 | +## Deployment |
| 222 | + |
| 223 | +Follow the standard HotStack deployment process with this scenario by setting |
| 224 | +the scenario name to `sno-nxsw-netconf` in your deployment configuration. |
0 commit comments