- By default, when a new Juniper switch's management interface is plugged in, it attempts to go through the ZTP process.
- It requests an IP address.
- It attempts to download and upgrade the Junos OS.
- It attempts to download and install a configuration.
- A user scans/enters the MAC address of each switch's management interface into a CSV file, along with other device-specific data (i.e. host name, IP addressing, VLANs, etc.).
- This CSV file is then placed on a server somewhere on the network where python, jinja2, apache2, the required Junos OS version, and a DHCP server are installed/loaded.
- Two jinja templates exist on this server that allow for the generation of device-specific configuration files.
- A configuration template that contains variables for all data that differs per device.
- A DHCP reservation template that contains variables for certain device-specific information (i.e MAC address of a switch's management interface).
- A single python script exists on this server, which when executed, analyzes the CSV file, generates configuration files, as well as creates DHCP reservations for each switch.
- Upon plugging each switch into the network, the ZTP process is triggered, and switches are deployment-ready in minutes.
Discussing my constraints with Vince and other team members, we came to the conclusion that a small, portable mini-computer just might work for this type of scenario. Enter Raspberry Pi!
Together we were able to validate that a Raspberry Pi gets the job done. It is super cheap and can be powered via a USB port on a switch. Once everything is loaded and the python script is executed, it is very plug and play. The Raspberry Pi can then be shipped from site to site to perform OS upgrades and provision configuration data.
In effort to make things a little simpler for network engineers that would like to try this out, I have taken a snapshot of my 8GB microSD with all the necessary applications installed and configured. It even has a sample CSV file, and generated samples from the python script. If you would like a copy just let me know. If you would like to build your own, here is what I installed:
- Snappy Ubuntu Core - https://wiki.ubuntu.com/ARM/RaspberryPi
- apache2 - used to transfer files via http
- python - used to generate files
- jinja2 - used to create templates
- isc-dhcp-server - used to serve IP addresses
- openssh-server - used to allow SSH access
hey Spencer,
ReplyDeleteLet me know how to get a copy of your 8GB microSD please.
greyhunter, send me your email and I will send you a link.
Deletehow can i send it privately to you? could not find any contact me link
ReplyDeleteThis comment has been removed by the author.
DeleteThanks. You may delete the file as i finished downloading.
DeleteAppreciate your support.
Hi Spencer,
ReplyDeleteThis is exactly like a project I've been trying to get working. Can you send me your snapshot? I can't find any contact information on this page.
Thanks!
Here is a link. It will be valid for 48 hours and then I will remove it.
Deletehttps://drive.google.com/file/d/0B3xuJU9ioNLJWGhyQ0paemRlOWs/view?usp=sharing
Downloaded! Thank you.
DeleteHi Spencer,
ReplyDeleteIs your snapshot working on Pi 3? I am having a tough time of running on Pi 3.
No this image is for Pi 2. That could be why you are having issues.
ReplyDeletehey Spencer,
ReplyDeleteLet me know how to get a copy of your 8GB microSD please.
Here is my email address
yanlouze@gmail.com
Thanks so much
Hello, you should have access now. Please let me know if it is not working.
DeleteHi Spencer,
DeleteRan across this post. Could I try out your image? You can get a hold of me at cis.rmullaney@gmail.com.
Thank you!
Ryan,
DeleteYou should now have access.
Spencer
i am interested in your image as well. theisgroup@gmail.com
ReplyDeleteHello. You should now have access.
Deleteany chance i got get a copy of the image avrillafuze@gmail.com
ReplyDeleteYou should now have access.
ReplyDeleteHi Spencer, I would like to have copy of your card please
ReplyDeleteemail jupekki16@gmail.com
Juuso, you should now have access.
ReplyDeleteHi Spencer, great project!
ReplyDeleteCould you send me a copy of your card please
email: david.benoudiz@gmail.com
Thanks!
You should now have access.
ReplyDeleteHi Spencer,
ReplyDeleteI'm very interested in this image as well. Can you please share? webnetwiz@gmail.com
You should now have access.
DeleteHi Spencer,
ReplyDeleteLate to the party, but can I also have access to your image? - gquinones83@gmail.com
You should now have access.
DeleteThank you!
DeleteI would like to check out the image as well bcording@cordingley.net
ReplyDeleteYou should now have access.
DeleteThis comment has been removed by the author.
ReplyDeleteHi Spencer, could you please grant me access as well (if it's still available!) many thanks: sjd113@gmail.com
ReplyDeleteFour and a half years on... I did a google search looking for a solution and found this Blog site. Would you be able to grant ma access as well to try out your image? Thank you, Pat G.
ReplyDeleteHey Pat, send me your email address and I will give you access.
DeleteHi Spencer, extremely late to this party but if possible may I get a copy of the scripts on your SD card. Would love to try this out.
ReplyDeleteMany thanks.
J
Send me your email address and I will add you.
DeleteHi Spencer, Great post. I am super late but I would appreciate if you can share a copy of the scripts on your sd card if you still have them . Thank you.
ReplyDeleteI would also like a copy if you can provide it please!
ReplyDeletebeen messing around with juniper ztp, and want to try it on the raspberry pi.
Thanks!
Samesies :) Would be great to get a copy. Thanks
ReplyDelete