Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Describe your DNS zones in a simple DSL and manage them with Git.

License

NotificationsYou must be signed in to change notification settings

digineo/dnsgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tests

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.

Pre-requisites

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).

Installation

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

Configuration

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.

Examples

Take a look at thelib/example/ andtestsfolders.

Development

To run tests, simply invokerake.

Debug output

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 backend
  • sqlite - for the SQLite backend
  • work - for details in the SQLite backend
  • zone - 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2026 Movatter.jp