Following on from my previous post regarding the installation of Digital Ocean’s network documentation application; Netbox, this post will concentrate on updating the code in Netbox. This ensures you’re running the latest release that contains all the up to date bug fixes and enhancements. This update process will hopefully ensure your update of Netbox runs predictably and hassle-free!

A few things to understand before we begin the process of updating just to make sure we’re all on the same page!

  • In the install guide, since we installed Netbox using the ‘git clone’ method, instead of ‘wget’, I’ll be continuing this practice in this update guide.
  • Worth mentioning, for the purpose of this guide, I’ll be updating Netbox from version 2.6.2 to 2.6.3.
  • I’ll be continuing on from the install guide, using the same environment, namely; an Ubuntu Server 18.04.01 LTS OS installed on a VM, running on VMware Workstation.

Step 1

As with the install process, first we will make sure that our OS is running on the latest package versions, so run the following commands:

sudo apt-get update
sudo apt-get dist-upgrade

Step 2

Now we’re up to date on our OS, we’ll begin updating Netbox. This guide continues on from the install guide and assumes your Netbox is installed at ‘/opt/netbox’. With this in mind, we’ll use ‘git clone’ to pull the latest master release of Netbox;

cd /opt/netbox
sudo git checkout master
sudo git pull origin master
sudo git status

Step 3

With the new code now in place from the master repository pull, we now need to run the upgrade script which will install/upgrade Python packages, runs new database migrations, collects static files to be served by the HTTP service;

sudo ./upgrade.sh

Step 4

A nice simple step to finish updating your Netbox installation! Simply restart your WSGI service and it will start serving your new up to date code;

sudo supvervisorctl restart netbox

When you browse to the IP address of your Ubuntu server now, you should be seeing your nice, new, shiny, updated version of Netbox!

Updating Netbox

Jamie Davidson

Jamie is a network engineer with over 10 years of experience working on one of the largest and most complex public sector networks in the UK.

Leave a Reply

Your email address will not be published. Required fields are marked *