OpenStack Rocky : Designate 設定#22018/09/18 |
OpenStack DNS Service(Designate)をインストールします。
当例では以下のような環境を例に Designate をインストールします。
Network ノードに Designate サービス一式をインストールし、バックエンドの DNS サービスとして BIND 9 を設定します。 BIND 9 以外にも PowerDNS などもバックエンド DNS として利用可能です。 ------------+---------------------------+---------------------------+------------ | | | 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] | Designate サービス および BIND 9 をインストールします。 |
root@network:~# apt -y install designate-api designate-central designate-worker designate-producer designate-mdns python-designateclient bind9 bind9utils
|
[2] | Designate から BIND が利用できるよう設定しておきます。 |
root@network:~# rndc-confgen -a -k designate -c /etc/bind/designate.key -r /dev/urandom wrote key file "/etc/bind/designate.key" root@network:~# chown bind:designate /etc/bind/designate.key root@network:~# chmod 640 /etc/bind/designate.key root@network:~# mv /etc/bind/named.conf.options /etc/bind/named.conf.options.org
root@network:~#
vi /etc/bind/named.conf.options # 新規作成
options {
directory "/var/cache/bind";
listen-on port 53 { any; };
listen-on-v6 port 53 { none; };
# クエリの許可範囲は自身の環境に合わせて置き換え
allow-query { localhost; 10.0.0.0/24; };
allow-new-zones yes;
request-ixfr no;
recursion no;
dnssec-validation auto;
auth-nxdomain no;
};
include "/etc/bind/designate.key";
controls {
inet 0.0.0.0 port 953
allow { localhost; } keys { "designate"; };
};
chmod 644 /etc/bind/named.conf.options root@network:~# chgrp bind /etc/bind/named.conf.options root@network:~# chown -R bind. /etc/bind root@network:~# systemctl restart bind9 |
[3] | Designate の設定です。 |
root@network:~# mv /etc/designate/designate.conf /etc/designate/designate.conf.org
root@network:~#
vi /etc/designate/designate.conf # 新規作成 [DEFAULT] log_dir = /var/log/designate # RabbitMQ 接続情報 transport_url = rabbit://openstack:password@10.0.0.30 root_helper = sudo designate-rootwrap /etc/designate/rootwrap.conf [database] # MariaDB 接続情報 connection = mysql+pymysql://designate:password@10.0.0.30/designate [service:api] listen = 0.0.0.0:9001 auth_strategy = keystone api_base_uri = http://10.0.0.50:9001 enable_api_v2 = True enabled_extensions_v2 = quotas, reports # Keystone 認証情報 [keystone_authtoken] www_authenticate_uri = http://10.0.0.30:5000 auth_url = http://10.0.0.30:5000 memcached_servers = 10.0.0.30:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = designate password = servicepassword [service:worker] enabled = True notify = True [storage:sqlalchemy] # MariaDB 接続情報 connection = mysql+pymysql://designate:password@10.0.0.30/designate chmod 640 /etc/designate/designate.conf root@network:~# chgrp designate /etc/designate/designate.conf root@network:~# su -s /bin/sh -c "designate-manage database sync" designate
root@network:~#
systemctl restart designate-central designate-api root@network:~# systemctl enable designate-central designate-api
root@network:~#
vi /etc/designate/pools.yaml # 新規作成 (ホスト名や IPアドレスは自身の環境に合わせて置き換え) - name: default description: Default Pool attributes: {} ns_records: - hostname: network.srv.world. priority: 1 nameservers: - host: 10.0.0.50 port: 53 targets: - type: bind9 description: BIND9 Server masters: - host: 10.0.0.50 port: 5354 options: host: 10.0.0.50 port: 53 rndc_host: 10.0.0.50 rndc_port: 953 rndc_key_file: /etc/bind/designate.key chmod 640 /etc/designate/pools.yaml root@network:~# chgrp designate /etc/designate/pools.yaml root@network:~# su -s /bin/sh -c "designate-manage pool update" designate Updating Pools Configuration **************************** root@network:~# systemctl restart designate-worker designate-producer designate-mdns root@network:~# systemctl enable designate-worker designate-producer designate-mdns
|
[4] | Openstack に認証可能な任意のノードでステータスを確認します。全て [up] 状態であれば OK です。 |
root@dlp ~(keystone)# openstack dns service list +--------------------------------------+-------------------+--------------+--------+-------+--------------+ | id | hostname | service_name | status | stats | capabilities | +--------------------------------------+-------------------+--------------+--------+-------+--------------+ | 9a8ccf52-81df-4983-bea4-3fb2ca5856f0 | network.srv.world | api | UP | - | - | | d5ba278d-4c75-4925-be5f-143b0fcdcf38 | network.srv.world | central | UP | - | - | | 579fdcbc-c975-42e7-a354-302868ba1d45 | network.srv.world | producer | UP | - | - | | c35f0c7a-af6a-4e88-a2fd-38efc1807e89 | network.srv.world | worker | UP | - | - | | e281d005-1ba3-4ab7-80a7-21e6c90f60c7 | network.srv.world | mdns | UP | - | - | +--------------------------------------+-------------------+--------------+--------+-------+--------------+ |
Sponsored Link |