본문 바로가기

CloudSystem(Iaas)

[OpenStack] OpenStack Mitaka Install Controller Node - Nova/Neutron Service


Step4. Nova install

: OpenStack 컴퓨터(Vitrual Machine) 서비스 설치 가이드


[stack@localhost ~]$ mysql -u root -p


MariaDB [(none)]> CREATE DATABASE nova_api;

Query OK, 1 row affected (0.00 sec)


MariaDB [(none)]> CREATE DATABASE nova;

Query OK, 1 row affected (0.00 sec)


MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'stack';

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'stack';

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'stack';

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'stack';

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> show DATABASES;

+--------------------+

| Database           |

+--------------------+

| glance             |

| information_schema |

| keystone           |

| mysql              |

| nova               |

| nova_api           |

| performance_schema |

+--------------------+

7 rows in set (0.00 sec)


MariaDB [(none)]> show grants for nova

    -> ;

+-----------------------------------------------------------------------------------------------------+

| Grants for nova@%                                                                                   |

+-----------------------------------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO 'nova'@'%' IDENTIFIED BY PASSWORD '*BAC89B69B31316D0E8B2146A25F0BD290E9801FA' |

| GRANT ALL PRIVILEGES ON `nova`.* TO 'nova'@'%'                                                      |

| GRANT ALL PRIVILEGES ON `nova_api`.* TO 'nova'@'%'                                                  |

+-----------------------------------------------------------------------------------------------------+


[stack@localhost ~]$  openstack user create --domain default --password-prompt nova

User Password: stack

Repeat User Password: stack

+-----------+----------------------------------+

| Field     | Value                            |

+-----------+----------------------------------+

| domain_id | 5c86aea57fad4ccebcd2e9345480b1d8 |

| enabled   | True                             |

| id        | 047120f23a85490e864253867cf9b4a2 |

| name      | nova                             |

+-----------+----------------------------------+


[stack@localhost ~]$ openstack role add --project service --user nova admin

[stack@localhost ~]$ openstack service create --name nova --description "OpenStack Compute" compute

+-------------+----------------------------------+

| Field       | Value                            |

+-------------+----------------------------------+

| description | OpenStack Compute                |

| enabled     | True                             |

| id          | a5f2977cb820446683d1e28e6aab0296 |

| name        | nova                             |

| type        | compute                          |

+-------------+----------------------------------+


[stack@localhost ~]$ openstack endpoint create --region RegionOne compute public http://controller1:8774/v2.1/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | 29290d6b4ae448d5a4985647438de818           |

| interface    | public                                     |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | a5f2977cb820446683d1e28e6aab0296           |

| service_name | nova                                       |

| service_type | compute                                    |

| url          | http://controller1:8774/v2.1/%(tenant_id)s |

+--------------+--------------------------------------------+

[stack@localhost ~]$ openstack endpoint create --region RegionOne compute internal http://controller1:8774/v2.1/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | 062214cda66949f790a79945fdc2e210           |

| interface    | internal                                   |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | a5f2977cb820446683d1e28e6aab0296           |

| service_name | nova                                       |

| service_type | compute                                    |

| url          | http://controller1:8774/v2.1/%(tenant_id)s |

+--------------+--------------------------------------------+

[stack@localhost ~]$ openstack endpoint create --region RegionOne compute admin http://controller1:8774/v2.1/%\(tenant_id\)s

+--------------+--------------------------------------------+

| Field        | Value                                      |

+--------------+--------------------------------------------+

| enabled      | True                                       |

| id           | 575bba1a5dc740e0b719811fc41eac5c           |

| interface    | admin                                      |

| region       | RegionOne                                  |

| region_id    | RegionOne                                  |

| service_id   | a5f2977cb820446683d1e28e6aab0296           |

| service_name | nova                                       |

| service_type | compute                                    |

| url          | http://controller1:8774/v2.1/%(tenant_id)s |

+--------------+--------------------------------------------+


# sudo -i


Nova Service Package Install

# yum install openstack-nova-api openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler


Edit Noava Confing

# vi /etc/nova/nova.conf

[DEFAULT]

..

enabled_apis = osapi_compute,metadata

rpc_backend = rabbit

auth_strategy = keystone

my_ip = 192.168.198.138

use_neutron = True

firewall_driver = nova.virt.firewall.NoopFirewallDriver



[api_database]

..

connection = mysql+pymysql://nova:stack@controller1/nova_api


[database]

..

connection = mysql+pymysql://nova:stack@controller1/nova


[oslo_messaging_rabbit]

..

rabbit_host = controller1

rabbit_userid = openstack

rabbit_password = stack


[keystone_authtoken]

..

auth_uri = http://controller1:5000

auth_url = http://controller1:35357

memcached_servers = controller1:11211

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = nova

password = stack


[vnc]

..

vncserver_listen = $my_ip

vncserver_proxyclient_address = $my_ip


[glance]

..

api_servers = http://controller1:9292


[oslo_concurrency]

..

