CentOS 6
Sponsored Link

OpenStack Icehouse : Configure Neutron#1(Control Node)
2014/06/25
 
Configure OpenStack Network Service (Neutron).
For this example, Install Neutron Server on Control Node which Keystone/Glance/Nova API are already installed, and Install DHCP Agent, L3 Agent, L2 Agent, Metadata Agent on Network Node, and also Install L2 Agent on Compute Node on here. ( it's possible to install on a server as All-in-One, though, if you want )
Neutron needs a plugin software, it's possible to choose it from some softwares. This example chooses ML2 plugin. ( it uses Open vSwitch under the backend )
                                |
+------------------+            |            +------------------------+
| [ Control Node ] |            |            |    [ Network Node ]    |
|     Keystone     |10.0.0.30   |   10.0.0.50|        DHCP Agent      |
|      Glance      |------------+------------|        L3 Agent        |
|     Nova API     |eth0        |        eth0|        L2 Agent        |
|  Neutron Server  |            |            |     Metadata Agent     |
+------------------+            |            +------------------------+
                            eth0|10.0.0.51
                      +--------------------+
                      |  [ Compute Node ]  |
                      |    Nova Compute    |
                      |      L2 Agent      |
                      +--------------------+

 
Configure Control Node on here.
[1] Add user or service for Neutron to Keystone.
# add Neutron user or service

[root@dlp ~(keystone)]#
keystone user-create --tenant service --name neutron --pass servicepassword --enabled true

+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|  email   |                                  |
| enabled  |               True               |
|    id    | f59d7c36743848aa96c020bfccd734eb |
|   name   |             neutron              |
| tenantId | dadd0a55406f4340aaffaf7d6b35b0c4 |
| username |             neutron              |
+----------+----------------------------------+

[root@dlp ~(keystone)]#
keystone user-role-add --user neutron --tenant service --role admin
[root@dlp ~(keystone)]#
keystone service-create --name=neutron --type=network --description="Neutron Network Service"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |     Neutron Network Service      |
|   enabled   |               True               |
|      id     | 6a8b8a4ace3e49f481ac5de33e756512 |
|     name    |             neutron              |
|     type    |             network              |
+-------------+----------------------------------+

# define Neutron Server's IP

[root@dlp ~(keystone)]#
export neutron_server=10.0.0.30
[root@dlp ~(keystone)]#
keystone endpoint-create --region RegionOne \
--service neutron \
--publicurl "http://$neutron_server:9696/" \
--internalurl "http://$neutron_server:9696/" \
--adminurl "http://$neutron_server:9696/"

+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
|   adminurl  |      http://10.0.0.30:9696/      |
|      id     | 59ac7ce5ceb8499eacabc2ecf69465bb |
| internalurl |      http://10.0.0.30:9696/      |
|  publicurl  |      http://10.0.0.30:9696/      |
|    region   |            RegionOne             |
|  service_id | 6a8b8a4ace3e49f481ac5de33e756512 |
+-------------+----------------------------------+
[2] Add a User and DB for Neutron to MariaDB.
[root@dlp ~(keystone)]#
mysql -u root -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.5.36-MariaDB-wsrep MariaDB Server, wsrep_25.9.r3961

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

# set any password for 'password' section

mysql>
create database neutron_ml2 character set utf8;

Query OK, 1 row affected (0.00 sec)
mysql>
grant all privileges on neutron_ml2.* to neutron@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
mysql>
grant all privileges on neutron_ml2.* to neutron@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
mysql>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
mysql>
exit

Bye
[3] Install Neutron Server
# install from RDO, EPEL

[root@dlp ~(keystone)]#
yum --enablerepo=openstack-icehouse,epel -y install openstack-neutron openstack-neutron-ml2
[4] Configure Neutron Server
[root@dlp ~(keystone)]#
vi /etc/neutron/neutron.conf
# line 55: add

core_plugin = ml2
# line 64: add

service_plugins = router
# line 70: uncomment and change

auth_strategy =
keystone
# line 87: uncomment

dhcp_agent_notification = True
# line 105: uncomment

rpc_backend = neutron.openstack.common.rpc.impl_kombu
# line 118: uncomment

control_exchange = neutron
# line 134: uncomment and change (specify RabbitMQ server)

rabbit_host =
10.0.0.30
# line 136: uncomment and change (specify RabbitMQ user's password)

rabbit_password =
password
# line 138: uncomment

rabbit_port = 5672
# line 143: uncomment and change (specify RabbitMQ user)

rabbit_userid =
guest
# line 299: uncomment

notify_nova_on_port_status_changes = True
# line 303: uncomment

notify_nova_on_port_data_changes = True
# line 306: uncomment and change (specify Nova endpoint)

nova_url =
http://10.0.0.30:8774/v2
# line 312: uncomment and change (specify Nova user)

nova_admin_username =
nova
# line 315: uncomment and change (specify Nova user's tenant ID)

nova_admin_tenant_id =
45fa65597c464d48a20be990f660a27b
# line 318: uncomment and change (specify Nova user's password)

nova_admin_password =
servicepassword
# line 321: uncomment and change (specify Keystone server)

nova_admin_auth_url =
http://10.0.0.30:35357/v2.0
# line 394: change like follows (auth info for Keystone)

auth_host =
10.0.0.30

auth_port = 35357
auth_protocol = http
signing_dir = $state_path/keystone-signing
admin_tenant_name =
service

admin_user =
neutron

admin_password =
servicepassword
# line 409: change (specify database)

connection = mysql://neutron:password@10.0.0.30/neutron_ml2
[root@dlp ~(keystone)]#
vi /etc/neutron/plugins/ml2/ml2_conf.ini
# line 7: add

type_drivers = flat,vlan,gre
tenant_network_types = vlan,gre
mechanism_drivers = openvswitch
# lats line : uncomment & add

enable_security_group = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
[root@dlp ~(keystone)]#
vi /etc/nova/nova.conf
# add in the [DEFAULT] section

network_api_class=nova.network.neutronv2.api.API
security_group_api=neutron
[root@dlp ~(keystone)]#
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

[root@dlp ~(keystone)]#
/etc/rc.d/init.d/neutron-server start

Starting neutron:                                          [  OK  ]
[root@dlp ~(keystone)]#
chkconfig neutron-server on

[root@dlp ~(keystone)]#
/etc/rc.d/init.d/openstack-nova-api restart

Stopping openstack-nova-api:                               [  OK  ]
Starting openstack-nova-api:                               [  OK  ]
Matched Content
 
Tweet