GNU/Linux >> Tutoriales Linux >  >> Ubuntu

OpenStack Kilo en Ubuntu 14.04.2 – Configurar Neutron #3

Esta es la tercera parte de la configuración de neutrones (redes) en Ubuntu 14.04. Puede consultar el artículo anterior sobre Configurar neutrones n.º 1 y Configurar neutrones n.º 2 en los que hemos instalado y configurado componentes de red en el nodo del controlador y el nodo de red.

Aquí, configuraremos el nodo de cómputo para usar neutrones.

Requisitos previos:

Configure los parámetros del kernel en el nodo de cómputo, edite el archivo /etc/sysctl.conf.

# nano /etc/sysctl.conf

Agregue los siguientes parámetros al archivo.

net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-ip6tables=1

Aplicar los cambios.

# sysctl -p

Instalar y configurar componentes de red:

Instale los siguientes paquetes en todos y cada uno de los nodos informáticos que tenga en el entorno OpenStack.

# apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent

Edite el archivo /etc/neutron/neutron.conf.

# nano /etc/neutron/neutron.conf

Modifique la configuración a continuación y asegúrese de colocar las entradas en las secciones adecuadas. En el caso de la sección de la base de datos, comente cualquier opción de conexión ya que el nodo de red no accede directamente a la base de datos.

[DEFAULT]
...
rpc_backend = rabbit
verbose = True
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
auth_strategy = keystone

[database]
...
#connection = sqlite:////var/lib/neutron/neutron.sqlite

##Comment out the above line.

[oslo_messaging_rabbit]
...
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = password

## Replace "password" with the password you chose for the openstack account in RabbitMQ

[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = password

## Replace "password" with the password you chose for neutron user in the identity service

Configurar complemento de capa modular 2 (ML2):

Edite el archivo /etc/neutron/plugins/ml2/ml2_conf.ini.

# nano /etc/neutron/plugins/ml2/ml2_conf.ini

Modifique las siguientes secciones.

[ml2]
...
type_drivers = flat,vlan,gre,vxlan
tenant_network_types = gre
mechanism_drivers = openvswitch

[ml2_type_gre]
...
tunnel_id_ranges = 1:1000

[securitygroup]
...
enable_security_group = True
enable_ipset = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

[ovs]
local_ip = 192.168.12.23

## Tunnel network interface on your Compute Node.

[agent]
tunnel_types = gre

## [ovs] and [agent] stanzas are need to be added extra at the bottom of the file.

Reinicie el servicio Open vSwitch.

# service openvswitch-switch restart

Configure el nodo Compute para usar Redes:

De forma predeterminada, el nodo Compute utiliza redes heredadas. Debemos reconfigurar Compute para administrar redes a través de Neutron.

Edite el archivo /etc/nova/nova.conf.

# nano /etc/nova/nova.conf

Modifique la configuración a continuación y asegúrese de colocar las entradas en las secciones adecuadas. Si las secciones no existen, cree una sección en consecuencia.

[DEFAULT]
...
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver

[neutron]

url = http://controller:9696
auth_strategy = keystone
admin_auth_url = http://controller:35357/v2.0
admin_tenant_name = service
admin_username = neutron
admin_password = password

## Replace "password" with the password you chose for neutron user in the identity service

Reinicie el cómputo y abra el agente vSwitch en el nodo de cómputo.

# service nova-compute restart
# service neutron-plugin-openvswitch-agent restart

Verificar operación:

Cargue las credenciales de administrador en el nodo del controlador.

# source admin-openrc.sh

Enumere los agentes.

# neutron agent-list
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| id                                   | agent_type         | host    | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| 23da3f95-b81b-4426-9d7a-d5cbfc5241c0 | Metadata agent     | network | :-)   | True           | neutron-metadata-agent    |
| 4217b0c0-fbd4-47d9-bc22-5187f09d958a | DHCP agent         | network | :-)   | True           | neutron-dhcp-agent        |
| a4eaabf8-8cf0-4d72-817d-d80921b4f915 | Open vSwitch agent | compute | :-)   | True           | neutron-openvswitch-agent |
| b4cf95cd-2eba-4c69-baa6-ae8832384e40 | Open vSwitch agent | network | :-)   | True           | neutron-openvswitch-agent |
| d9e174be-e719-4f05-ad05-bc444eb97df5 | L3 agent           | network | :-)   | True           | neutron-l3-agent          |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+

La salida debe tener cuatro agentes activos en el nodo de red y un agente activo en el nodo de cómputo.


Ubuntu
  1. OpenStack Liberty en Ubuntu 14.04 LTS - Configurar Nova

  2. OpenStack Kilo en Ubuntu 14.04.2 – Configurar Neutron #1

  3. OpenStack Kilo en Ubuntu 14.04.2 – Configurar Nova

  4. OpenStack Kilo en Ubuntu 14.04.2 – Configurar Vistazo

  5. OpenStack Kilo en Ubuntu 14.04.2 – Configurar KeyStone #2

OpenStack Kilo en Ubuntu 14.04.2 – Configurar Neutron #2

OpenStack Liberty en Ubuntu 14.04 – Configurar Neutron

OpenStack Liberty en Ubuntu 14.04 LTS – Configurar Vistazo

OpenStack Liberty en Ubuntu 14.04 LTS – Configurar KeyStone #2

OpenStack Liberty en Ubuntu 14.04 LTS – Configurar KeyStone #1

OpenStack Liberty en Ubuntu 14.04 – Configurar Neutron #2