CentOS 6
Sponsored Link

OpenStack Havana - Configure Neutron#2(Network Node)2013/10/29

 
Configure OpenStack Network Service (Neutron).
This example configures like the environment below.
Install Neutron Server on Controle Node, and Install DHCP, L3, L2 Agent on Network Node, and Install L2 Agent on Compute Node.
                                |
+------------------+            |            +------------------------+
| [ Control Node ] |10.0.0.30   |   10.0.0.50|    [ Network Node ]    |
|     Keystone     |------------+------------|        DHCP Agent      |
|  Neutron Server  |            |            |        L3 Agent        |
+------------------+            |            |        L2 Agent        |
                                |            +------------------------+
                                |
                                |10.0.0.51
                      +--------------------+
                      |  [ Compute Node ]  |
                      |         Nova       |
                      |       L2 Agent     |
                      +--------------------+
 
Configure Network Node on here.
By the way, Neutron needs a plugin software, it's possible to choose it from some softwares.
This example chooses Open vSwitch plugin.
[1] Enable IP forwarding first.
[root@network ~]#
sed -i -e "s/net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/g" /etc/sysctl.conf

[root@network ~]#
sysctl -p

[2] Update from EPEL OpenStack to use Network Namespace and install some packages like follows.
# install from EPEL OpenStack, EPEL

[root@network ~]#
yum --enablerepo=openstack-havana,epel -y update

[root@network ~]#
yum --enablerepo=openstack-havana,epel -y install openstack-neutron openstack-neutron-openvswitch python-keystoneclient

[root@network ~]#
[3] Load environment variables.( The value is set in Keystone )
[root@network ~]#
vi ~/keystonerc_neutron
export OS_USERNAME=neutron
export OS_PASSWORD=servicepassword
export OS_TENANT_NAME=service
export OS_AUTH_URL=http://10.0.0.30:35357/v2.0/
export PS1='[\u@\h \W(neutron)]\$ '
[root@network ~]#
chmod 600 ~/keystonerc_neutron

[root@network ~]#
source ~/keystonerc_neutron

[root@network ~(neutron)]#
echo "source ~/keystonerc_neutron " >> ~/.bash_profile
[4] Configure DHCP, L3, L2 Agent
[root@network ~(neutron)]#
neutron-dhcp-setup --plugin openvswitch

Neutron plugin: openvswitch
Please enter the Neutron hostname:
10.0.0.30
   
# specify QPID server

Configuration updates complete!
[root@network ~(neutron)]#
neutron-l3-setup --plugin openvswitch

Neutron plugin: openvswitch
Please enter the Neutron hostname:
10.0.0.30
   
# specify QPID server

Configuration updates complete!
[root@network ~(neutron)]#
neutron-node-setup --plugin openvswitch

Neutron plugin: openvswitch
Please enter the Neutron hostname:
10.0.0.30
   
# specify QPID server

Would you like to update the nova configuration files? (y/n):
n

Complete!
[root@network ~(neutron)]#
vi /etc/neutron/neutron.conf
# near line 5: add

core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2
# line 110: uncomment

control_exchange = neutron
# line 301: uncomment and change

root_helper =
sudo neutron-rootwrap /etc/neutron/rootwrap.conf
[root@network ~(neutron)]#
vi /etc/neutron/dhcp_agent.ini
# near line 8: add

root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf
[root@network ~(neutron)]#
vi /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
# add at the last (specify Neutron DB)

[DATABASE]
sql_connection = mysql://neutron:neutron@10.0.0.30/ovs_neutron
[root@network ~(neutron)]#
/etc/rc.d/init.d/openvswitch start

[root@network ~(neutron)]#
chkconfig openvswitch on

[root@network ~(neutron)]#
ovs-vsctl add-br br-int

[root@network ~(neutron)]#
for service in dhcp-agent l3-agent openvswitch-agent; do
/etc/rc.d/init.d/neutron-$service start
chkconfig neutron-$service on
done

Starting neutron-dhcp-agent: [  OK  ]
Starting neutron-l3-agent: [  OK  ]
Starting neutron-openvswitch-agent: [  OK  ]
Matched Content