The automated process has been tested only on CentOS 7 droplet and will install and configure the following:
- PostgreSQL 10
Once installed, you should be able to login to NetBox by browsing to http://ip.address.of.droplet:8000. Login information is stored in /root/netbox-info.log.
As part of this installation, selinux is disabled on the server.
cloud-init is a set of Python scripts that allows an easy way to automate the initial configuration of a cloud compute instance. You can read more about cloud-init at https://cloudinit.readthedocs.io/en/latest/
cloud-init config below can be used at Digital Ocean to configure a droplet with NetBox. This needs to be copied in the “User data” section when a droplet is being created.
#cloud-config package_upgrade: true runcmd: - 'curl -sSL https://gist.githubusercontent.com/gauravsabharwal/c05684d99b7ae28f2e48a096c6589082/raw/753ba18082262f1cca8354f50c11ec46a8dcbc79/netboxInstall.sh | bash'
Below is a demo on how to deploy a droplet in Digital Ocean.
Post Installation Login Information
Login and other information are stored in a file called netbox-info.log under the root directory of your server.
NetBox Install Complete DROPLETNAME: $DROPLETNAME DROPLETIP: $DROPLETIP Database Password: $DBPASS Netbox Admin: $NBADMIN Netbox Email: $NBADMINEMAIL Netbox Password: $NBPASS
$DROPLETNAME – Name of your droplet
$DROPLETIP – The IP address of your droplet
$DBPASS – The password used for the database. The username is netbox
$NBADMIN – The admin username, which is set to admin by default
$NBADMINEMAIL – The email address of the admin user, set to firstname.lastname@example.org
$NBPASS – Randomly generated password for NetBox admin user.
Install takes approximately two to three minutes on the $5/mo droplet.
If for some reason the software installation is not complete, there are two sets of logs that you can refer to:
- /tmp/netbox-install.log – created by the script.
- /var/log/cloud-init.log – captures the same content as the script and if there were any issues with cloud-init.