This script will be pushed to the device and then executed on-box. There are static variables set within the script that will need to be adjusted to match your environment.
- Catalyst 9000 series switch
- Management port
- DHCP server
- Option 67 (only) if http/https server is available, ex.
http://fileserver/ztp.py
- Option 150 specifies TFTP server
- Option 67 specifies the name of the file
ztp.py
- Option 67 (only) if http/https server is available, ex.
- TFTP Server
- Image name
- Image MD5
- File system
- Default of
bootflash:/
- Default of
- Config file
- Uses serial number obtained from the device
- Obtain serial number from device
- Set
config_file
variable toserialnumber.cfg
- Checks to see if image exists on device
- If the file exists, verify MD5 hash
- If MD5 hash does not match, retransfer
- If file does not exist, transfer file and verify MD5 hash
- Deploy EEM script to upgrade device (install mode)
- Device reboots
- See Workflow - Upgrade NOT Required
- Obtain serial number from device
- Set
config_file
variable toserialnumber.cfg
- Checks to see if configuration exists on device
- If not, transfer file over
- Find and remove any existing certs on device
- Deploy configuration using EEM script (configure replace)
Configure replace requires commands to be exact which can cause the configuration deployment to fail. Make sure all commands have been tested prior to deployment.