Mindmajix

Configuring Compute nodes for Neutron – OpenStack

The compute node handles connectivity and security groups for instances.

With the network node configured, there are some services that need to run our Compute nodes. The services that run our compute node for Neutron are nova-compute, quantum-ovs-plugin-agent, and openvswitch-server.

Screenshot_643

Getting ready

Ensure that you are logged on to the compute node in our environment. If you created this using Vagrant, you can issue the following command:

vagrant ssh compute

How to achieve it…

To configure our OpenStack Compute node, carry out the following steps:

  • First update the packages installed on the node:
sudo apt-get update 
sudo apt-get -y upgrade
  • We then install the kernel headers package as the installation will compile some new kernel modules:
sudo apt-get -y install linux-headers-'uname -r'
  • We now need to install some supporting applications and utilities:
sudo apt-get -y install vlan bridge-utils
  • We are now ready to install Open vSwitch which also runs on our Compute node:
sudo apt-get -y install openvswitch-switch \ openvswitch-datapath-dkms
  • After this has installed and configured some kernel modules we can simply start our OVS service:
sudo service openvswitch-switch start
  • We can now proceed to install the Neutron plugin component that run on this node:
sudo apt-get -y install quantum-plugin-openvswitch-agent
  • With the installation of the required packages complete, we can now configure our environment. To do this, we first configure our OVS switch service. We need to configure a bridge that we will call br-int. This is the integration bridge that glues our VM networks together within our SDN environment.
sudo ovs-vsctl add-br br-int
  • We need to ensure that we have IP forwarding on within our Network node:
sudo sed -i \ 
's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' \ /etc/sysctl.conf
sudo sysctl -p
  • We can now configure the relevant configuration files to get our Compute node working with the Neutron services. We first edit the /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini file.

The first is to configure the database credentials to point to our MySQL installation:

[DATABASE]
sql_connection = mysql://quantum:openstack@172.16.0.200/quantum
  • Further down the file, we will see also a section called [OVS]. We need to edit this section to include the following values:
[OVS]
tenant_network_type = gre
 tunnel_id_ranges = 1:1000 
integration_bridge = br-int 
tunnel_bridge = br-tun local_ip = 172.16.0.201 
enable_tunneling = True

In a similar way to configuring other OpenStack services, the Neutron services have a paste ini file. Edit /etc/quantum/api-paste.ini to configure Keystone authentication. We add the auth and admin lines to the [filter:authtoken] section:

[filter:authtoken]
paste.filter_factory =keystone.middleware.auth_token:filter_factory 
auth_host = 172.16.0.200
auth_port = 35357 
auth_protocol = http
admin_tenant_name = service 
admin_user = quantum 
admin_password = quantum
  • We must ensure that our Neutron server configuration is pointing at the right RabbitMQ in our environment. Edit /etc/quantum/quantum.conf and locate the following and edit to suit our environment:
rabbit_host = 172.16.0.200
  • We need to edit the familiar [keystone_authtoken] located at the bottom of the file to match our Keystone environment:
[keystone_authtoken] 
auth_host = 172.16.0.200 
auth_port = 35357 
auth_protocol = http 
admin_tenant_name = service
admin_user = quantum 
admin_password = quantum
signing_dir = /var/lib/quantum/keystone-signing
  • We can now configure the /etc/nova/nova.conf file to tell the OpenStack Compute components to utilize Neutron. Add the following lines under [Default] to our /etc/nova/nova.conf configuration:
# Network settings 
network_api_class=nova.network.quantumv2.api.API 
quantum_url=http://172.16.0.200:9696/ 
quantum_auth_strategy=keystone 
quantum_admin_tenant_name=service 
quantum_admin_username=quantum 
quantum_admin_password=quantum 
quantum_admin_auth_url=http://172.16.0.200:35357/v2.0
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDr iver 
linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfac eDriver 
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
  • Restart our nova services running on this node to pick up the changes in the /etc/nova/nova.conf file:
ls /etc/init/nova-* | cut -d '/' -f4 | cut -d '.' -f1 | while read S; do sudo stop $S; sudo start $S; done

How it works…

Configuring our OpenStack Compute node to use Neutron is straightforward. We follow a similar set of initial steps that were conducted on our Network node, which involves installing a number of packages as follows:

  • Operating system:
linux-headers-'uname -r'
  • Generic networking components:
vlan
bridge-utils
  • Open vSwitch:
openvswitch-switch 
openvswitch-datapath-dkms
  • Neutron:
quantum-plugin-openvswitch-agent

Once installed, we also configure the Open vSwitch service running on our Compute node and configure the same integration bridge, br-int.

We utilize the same

/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini file with only one

difference—the local_ip setting is the IP address of the Compute node that we are configuring.

Lastly, we configure /etc/nova/nova.conf— all the important configuration file for our OpenStack Compute services.

network_api_class=nova.network.quantumv2.api.API

The preceding code tells our OpenStack Compute service to use Neutron networking.

quantum_url=http://172.16.0.200:9696/

The preceding is the address of our Neutron server API (running on our Controller node).

quantum_auth_strategy=keystone

This tells Neutron to utilize the OpenStack identity and authentication service, Keystone.

quantum_admin_tenant_name=service

The name of the service tenant in Keystone.

quantum_admin_username=quantum

The username that Neutron uses to authenticate with in Keystone.

quantum_admin_password=quantum

The password that Neutron uses to authenticate with in Keystone.

quantum_admin_auth_url=http://172.16.0.200:35357/v2.0

The address of our Keystone service.

libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver

This tells Libvirt to use the OVS Bridge driver.

linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDri ver

This is the driver used to create Ethernet devices on our Linux hosts.

firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver

This is the driver to use when managing the firewalls.

http://docs.openstack.org/juno/install-guide/install/apt/content/neutron-compute-node.html

0 Responses on Configuring Compute nodes for Neutron – OpenStack"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.