Power On Auto Provisioning
Overview
POAP (Power On Auto Provisioning) automates the process of upgrading software images and installing configuration files on Cisco Nexus switches that are being deployed in the network.
When a Cisco Nexus switch with the POAP feature boots and does not find the startup configuration, the switch enters POAP mode, locates the DCNM DHCP server and bootstraps itself with its interface IP address, gateway, and DCNM DNS server IP addresses. It also obtains the IP address of the DCNM server to download the configuration script that is run on the switch to download and install the appropriate software image and device configuration file.
The DCNM 7.0 release will support the web services API for external applications to manage POAP, as an alternate means but similar to how the same API set is used internally by the DCNM GUI for the same functionality. Therefore customers can choose to externally manage POAP programmatically via the DCNM web services APIs, or directly via the DCNM GUI.
Note You will need to install DCNM before running these APIs.
DHCP Scope Creation
DHCP scope is a well-defined term in DHCP arena. It is used to define a policy for giving out IP addresses and other options to hosts on a specific IP subnet. Here, we use DCHP scope for the POAP function to distribute IPv4 address, default gateway, DNS sever IP address, PYTHON bootscript, TFTP server IP address (or other supported protocol + access credential + server, e.g. http://<dcnm-server-ip>/scripts) which stores the bootscript.
By default, a DHCP scope for the management vlan facing interface (eth1) will be created. For DFA use, it is only required to edit the management vlan facing scope with the corresponding IP address range for the devices management addresses.
Add the boot, startup, image server information
This feature allows the user to specify the servers & credentials used to access the device images and the uploaded or DCNM generated/published device configuration. The server serving the images could be different from the one serving the configurations. For the case that the same server is serving both images and configurations, the user is required to provide the server IP address and credentials twice for each server because the root directory holding the images or configuration files could be different. By default, the DCNM server will be the default image and configuration server. There will be two DCNM server addresses, one for config, one for image.
POAP Definition
A POAP device requires the following elements to make it work:
- A device configuration (startup config), which is either provided by the user or generated by DCNM through template instantiation
- Device system and kick start images
- Device Recipe (device deployment plan) which contains
– Image information -- the location (server & directory) and name of the device images to use
– Troubleshooting policy – enables debugging and set debugging level, turn-on/off remote logging. It is assumed that the device log will be uploaded to DCNM server.
– Extra misc. CLI commands to be executed before the device reboot
- Server List file (dcnm-server-list.cfg) – defines the list of servers and their access-credential and path to upload/download files or images.
- DHCP Scope setting – specifies the IPv4 address allocated to a switch device temporarily during the POAP process, what bootscript to use and which TFTP server stores it
- A bootup script (poap-dcnm.py), which is referenced in the DCHP scope, stored in a TFTP server(by default on DCNM server at /var/lib/tftpboot) and loaded by the device. It will download further information (device recipe) or entity (device images, startup config) to complete the POAP process.
POAP Templates
DCNM 7.0 comes pre-packaged with 3 default templates for DFA:
- The Leaf Template – used for switch devices with interfaces facing the hosts
- The Spine Template –used for switch devices serving as spine switches
- The Border Leaf Template – used for switch devices with interfaces facing the DC Interconnet
POAP REST APIs
The POAP REST APIs can be used by an external application to manage the servers and files used for Power On Auto Provisioning of the network devices
The POAP REST APIs are mentioned in Table 4-1 .
Table 4-1 POAP REST APIs
|
|
Resource at URL https://dcnm-ip/rest/
|
Generate Template Startup Config |
POST |
/templates/populate-template/{template-name} |
Get Group Navigation |
GET |
/templates/groups |
Perform Shallow Discovery |
POST |
/templates/perform-shallow-discovery |
Create POAP Definition |
POST |
/poap/poap-switch-definition |
Get POAP Template |
GET |
/poap/templates/{template-name} |
Create POAP Template |
POST |
/poap/templates |
Update POAP Template |
PUT |
/poap/templates/{template-name} |
Delete POAP Template |
POST |
/poap/templates/{template-name} |
Get All Published Templates |
GET |
/poap/templates?published=true |
Generate Template Startup Config |
POST |
/templates/populate-template/{template-name} |
List servers |
GET |
/poap/servers |
Create a server |
POST |
/poap/servers |
Get servers |
GET |
/poap/servers/server-name |
Update servers |
PUT |
/poap/servers/server-name |
Delete Servers |
DELETE |
/poap/servers/server-name |
List switch definitions |
GET |
/poap/switch-definitions |
Create switch definitions |
POST |
/poap/switch-definitions |
Get a switch definition |
GET |
/poap/switch-definitions/{serial-number} |
Update a switch definition |
PUT |
/poap/switch-definitions/switch-id |
Delete a switch definition |
DELETE |
/poap/switch-definitions/switch-id |
Publish a switch definition |
POST |
/poap/published-switch-definitions/{serial-number} |
For information on the default configuration profiles in the DCNM DFA package, see Appendix E, “POAP Examples”