Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / powerdns / README.md
1 # PowerDNS RADOS Gateway backend
2
3 A backend for PowerDNS to direct RADOS Gateway bucket traffic to the correct regions.
4
5 For example, two regions exist, US and EU.
6
7     EU: o.myobjects.eu
8     US: o.myobjects.us
9
10 A global domain o.myobjects.com exists.
11
12 Bucket 'foo' exists in the region EU and 'bar' in US.
13
14     foo.o.myobjects.com will return a CNAME to foo.o.myobjects.eu
15     bar.o.myobjects.com will return a CNAME to foo.o.myobjects.us
16
17 The HTTP Remote Backend from PowerDNS is used in this case: http://doc.powerdns.com/html/remotebackend.html
18
19 PowerDNS must be compiled with Remote HTTP backend support enabled, this is not default.
20
21 For more information visit the [Blueprint](http://wiki.ceph.com/Planning/Blueprints/Firefly/PowerDNS_backend_for_RGW)
22
23 # Configuration
24
25 ## PowerDNS
26     launch=remote
27     remote-connection-string=http:url=http://localhost:6780/dns
28
29 ## PowerDNS backend
30 Usage for this backend is showed by invoking with --help. See rgw-pdns.conf.in for a configuration example
31
32 The ACCESS and SECRET key pair requires the caps "metadata=read"
33
34 # Testing
35
36 $ curl -X GET http://localhost:6780/dns/lookup/foo.o.myobjects.com/ANY
37
38 Should return something like:
39
40     {
41      "result": [
42       {
43        "content": "foo.o.myobjects.eu",
44        "qtype": "CNAME",
45        "qname": "foo.o.myobjects.com",
46        "ttl": 60
47       }
48      ]
49     }
50
51 ## WSGI
52 You can run this backend directly behind an Apache server with mod_wsgi
53
54     WSGIScriptAlias / /var/www/pdns-backend-rgw.py
55
56 Placing that in your virtualhost should be sufficient.
57
58 Afterwards point PowerDNS to localhost on port 80:
59
60     launch=remote
61     remote-connection-string=http:url=http://localhost/dns