dns #0

Supports: precise


Deploys BIND9, and exposes a programmable API to set DNS records, alternatively utilizes a plugin architecture to extend the charm to other API based DNS services.

DNS As A Service


the DNS charm is unique in that it wraps several other services to provide a common gateway to automatically provisioning your DNS configuration. Regardless if you are setting up a BIND cluster, PowerDNS, or integrating with a third party provider (such as Amazon Rt53, or GoDaddy for example).

This charm provides DNS. By default the charm will deploy a configured Bind9 server, assuming it is the authoritative master of the configured domain(s).

Notes about architecture

The DNS charm implements an abstracted 'provider' concept, to ease integration of new services. Specific instructions how to extend/ add providers is outlined in docs/HACKING.md


juju deploy dns
juju set dns domain='superawesome.com'
juju add-relation myservice:programmable dns:programmable

Offline Environment Usage

juju set dns offline=true

You will need to branch the charm locally, and fill the required dependencies. Each dependency should be listed by the provider(s) specific documentation in docs/provider.md.

An example Heirarchy:

├── bind
│   ├── bind9_1%3a9.8.1.dfsg.P1-4ubuntu0.8_amd64.deb
│   ├── bind9utils_1%3a9.8.1.dfsg.P1-4ubuntu0.8_amd64.deb
│   └── pip
│       └── tldextract-1.3.1.tar.gz
└── core
    ├── python-pip_1.0-1build1_all.deb
    └── python-setuptools_0.6.24-1ubuntu1_all.deb

core is used to install the baseline dependencies for the bind service provider. This is agnostic to any specific provider, and required for the DNS charm itself to operate.

bind Specific to the bind provider, and exposes a sub-directory of pip for python modules consumed to make the bind provider function. The order of operation: the bind .deb files will be installed before the pip directory.

Charm Integration

To integrate with the DNS charm, there is a specific format to send data over the wire. There are Three interfaces that are possible, as documented below


Not implemented


An easy integration. Geared towards A, and CNAME records. But any record that conforms to this format will be acceptable.

Set your associated record resource configuration variables, and expect to receive a public-address value from the dns relation.

  • domain optional - If using a domain other than what the configured domain on the DNS server, this will create a new zone file, and append the record.
  • alias - sub portion of the domain. for example, given redis.example.com - redis is the alias.
  • addr - Assigned as the public/private address from your host.
  • rr - Record Resource type. Possible values: A, CNAME, AAAA, NS


A higly configurable interface to pass single/multiple records to the DNS host. This will expect a newline separated list of records to add that conform to the named-checkzone output. Sent over the wire as resources

sprout  604800 IN A
sprout  604800 IN NAPTR 1 1 "S" "SIP+D2T" "" _sip._tcp.sprout
_sip._tcp.sprout 604800 IN SRV 0 0 5054 sprout-1
sprout-1 604800 IN A

Known Limitations and Issues

The charm in it's current form does not support scale out operations. It's engineered towards a single Bind9 Authoritative master deployment for use in offline environments.

None of the 3rd party provider support has been added save for the provider architecture outlined in docs/HACKING.md


domain: Used to configure the base domain provided by the DNS charm. Defaults to 'example.com'. This is used implicitly in the autogenerated relationship. eg: if you deploy redis, and relate it to the dns charm with the autogen relationship - it returns: redis0.example.com as the configured DNS.

offline: Predicate configuration option for determining if packages found in files/ are to be used for installation in an offline environment.

provider: Specify the underlying provider. Defaults to bind

Contact Information

Dont forget to check the docs directory for additional resources!


(string) Base Canonical Domain name for environment
(boolean) Specify offline env configuration, and install from local filepath instead of via apt
(string) Used to specify the provider to deploy/consume for DNS management