Book Image

Production Ready OpenStack - Recipes for Successful Environments

By : Arthur Berezin
Book Image

Production Ready OpenStack - Recipes for Successful Environments

By: Arthur Berezin

Overview of this book

OpenStack is the most popular open source cloud platform used by organizations building internal private clouds and by public cloud providers. OpenStack is designed in a fully distributed architecture to provide Infrastructure as a Service, allowing us to maintain a massively scalable cloud infrastructure. OpenStack is developed by a vibrant community of open source developers who come from the largest software companies in the world. The book provides a comprehensive and practical guide to the multiple uses cases and configurations that OpenStack supports. This book simplifies the learning process by guiding you through how to install OpenStack in a single controller configuration. The book goes deeper into deploying OpenStack in a highly available configuration. You'll then configure Keystone Identity Services using LDAP, Active Directory, or the MySQL identity provider and configure a caching layer and SSL. After that, you will configure storage back-end providers for Glance and Cinder, which will include Ceph, NFS, Swift, and local storage. Then you will configure the Neutron networking service with provider network VLANs, and tenant network VXLAN and GRE. Also, you will configure Nova's Hypervisor with KVM, and QEMU emulation, and you will configure Nova's scheduler filters and weights. Finally, you will configure Horizon to use Apache HTTPD and SSL, and you will customize the dashboard's appearance.
Table of Contents (16 chapters)
Production Ready OpenStack - Recipes for Successful Environments
About the Author
About the Reviewers

Configuring Neutron network node

After we have configured Neutron-server on the controller node, we can proceed and configure the network server that is responsible for routing and connecting the OpenStack environment to the public network.

How to do it...

Neutron network node runs the networking services layer 2 management agent, DHCP service, L3 management agent, and metadata services agent. We will install and configure Neutron network node services to use the ML2 plugin.

Run the following commands on Neutron network node!

  1. Enable IP forwarding and reverse path filtering, edit /etc/sysctl.conf to contain the following:


    and apply the new settings:

    [root@nnn ~]# sysctl -p
  2. Then install the needed packages:

    [root@nnn ~]# yum install openstack-neutron openstack-neutron-ml2   openstack-neutron-openvswitch

Configure message broker

Configure Neutron to use RabbitMQ message broker of the controller:


Remember to change to your controller management IP.

[root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf DEFAULT rpc_backend rabbit
[root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf DEFAULT rabbit_host

Configure Neutron service

  1. Configure Neutron to use Keystone as an authentication strategy:

    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf DEFAULT \  auth_strategy keystone
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_uri http://controller:5000
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_host controller
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_protocol http
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf keystone_authtoken auth_port 35357
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_tenant_name services
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_user neutron
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf keystone_authtoken admin_password password
  2. Configure Neutron to use the ML2 Neutron plugin:

    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf DEFAULT core_plugin ml2
    [root@nnn ~]# openstack-config --set /etc/neutron/neutron.conf DEFAULT service_plugins router
  3. Configure Layer 3 agent that provides routing services for instances:

    [root@nnn ~]# openstack-config --set /etc/neutron/l3_agent.ini DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
    [root@nnn ~]# openstack-config --set /etc/neutron/l3_agent.ini DEFAULT use_namespaces True
  4. Configure the DHCP agent, which provides DHCP services for instances:

    [root@nnn ~]# openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT interface_driver neutron.agent.linux.interface.OVSInterfaceDriver
    [root@nnn ~]# openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT dhcp_driver neutron.agent.linux.dhcp.Dnsmasq
    [root@nnn ~]# openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT use_namespaces True
  5. Configure instances Metadata service:

    [root@nnn ~]# openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT \auth_url http://controller:5000/v2.0
    [root@nnn ~]# openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT \auth_region regionOne
    [root@nnn ~]# openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT \admin_tenant_name services
    [root@nnn ~]# openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT \admin_user neutron
    [root@nnn ~]# openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT \admin_password password
    [root@nnn ~]# openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT \nova_metadata_ip controller
    [root@nnn ~]# openstack-config --set /etc/neutron/metadata_agent.ini DEFAULT \metadata_proxy_shared_secret SHARED_SECRET
  6. Configure the ML2 plugin to use GRE tunneling segregation:

    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 \type_drivers gre
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 \tenant_network_types gre
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 \mechanism_drivers openvswitch
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2_type_gre \tunnel_id_ranges 1:1000
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs \local_ip
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs \tunnel_type gre
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ovs \enable_tunneling True
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup \firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
    [root@nnn ~]# openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini securitygroup \enable_security_group True
  7. Create bridges for Neutron layer 2 and Neutron layer 3 agents. First, start the Open vSwitch service:

    [root@nnn ~]# systemctl start openvswitch
    [root@nnn ~]# systemctl enable openvswitch
  8. Create a bridge for instances' inner-commutation:

    [root@nnn ~]# ovs-vsctl add-br br-int
  9. Create a bridge that the instance will use for communication with public networks:

    [root@nnn ~]# ovs-vsctl add-br br-ex
  10. Bind the external bridge with the NIC used for external communication:

    [root@nnn ~]# ovs-vsctl add-port br-ex eth2
  11. Create symbolic link for ML2 Neutron plugin:

    [root@nnn ~]# ln -s plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

Start and enable service

  1. At this point, we can start and enable L2 Open vSwitch agent, L3 agent, HDCP agent, and metadata agent services:

    [root@nnn ~]# systemctl start neutron-openvswitch-agent
    [root@nnn ~]# systemctl start neutron-l3-agent
    [root@nnn ~]# systemctl start neutron-dhcp-agent
    [root@nnn ~]# systemctl start neutron-metadata-agent
    [root@nnn ~]# systemctl enable neutron-openvswitch-agent
    [root@nnn ~]# systemctl enable neutron-l3-agent
    [root@nnn ~]# systemctl enable neutron-dhcp-agent
    [root@nnn ~]# systemctl enable neutron-metadata-agent
  2. This concludes configuring Neutron network node. Now we can configure the Nova-Compute nodes to use Neutron networking.