diff --git a/playbooks/roles/os_neutron/defaults/main.yml b/playbooks/roles/os_neutron/defaults/main.yml index 1c88baca89..fb16118573 100644 --- a/playbooks/roles/os_neutron/defaults/main.yml +++ b/playbooks/roles/os_neutron/defaults/main.yml @@ -63,6 +63,10 @@ neutron_plugins: plugin_core: neutron.plugins.ml2.plugin.Ml2Plugin plugin_ini: plugins/ml2/ml2_conf.ini plugin_conf_ini_overrides: "{{ neutron_ml2_conf_ini_overrides }}" + plumgrid: + plugin_core: neutron.plugins.plumgrid.plumgrid_plugin.plumgrid_plugin.NeutronPluginPLUMgridV2 + plugin_ini: plugins/plumgrid/plumgrid.ini + plugin_conf_ini_overrides: "{{ neutron_plumgrid_conf_ini_overrides }}" neutron_services: neutron-dhcp-agent: @@ -296,12 +300,17 @@ neutron_pip_packages: - python-novaclient - repoze.lru +neutron_plumgrid_pip_packages: + - networking-plumgrid + ## Service Names neutron_service_names: "{{ neutron_services.items()|selectattr('1.service_en')|map(attribute='0')|list }}" ## Tunable overrides neutron_neutron_conf_overrides: {} neutron_ml2_conf_ini_overrides: {} +neutron_plumgrid_conf_ini_overrides: {} +neutron_plumlib_ini_overrides: {} neutron_dhcp_agent_ini_overrides: {} neutron_api_paste_ini_overrides: {} neutron_rootwrap_conf_overrides: {} diff --git a/playbooks/roles/os_neutron/tasks/neutron_post_install.yml b/playbooks/roles/os_neutron/tasks/neutron_post_install.yml index 1b21b64757..bc0f713f9b 100644 --- a/playbooks/roles/os_neutron/tasks/neutron_post_install.yml +++ b/playbooks/roles/os_neutron/tasks/neutron_post_install.yml @@ -152,3 +152,7 @@ tags: - neutron-config - neutron-checksum-fix + +- name: Setup PLUMgrid config + include: plumgrid_config.yml + when: neutron_plugin_type == 'plumgrid' diff --git a/playbooks/roles/os_neutron/tasks/plumgrid_config.yml b/playbooks/roles/os_neutron/tasks/plumgrid_config.yml new file mode 100644 index 0000000000..cda7572edc --- /dev/null +++ b/playbooks/roles/os_neutron/tasks/plumgrid_config.yml @@ -0,0 +1,36 @@ +--- +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Setup PLUMlib Neutron Config + config_template: + src: plugins/plumgrid/plumlib.ini + dest: /etc/neutron/plugins/plumgrid/plumlib.ini + owner: "{{ neutron_system_user_name }}" + group: "{{ neutron_system_group_name }}" + config_overrides: "{{ neutron_plumlib_ini_overrides }}" + config_type: "ini" + tags: + - neutron_config + +- name: Install networking-plumgrid + pip: + name: "{{ item }}" + state: present + with_items: neutron_plumgrid_pip_packages + register: install_package + until: install_packages|success + retries: 5 + delay: 2 + when: + inventory_hostname in groups['neutron_server'] diff --git a/playbooks/roles/os_neutron/templates/neutron.conf.j2 b/playbooks/roles/os_neutron/templates/neutron.conf.j2 index c39cfa05b1..9ee967bdb8 100644 --- a/playbooks/roles/os_neutron/templates/neutron.conf.j2 +++ b/playbooks/roles/os_neutron/templates/neutron.conf.j2 @@ -20,7 +20,9 @@ vlan_transparent = False # Plugins core_plugin = {{ neutron_plugin_core }} +{% if neutron_plugin_type != 'plumgrid' %} service_plugins = {{ neutron_plugin_loaded_base }} +{% endif %} # MAC address generation for VIFs base_mac = fa:16:3e:00:00:00 diff --git a/playbooks/roles/os_neutron/templates/plugins/plumgrid/plumgrid.ini.j2 b/playbooks/roles/os_neutron/templates/plugins/plumgrid/plumgrid.ini.j2 new file mode 100644 index 0000000000..f5913e769e --- /dev/null +++ b/playbooks/roles/os_neutron/templates/plugins/plumgrid/plumgrid.ini.j2 @@ -0,0 +1,14 @@ +#Config file for Neutron PLUMgrid Plugin + +[plumgriddirector] +# This line should point to the PLUMgrid Director Virtual-IP, +# for the PLUMgrid Platform. +director_server={{ pg_vip }} +director_server_port={{ pg_ports['vip_port'] }} +# Authentification parameters for the Director. +# These are the admin credentials to manage and control +# the PLUMgrid Director server. +username={{ pg_username }} +password={{ pg_password }} +servertimeout=70 +connection = mysql://{{ neutron_galera_user }}:{{ neutron_container_mysql_password }}@{{ neutron_galera_address }}/{{ neutron_galera_database }}?charset=utf8 diff --git a/playbooks/roles/os_neutron/templates/plugins/plumgrid/plumlib.ini b/playbooks/roles/os_neutron/templates/plugins/plumgrid/plumlib.ini new file mode 100644 index 0000000000..20b6cf960d --- /dev/null +++ b/playbooks/roles/os_neutron/templates/plugins/plumgrid/plumlib.ini @@ -0,0 +1,49 @@ +# Configuration file for the Python PLUMgrid Library +# PLUMgrid spefifc parameters are expected to come +# from /etc/openstack_deploy/user_pg_vars.yml + +[PLUMgridLibrary] +# PLUMlib writes to CDB to save some data. If this flag is set to +# false, PLUMlib will not use CDB utility +cdb_configuration = True + +# Name of the interface plugged on fabric network +fabric_eth = eth1 + +# Security Policy Flag +enable_pg_security = True + +# Flag to enable/disable virtual appliance creation +vapp_flag = False + +[PLUMgridMetadata] +nova_metadata_ip = {{ pg_metadata_ip }} +nova_metadata_port = {{ pg_metadata_port }} +metadata_proxy_shared_secret = {{ nova_metadata_proxy_secret }} +enable_pg_metadata = {{ enable_pg_metadata }} + +# setting "metadata_ns" to false, will result in +# no metadata namespace created on this node +metadata_ns = True + +# Where to store Neutron state files +state_path = /var/lib/neutron/ + +# Name of proxy used in metadata namespaces +ns_proxy_name = neutron-ns-metadata-proxy + +# PLUMlib supports two metadata modes: tunnel and local +# Note: modes cannot be changed on a running system. This config +# should be done before bringing up the system +metadata_mode = local + +# Use "sudo neutron-rootwrap /etc/neutron/rootwrap.conf" to use the real +# root filter facility. +# Change to "sudo" to skip the filtering and just run the comand directly +root_helper_name = /usr/bin/neutron-rootwrap + +[keystone_authtoken] +admin_user = {{ neutron_service_user_name }} +admin_password = {{ neutron_service_password }} +auth_uri = {{ keystone_service_internaluri }} +admin_tenant_name = {{ neutron_service_project_name }}