- Notifications
You must be signed in to change notification settings - Fork2
Describe your DNS zones in a simple DSL and manage them with Git.
License
digineo/dnsgit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Run your own DNS servers and manage your zones easily with Git.
This piece of free software gives you the ability to describe your zonefiles in asimple DSL (Domain Specific Language) withtemplatesand store everything in aGit repository.
Every time you push your changes, a hook generates all zone files and,if necessary, increases serial numbers. This has been inspired byLuaDNS.
DNS Git has been tested with version 4.1.1 of thePowerDNS Authoritative Server.
DNS Git supports two PowerDNS backends: BIND and SQLite3.
You need to have Git and a recent version of Ruby (>= v2.4) installed onyour server. If you want to use the SQLite backend, you'll also needdevelopment packages for Ruby and libsqlite3, plus a C compiler (onDebian-based OS,ruby-dev,libsqlite3-dev andbuild-essential shouldsuffice).
First, clone the repository (on the machine your PowerDNS server runs on):
$ssh root@yourserver.example.com#git clone git://github.com/digineo/dnsgit /opt/dnsgit#cd /opt/dnsgit
Then install the required libraries using bundler.
Depending on whether or not you have PowerDNS configured withlaunch=bind orlaunch=gsqlite3, you need to execute one of thesecommands:
#bundle install --without=sqlite#bundle install --with=sqlite
Finally, initialize a sample configuration repository:
#bin/initPlease clone and update the configuration: git clone root@yourserver.example.com:/opt/dnsgit/data dns-config
Run these steps locally on your own machine:
$git clone root@yourserver.example.com:/opt/dnsgit/data dns-config$cd dns-config
The first thing you should do after setup is modify the containedconfig.yml and update the values according to your PowerDNSinstallation (removesqlite: section forlaunch=bind or removebind: section forlaunch=gsqlite3).
Once that's done, you can update the zones.
Then push your changes back to the server.
$git add -A$git commit -m"my commit message"$git push
On error, your commit will be rejected.
Take a look at thelib/example/ andtestsfolders.
To run tests, simply invokerake.
To get a detailed log of what happens on agit push, modifybin/hooks/pre-receive on the server:
# Generate Zones-ruby -I$basedir/lib $basedir/bin/run.rb+DNSGIT_DEBUG=all ruby -I$basedir/lib $basedir/bin/run.rb
You can reduce the log amount by settingDNSGIT_DEBUG to a comma-separatedlist of (lowercase) class names. Known log-enabled classes include:
bind- for the BIND backendsqlite- for the SQLite backendwork- for details in the SQLite backendzone- logs effects of your DSL files
The class names of log-enabled classes are printed in magenta in thelog output.
About
Describe your DNS zones in a simple DSL and manage them with Git.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.