Automating OS Upgrade


Introduction

In this series of videos, we will go over netmiko and how we used it to automate the process of OS upgrade. In our used case, we had to use the jump host to reach the devices.  We were able to reduce significantly the time to perform OS upgrades. We will create two scripts one to copy the OS to the devices in the network, and the second is to perform a pre-check, reload the devices, and then perform a post-check. 


pre-requisite






  • : We will use netmiko to connect to the jump host, and from the jump host, we will connect to the switch. In the six video will show you how to change the script if you don't need this option.
  • : We use netmiko and FTP to copy the OS to the device; you don't have to use FTP; you can use any of the protocols SCP, SFTP, and TFTP; you just need to update the script.
  • : We did some improvements to the script. We added the ability to check if the file was copied correctly by checking the md5 sum of the file. We also added the option to retry the copy if the file was corrupted, and we added a retry time out of 3 times.
  • : We add a couple of netmiko exception handling, and we add more conditions to deal with authentication and reachability issues to the device from the jump host.
  • : we introduce MultiThreading to be able to copy to multiple switches at a time which makes the process much faster.
  • : We go over the script for the people who just need to run the script and don't want to go into the programming.





Thank you for reading. I hope this has been helpful. If you need any help, don't hesitate to reach out. We are more than happy to help you in any way we can.

Talk to an expert

List of titles