Netbox
Netbox is an open-source Django application that is designed to help manage and document networks and the devices on those networks. In the CSL we use it to document each machine and VM along with their network configurations.
Installation
Netbox consists of 4 parts:
PostgreSQL database
Redis
Netbox Django Application
HTTP Proxy and Daemon
Basic installation instructions are here.
The netbox Ansible playbook properly installs and configures everything as well.
Upgrading Netbox
Netbox graciously created an upgrade script that automatically upgrades the current installation.
Just ssh into netbox and run the following:
/opt/netbox/upgrade.shOnce the script finishes, make sure to restart the supervisordaemons:
supervisorctl restart netbox
supervisorctl restart netbox-rqworkerUsing Netbox
You can access the netbox web page at https://netbox.tjhsst.edu, but you MUST be VPN'ed into the CSL in order to access the website.
Creating User Accounts
Netbox has SSO support. Use that to log in.
Interacting with Netbox
Using netbox is pretty straightforward; navigating through the web page is pretty intuitive. More specific documentation on netbox is available here, but here are a few basics:
The highest order of organization is a
region, it represents the physical area where the network is (TJHSST , CSL).Next there are
sites, they represent the specific area in theregionthat divides the network (Machine Room, Room 200, Room 200C, etc.).Each
sitecan haveracks, which represent a physical server rack (only used in the Machine Roomsite)devicesare the next organizational unit.devicesare NOT VMs.devicescan belong to arack(in the case of servers), or they can be independent (in the case of workstations).deviceshaveinterfaceswhich can be assigned anip.Creating
interfacesandipsis not obvious, though.First you have to create a
devicethen on that
device's overview page, click the "Add Components" dropdown and select "Interfaces".Then fill out the information for that
interface.Finally, when the
interfaceis created, scroll to the bottom of thedevice's overview page and click the green "+" box and add anipthere.
It is much easier to mass create devices through netbox's API, available at https://netbox.tjhsst.edu/api. In order to use the API, however, you must first create an API token here.
Some (messy) scripts that were used to bulk create the borg devices and workstations are available at https://gitlab.tjhsst.edu/sysadmins/docs/netbox-scripts.git
Last updated