GNU/Linux >> Linux Esercitazione >  >> Ubuntu

OpenStack Kilo su Ubuntu 14.04.2 – Configura Neutron #1

OpenStack Networking ti consente di creare o collegare dispositivi di interfaccia alle reti, questa guida ti aiuta a configurare Neutron (Networking) sull'ambiente OpenStack. Neutron gestisce tutte le cose relative alla rete necessarie per l'infrastruttura di rete virtuale, fornisce le reti, le sottoreti e le astrazioni degli oggetti router.

Installa e configura il nodo controller:

Prima di configurare il servizio Neutron, dobbiamo creare un database, un servizio e un endpoint API.

Accedi come root al server MySQL.

# mysql -u root -p
Create the neutron database.
CREATE DATABASE neutron;

Concedi un'adeguata autorizzazione al database dei neutroni.

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'password';

Sostituire "password" con una password adatta. Esci da MySQL.

Carica le tue credenziali di amministratore dallo script dell'ambiente.

# source admin-openrc.sh

Crea l'utente neutrone per la creazione delle credenziali di servizio.

# openstack user create --password-prompt neutron
User Password:
Repeat User Password:
+----------+----------------------------------+
| Field    | Value                            |
+----------+----------------------------------+
| email    | None                             |
| enabled  | True                             |
| id       | ac5ee3286887450d911b82d4e263e1c9 |
| name     | neutron                          |
| username | neutron                          |
+----------+----------------------------------+

Aggiungi il ruolo di amministratore all'utente neutron.

# openstack role add --project service --user neutron admin
+-------+----------------------------------+
| Field | Value                            |
+-------+----------------------------------+
| id    | 33af4f957aa34cc79451c23bf014af6f |
| name  | admin                            |
+-------+----------------------------------+

Crea l'entità del servizio di neutroni.

# openstack service create --name neutron --description "OpenStack Networking" network
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Networking             |
| enabled     | True                             |
| id          | 95237876259e44d9a1a926577b786875 |
| name        | neutron                          |
| type        | network                          |
+-------------+----------------------------------+

Crea l'endpoint dell'API del servizio neutroni.

# openstack endpoint create \
--publicurl http://controller:9696 \
--adminurl http://controller:9696 \
--internalurl http://controller:9696 \
--region RegionOne \
network
+--------------+----------------------------------+
| Field        | Value                            |
+--------------+----------------------------------+
| adminurl     | http://controller:9696           |
| id           | ed46eb46c27e4f2b9a58ff574f43d0cb |
| internalurl  | http://controller:9696           |
| publicurl    | http://controller:9696           |
| region       | RegionOne                        |
| service_id   | 95237876259e44d9a1a926577b786875 |
| service_name | neutron                          |
| service_type | network                          |
+--------------+----------------------------------+

Installa e configura i componenti di rete sul nodo del controller:

# apt-get install neutron-server neutron-plugin-ml2 python-neutronclient

Modifica /etc/neutron/neutron.conf.

# nano /etc/neutron/neutron.conf

Modifica le impostazioni seguenti e assicurati di inserire una voce nelle sezioni appropriate.

[DEFAULT]
...
verbose = True
rpc_backend = rabbit
auth_strategy = keystone
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://controller:8774/v2


[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

[database]
...
connection = mysql://neutron:password@controller/neutron
## Replace "password" with the password you chose for neutron database

[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.

[nova]
...
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = nova
password = password

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

Configura plug-in Modular Layer 2 (ML2):

Modifica il file /etc/neutron/plugins/ml2/ml2_conf.ini

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

Modifica le seguenti strofe.

[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

Configura il calcolo per utilizzare la rete, modifica /etc/nova/nova.conf sul nodo controller.

# nano /etc/nova/nova.conf

Modifica le impostazioni seguenti e assicurati di inserire una voce nelle sezioni appropriate.

[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

Nota:se non disponi di una sezione particolare, crea e inserisci le stanze su di essa.

Popolare il database dei neutroni.

# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron

Riavvia il servizio di calcolo e rete sul nodo controller.

# service nova-api restart

# service neutron-server restart

Verificalo elencando le estensioni caricate.

# neutron ext-list
+-----------------------+-----------------------------------------------+
| alias                 | name                                          |
+-----------------------+-----------------------------------------------+
| security-group        | security-group                                |
| l3_agent_scheduler    | L3 Agent Scheduler                            |
| net-mtu               | Network MTU                                   |
| ext-gw-mode           | Neutron L3 Configurable external gateway mode |
| binding               | Port Binding                                  |
| provider              | Provider Network                              |
| agent                 | agent                                         |
| quotas                | Quota management support                      |
| subnet_allocation     | Subnet Allocation                             |
| dhcp_agent_scheduler  | DHCP Agent Scheduler                          |
| l3-ha                 | HA Router extension                           |
| multi-provider        | Multi Provider Network                        |
| external-net          | Neutron external network                      |
| router                | Neutron L3 Router                             |
| allowed-address-pairs | Allowed Address Pairs                         |
| extraroute            | Neutron Extra Route                           |
| extra_dhcp_opt        | Neutron Extra DHCP opts                       |
| dvr                   | Distributed Virtual Router                    |
+-----------------------+-----------------------------------------------+

Il prossimo passo è installare e configurare il nodo di rete.


Ubuntu
  1. OpenStack Liberty su Ubuntu 14.04 LTS – Configura Nova

  2. OpenStack Kilo su Ubuntu 14.04.2 – Configura Nova

  3. OpenStack Kilo su Ubuntu 14.04.2 – Configura Sguardo

  4. OpenStack Kilo su Ubuntu 14.04.2 – Configura KeyStone #2

  5. OpenStack Kilo su Ubuntu 14.04.2 – Configura KeyStone #1

OpenStack Kilo su Ubuntu 14.04.2 – Configura Neutron #2

OpenStack Liberty su Ubuntu 14.04 – Configura Neutron

OpenStack Liberty su Ubuntu 14.04 LTS – Configura Sguardo

OpenStack Liberty su Ubuntu 14.04 LTS – Configura KeyStone #2

OpenStack Liberty su Ubuntu 14.04 LTS – Configura KeyStone #1

OpenStack Liberty su Ubuntu 14.04 – Configura Neutron #2