OpenStack Victoria : Configure Magnum (Control Node)2021/03/26 |
Install OpenStack Container Infrastructure Management Service (Magnum).
This example is based on the environment like follows.
Install Magnum services on Network Node. ------------+---------------------------+---------------------------+------------ | | | 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] | Add users and others for Magnum in Keystone. |
# create [magnum] user in [service] project [root@dlp ~(keystone)]# openstack user create --domain default --project service --password servicepassword magnum +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | affa3a6446154e37adfd233c437bacc1 | | domain_id | default | | enabled | True | | id | 6e7bbd6aad8a49808a04b91c50f15d9d | | name | magnum | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+ # add [magnum] user in [admin] role [root@dlp ~(keystone)]# openstack role add --project service --user magnum admin
# create service entry for [magnum] [root@dlp ~(keystone)]# openstack service create --name magnum --description "OpenStack Containers Orchestration" container-infra +-------------+------------------------------------+ | Field | Value | +-------------+------------------------------------+ | description | OpenStack Containers Orchestration | | enabled | True | | id | 0e635df9c38b4742a3b80f8b7c904fb3 | | name | magnum | | type | container-infra | +-------------+------------------------------------+ # define Magnum API Host [root@dlp ~(keystone)]# export magnum_api=10.0.0.50
# create endpoint for [magnum] (public) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne container-infra public http://$magnum_api:9511/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 8fa825eaffc84df398b347357e67f4e2 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 0e635df9c38b4742a3b80f8b7c904fb3 | | service_name | magnum | | service_type | container-infra | | url | http://10.0.0.50:9511/v1 | +--------------+----------------------------------+ # create endpoint for [magnum] (internal) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne container-infra internal http://$magnum_api:9511/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 2f778ae30cf841d5a52873743001c727 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 0e635df9c38b4742a3b80f8b7c904fb3 | | service_name | magnum | | service_type | container-infra | | url | http://10.0.0.50:9511/v1 | +--------------+----------------------------------+ # create endpoint for [magnum] (admin) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne container-infra admin http://$magnum_api:9511/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 84ddd84b323e4d5ea73e18e121a425e7 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 0e635df9c38b4742a3b80f8b7c904fb3 | | service_name | magnum | | service_type | container-infra | | url | http://10.0.0.50:9511/v1 | +--------------+----------------------------------+ # create [magnum] domain [root@dlp ~(keystone)]# openstack domain create --description "Containers projects and users" magnum +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Containers projects and users | | enabled | True | | id | 086aeb0350e74f468504931dbf4a1551 | | name | magnum | | options | {} | | tags | [] | +-------------+----------------------------------+ # create [magnum_domain_admin] user [root@dlp ~(keystone)]# openstack user create --domain magnum --password servicepassword magnum_domain_admin +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | 086aeb0350e74f468504931dbf4a1551 | | enabled | True | | id | 05260c80dd594d8f97ff2465ef47646c | | name | magnum_domain_admin | | options | {} | | password_expires_at | None | +---------------------+----------------------------------+ # add [magnum_domain_admin] user to [admin] role [root@dlp ~(keystone)]# openstack role add --domain magnum --user-domain magnum --user magnum_domain_admin admin
|
[2] | Add a User and Database on MariaDB for Magnum. |
[root@dlp ~(keystone)]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 104 Server version: 10.3.27-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> create database magnum; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all privileges on magnum.* to magnum@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> grant all privileges on magnum.* to magnum@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> exit Bye |
Sponsored Link |