Abstract

Deploy a nautobot instance to an ArchLinux system.

Nautobot Installation#

Note

This document is adapted from the original installation guide which should be considered the source of truth for anyone that is installing nautobot onto an ArchLinux or any other system.

Requirements#

To run nautobot you must provide access to a working PostgreSQL, MySQL or MariaDB service. This guide will use PostgreSQL, of which the version used by default appears to be 13 so that will be the version used here.

You also need an instance of Redis, the default version appears to be 6 so that will be the version used here.

If you want to enable metrics you will also need a Prometheus service available.

PostgreSQL 13#

This version is a little behind the latest release of Postgres, so to install it we’ll need to go to the AUR.

Since we’ve installed yay already we can use it to install the required version of PostgreSQL 13.

yay -Syu --noconfirm postgresql13 postgresql13-docs postgresql13-lib python python-pip python-psycopg2

Initialize the data directory#

If your data directory is empty, you’ll need to initialize.

sudo -u postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"

Start and Enable PostgreSQL#

sudo systemctl start postgresql
sudo systemctl enable postgresql

Redis 6#

This is also a little behind the latest version, so we’ll need to go to the AUR for the package.

yay -Syu --noconfirm redis6

Start and enable Redis#

sudo systemctl start redis6
sudo systemctl enable redis6

Install nautobot#

The first step is to clone the GitHub repository into the new NAUTOBOT_ROOT, for our installation it will be /opt/nautobot.

sudo git clone https://github.com/nautobot/nautobot.git /opt/nautobot

User, group, ownership#

We’ll need a user and group to own the directory, so let’s create them.

sudo groupadd nautobot
sudo useradd -s /bin/bash -m -d /opt/nautobot -g nautobot nautobot
echo "export NAUTOBOT_ROOT=/opt/nautobot" > /etc/profile.d/nautobot.sh

Now we need to make sure the root is owned by the nautobot user.

sudo chown -Rv nautobot:nautobot /opt/nautobot

Init the server#

sudo -u nautobot nautobot-server init
sudo -u nautobot cp /opt/nautobot/.nautobot/nautobot_config.py /opt/nautobot/nautobot_config.py

Section author: Xander Harris xandertheharris@gmail.com