It’s possible to set up a zero-touch provisioning system using only switches and routers. As you can imagine this doesn’t provide the best of flexibility.
When a device without config boots up it will start by trying to find a configuration it can apply. The first step is to get an IP address and the way to do this is to use a DHCP server. Aside from providing the network device with an IP address, the DHCP server can also inform it about where to find a configuration. This is a location on the network and can, for example, be on a TFTP or HTTP server. In this tutorial the focus will be on a solution using TFTP, the reason for this is to allow for the broadest possible device support.
TFTP will be handled by Fbtftp which is a dynamic TFTP framework written by Facebook. It’s written in Python 3 and focuses on flexibility and scalability instead of speed. However, as they write in the Readme file it’s still fast enough to handle Facebook’s data centers. This server will allow us to tie some logic around the TFTP service to send notifications to keep track of the installation status as well as call other automation jobs as part of the installation process.
The TFTP server has Linux as a requirement and as such you will have to use a Linux server. In this guide, we will be using Ubuntu 16.04.
While the solution requires a DHCP server the use of ISC DHCP is optional. I do however use some features that wouldn’t be possible on a DHCP server running on an IOS device, but that’s in an optional part of the tutorial.
Redis will be used to run jobs.