OpenStack Epoxy : Designate 利用方法2025/05/28 |
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 | 2025-05-28T00:22:22.000000 | | description | None | | email | dnsmaster@server.education | | id | 51b321da-5fdf-49ba-9ea1-7dc5378945b4 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 6cd379304e2447da8514a66bb6cdfda5 | | serial | 1748391742 | | 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 | +--------------------------------------+-------------------+---------+------------+--------+--------+ | 51b321da-5fdf-49ba-9ea1-7dc5378945b4 | server.education. | PRIMARY | 1748391742 | 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 | 2025-05-28T00:23:00.000000 | | description | None | | id | a7a6f727-363e-4ac6-90db-2c63b9665b53 | | name | node01.server.education. | | project_id | 6cd379304e2447da8514a66bb6cdfda5 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | None | | version | 1 | | zone_id | 51b321da-5fdf-49ba-9ea1-7dc5378945b4 | | zone_name | server.education. | +-------------+--------------------------------------+ # [status] が [ACTIVE] であれば OK [cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 87827c95-760d-40d4-89aa-aa14ff228813 | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1748391785 3556 600 86400 3600 | ACTIVE | NONE | | f3e20673-db55-4eff-99d5-1135d830bd69 | server.education. | NS | network.srv.world. | ACTIVE | NONE | | a7a6f727-363e-4ac6-90db-2c63b9665b53 | 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: 37364 ;; 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: 9 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed May 28 09:24:05 JST 2025 ;; 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 | 2025-05-28T00:24:51.000000 | | description | None | | email | dnsmaster@server.education | | id | 6d251885-ca82-441b-bc9c-eeebf06b3403 | | masters | | | name | 100.168.192.in-addr.arpa. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 6cd379304e2447da8514a66bb6cdfda5 | | serial | 1748391891 | | 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 | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 51b321da-5fdf-49ba-9ea1-7dc5378945b4 | server.education. | PRIMARY | 1748391785 | ACTIVE | NONE | | 6d251885-ca82-441b-bc9c-eeebf06b3403 | 100.168.192.in-addr.arpa. | PRIMARY | 1748391891 | 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 | 2025-05-28T00:25:28.000000 | | description | None | | id | 832054a4-5f2e-4c5c-8208-8686f664cdef | | name | 10.100.168.192.in-addr.arpa. | | project_id | 6cd379304e2447da8514a66bb6cdfda5 | | records | node01.server.education. | | status | PENDING | | ttl | None | | type | PTR | | updated_at | None | | version | 1 | | zone_id | 6d251885-ca82-441b-bc9c-eeebf06b3403 | | 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 | +--------------------------------------+------------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 8c9c5f96-5fa3-42d6-ab13-7010057da9df | 100.168.192.in-addr.arpa. | NS | network.srv.world. | ACTIVE | NONE | | d6ddc54b-3675-4b1b-ba2f-6a34390a37d0 | 100.168.192.in-addr.arpa. | SOA | network.srv.world. dnsmaster.server.education. 1748391930 3533 600 86400 3600 | ACTIVE | NONE | | 832054a4-5f2e-4c5c-8208-8686f664cdef | 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: 49290 ;; 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: 8 msec ;; SERVER: 10.0.0.50#5354(10.0.0.50) ;; WHEN: Wed May 28 09:26:00 JST 2025 ;; MSG SIZE rcvd: 93 |
[3] | レコードやゾーンを削除するには以下のように実行します。 |
[cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+--------------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 87827c95-760d-40d4-89aa-aa14ff228813 | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1748391785 3556 600 86400 3600 | ACTIVE | NONE | | f3e20673-db55-4eff-99d5-1135d830bd69 | server.education. | NS | network.srv.world. | ACTIVE | NONE | | a7a6f727-363e-4ac6-90db-2c63b9665b53 | 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 | 2025-05-28T00:23:00.000000 | | description | None | | id | a7a6f727-363e-4ac6-90db-2c63b9665b53 | | name | node01.server.education. | | project_id | 6cd379304e2447da8514a66bb6cdfda5 | | records | 192.168.100.10 | | status | PENDING | | ttl | None | | type | A | | updated_at | 2025-05-28T00:26:52.000000 | | version | 2 | | zone_id | 51b321da-5fdf-49ba-9ea1-7dc5378945b4 | | zone_name | server.education. | +-------------+--------------------------------------+[cent@dlp ~(keystone)]$ openstack recordset list server.education. +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+ | id | name | type | records | status | action | +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+ | 87827c95-760d-40d4-89aa-aa14ff228813 | server.education. | SOA | network.srv.world. dnsmaster.server.education. 1748392015 3556 600 86400 3600 | ACTIVE | NONE | | f3e20673-db55-4eff-99d5-1135d830bd69 | server.education. | NS | network.srv.world. | ACTIVE | NONE | +--------------------------------------+-------------------+------+-------------------------------------------------------------------------------+--------+--------+[cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 51b321da-5fdf-49ba-9ea1-7dc5378945b4 | server.education. | PRIMARY | 1748392015 | ACTIVE | NONE | | 6d251885-ca82-441b-bc9c-eeebf06b3403 | 100.168.192.in-addr.arpa. | PRIMARY | 1748391930 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ # [server.education.] ゾーンを削除する [cent@dlp ~(keystone)]$ openstack zone delete server.education. +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | action | DELETE | | attributes | | | created_at | 2025-05-28T00:22:22.000000 | | description | None | | email | dnsmaster@server.education | | id | 51b321da-5fdf-49ba-9ea1-7dc5378945b4 | | masters | | | name | server.education. | | pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 | | project_id | 6cd379304e2447da8514a66bb6cdfda5 | | serial | 1748392015 | | shared | False | | status | PENDING | | transferred_at | None | | ttl | 3600 | | type | PRIMARY | | updated_at | 2025-05-28T00:27:39.000000 | | version | 7 | +----------------+--------------------------------------+[cent@dlp ~(keystone)]$ openstack zone list +--------------------------------------+---------------------------+---------+------------+--------+--------+ | id | name | type | serial | status | action | +--------------------------------------+---------------------------+---------+------------+--------+--------+ | 6d251885-ca82-441b-bc9c-eeebf06b3403 | 100.168.192.in-addr.arpa. | PRIMARY | 1748391930 | ACTIVE | NONE | +--------------------------------------+---------------------------+---------+------------+--------+--------+ |
Sponsored Link |
|