OpenStack Rocky : How to use Designate2018/09/18 |
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-09-18T04:53:59.000000 | | description | None | | email | dnsmaster@server.education | | id | d839e982-25a1-438d-be53-4ad853324941 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 5f54b0ad76274f06b13f29458cc1c036 | | serial | 1537246439 | | 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 | +--------------------------------------+-------------------+---------+------------+--------+--------+ | d839e982-25a1-438d-be53-4ad853324941 | server.education. | PRIMARY | 1537246439 | 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-09-18T04:54:34.000000 | | description | None | | id | 1d1437d4-952f-46b4-a347-a6307d19e140 | | name | www.server.education. | | project_id | 5f54b0ad76274f06b13f29458cc1c036 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | d839e982-25a1-438d-be53-4ad853324941 | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-----------------------+------ | id | name | type +--------------------------------------+-----------------------+------ | 784d13da-0c1d-49a8-b1a6-541d7a27589f | server.education. | SOA | 270805a0-55d3-4d40-ba92-d5e5a0140930 | server.education. | NS | 1d1437d4-952f-46b4-a347-a6307d19e140 | www.server.education. | A +--------------------------------------+-----------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1537246474 3505 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.1-Ubuntu <<>> -p 5354 @network.srv.world www.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37718 ;; 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: 40 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Tue Sep 18 19:55:14 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-09-18T04:55:58.000000 | | description | None | | email | dnsmaster@server.education | | id | ef94c0b8-8415-4d09-8a1e-58b992fe6e39 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 5f54b0ad76274f06b13f29458cc1c036 | | serial | 1537246558 | | 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 | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | d839e982-25a1-438d-be53-4ad853324941 | server.education. | PRIMARY | 1537246474 | ACTIVE | NONE | | ef94c0b8-8415-4d09-8a1e-58b992fe6e39 | 100.168.192.in-addr.arpa. | PRIMARY | 1537246558 | 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-09-18T04:56:38.000000 | | description | None | | id | 1a5296d0-a3a6-480e-b16c-b745abc5a64d | | name | 10.100.168.192.in-addr.arpa. | | project_id | 5f54b0ad76274f06b13f29458cc1c036 | | records | www.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | ef94c0b8-8415-4d09-8a1e-58b992fe6e39 | | 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 +--------------------------------------+------------------------------+------ | 4ec3fe9e-7eff-4373-984c-5fcd9dfde76f | 100.168.192.in-addr.arpa. | NS | 88c20ebf-c689-44f1-976d-c5ae9b9dcb4e | 100.168.192.in-addr.arpa. | SOA | 1a5296d0-a3a6-480e-b16c-b745abc5a64d | 10.100.168.192.in-addr.arpa. | PTR +--------------------------------------+------------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1537246598 3586 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.1-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: 36592 ;; 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: 27 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Tue Sep 18 13:57:23 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 +--------------------------------------+-----------------------+------ | 784d13da-0c1d-49a8-b1a6-541d7a27589f | server.education. | SOA | 270805a0-55d3-4d40-ba92-d5e5a0140930 | server.education. | NS | 1d1437d4-952f-46b4-a347-a6307d19e140 | www.server.education. | A +--------------------------------------+-----------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1537246474 3505 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-09-18T04:54:34.000000 | | description | None | | id | 1d1437d4-952f-46b4-a347-a6307d19e140 | | name | www.server.education. | | project_id | 5f54b0ad76274f06b13f29458cc1c036 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2018-09-18T04:58:33.000000 | | version | 2 | | zone_id | d839e982-25a1-438d-be53-4ad853324941 | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-------------------+------ | id | name | type +--------------------------------------+-------------------+------ | 784d13da-0c1d-49a8-b1a6-541d7a27589f | server.education. | SOA | 270805a0-55d3-4d40-ba92-d5e5a0140930 | server.education. | NS +--------------------------------------+-------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1537246713 3505 600 86400 3600 | ACTIVE | NONE | | network.srv.world. | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | d839e982-25a1-438d-be53-4ad853324941 | server.education. | PRIMARY | 1537246713 | ACTIVE | NONE | | ef94c0b8-8415-4d09-8a1e-58b992fe6e39 | 100.168.192.in-addr.arpa. | PRIMARY | 1537246598 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # delete [server.education.] zone ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2018-09-18T04:53:59.000000 | | description | None | | email | dnsmaster@server.education | | id | d839e982-25a1-438d-be53-4ad853324941 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 5f54b0ad76274f06b13f29458cc1c036 | | serial | 1537246713 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2018-09-18T04:59:33.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | ef94c0b8-8415-4d09-8a1e-58b992fe6e39 | 100.168.192.in-addr.arpa. | PRIMARY | 1537246598 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |