Ubuntu 14.04
Sponsored Link

OpenStack Icehouse : Configure Neutron#1 (Control Node)2014/05/23

 
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    | 75990e24783c408ab9b497ec8e51efc7 |
|   name   |             neutron              |
| tenantId | 45fa65597c464d48a20be990f660a27b |
| 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     | c91e39de2c9d4072942bf77e1d93b4b4 |
|     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     | ad19bde6c9ca41dd9e9b31c220f235a3 |
| internalurl |      http://10.0.0.30:9696/      |
|  publicurl  |      http://10.0.0.30:9696/      |
|    region   |            RegionOne             |
|  service_id | c91e39de2c9d4072942bf77e1d93b4b4 |
+-------------+----------------------------------+
[2] Add a User and DB for Neutron to MySQL.
root@dlp ~(keystone)#
mysql -u root -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.5.34-0ubuntu0.12.04.1 (Ubuntu)

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
root@dlp ~(keystone)#
apt-get -y install neutron-server neutron-plugin-ml2 python-neutronclient
[4] Configure Neutron Server
root@dlp ~(keystone)#
vi /etc/neutron/neutron.conf
# line 53: uncomment

core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin
# line 64: add

service_plugins = neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
# line 70: uncomment

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 (RabbitMQ server's user's password)

rabbit_password =
password
# line 138: uncomment

rabbit_port = 5672
# line 143: uncomment and change (RabbitMQ server's 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

signing_dir = $state_path/keystone-signing
# line 409: change (specify database)

connection =
mysql://neutron:password@10.0.0.30/neutron_ml2
# line 454: comment out

# service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.
drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
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
# last 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)#
service neutron-server restart

neutron-server stop/waiting
neutron-server start/running, process 6415
root@dlp ~(keystone)#
service nova-api restart

nova-api stop/waiting
nova-api start/running, process 4926
Matched Content