Add possibility to use MySQL backend
Just for the information:
The base code for row_present state was mainly taken from sqlite3
SaltStack state.
MySQL database schema was taken from:
https://doc.powerdns.com/authoritative/backends/generic-mysql.html
Related-PROD: PROD-21596 (PROD:21596)
Change-Id: If58216b058c352c692ea4997019193dba287038a
diff --git a/README.rst b/README.rst
index f16ed70..8563d18 100644
--- a/README.rst
+++ b/README.rst
@@ -1,63 +1,102 @@
+=====
+Usage
+=====
-========
-PowerDNS
-========
+PowerDNS, founded in the late 1990s, is a premier supplier
+of open source DNS software, services and support. Deployed
+throughout the world with some of the most demanding users
+of DNS, we pride ourselves on providing quality software
+and the very best support available.
-Sample pillar:
+Sample Pillars
+==============
PowerDNS server with MySQL backend
.. code-block:: yaml
- powedns:
- server:
- enabled: true
- backend:
- engine: mysql
- host: localhost
- port: 3306
- name: pdns
- user: pdns
- password: password
- bind:
- address: 0.0.0.0
- port: 53
- axfr_ips:
- - 10.11.0.0/16
- - 127.0.0.1
- api:
- enabled: true
- key: SecurePass
- webserver:
- enabled: true
- password: SuperSecurePass
- address: 0.0.0.0
- port: 8081
+ powerdns:
+ server:
+ api:
+ enabled: True
+ key: VxK9cMlFL5Ae
+ axfr_ips:
+ - 172.16.10.103
+ - 172.16.10.104
+ - 172.16.10.102
+ - 127.0.0.1
+ backend:
+ engine : mysql
+ host : localhost
+ port : 3306
+ dbname : powerdns
+ user : powerdns
+ password : powerdns
+ timeout': 10
+ dnssec : on
+ bind:
+ address: 172.16.10.103
+ overwrite_supermasters: True
+ supermasters:
+ - account: master
+ ip: 172.16.10.103
+ nameserver: ns1.example.org
+ - account: master
+ ip: 172.16.10.104
+ nameserver: ns2.example.org
+ - account: master
+ ip: 172.16.10.102
+ nameserver: ns3.example.org
+ webserver:
+ address: 172.16.10.103
+ enabled: True
+ password: gJ6n3gVaYP8eS
+ port: 8081
-PowerDNS server with sqlite backend
+.. note:: If you use one MySQL database across several
+ PowerDNS instances, be sure to pass *-b1* parameter
+ to *salt* command to avoid race condition.
+
+PowerDNS server with SQLite backend
.. code-block:: yaml
- powerdns:
- server:
- enabled: true
- backend:
- engine: sqlite
- dbname: pdns.sqlite
- dbpath: /var/lib/powerdns
- bind:
- address: 127.0.0.1
- port: 55
- default-soa-name: ns1.domain.tld
- soa-minimum-ttl: 3600
- api:
- enabled: true
- key: SecurePass
- webserver:
- enabled: true
- password: SuperSecurePass
- address: 0.0.0.0
- port: 8081
+
+ powerdns:
+ server:
+ api:
+ enabled: True
+ key: VxK9cMlFL5Ae
+ axfr_ips:
+ - 172.16.10.103
+ - 172.16.10.104
+ - 172.16.10.102
+ - 127.0.0.1
+ backend:
+ engine: sqlite
+ dbname: pdns.sqlite
+ dbpath: /var/lib/powerdns
+ bind:
+ address: 172.16.10.103
+ overwrite_supermasters: True
+ supermasters:
+ - account: master
+ ip: 172.16.10.103
+ nameserver: ns1.example.org
+ - account: master
+ ip: 172.16.10.104
+ nameserver: ns2.example.org
+ - account: master
+ ip: 172.16.10.102
+ nameserver: ns3.example.org
+ webserver:
+ address: 172.16.10.103
+ enabled: True
+ password: gJ6n3gVaYP8eS
+ port: 8081
-Read more
-=========
+Documentation
+=============
+
+* https://doc.powerdns.com/
+