OpenStack Yoga : How to use Designate2022/05/05 |
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 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached httpd | | Neutron Server | | Nova Compute | | Keystone Glance | | OVN-Northd | | Open vSwitch | | Nova API Cinder API | | Cinder Volume | | OVN Metadata Agent | | | | Designate Services | | OVN-Controller | +-----------------------+ +-----------------------+ +-----------------------+ |
[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 | 2022-05-05T06:39:39.000000 | | description | None | | email | dnsmaster@server.education | | id | ed601997-9157-4354-a61b-3dfcd120e6db | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 66102fdb888d4556a59dcff8b631ffdf | | serial | 1651732779 | | 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 | +--------------------------------------+-------------------+---------+------------+--------+--------+ | ed601997-9157-4354-a61b-3dfcd120e6db | server.education. | PRIMARY | 1651732779 | 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 | 2022-05-05T06:40:07.000000 | | description | None | | id | a372c4ae-40fd-45fe-afb5-73e38df770c1 | | name | node01.server.education. | | project_id | 66102fdb888d4556a59dcff8b631ffdf | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | ed601997-9157-4354-a61b-3dfcd120e6db | | zone_name | server.education. | +-------------+--------------------------------------+ # OK if [status] is [ACTIVE] ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | 26f04c72-60db-41d8-a874-c01bb30d03fd | server.education. | NS | fd8fa87b-0a88-4afd-be85-4cfba2070077 | server.education. | SOA | a372c4ae-40fd-45fe-afb5-73e38df770c1 | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1651732807 3516 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.18.1-1ubuntu1-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62966 ;; 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(network.srv.world) (UDP) ;; WHEN: Thu May 05 06:40:44 UTC 2022 ;; 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 | 2022-05-05T06:41:16.000000 | | description | None | | email | dnsmaster@server.education | | id | 8c205616-449f-4e27-baee-325f1037283c | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 66102fdb888d4556a59dcff8b631ffdf | | serial | 1651732876 | | 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 | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | ed601997-9157-4354-a61b-3dfcd120e6db | server.education. | PRIMARY | 1651732807 | ACTIVE | NONE | | 8c205616-449f-4e27-baee-325f1037283c | 100.168.192.in-addr.arpa. | PRIMARY | 1651732876 | 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 | 2022-05-05T06:41:47.000000 | | description | None | | id | 953a0013-b199-4716-a78d-49c8f01bd2ee | | name | 10.100.168.192.in-addr.arpa. | | project_id | 66102fdb888d4556a59dcff8b631ffdf | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 8c205616-449f-4e27-baee-325f1037283c | | 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 +--------------------------------------+------------------------------+------ | 906514f5-2ace-4126-9a0e-2566376e8afd | 100.168.192.in-addr.arpa. | NS | e70ba725-7905-421b-b914-55850695b297 | 100.168.192.in-addr.arpa. | SOA | 953a0013-b199-4716-a78d-49c8f01bd2ee | 10.100.168.192.in-addr.arpa. | PTR +--------------------------------------+------------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1651732907 3525 600 86400 3600 | 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.18.1-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: 29026 ;; 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(network.srv.world) (UDP) ;; WHEN: Thu May 05 06:42:27 UTC 2022 ;; MSG SIZE rcvd: 93 |
[3] | To delete record or zone, do like follows. |
ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+--------------------------+------ | id | name | type +--------------------------------------+--------------------------+------ | 26f04c72-60db-41d8-a874-c01bb30d03fd | server.education. | NS | fd8fa87b-0a88-4afd-be85-4cfba2070077 | server.education. | SOA | a372c4ae-40fd-45fe-afb5-73e38df770c1 | node01.server.education. | A +--------------------------------------+--------------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1651732807 3516 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 | 2022-05-05T06:40:07.000000 | | description | None | | id | a372c4ae-40fd-45fe-afb5-73e38df770c1 | | name | node01.server.education. | | project_id | 66102fdb888d4556a59dcff8b631ffdf | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2022-05-05T06:43:28.000000 | | version | 2 | | zone_id | ed601997-9157-4354-a61b-3dfcd120e6db | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +--------------------------------------+-------------------+------ | id | name | type +--------------------------------------+-------------------+------ | 26f04c72-60db-41d8-a874-c01bb30d03fd | server.education. | NS | fd8fa87b-0a88-4afd-be85-4cfba2070077 | server.education. | SOA +--------------------------------------+-------------------+------ +-------------------------------------------------------------------------------+--------+--------+ | records | status | action | +-------------------------------------------------------------------------------+--------+--------+ | network.srv.world. | ACTIVE | NONE | | network.srv.world. dnsmaster.server.education. 1651733008 3516 600 86400 3600 | ACTIVE | NONE | +-------------------------------------------------------------------------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | ed601997-9157-4354-a61b-3dfcd120e6db | server.education. | PRIMARY | 1651733008 | ACTIVE | NONE | | 8c205616-449f-4e27-baee-325f1037283c | 100.168.192.in-addr.arpa. | PRIMARY | 1651732907 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # delete [server.education.] zone ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2022-05-05T06:39:39.000000 | | description | None | | email | dnsmaster@server.education | | id | ed601997-9157-4354-a61b-3dfcd120e6db | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 66102fdb888d4556a59dcff8b631ffdf | | serial | 1651733008 | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2022-05-05T06:47:13.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 8c205616-449f-4e27-baee-325f1037283c | 100.168.192.in-addr.arpa. | PRIMARY | 1651732907 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |
|