The goal is to productionize @Papaul's efforts to perform zero touch provisioning of the network devices both on the Puppet side and with a Cookbook that will setup the DHCP side and then run Homer on the device to complete the setup.
The rough plan is to have:
Puppet
- DHCP generic config to setthe ZTP values required for it to work (merged)
- puppet/private: bash script to be executed by Juniper modules/secret/secrets/install_server/ztp-juniper.sh
- labs/private: dummy script to be executed by Juniper (merged)
Spicerack
- expand the existing spicerack.dhcp.DHCPConfMgmt class to be a bit more generic and match also this use case based on the vendor. (to be reviewed)
Cookbook
- Create a new sre.network.provision cookbook that should take care of the process (merged). Current idea is to:
- On Netbox assigns an IP to the em0 interface (must be there) and set its DNS record, disable all the other fixed interfaces
- run the sre.dns.netbox cookbook
- set the DHCP
- polls for the device to be "up" in some way [TBD how exactly]
- once the device is reachable the cookbook runs homer on it
- final checks and clean up
Pre-requisite
The current proposed workflow requires only that the device is already in Netbox with name and location and thanks to the device type template also the fixed interfaces.
There are some details to be defined for the fixed interfaces, see T336485#8844448