lock_path = /var/lib/nova/tmp


exit


# su -s /bin/sh -c "nova-manage api_db sync" nova

# su -s /bin/sh -c "nova-manage db sync" nova


# systemctl enable openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.servic


# systemctl start openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.servic


# su - stack

# openstack compute service list


Step5. Neutron Install

: OpenStack 네트워크 서비스 설치 가이드

[stack@controller1 ~]$ mysql -u root -p

Enter password:

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 32

Server version: 10.1.20-MariaDB MariaDB Server


Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]> CREATE DATABASE neutron;

Query OK, 1 row affected (0.01 sec)


MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'stack';

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'stack';

Query OK, 0 rows affected (0.00 sec)


MariaDB [(none)]> show DATABASES;

+--------------------+

| Database           |

+--------------------+

| glance             |

| information_schema |

| keystone           |

| mysql              |

| neutron            |

| nova               |

| nova_api           |

| performance_schema |

+--------------------+

8 rows in set (0.00 sec)


MariaDB [(none)]> show grants for neutron

    -> ;

+--------------------------------------------------------------------------------------------------------+

| Grants for neutron@%                                                                                   |

+--------------------------------------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO 'neutron'@'%' IDENTIFIED BY PASSWORD '*BAC89B69B31316D0E8B2146A25F0BD290E9801FA' |

| GRANT ALL PRIVILEGES ON `neutron`.* TO 'neutron'@'%'                                                   |

+--------------------------------------------------------------------------------------------------------+

2 rows in set (0.00 sec)


MariaDB [(none)]> show grants for neutron@localhost;

+----------------------------------------------------------------------------------------------------------------+

| Grants for neutron@localhost                                                                                   |

+----------------------------------------------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO 'neutron'@'localhost' IDENTIFIED BY PASSWORD '*BAC89B69B31316D0E8B2146A25F0BD290E9801FA' |

| GRANT ALL PRIVILEGES ON `neutron`.* TO 'neutron'@'localhost'                                                   |

+----------------------------------------------------------------------------------------------------------------+

2 rows in set (0.00 sec)


MariaDB [(none)]> show grants for neutron@;

+--------------------------------------------------------------------------------------------------------+

| Grants for neutron@%                                                                                   |

+--------------------------------------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO 'neutron'@'%' IDENTIFIED BY PASSWORD '*BAC89B69B31316D0E8B2146A25F0BD290E9801FA' |

| GRANT ALL PRIVILEGES ON `neutron`.* TO 'neutron'@'%'                                                   |

+--------------------------------------------------------------------------------------------------------+


exit


[stack@controller1 ~]$ source admin-openrc

[stack@controller1 ~]$ openstack user create --domain default --password-prompt neutron

User Password:

Repeat User Password:

+-----------+----------------------------------+

| Field     | Value                            |

+-----------+----------------------------------+

| domain_id | 5c86aea57fad4ccebcd2e9345480b1d8 |

| enabled   | True                             |

| id        | 416941445bdb4f56ad7780d7602b2bf0 |

| name      | neutron                          |

+-----------+----------------------------------+

[stack@controller1 ~]$ openstack role add --project service --user neutron admin

[stack@controller1 ~]$ openstack service create --name neutron --description "OpenStack Networking" network

+-------------+----------------------------------+

| Field       | Value                            |

+-------------+----------------------------------+

| description | OpenStack Networking             |

| enabled     | True                             |

| id          | e59175f0033c45c0940974ddb6bc7163 |

| name        | neutron                          |

| type        | network                          |

+-------------+----------------------------------+

[stack@controller1 ~]$ openstack endpoint create --region RegionOne network public http://controller1:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           | f06dec96d000445abcfaf942536b4bd3 |

| interface    | public                           |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   | e59175f0033c45c0940974ddb6bc7163 |

| service_name | neutron                          |

| service_type | network                          |

| url          | http://controller1:9696          |

+--------------+----------------------------------+

[stack@controller1 ~]$ openstack endpoint create --region RegionOne network internal http://controller1:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           | 35e98827f1544907b5287974f4a7188f |

| interface    | internal                         |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   | e59175f0033c45c0940974ddb6bc7163 |

| service_name | neutron                          |

| service_type | network                          |

| url          | http://controller1:9696          |

+--------------+----------------------------------+

[stack@controller1 ~]$ openstack endpoint create --region RegionOne network admin http://controller1:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           | ffe3cbec982345159e9496d39f5bfd50 |

| interface    | admin                            |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   | e59175f0033c45c0940974ddb6bc7163 |

| service_name | neutron                          |

| service_type | network                          |

| url          | http://controller1:9696          |

+--------------+----------------------------------+



[stack@controller1 ~]$ openstack user create --domain default --password-prompt neutron

User Password:

Repeat User Password:

+-----------+----------------------------------+

| Field     | Value                            |

+-----------+----------------------------------+

| domain_id | 5c86aea57fad4ccebcd2e9345480b1d8 |

| enabled   | True                             |

