OpenStack Dalmatian : Designate 利用方法2024/10/15 |
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] の正引きゾーンを作成します。 |
[cent@dlp ~(keystone)]$ openstack zone create --email dnsmaster@server.education server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2024-10-15T01:50:44.000000 | | description | None | | email | dnsmaster@server.education | | id | 0d3d9be3-babe-4207-9fa8-296c868c1e3c | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 756e2b4937c44d3991028e294f92d89a | | serial | 1728957044 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK [cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+-------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+-------------------+---------+------------+--------+--------+ | 0d3d9be3-babe-4207-9fa8-296c868c1e3c | server.education. | PRIMARY | 1728957044 | ACTIVE | NONE | +--------------------------------------+-------------------+---------+------------+--------+--------+ # A レコードを登録する [cent@dlp ~(keystone)]$ openstack recordset create --record '192.168.100.10' --type A server.education. node01 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2024-10-15T01:51:21.000000 | | description | None | | id | c96ba608-cdd0-452e-81ca-f3428152911d | | name | node01.server.education. | | project_id | 756e2b4937c44d3991028e294f92d89a | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | 0d3d9be3-babe-4207-9fa8-296c868c1e3c | | zone_name | server.education. | +-------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK [cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | c9f8d2cd-1048-4c59-867b-8fa179635b72 | server.education. | NS | network.srv.world. | ACTIVE | NONE | | ce68b900-54ac-4402-8657-77976405eaae | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1728957086 3591 600 86400 3600 | ACTIVE | NONE | | c96ba608-cdd0-452e-81ca-f3428152911d | node01.server.education. | A | 192.168.100.10 | ACTIVE | NONE | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ # 確認 [cent@dlp ~(keystone)]$ dig -p 5354 @network.srv.world node01.server.education. ; <<>> DiG 9.16.23-RH <<>> -p 5354 @network.srv.world node01.server.education. ; (1 server found) ;; global options: +cmd ;; Got answer: ;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 9015 ;; 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: 8 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Tue Oct 15 10:52:09 JST 2024 ;; MSG SIZE rcvd: 68 |
[2] | 例として [192.168.100.0/24] の逆引きゾーンを作成します。 |
[cent@dlp ~(keystone)]$ openstack zone create --email dnsmaster@server.education 100.168.192.in-addr.arpa. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | CREATE | | attributes | | | created_at | 2024-10-15T01:54:48.000000 | | description | None | | email | dnsmaster@server.education | | id | c736e2a4-eda6-441a-83b7-49356ffad03c | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 756e2b4937c44d3991028e294f92d89a | | serial | 1728957288 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | None | | version | 1 | +----------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK [cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 0d3d9be3-babe-4207-9fa8-296c868c1e3c | server.education. | PRIMARY | 1728957086 | ACTIVE | NONE | | c736e2a4-eda6-441a-83b7-49356ffad03c | 100.168.192.in-addr.arpa. | PRIMARY | 1728957288 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # PTR レコードを登録する [cent@dlp ~(keystone)]$ openstack recordset create --record 'node01.server.education.' --type PTR 100.168.192.in-addr.arpa. 10 +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | CREATE | | created_at | 2024-10-15T01:55:20.000000 | | description | None | | id | 69ae36a5-ac4e-474c-aabd-a76865a5d5ed | | name | 10.100.168.192.in-addr.arpa. | | project_id | 756e2b4937c44d3991028e294f92d89a | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | c736e2a4-eda6-441a-83b7-49356ffad03c | | zone_name | 100.168.192.in-addr.arpa. | +-------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK [cent@dlp ~(keystone)]$ openstack recordset list 100.168.192.in-addr.arpa. +--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 59ccbe78-c02d-4d20-9fd0-c0f3f334f190 | 100.168.192.in-addr.arpa. | SOA | network.srv.world. dnsmaster.server.education. 1728957326 3596 600 86400 3600 | ACTIVE | NONE | | 73a45a8f-4e2f-4cfb-8b8b-3885ae6c82f7 | 100.168.192.in-addr.arpa. | NS | network.srv.world. | ACTIVE | NONE | | 69ae36a5-ac4e-474c-aabd-a76865a5d5ed | 10.100.168.192.in-addr.arpa. | PTR | node01.server.education. | ACTIVE | NONE | +--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+ # 確認 [cent@dlp ~(keystone)]$ dig -p 5354 @network.srv.world -x 192.168.100.10 ; <<>> DiG 9.16.23-RH <<>> -p 5354 @network.srv.world -x 192.168.100.10 ; (1 server found) ;; global options: +cmd ;; Got answer: ;; -<<>>HEADER<<- opcode: QUERY, status: NOERROR, id: 42184 ;; 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: 9 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Tue Oct 15 10:55:58 JST 2024 ;; MSG SIZE rcvd: 93 |
[3] | レコードやゾーンを削除するには以下のように実行します。 |
[cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | c9f8d2cd-1048-4c59-867b-8fa179635b72 | server.education. | NS | network.srv.world. | ACTIVE | NONE | | ce68b900-54ac-4402-8657-77976405eaae | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1728957086 3591 600 86400 3600 | ACTIVE | NONE | | c96ba608-cdd0-452e-81ca-f3428152911d | node01.server.education. | A | 192.168.100.10 | ACTIVE | NONE | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ # [node01] レコードを削除する [cent@dlp ~(keystone)]$ openstack recordset delete server.education. node01.server.education. +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | action | DELETE | | created_at | 2024-10-15T01:51:21.000000 | | description | None | | id | c96ba608-cdd0-452e-81ca-f3428152911d | | name | node01.server.education. | | project_id | 756e2b4937c44d3991028e294f92d89a | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2024-10-15T01:56:51.000000 | | version | 2 | | zone_id | 0d3d9be3-babe-4207-9fa8-296c868c1e3c | | zone_name | server.education. | +-------------+--------------------------------------+[cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+ | c9f8d2cd-1048-4c59-867b-8fa179635b72 | server.education. | NS | network.srv.world. | ACTIVE | NONE | | ce68b900-54ac-4402-8657-77976405eaae | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1728957416 3591 600 86400 3600 | ACTIVE | NONE | +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+[cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 0d3d9be3-babe-4207-9fa8-296c868c1e3c | server.education. | PRIMARY | 1728957416 | ACTIVE | NONE | | c736e2a4-eda6-441a-83b7-49356ffad03c | 100.168.192.in-addr.arpa. | PRIMARY | 1728957326 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # [server.education.] ゾーンを削除する [cent@dlp ~(keystone)]$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2024-10-15T01:50:44.000000 | | description | None | | email | dnsmaster@server.education | | id | 0d3d9be3-babe-4207-9fa8-296c868c1e3c | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 756e2b4937c44d3991028e294f92d89a | | serial | 1728957416 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2024-10-15T01:57:36.000000 | | version | 7 | +----------------+--------------------------------------+[cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | c736e2a4-eda6-441a-83b7-49356ffad03c | 100.168.192.in-addr.arpa. | PRIMARY | 1728957326 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |
|