OpenStack Queens : How to use Designate2018/06/20 |
This is how to use Designate.
This example is based on the emvironment like follows.
------------+---------------------------+---------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ Control Node ] | | [ Network Node ] | | [ Compute Node ] | | | | | | | | MariaDB RabbitMQ | | Linux Bridge | | Libvirt | | Memcached httpd | | L2_Agent L3_Agent | | Nova_Compute | | Keystone Glance | | Metadata_Agent | | Linux Bridge | | Nova_API Cinder_API | | Cinder_Volume | | L2_Agent | | Neutron_Server | | Heat_API | | | | Metadata_Agent | | Heat Engine | | | | | | Designate_Services | | | | | | named | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Login as a user you'd like to set DNS entry. It's OK to work on any node. (This example is on Control Node) For example, create a [server.education] zone. |
ubuntu@dlp ~(keystone)$ openstack zone create --email dnsmaster@server.education server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2018-06-20T01:50:11.000000 | | description | None | | email | dnsmaster@server.education | | id | aff50460-1982-455d-8345-569e46982ecf | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 04a16d601dc940dd845f3092ce2712e8 | | serial | 1529459411 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+-------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+-------------------+---------+------------+--------+--------+ | aff50460-1982-455d-8345-569e46982ecf | server.education. | PRIMARY | 1529459411 | ACTIVE | NONE | +--------------------------------------+-------------------+---------+------------+--------+--------+ # add A record ubuntu@dlp ~(keystone)$ openstack recordset create --record '192.168.100.10' --type A server.education. www +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2018-06-20T01:50:57.000000 | | description | None | | id | 9f574a09-500a-44f5-94ce-0c423f07840a | | name | www.server.education. | | project_id | 04a16d601dc940dd845f3092ce2712e8 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | aff50460-1982-455d-8345-569e46982ecf | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-----------------------+------ | id | name | type +--------------------------------------+-----------------------+------ | 05ffc8c8-49ba-47b4-9741-cd3ccba1e5cb | server.education. | SOA | 898a71b3-e8ff-4730-a0b6-12a6e2db58cb | server.education. | NS | 9f574a09-500a-44f5-94ce-0c423f07840a | www.server.education. | A +--------------------------------------+-----------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1529459456 3597 600 86400 3600 | ACTIVE | NONE | | network.srv.world. | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world www.server.education. ; <<>> DiG 9.11.3-1ubuntu1-Ubuntu <<>> -p 5354 @network.srv.world www.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5365 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 8192 ;; QUESTION SECTION: ;www.server.education. IN A ;; ANSWER SECTION: www.server.education. 3600 IN A 192.168.100.10 ;; Query time: 33 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed Jun 20 19:52:24 JST 2018 ;; MSG SIZE rcvd: 65 |
[2] | For example, create a [192.168.100.0/24] reverse zone. |
ubuntu@dlp ~(keystone)$ openstack zone create --email dnsmaster@server.education 100.168.192.in-addr.arpa. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2018-06-20T01:53:48.000000 | | description | None | | email | dnsmaster@server.education | | id | d84ea35a-c27c-458c-ac8e-8303df355f21 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 04a16d601dc940dd845f3092ce2712e8 | | serial | 1529459628 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | aff50460-1982-455d-8345-569e46982ecf | server.education. | PRIMARY | 1529459456 | ACTIVE | NONE | | d84ea35a-c27c-458c-ac8e-8303df355f21 | 100.168.192.in-addr.arpa. | PRIMARY | 1529459628 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # add PTR record ubuntu@dlp ~(keystone)$ openstack recordset create --record 'www.server.education.' --type PTR 100.168.192.in-addr.arpa. 10 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2018-06-20T01:55:05.000000 | | description | None | | id | 341a5de8-bd4a-439e-8825-5b10e0df61f5 | | name | 10.100.168.192.in-addr.arpa. | | project_id | 04a16d601dc940dd845f3092ce2712e8 | | records | www.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | d84ea35a-c27c-458c-ac8e-8303df355f21 | | zone_name | 100.168.192.in-addr.arpa. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list 100.168.192.in-addr.arpa. +--------------------------------------+------------------------------+------ | id | name | type +--------------------------------------+------------------------------+------ | 41ea66f8-46c0-4cfd-b6e1-eaba9798f31d | 100.168.192.in-addr.arpa. | NS | 993f0812-185c-4c29-b87b-e02f36e2f27f | 100.168.192.in-addr.arpa. | SOA | 341a5de8-bd4a-439e-8825-5b10e0df61f5 | 10.100.168.192.in-addr.arpa. | PTR +--------------------------------------+------------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1529459705 3504 600 86400 3600 | ACTIVE | NONE | | www.server.education. | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.11.3-1ubuntu1-Ubuntu <<>> -p 5354 @network.srv.world -x 192.168.100.10 ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10143 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; WARNING: recursion requested but not available ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 8192 ;; QUESTION SECTION: ;10.100.168.192.in-addr.arpa. IN PTR ;; ANSWER SECTION: 10.100.168.192.in-addr.arpa. 3600 IN PTR www.server.education. ;; Query time: 34 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed Jun 20 10:55:49 JST 2018 ;; MSG SIZE rcvd: 90 |
[3] | To delete record or zone, do like follows. |
ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-----------------------+------ | id | name | type +--------------------------------------+-----------------------+------ | 05ffc8c8-49ba-47b4-9741-cd3ccba1e5cb | server.education. | SOA | 898a71b3-e8ff-4730-a0b6-12a6e2db58cb | server.education. | NS | 9f574a09-500a-44f5-94ce-0c423f07840a | www.server.education. | A +--------------------------------------+-----------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1529459456 3597 600 86400 3600 | ACTIVE | NONE | | network.srv.world. | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # delete www record ubuntu@dlp ~(keystone)$ openstack recordset delete server.education. www.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2018-06-20T01:50:57.000000 | | description | None | | id | 9f574a09-500a-44f5-94ce-0c423f07840a | | name | www.server.education. | | project_id | 04a16d601dc940dd845f3092ce2712e8 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2018-06-20T01:57:04.000000 | | version | 2 | | zone_id | aff50460-1982-455d-8345-569e46982ecf | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-------------------+------ | id | name | type +--------------------------------------+-------------------+------ | 05ffc8c8-49ba-47b4-9741-cd3ccba1e5cb | server.education. | SOA | 898a71b3-e8ff-4730-a0b6-12a6e2db58cb | server.education. | NS +--------------------------------------+-------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1529459824 3597 600 86400 3600 | ACTIVE | NONE | | network.srv.world. | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | aff50460-1982-455d-8345-569e46982ecf | server.education. | PRIMARY | 1529459824 | ACTIVE | NONE | | d84ea35a-c27c-458c-ac8e-8303df355f21 | 100.168.192.in-addr.arpa. | PRIMARY | 1529459705 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # delete [server.education.] zone ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2018-06-20T01:50:11.000000 | | description | None | | email | dnsmaster@server.education | | id | aff50460-1982-455d-8345-569e46982ecf | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 04a16d601dc940dd845f3092ce2712e8 | | serial | 1529459824 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2018-06-20T01:57:59.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | d84ea35a-c27c-458c-ac8e-8303df355f21 | 100.168.192.in-addr.arpa. | PRIMARY | 1529459705 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |