
Since ages I wanted have replaced this freaking backup solution of our Network Equipment based on some hacky shell scripts and
expect uploading the configs on a
TFTP server.
Years ago I stumbled upon
RANCID (Really Awesome New Cisco confIg Differ) but had no time to implement it. Now I returned to my idea to get rid of all our old crap.
I don't know where, I think it was at
DENOG2, I saw RANCID coupled with a
VCS, where the
NOC was notified about configuration (and inventory) changes by mailing the configuration diff and the history was indeed in the VCS.
The good old RANCID seems not to support to write into a VCS out of the box. But for the rescue there is
rancid-git, a fork that promises git extensions and support for colorized emails. So far so good.
While I was searching for a VCS capable RANCID, somewhere under a stone I found
Oxidized, a 'silly attempt at rancid'. Looking at it, it seems more sophisticated, so I thought this might be the right attempt. Unfortunately there is no Debian package available, but I found an
ITP created by
Jonas.
Anyway, for just looking into it, I thought the Docker path for a testbed might be a good idea, as no Debian package ist available (yet).
For oxidized
configuration is only a
configfile needed and as nodes
source a rancid compatible
router.db file can be used (beside SQLite and http backend). A migration into a production environment seems pretty easy. So I gave it a go.
I assume Docker is
installed already. There seems to be a Docker image on
Docker Hub, that looks official, but it seems not maintained (actually). An
issue is open for automated building the image.
Creating Oxidized container image
The official documentation describes the procedure. I used a slightly different approach.
docking-station:~# mkdir -p /srv/docker/oxidized/
docking-station:~# git clone https://github.com/ytti/oxidized \
/srv/docker/oxidized/oxidized.git
docking-station:~# docker build -q -t oxidized/oxidized:latest \
/srv/docker/oxidized/oxidized.git
I thought it might be a good idea to also tag the image with the actual version of the gem.
docking-station:~# docker tag oxidized/oxidized:latest \
oxidized/oxidized:0.11.0
docking-station:~# docker images grep oxidized
oxidized/oxidized latest 35a325792078 15 seconds ago 496.1 MB
oxidized/oxidized 0.11.0 35a325792078 15 seconds ago 496.1 MB
Create initial default configuration like described in the documentation.
docking-station:~# mkir -p /srv/docker/oxidized/.config/
docking-station:~# docker run -e CONFIG_RELOAD_INTERVAL=600 \
-v /srv/docker/oxidized/.config/:/root/.config/oxidized \
-p 8888:8888/tcp -t oxidized/oxidized:latest oxidized
Adjusting configuration
After this I adjusted the default configuration for writing a log, the nodes config into a bare git, having nodes secrets in router.db and some hooks for debugging.
Creating node configuration
docking-station:~# echo "7204vxr.lab.cyconet.org:cisco:admin:password:enable" >> \
/srv/docker/oxidized/.config/router.db
docking-station:~# echo "ccr1036.lab.cyconet.org:routeros:admin:password" >> \
/srv/docker/oxidized/.config/router.db
Starting the oxidized beast
docking-station:~# docker run -e CONFIG_RELOAD_INTERVAL=600 \
-v /srv/docker/oxidized/.config/:/root/.config/oxidized \
-p 8888:8888/tcp -t oxidized/oxidized:latest oxidized
Puma 2.16.0 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://127.0.0.1:8888
If you want to have the container get started with the docker daemon automatically, you can start the container with --restart always and docker will take care of it. If I wanted to make it running permanent, I would use a systemd unitfile.