Code Monkey home page Code Monkey logo

powerdns-consul's Introduction

powerdns-consul

powerdns-consul is a utility written in Go that allows you to use the Consul key value store as a backend for PowerDNS through the Pipe backend.

Some of the PowerDNS-related code is inspired by mindreframer's work.

Usage

  1. Customize the powerdns-consul.json.example configuration
  2. Execute ./powerdns-consul -config=/path/to/powerdns-consul.json
  • Set DEBUG=1 to make powerdns-consul print each request and response

Architecture

powerdns-consul Architecture

powerdns-consul implements the PowerDNS pipe backend protocol. It can use various key-value stores to query for DNS records. Supported key-value store backends are:

  • Consul (tested against v0.7.0)
  • etcd (tested against v3.0.14)

You can organize the data in the key-value store in two different ways (schemas):

  • Flat schema (docs)
  • SkyDNS schema (docs, this will be implemented in a future version)

Building

  • Clone the repository in your $GOPATH/src/github.com/Shark/powerdns-consul
  • Run go get ./...
  • Run make

Testing

  • Go tests: run make test
  • End to end test
    • Run make end2end_test.
    • Requires a working Docker setup.
    • This test will build powerdns-consul and a Docker image with PowerDNS, Consul and powerdns-consul. It will then bootstrap the Consul key-value store and run some 'real world' tests against this setup using dig.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request! :)

History

  • v0.0.1 (2016-04-20): initial version
  • v0.0.2 (2016-11-05): use libkv and support Consul and etcd

License

This project is licensed under the MIT License. See LICENSE for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.