Sysadmin/Autocheckout repositories

Configuration for a number of services, including Service/Nameservers and Service/planet, is stored in git repositories intended to be edited concurrently by the sysadmins, using a local clone. On push, the commit hook performs an automatic checkout and reloads the configuration as needed. A notification email is sent to the other sysadmins.

Usage

You need ssh access to the remote server and an account with write access to the directory where the data is stored. This is generally accomplished by using groups. Please, do not work as root.

On your computer, do:

git clone <user>@<remote_host>:<repository_path>

Then edit data as you would normally do. When you're done:

git commit <changed_file1> <changed_file2>

GIT repository implementation details

We use a detached working directory to allow the automatic checkout to work (see post-receive hook below). The git repository is in /var/lib/bind/etc/bind.git and the working directory lives in /var/lib/bind/etc/bind. /etc/bind is a symlink to the working directory (/var/lib/bind/etc/bind).