CentOS Stream 8
Sponsored Link

OpenStack Victoria : Magnum 設定 (Network ノード)2021/03/26

 
OpenStack Container Infrastructure Management Service(Magnum)をインストールします。
当例では以下のような環境を例に Network ノードに Magnum サービス一式をインストールします。
------------+---------------------------+---------------------------+------------
            |                           |                           |
        eth0|10.0.0.30              eth0|10.0.0.50              eth0|10.0.0.51
+-----------+-----------+   +-----------+-----------+   +-----------+-----------+
|    [ Control Node ]   |   |    [ Network Node ]   |   |    [ Compute Node ]   |
|                       |   |                       |   |                       |
|  MariaDB    RabbitMQ  |   |      Open vSwitch     |   |        Libvirt        |
|  Memcached  httpd     |   |     Neutron Server    |   |     Nova Compute      |
|  Keystone   Glance    |   |       OVN-Northd      |   |      Open vSwitch     |
|  Nova API             |   |     Cinder Volume     |   |   OVN Metadata Agent  |
|  Cinder API           |   |      iSCSI Target     |   |     OVN-Controller    |
|  Barbican API         |   |     Heat API/Engine   |   |                       |
|                       |   |     Magnum Services   |   |                       |
+-----------------------+   +-----------------------+   +-----------------------+

[1] Network ノードで Magnum サービス をインストールします。
# Victoria, EPEL, PowerTools からインストール

[root@network ~]#
dnf --enablerepo=centos-openstack-victoria,powertools,epel -y install openstack-magnum-api openstack-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
rootwrap_config = /etc/magnum/rootwrap.conf
log_dir = /var/log/magnum
# RabbitMQ 接続情報
transport_url = rabbit://openstack:password@10.0.0.30

[api]
host = 10.0.0.50
port = 9511
enabled_ssl = False

[database]
# MariaDB 接続情報
connection = mysql+pymysql://magnum:password@10.0.0.30/magnum

[barbican_client]
region_name = RegionOne

[certificates]
cert_manager_type = barbican

[cinder]
default_docker_volume_type = lvm-magnum

[cinder_client]
region_name = RegionOne

[magnum_client]
region_name = RegionOne

[glance_client]
region_name = RegionOne

[nova_client]
region_name = RegionOne

[neutron_client]
region_name = RegionOne

[heat_client]
region_name = RegionOne

# Keystone 認証情報
[keystone_authtoken]
www_authenticate_uri = http://10.0.0.30:5000/v3
auth_url = http://10.0.0.30:5000
memcached_servers = 10.0.0.30: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_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

[root@network ~]#
chmod 640 /etc/magnum/magnum.conf

[root@network ~]#
chgrp magnum /etc/magnum/magnum.conf

[root@network ~]#
mkdir /var/lib/magnum/tmp

[root@network ~]#
chown magnum /var/lib/magnum/tmp

[root@network ~]#
su -s /bin/bash magnum -c "magnum-db-manage upgrade"

[root@network ~]#
systemctl enable --now openstack-magnum-api openstack-magnum-conductor

[3] Firewalld を有効にしている場合は、サービスポートの許可が必要です。
[root@network ~]#
firewall-cmd --add-port=9511/tcp --permanent

success
[root@network ~]#
firewall-cmd --reload

success
[4] Control ノードでステータスを確認します。[up] 状態であれば OK です。
また、[magnum.conf] で設定した Magnum 用の Cinder ボリュームタイプを作成しておきます。
[root@dlp ~(keystone)]#
dnf --enablerepo=centos-openstack-victoria,powertools,epel -y install python3-magnumclient
[root@dlp ~(keystone)]#
openstack coe service list

+----+------+------------------+-------+----------+-----------------+---------------------------+---------------------------+
| id | host | binary           | state | disabled | disabled_reason | created_at                | updated_at                |
+----+------+------------------+-------+----------+-----------------+---------------------------+---------------------------+
|  1 | None | magnum-conductor | up    | False    | None            | 2021-03-26T02:57:55+00:00 | 2021-03-26T03:00:57+00:00 |
+----+------+------------------+-------+----------+-----------------+---------------------------+---------------------------+

[root@dlp ~(keystone)]#
openstack volume type create lvm-magnum --public

+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| description | None                                 |
| id          | 8a8c3989-4b24-4fde-8e15-1e83eb5ae68b |
| is_public   | True                                 |
| name        | lvm-magnum                           |
+-------------+--------------------------------------+
関連コンテンツ