OpenStack Victoria : How to use Designate2020/10/21 |
This is how to use Designate.
This example is based on the environment 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 | 2020-10-21T07:38:48.000000 | | description | None | | email | dnsmaster@server.education | | id | 74c04568-2425-4bd3-86d0-3db6a78009b6 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 6c44eafd4f614985bf74b94f2aee82fb | | serial | 1603265928 | | 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 | +--------------------------------------+-------------------+---------+------------+--------+--------+ | 74c04568-2425-4bd3-86d0-3db6a78009b6 | server.education. | PRIMARY | 1603265928 | ACTIVE | NONE | +--------------------------------------+-------------------+---------+------------+--------+--------+ # add [A] record ubuntu@dlp ~(keystone)$ openstack recordset create --record '192.168.100.10' --type A server.education. node01 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2020-10-21T07:39:18.000000 | | description | None | | id | ad4381e6-9997-4391-a188-d44d21bb79ab | | name | node01.server.education. | | project_id | 6c44eafd4f614985bf74b94f2aee82fb | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | 74c04568-2425-4bd3-86d0-3db6a78009b6 | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | 408d0da5-4513-4445-bd52-3679310376be | server.education. | NS | 68c60c24-9e19-4fa9-bb52-a06759078e6e | server.education. | SOA | ad4381e6-9997-4391-a188-d44d21bb79ab | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1603265957 3547 600 86400 3600 | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world node01.server.education. ; <<>> DiG 9.16.1-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17745 ;; 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: ;node01.server.education. IN A ;; ANSWER SECTION: node01.server.education. 3600 IN A 192.168.100.10 ;; Query time: 20 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed Oct 21 19:39:57 JST 2020 ;; MSG SIZE rcvd: 68 |
[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 | 2020-10-21T07:40:43.000000 | | description | None | | email | dnsmaster@server.education | | id | 866caa46-856a-4ee2-bf11-a218abed09ac | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 6c44eafd4f614985bf74b94f2aee82fb | | serial | 1603266043 | | 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 | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 74c04568-2425-4bd3-86d0-3db6a78009b6 | server.education. | PRIMARY | 1603265957 | ACTIVE | NONE | | 866caa46-856a-4ee2-bf11-a218abed09ac | 100.168.192.in-addr.arpa. | PRIMARY | 1603266043 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # add PTR record ubuntu@dlp ~(keystone)$ openstack recordset create --record 'node01.server.education.' --type PTR 100.168.192.in-addr.arpa. 10 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2020-10-21T07:41:11.000000 | | description | None | | id | a7d9576c-e640-47ea-b4d2-b4e763c2c993 | | name | 10.100.168.192.in-addr.arpa. | | project_id | 6c44eafd4f614985bf74b94f2aee82fb | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 866caa46-856a-4ee2-bf11-a218abed09ac | | 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 +--------------------------------------+------------------------------+------ | 69e43eae-7a7a-45fb-92a8-6d45835ca55b | 100.168.192.in-addr.arpa. | SOA | 8dfd3eee-c8e5-4417-9ee8-150fa6e28f51 | 100.168.192.in-addr.arpa. | NS | a7d9576c-e640-47ea-b4d2-b4e763c2c993 | 10.100.168.192.in-addr.arpa. | PTR +--------------------------------------+------------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. dnsmaster.server.education. 1603266071 3583 600 86400 3600 | ACTIVE | NONE | | network.srv.world. | ACTIVE | NONE | | node01.server.education. | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # verify resolution ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.16.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: 22173 ;; 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 node01.server.education. ;; Query time: 24 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed Oct 21 19:41:56 JST 2020 ;; MSG SIZE rcvd: 93 |
[3] | To delete record or zone, do like follows. |
ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | 408d0da5-4513-4445-bd52-3679310376be | server.education. | NS | 68c60c24-9e19-4fa9-bb52-a06759078e6e | server.education. | SOA | ad4381e6-9997-4391-a188-d44d21bb79ab | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1603265957 3547 600 86400 3600 | ACTIVE | NONE | | 192.168.100.10 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ # delete [node01] record ubuntu@dlp ~(keystone)$ openstack recordset delete server.education. node01.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2020-10-21T07:39:18.000000 | | description | None | | id | ad4381e6-9997-4391-a188-d44d21bb79ab | | name | node01.server.education. | | project_id | 6c44eafd4f614985bf74b94f2aee82fb | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2020-10-21T07:42:51.000000 | | version | 2 | | zone_id | 74c04568-2425-4bd3-86d0-3db6a78009b6 | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-------------------+------ | id | name | type +--------------------------------------+-------------------+------ | 408d0da5-4513-4445-bd52-3679310376be | server.education. | NS | 68c60c24-9e19-4fa9-bb52-a06759078e6e | server.education. | SOA +--------------------------------------+-------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1603266171 3547 600 86400 3600 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 74c04568-2425-4bd3-86d0-3db6a78009b6 | server.education. | PRIMARY | 1603266171 | ACTIVE | NONE | | 866caa46-856a-4ee2-bf11-a218abed09ac | 100.168.192.in-addr.arpa. | PRIMARY | 1603266071 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # delete [server.education.] zone ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2020-10-21T07:38:48.000000 | | description | None | | email | dnsmaster@server.education | | id | 74c04568-2425-4bd3-86d0-3db6a78009b6 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 6c44eafd4f614985bf74b94f2aee82fb | | serial | 1603266171 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2020-10-21T07:43:40.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 866caa46-856a-4ee2-bf11-a218abed09ac | 100.168.192.in-addr.arpa. | PRIMARY | 1603266071 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |
|