RANCID is an open-source tool that allows backup and management of configurations from network devices. In this tutorial, we will guide you on how to install RANCID on Fedora CoreOS.
Open a terminal window on your Fedora CoreOS instance.
Install the required packages:
sudo dnf install git rancid
Create a directory for RANCID to store its configuration files:
sudo mkdir /etc/rancid
Copy the rancid.conf.sample file to /etc/rancid/rancid.conf:
sudo cp /usr/share/doc/rancid/rancid.conf.sample /etc/rancid/rancid.conf
Create a directory where RANCID will save the device configurations:
sudo mkdir /var/lib/rancid
Update the rancid.conf file to specify the location of the directory created in Step 5:
sudo vi /etc/rancid/rancid.conf
# Edit the following line:
# RCSSYS=/usr/local/libexec/rancid
# To:
RCSSYS=/usr/libexec/rancid
# Edit the following line:
# LIST_OF_GROUPS="mygroup"
# To:
LIST_OF_GROUPS="mygroup"
# Edit the following line:
# LIST_OF_USERS = "" ; # Default user definitions
# To:
LIST_OF_USERS = "username" ; # Default user definitions
# Edit the following line:
# RANCID_BRANCH.master.regex = _{}
# To:
RANCID_BRANCH.master.regex = _.*{}
# Add the following lines at the end of the file:
cloginrc=/etc/rancid/.cloginrc
logdir=/var/lib/rancid/logs
Create a cloginrc file in the /etc/rancid directory to specify the login credentials for each device:
sudo vi /etc/rancid/.cloginrc
# Add the following lines for each device you want to backup:
add user {DEVICE-IP-ADDRESS} {USERNAME}
add password {DEVICE-IP-ADDRESS} {DEVICE-PASSWORD}
add method {DEVICE-IP-ADDRESS} ssh
# Replace {DEVICE-IP-ADDRESS}, {USERNAME} and {DEVICE-PASSWORD} with your device's IP address, username and password respectively.
Modify the SELinux context of the log directory:
sudo semanage fcontext -a -t usr_t "/var/lib/rancid/logs(/.*)?"
sudo restorecon -R /var/lib/rancid/logs/
Start the RANCID services:
sudo systemctl start rancid-cvsweb
sudo systemctl start rancid-cvs
Enable RANCID to start on boot:
sudo systemctl enable rancid-cvsweb
sudo systemctl enable rancid-cvs
You have successfully installed RANCID on your Fedora CoreOS instance. You can now use it to backup and manage configurations from network devices.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!