| id        | 416941445bdb4f56ad7780d7602b2bf0 |

| name      | neutron                          |

+-----------+----------------------------------+

[stack@controller1 ~]$ openstack role add --project service --user neutron admin

[stack@controller1 ~]$ openstack service create --name neutron --description "OpenStack Networking" network

+-------------+----------------------------------+

| Field       | Value                            |

+-------------+----------------------------------+

| description | OpenStack Networking             |

| enabled     | True                             |

| id          | e59175f0033c45c0940974ddb6bc7163 |

| name        | neutron                          |

| type        | network                          |

+-------------+----------------------------------+

[stack@controller1 ~]$ openstack endpoint create --region RegionOne network public http://controller1:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           | f06dec96d000445abcfaf942536b4bd3 |

| interface    | public                           |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   | e59175f0033c45c0940974ddb6bc7163 |

| service_name | neutron                          |

| service_type | network                          |

| url          | http://controller1:9696          |

+--------------+----------------------------------+

[stack@controller1 ~]$ openstack endpoint create --region RegionOne network internal http://controller1:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           | 35e98827f1544907b5287974f4a7188f |

| interface    | internal                         |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   | e59175f0033c45c0940974ddb6bc7163 |

| service_name | neutron                          |

| service_type | network                          |

| url          | http://controller1:9696          |

+--------------+----------------------------------+

[stack@controller1 ~]$ openstack endpoint create --region RegionOne network admin http://controller1:9696

+--------------+----------------------------------+

| Field        | Value                            |

+--------------+----------------------------------+

| enabled      | True                             |

| id           | ffe3cbec982345159e9496d39f5bfd50 |

| interface    | admin                            |

| region       | RegionOne                        |

| region_id    | RegionOne                        |

| service_id   | e59175f0033c45c0940974ddb6bc7163 |

| service_name | neutron                          |

| service_type | network                          |

| url          | http://controller1:9696          |

+--------------+----------------------------------+


# sudo -i

# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables

# vi /etc/neutron/neutron.conf

[database]

connection = mysql+pymysql://neutron:stack@controller1/neutron


[DEFAULT]

core_plugin = ml2

service_plugins =

rpc_backend = rabbit

auth_strategy = keystone

notify_nova_on_port_status_changes = true

notify_nova_on_port_data_changes = true

dhcp_agents_per_network = 2


[keystone_authtoken]

auth_uri = http://controller1:5000

auth_url = http://controller1:35357

memcached_servers = controller1:11211

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = neutron

password = stack


[nova]

auth_url = http://controller1:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = nova

password = stack


[oslo_concurrency]

lock_path = /var/lib/neutron/tmp


[oslo_messaging_rabbit]

rabbit_host = controller1

rabbit_userid = openstack

rabbit_password = stack


# grep ^[^#] /etc/neutron/neutron.conf


# vi /etc/neutron/plugins/ml2/ml2.conf.ini

[DEFAULT]

type_drivers = flat,vlan

tenant_network_types =

mechanism_drivers = openvswitch

extension_drivers = port_security


[ml2_type_vlan]

network_vlan_ranges = provider


[securitygroup]

firewall_driver = iptables_hybrid


# vi /etc/neutron/metadata_agent.ini

[DEFAULT]

..

nova_metadata_ip = controller1

metadata_proxy_shared_secret = stack



# vi /etc/nova/nova.conf 

[neutron]

..

url = http://controller1:9696

auth_url = http://controller1:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = neutron

password = stack


service_metadata_proxy = True

metadata_proxy_shared_secret = stack


[stack@controller1 ~]$ neutron net-create --shared --provider:physical_network provider \

>   --provider:network_type flat provider1

Created a new network:

+---------------------------+--------------------------------------+

| Field                     | Value                                |

+---------------------------+--------------------------------------+

| admin_state_up            | True                                 |

| availability_zone_hints   |                                      |

| availability_zones        |                                      |

| created_at                | 2019-03-26T09:11:32                  |

| description               |                                      |

| id                        | a0abccda-98ed-4200-b864-9f7670a5d045 |

| ipv4_address_scope        |                                      |

| ipv6_address_scope        |                                      |

| mtu                       | 1500                                 |

| name                      | provider1                            |

| provider:network_type     | flat                                 |

| provider:physical_network | provider                             |

| provider:segmentation_id  |                                      |

| router:external           | False                                |

| shared                    | True                                 |

| status                    | ACTIVE                               |

| subnets                   |                                      |

| tags                      |                                      |

| tenant_id                 | 9c131ba2af2b44459578c85fcef3334e     |

| updated_at                | 2019-03-26T09:11:32                  |

+---------------------------+--------------------------------------+



'CloudSystem(Iaas)' 카테고리의 다른 글

[OpenStack] Nova Componet OverView  (0) 2019.03.27
[OpenStack] OpenStack Mitaka Install  (0) 2019.03.22
[OpenStack]Helion OpenStack Install Comfirm  (0) 2019.03.21