Service/Nameservers: Difference between revisions

No edit summary
No edit summary
Line 91: Line 91:
== GIT repository implementation details ==
== 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 <code>/var/lib/bind/etc/bind.git</code> and the working directory lives in <code>/var/lib/bind/etc/bind</code>. <code>/etc/bind</code> is a symlink to the working directory (<code>/var/lib/bind/etc/bind</code>).
We use a detached working directory to allow the automatic checkout to work (see post-receive hook below). The git repository is in <code>/var/lib/bind/etc/bind.git</code> and the working directory lives in <code>/var/lib/bind/etc/bind</code>. <code>/etc/bind</code> is a symlink to the working directory (<code>/var/lib/bind/etc/bind</code>).
 
* The git config file is as follows:
 
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        sharedRepository = true
        logallrefupdates = true
        worktree = /etc/bind
[receive]
        denycurrentbranch = ignore
[hooks]
        mailinglist = systems-logs@...
        emailprefix = "[DNS] "
        showrev = "git show -C %s; echo"
 
* /var/lib/bind/etc/bind.git/description contains the repository description "Sugar Labs DNS zone data"
* We use a post-receive hook to checkout the zones to the local sandbox and make BIND reload them:
 
#!/bin/bash
/bin/bash /usr/share/doc/git-core/contrib/hooks/post-receive-email
git checkout -f
tail -n0 -f /var/log/daemon.log &
/etc/init.d/bind9 reload
sleep 3


See [[Sysadmin/Autocheckout repositories]] for all the implementation details.


== DNSSEC details ==
== DNSSEC details ==