OpenStack Zed : Magnum 設定 (Network ノード)2022/10/11 |
OpenStack Container Infrastructure Management Service(Magnum)をインストールします。
当例では以下のような環境を例に Network ノードに Magnum サービス一式をインストールします。
------------+-----------------------------+-----------------------------+------------ | | | 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 | | Barbican API | | Heat API/Engine | | | | | | Magnum Services | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | Network ノードで Magnum サービス をインストールします。インストール中の問いには全て [No] で OK です。 |
root@network:~# apt -y install magnum-api magnum-conductor python3-magnumclient
|
[2] | Magnum の設定です。 |
root@network:~# mv /etc/magnum/magnum.conf /etc/magnum/magnum.conf.org
root@network:~#
vi /etc/magnum/magnum.conf # 新規作成 [DEFAULT] state_path = /var/lib/magnum log_dir = /var/log/magnum # RabbitMQ 接続情報 transport_url = rabbit://openstack:password@dlp.srv.world [api] host = 127.0.0.1 port = 9511 enabled_ssl = false [database] # MariaDB 接続情報 connection = mysql+pymysql://magnum:password@dlp.srv.world/magnum [certificates] cert_manager_type = barbican [cinder] default_docker_volume_type = lvm-magnum [cinder_client] region_name = RegionOne [magnum_client] region_name = RegionOne # Keystone 認証情報 [keystone_authtoken] www_authenticate_uri = https://dlp.srv.world:5000 auth_url = https://dlp.srv.world:5000 memcached_servers = dlp.srv.world:11211 auth_type = password auth_version = v3 project_domain_name = default user_domain_name = default project_name = service username = magnum password = servicepassword admin_user = magnum admin_password = servicepassword admin_tenant_name = service [oslo_policy] enforce_scope = false enforce_new_defaults = false policy_file = /etc/magnum/policy.json [oslo_messaging_notifications] driver = messagingv2 [trust] trustee_domain_name = magnum trustee_domain_admin_name = magnum_domain_admin trustee_domain_admin_password = servicepassword trustee_keystone_interface = public chmod 640 /etc/magnum/magnum.conf root@network:~# chgrp magnum /etc/magnum/magnum.conf root@network:~# mkdir /var/lib/magnum/{tmp,certificates} root@network:~# chown magnum. /var/lib/magnum/{tmp,certificates} |
[3] | Nginx にプロキシの設定をします。 |
root@network:~#
vi /etc/nginx/nginx.conf # [stream] セクション内に追記
stream {
upstream neutron-api {
server 127.0.0.1:9696;
}
server {
listen 10.0.0.50:9696 ssl;
proxy_pass neutron-api;
}
upstream magnum-api {
server 127.0.0.1:9511;
}
server {
listen 10.0.0.50:9511 ssl;
proxy_pass magnum-api;
}
ssl_certificate "/etc/letsencrypt/live/network.srv.world/fullchain.pem";
ssl_certificate_key "/etc/letsencrypt/live/network.srv.world/privkey.pem";
}
|
[4] | データベースにデータを追加して Magnum サービスを起動します。 |
root@network:~# su -s /bin/bash magnum -c "magnum-db-manage upgrade" root@network:~# systemctl restart magnum-api magnum-conductor nginx |
[5] | Control ノードでステータスを確認します。[up] 状態であれば OK です。 また、[magnum.conf] で設定した Magnum 用の Cinder ボリュームタイプを作成しておきます。 |
root@dlp ~(keystone)#
root@dlp ~(keystone)# apt -y install python3-magnumclient openstack coe service list +----+------+------------------+-------+----------+-----------------+---------------------------+---------------------------+ | id | host | binary | state | disabled | disabled_reason | created_at | updated_at | +----+------+------------------+-------+----------+-----------------+---------------------------+---------------------------+ | 1 | None | magnum-conductor | up | False | None | 2022-10-11T07:37:16+00:00 | 2022-10-11T07:44:52+00:00 | +----+------+------------------+-------+----------+-----------------+---------------------------+---------------------------+root@dlp ~(keystone)# openstack volume type create lvm-magnum --public +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | description | None | | id | 1706d435-60c6-4179-a1ca-702487a2e613 | | is_public | True | | name | lvm-magnum | +-------------+--------------------------------------+ |
Sponsored Link |
|