Difference between revisions of "PLUMgrid-Neutron"
m (→Devstack) |
m (→Plugin configuration (Neutron server node)) |
||
(8 intermediate revisions by one other user not shown) | |||
Line 64: | Line 64: | ||
username=<PLUMgrid_Director_Admin> | username=<PLUMgrid_Director_Admin> | ||
password=<PLUMgrid_Director_Admin_Password> | password=<PLUMgrid_Director_Admin_Password> | ||
+ | |||
+ | [l2gateway] | ||
+ | vendor = <L2 Gateway Vendor> | ||
+ | sw_username = <L2_Gateway_Username> | ||
+ | sw_password = <L2_Gateway_Password> | ||
</nowiki></pre> | </nowiki></pre> | ||
+ | * Edit /etc/neutron/plugins/plumgrid/plumlib.ini (replace <placeholder> as required): | ||
+ | |||
+ | <pre><nowiki> | ||
+ | [PLUMgridMetadata] | ||
+ | enable_pg_metadata = True | ||
+ | metadata_mode = local | ||
+ | nova_metadata_subnet = <Nova_Metadata_Subnet> | ||
+ | nova_metadata_ip = <Nova_Metadata_IP> | ||
+ | nova_metadata_port = 8775 | ||
+ | metadata_proxy_shared_secret = <Neutron_Secret_Key> | ||
+ | |||
+ | [keystone_authtoken] | ||
+ | admin_user = <Keystone_Admin_User> | ||
+ | admin_password = <Keystone_Admin_Password> | ||
+ | auth_uri = <Auth_Protocol>://<Keyston_Auth_URI>:35357/v2.0/ | ||
+ | admin_tenant_name = <Keystone_Admin_Tenant> | ||
+ | identity_version = <Keystone_Identity_Version> | ||
+ | user_domain_name = <Keystone_User_Domain_Name> | ||
+ | |||
+ | [ConnectorType] | ||
+ | connector_type = distributed | ||
+ | </nowiki></pre> | ||
=== Configuration Example === | === Configuration Example === | ||
+ | |||
+ | * /etc/neutron/plugins/plumgrid/plumgrid.ini: | ||
<pre><nowiki> | <pre><nowiki> | ||
Line 78: | Line 107: | ||
username=plumgrid | username=plumgrid | ||
password=password | password=password | ||
− | + | </nowiki></pre> | |
+ | |||
+ | * /etc/neutron/plugins/plumgrid/plumlib.ini: | ||
+ | |||
+ | <pre><nowiki> | ||
+ | [PLUMgridMetadata] | ||
+ | enable_pg_metadata = True | ||
+ | metadata_mode = local | ||
+ | nova_metadata_subnet = 169.254.169.254/30 | ||
+ | nova_metadata_ip = 127.0.0.1 | ||
+ | nova_metadata_port = 8775 | ||
+ | metadata_proxy_shared_secret = changeme | ||
+ | [keystone_authtoken] | ||
+ | admin_user = plumgrid | ||
+ | admin_password = password | ||
+ | auth_uri = http://127.0.0.1:35357/v2.0/ | ||
+ | admin_tenant_name = admin_tenant | ||
+ | identity_version = v3.0 | ||
+ | user_domain_name = Default | ||
+ | </nowiki></pre> | ||
+ | |||
+ | * Start the neutron service by providing the relevant configuration files | ||
+ | <pre><nowiki> | ||
cd <neutron_path> && python <neutron_path>/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/plumgrid/plumgrid.ini | cd <neutron_path> && python <neutron_path>/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/plumgrid/plumgrid.ini | ||
</nowiki></pre> | </nowiki></pre> | ||
+ | === Plugin configuration (Compute nodes) === | ||
+ | * Sudoedit /etc/sudoers.d/ifc_ctl_sudoers and add the following line | ||
+ | <pre><nowiki> | ||
+ | nova ALL=(root) NOPASSWD: /opt/pg/bin/ifc_ctl_pp * | ||
+ | </nowiki></pre> | ||
+ | |||
+ | * Change mode of /etc/sudoers.d/ifc_ctl_sudoers | ||
+ | <pre><nowiki> | ||
+ | $ chmod 0440 /etc/sudoers.d/ifc_ctl_sudoers | ||
+ | </nowiki></pre> | ||
+ | |||
+ | * Enable IP forwarding. Edit /etc/sysctl.conf and add the following line | ||
+ | <pre><nowiki> | ||
+ | net.ipv4.ip_forward = 1 | ||
+ | </nowiki></pre> | ||
+ | |||
+ | * Run the following command to enable the changes made in /etc/sysctl.conf | ||
+ | <pre><nowiki> | ||
+ | $ sysctl -p /etc/sysctl.conf | ||
+ | </nowiki></pre> | ||
== PLUMgrid OpenStack Networking Suite Neutron Plugin Unit Tests == | == PLUMgrid OpenStack Networking Suite Neutron Plugin Unit Tests == |
Latest revision as of 11:18, 21 July 2016
PLUMgrid OpenStack Networking Suite Neutron Plugin
Overview
PLUMgrid OpenStack Networking Suite Neutron Plugin v2 implements the Neutron v2.0 API.
Requirements
- PLUMgrid IO Visor 2.1.12 (or higher)
- PLUMgridLibrary
Supported APIs and API Extensions
- Networks
- Subnets
- Ports
- External Networks
- Routers
- Security Groups
- Quotas
- Port Binding
- Provider Networks
Configuration
Plugin configuration (Neutron server node)
- MySQL should be installed on the host. Initialize MySQL as follows (where $PASS = mysql password):
$ mysql -u root -p$PASS -e 'DROP DATABASE IF EXISTS plumgrid_neutron;' $ mysql -u root -p$PASS -e 'CREATE DATABASE IF NOT EXISTS plumgrid_neutron;' $ mysql -u root -p$PASS -e 'GRANT ALL ON plumgrid_neutron.* TO '$Neutron_User'@'%' IDENTIFIED BY '$Neutron_Pass';
- Edit /etc/neutron/neutron.conf and set provider as:
[DEFAULT] core_plugin = neutron.plugins.plumgrid.plumgrid_plugin.plumgrid_plugin.NeutronPluginPLUMgridV2 [DATABASE] sql_connection = mysql://<username>:<password>@<database_ip>:3306/plumgrid_neutron
- Edit /etc/nova/nova.conf and set provider as:
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver libvirt_vif_type=ethernet
- Edit /etc/neutron/plugins/plumgrid/plumgrid.ini (replace <placeholder> as required):
[PLUMgridDirector] director_server=<PLUMgrid_Director_IP> director_server_port=<PLUMgrid_Director_Port> username=<PLUMgrid_Director_Admin> password=<PLUMgrid_Director_Admin_Password> [l2gateway] vendor = <L2 Gateway Vendor> sw_username = <L2_Gateway_Username> sw_password = <L2_Gateway_Password>
- Edit /etc/neutron/plugins/plumgrid/plumlib.ini (replace <placeholder> as required):
[PLUMgridMetadata] enable_pg_metadata = True metadata_mode = local nova_metadata_subnet = <Nova_Metadata_Subnet> nova_metadata_ip = <Nova_Metadata_IP> nova_metadata_port = 8775 metadata_proxy_shared_secret = <Neutron_Secret_Key> [keystone_authtoken] admin_user = <Keystone_Admin_User> admin_password = <Keystone_Admin_Password> auth_uri = <Auth_Protocol>://<Keyston_Auth_URI>:35357/v2.0/ admin_tenant_name = <Keystone_Admin_Tenant> identity_version = <Keystone_Identity_Version> user_domain_name = <Keystone_User_Domain_Name> [ConnectorType] connector_type = distributed
Configuration Example
- /etc/neutron/plugins/plumgrid/plumgrid.ini:
[DATABASE] sql_connection = mysql://root:nova@127.0.0.1:3306/plumgrid_neutron [PLUMgridDirector] director_server=10.1.1.100 director_server_port=8080 username=plumgrid password=password
- /etc/neutron/plugins/plumgrid/plumlib.ini:
[PLUMgridMetadata] enable_pg_metadata = True metadata_mode = local nova_metadata_subnet = 169.254.169.254/30 nova_metadata_ip = 127.0.0.1 nova_metadata_port = 8775 metadata_proxy_shared_secret = changeme [keystone_authtoken] admin_user = plumgrid admin_password = password auth_uri = http://127.0.0.1:35357/v2.0/ admin_tenant_name = admin_tenant identity_version = v3.0 user_domain_name = Default
- Start the neutron service by providing the relevant configuration files
cd <neutron_path> && python <neutron_path>/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/plumgrid/plumgrid.ini
Plugin configuration (Compute nodes)
- Sudoedit /etc/sudoers.d/ifc_ctl_sudoers and add the following line
nova ALL=(root) NOPASSWD: /opt/pg/bin/ifc_ctl_pp *
- Change mode of /etc/sudoers.d/ifc_ctl_sudoers
$ chmod 0440 /etc/sudoers.d/ifc_ctl_sudoers
- Enable IP forwarding. Edit /etc/sysctl.conf and add the following line
net.ipv4.ip_forward = 1
- Run the following command to enable the changes made in /etc/sysctl.conf
$ sysctl -p /etc/sysctl.conf
PLUMgrid OpenStack Networking Suite Neutron Plugin Unit Tests
cd <neutron_path> ./run_tests.sh neutron.tests.unit.plumgrid.test_plumgrid_plugin
Devstack
Include in "localrc" file the following variables:
PLUMGRID_DIRECTOR_IP = 10.1.1.100
PLUMGRID_DIRECTOR_PORT = 8080