OpenStack Flamingo : Designate 利用方法2025/11/27 |
|
OpenStack DNS Service(Designate)の利用方法です。 当例では以下のような環境を例に Designate をインストールしています。
------------+--------------------------+--------------------------+------------
| | |
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 Nginx | | Neutron Server | | Nova Compute |
| Keystone httpd | | OVN-Northd | | Open vSwitch |
| Glance Nova API | | Nginx iSCSI Target | | OVN Metadata Agent |
| Cinder API | | Cinder Volume | | OVN-Controller |
| | | Designate Services | | |
+-----------------------+ +-----------------------+ +-----------------------+
|
| [1] | Openstack システムを利用可能な任意のユーザーで認証して、DNS エントリを作成します。 作業は、どこでもよいですが、当例ではコントロールノード上で行います。 例として [server.education] の正引きゾーンを作成します。 |
|
ubuntu@dlp ~(keystone)$ openstack zone create --email dnsmaster@server.education server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2025-11-27T04:42:08.000000 | | description | None | | email | dnsmaster@server.education | | id | fa0ecc08-5bab-454d-ba74-69b090570b28 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | b45ce8ac12c749e49e933c84334e79de | | serial | 1764218528 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | fa0ecc08-5bab- | server.education | PRIMARY | 1764218528 | ACTIVE | NONE | | 454d-ba74- | . | | | | | | 69b090570b28 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # A レコードを登録する ubuntu@dlp ~(keystone)$ openstack recordset create --record '192.168.100.10' --type A server.education. node01 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2025-11-27T04:42:49.000000 | | description | None | | id | 8403d633-5438-43d6-aa37-32f571a066e0 | | name | node01.server.education. | | project_id | b45ce8ac12c749e49e933c84334e79de | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | fa0ecc08-5bab-454d-ba74-69b090570b28 | | zone_name | server.education. | +-------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | b1d2770a-c380- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 45f8-856e- | n. | | ld. | | | | 9e3c203ae78c | | | | | | | c74af83c-eb19- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4add-8998- | n. | | ld. dnsmaster.s | | | | d472ed982e59 | | | erver.education | | | | | | | . 1764218574 | | | | | | | 3574 600 86400 | | | | | | | 3600 | | | | 8403d633-5438- | node01.server.e | A | 192.168.100.10 | ACTIVE | NONE | | 43d6-aa37- | ducation. | | | | | | 32f571a066e0 | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # 確認 ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world node01.server.education. ; <<>> DiG 9.18.39-0ubuntu0.24.04.2-Ubuntu <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5684 ;; 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: 7 msec ;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP) ;; WHEN: Thu Nov 27 04:43:31 UTC 2025 ;; MSG SIZE rcvd: 68 |
| [2] | 例として [192.168.100.0/24] の逆引きゾーンを作成します。 |
|
ubuntu@dlp ~(keystone)$ openstack zone create --email dnsmaster@server.education 100.168.192.in-addr.arpa. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2025-11-27T04:44:19.000000 | | description | None | | email | dnsmaster@server.education | | id | 3f64d3cb-582b-4743-b4a4-2e6be568e8d2 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | b45ce8ac12c749e49e933c84334e79de | | serial | 1764218659 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | fa0ecc08-5bab- | server.education | PRIMARY | 1764218574 | ACTIVE | NONE | | 454d-ba74- | . | | | | | | 69b090570b28 | | | | | | | 3f64d3cb-582b- | 100.168.192.in- | PRIMARY | 1764218659 | ACTIVE | NONE | | 4743-b4a4- | addr.arpa. | | | | | | 2e6be568e8d2 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # PTR レコードを登録する 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 | 2025-11-27T04:45:25.000000 | | description | None | | id | 861f9095-5666-4be7-8f96-3b88f2af9f2d | | name | 10.100.168.192.in-addr.arpa. | | project_id | b45ce8ac12c749e49e933c84334e79de | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 3f64d3cb-582b-4743-b4a4-2e6be568e8d2 | | zone_name | 100.168.192.in-addr.arpa. | +-------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK ubuntu@dlp ~(keystone)$ openstack recordset list 100.168.192.in-addr.arpa. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | 25238ef4-56d1- | 100.168.192.in- | SOA | network.srv.wor | ACTIVE | NONE | | 473d-a2e7- | addr.arpa. | | ld. dnsmaster.s | | | | cae4151ed570 | | | erver.education | | | | | | | . 1764218729 | | | | | | | 3595 600 86400 | | | | | | | 3600 | | | | 2e19508a-8bec- | 100.168.192.in- | NS | network.srv.wor | ACTIVE | NONE | | 4a50-b762- | addr.arpa. | | ld. | | | | 5938ae00717e | | | | | | | 861f9095-5666- | 10.100.168.192. | PTR | node01.server.e | ACTIVE | NONE | | 4be7-8f96- | in-addr.arpa. | | ducation. | | | | 3b88f2af9f2d | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # 確認 ubuntu@dlp ~(keystone)$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.18.39-0ubuntu0.24.04.2-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: 4076 ;; 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: 7 msec ;; SERVER: 10.0.0.50#5354(network.srv.world) (UDP) ;; WHEN: Thu Nov 27 04:46:04 UTC 2025 ;; MSG SIZE rcvd: 93 |
| [3] | レコードやゾーンを削除するには以下のように実行します。 |
|
ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | b1d2770a-c380- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 45f8-856e- | n. | | ld. | | | | 9e3c203ae78c | | | | | | | c74af83c-eb19- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4add-8998- | n. | | ld. dnsmaster.s | | | | d472ed982e59 | | | erver.education | | | | | | | . 1764218574 | | | | | | | 3574 600 86400 | | | | | | | 3600 | | | | 8403d633-5438- | node01.server.e | A | 192.168.100.10 | ACTIVE | NONE | | 43d6-aa37- | ducation. | | | | | | 32f571a066e0 | | | | | | +-----------------+-----------------+------+-----------------+--------+--------+ # [node01] レコードを削除する ubuntu@dlp ~(keystone)$ openstack recordset delete server.education. node01.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2025-11-27T04:42:49.000000 | | description | None | | id | 8403d633-5438-43d6-aa37-32f571a066e0 | | name | node01.server.education. | | project_id | b45ce8ac12c749e49e933c84334e79de | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2025-11-27T04:47:03.000000 | | version | 2 | | zone_id | fa0ecc08-5bab-454d-ba74-69b090570b28 | | zone_name | server.education. | +-------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack recordset list server.education. +-----------------+-----------------+------+-----------------+--------+--------+ | id | name | type | records | status | action | +-----------------+-----------------+------+-----------------+--------+--------+ | b1d2770a-c380- | server.educatio | NS | network.srv.wor | ACTIVE | NONE | | 45f8-856e- | n. | | ld. | | | | 9e3c203ae78c | | | | | | | c74af83c-eb19- | server.educatio | SOA | network.srv.wor | ACTIVE | NONE | | 4add-8998- | n. | | ld. dnsmaster.s | | | | d472ed982e59 | | | erver.education | | | | | | | . 1764218825 | | | | | | | 3574 600 86400 | | | | | | | 3600 | | | +-----------------+-----------------+------+-----------------+--------+--------+ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | fa0ecc08-5bab- | server.education | PRIMARY | 1764218825 | ACTIVE | NONE | | 454d-ba74- | . | | | | | | 69b090570b28 | | | | | | | 3f64d3cb-582b- | 100.168.192.in- | PRIMARY | 1764218729 | ACTIVE | NONE | | 4743-b4a4- | addr.arpa. | | | | | | 2e6be568e8d2 | | | | | | +------------------+------------------+---------+------------+--------+--------+ # [server.education.] ゾーンを削除する ubuntu@dlp ~(keystone)$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2025-11-27T04:42:08.000000 | | description | None | | email | dnsmaster@server.education | | id | fa0ecc08-5bab-454d-ba74-69b090570b28 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | b45ce8ac12c749e49e933c84334e79de | | serial | 1764218825 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2025-11-27T04:47:56.000000 | | version | 7 | +----------------+--------------------------------------+ubuntu@dlp ~(keystone)$ openstack zone list +------------------+------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +------------------+------------------+---------+------------+--------+--------+ | 3f64d3cb-582b- | 100.168.192.in- | PRIMARY | 1764218729 | ACTIVE | NONE | | 4743-b4a4- | addr.arpa. | | | | | | 2e6be568e8d2 | | | | | | +------------------+------------------+---------+------------+--------+--------+ |
| Sponsored Link |
|
|