aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/neutron
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/neutron')
-rw-r--r--manifests/profile/base/neutron/agents/midonet.pp52
-rw-r--r--manifests/profile/base/neutron/agents/nuage.pp58
-rw-r--r--manifests/profile/base/neutron/agents/ovn.pp38
-rw-r--r--manifests/profile/base/neutron/dhcp.pp15
-rw-r--r--manifests/profile/base/neutron/l3.pp6
-rw-r--r--manifests/profile/base/neutron/metadata.pp2
-rw-r--r--manifests/profile/base/neutron/midonet.pp85
-rw-r--r--manifests/profile/base/neutron/opendaylight.pp46
-rw-r--r--manifests/profile/base/neutron/ovs.pp1
-rw-r--r--manifests/profile/base/neutron/plugins/ml2.pp28
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/opendaylight.pp54
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/ovn.pp46
-rw-r--r--manifests/profile/base/neutron/plugins/nuage.pp17
-rw-r--r--manifests/profile/base/neutron/plugins/opencontrail.pp17
-rw-r--r--manifests/profile/base/neutron/plugins/ovs/opendaylight.pp73
-rw-r--r--manifests/profile/base/neutron/plugins/plumgrid.pp17
-rw-r--r--manifests/profile/base/neutron/server.pp32
-rw-r--r--manifests/profile/base/neutron/sriov.pp43
18 files changed, 529 insertions, 101 deletions
diff --git a/manifests/profile/base/neutron/agents/midonet.pp b/manifests/profile/base/neutron/agents/midonet.pp
new file mode 100644
index 0000000..f2ce94a
--- /dev/null
+++ b/manifests/profile/base/neutron/agents/midonet.pp
@@ -0,0 +1,52 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::agents::midonet
+#
+# Midonet Neutron agent profile
+#
+# === Parameters
+#
+# [*midonet_libvirt_qemu_data*]
+# (Optional) qemu.conf data for midonet.
+# Defaults to hiera('midonet_libvirt_qemu_data')
+#
+# [*neutron_api_node_ips*]
+# (Optional) The IPs of the Neutron API hosts
+# Defaults to hiera('neutron_api_node_ips')
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::agents::midonet (
+ $midonet_libvirt_qemu_data = hiera('midonet_libvirt_qemu_data', ''),
+ $neutron_api_node_ips = hiera('neutron_api_node_ips', ''),
+ $step = hiera('step'),
+) {
+ if $step >= 4 {
+ # TODO(devvesa) provide non-controller ips for these services
+ class { '::tripleo::network::midonet::agent':
+ zookeeper_servers => $neutron_api_node_ips,
+ cassandra_seeds => $neutron_api_node_ips
+ }
+
+ if defined(Service['libvirt']) {
+ file { '/etc/libvirt/qemu.conf':
+ ensure => present,
+ content => hiera('midonet_libvirt_qemu_data')
+ }
+ }
+ }
+}
diff --git a/manifests/profile/base/neutron/agents/nuage.pp b/manifests/profile/base/neutron/agents/nuage.pp
new file mode 100644
index 0000000..80beceb
--- /dev/null
+++ b/manifests/profile/base/neutron/agents/nuage.pp
@@ -0,0 +1,58 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::agents::nuage
+#
+# Nuage Neutron agent profile
+#
+# === Parameters
+#
+# [*nova_auth_ip*]
+# (Optional) Nova auth IP
+# Defaults to hiera('keystone_public_api_virtual_ip')
+#
+# [*nova_metadata_ip*]
+# (Optional) Nova metadata node IPs
+# Defaults to hiera('nova_metadata_node_ips')
+#
+# [*nova_os_password*]
+# (Optional) Nova password
+# Defaults to hiera('nova_password')
+#
+# [*nova_os_tenant_name*]
+# (Optional) Nova tenant name
+# Defaults to hiera('nova_os_tenant_name')
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::agents::nuage (
+ $nova_auth_ip = hiera('keystone_public_api_virtual_ip', ''),
+ $nova_metadata_ip = hiera('nova_metadata_node_ips', ''),
+ $nova_os_password = hiera('nova_password', ''),
+ $nova_os_tenant_name = hiera('nova::api::admin_tenant_name', ''),
+ $step = hiera('step'),
+) {
+ if $step >= 4 {
+ include ::nuage::vrs
+
+ class { '::nuage::metadataagent':
+ nova_os_tenant_name => $nova_os_tenant_name,
+ nova_os_password => $nova_os_password,
+ nova_metadata_ip => $nova_metadata_ip,
+ nova_auth_ip => $nova_auth_ip,
+ }
+ }
+}
diff --git a/manifests/profile/base/neutron/agents/ovn.pp b/manifests/profile/base/neutron/agents/ovn.pp
new file mode 100644
index 0000000..443b164
--- /dev/null
+++ b/manifests/profile/base/neutron/agents/ovn.pp
@@ -0,0 +1,38 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::agents::ovn
+#
+# OVN Neutron agent profile for tripleo
+#
+# [*ovn_db_host*]
+# The IP-Address/Hostname where OVN DBs are deployed
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::agents::ovn (
+ $ovn_db_host,
+ $step = hiera('step')
+) {
+ if $step >= 4 {
+ $ovn_sbdb_port = hiera('ovn::southbound::port')
+ class { '::ovn::controller':
+ ovn_remote => "tcp:${ovn_db_host}:${ovn_sbdb_port}",
+ ovn_encap_type => hiera('ovn::southboud::encap_type')
+ }
+ }
+}
diff --git a/manifests/profile/base/neutron/dhcp.pp b/manifests/profile/base/neutron/dhcp.pp
index 180fd37..24b1a35 100644
--- a/manifests/profile/base/neutron/dhcp.pp
+++ b/manifests/profile/base/neutron/dhcp.pp
@@ -18,31 +18,18 @@
#
# === Parameters
#
-# [*neutron_dnsmasq_options*]
-# (Optional)
-# Defaults to hiera('neutron_dnsmasq_options')
-#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::dhcp (
- $neutron_dnsmasq_options = hiera('neutron_dnsmasq_options', ''),
- $step = hiera('step'),
+ $step = hiera('step'),
) {
if $step >= 4 {
include ::tripleo::profile::base::neutron
include ::neutron::agents::dhcp
- file { '/etc/neutron/dnsmasq-neutron.conf':
- content => $neutron_dnsmasq_options,
- owner => 'neutron',
- group => 'neutron',
- notify => Service['neutron-dhcp-service'],
- require => Package['neutron'],
- }
-
Service<| title == 'neutron-server' |> -> Service <| title == 'neutron-dhcp' |>
}
}
diff --git a/manifests/profile/base/neutron/l3.pp b/manifests/profile/base/neutron/l3.pp
index 2b57555..14ffa82 100644
--- a/manifests/profile/base/neutron/l3.pp
+++ b/manifests/profile/base/neutron/l3.pp
@@ -18,17 +18,13 @@
#
# === Parameters
#
-# [*neutron_ovs_use_veth*]
-# (Optional) Whether to set ovs_use_veth (for older kernel support)
-# Defaults to hiera('neutron_ovs_use_veth', false)
-#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::l3 (
- $step = hiera('step'),
+ $step = hiera('step'),
) {
if $step >= 4 {
include ::tripleo::profile::base::neutron
diff --git a/manifests/profile/base/neutron/metadata.pp b/manifests/profile/base/neutron/metadata.pp
index d7b4c99..4cc6748 100644
--- a/manifests/profile/base/neutron/metadata.pp
+++ b/manifests/profile/base/neutron/metadata.pp
@@ -24,7 +24,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::metadata (
- $step = hiera('step'),
+ $step = hiera('step'),
) {
if $step >= 4 {
include ::tripleo::profile::base::neutron
diff --git a/manifests/profile/base/neutron/midonet.pp b/manifests/profile/base/neutron/midonet.pp
index 972856f..3ba9dd9 100644
--- a/manifests/profile/base/neutron/midonet.pp
+++ b/manifests/profile/base/neutron/midonet.pp
@@ -18,75 +18,67 @@
#
# === Parameters
#
-# [*vip*]
-# (Optional) Public Virtual IP Address for this cloud
-# Defaults to hiera('public_virtual_ip')
+# [*admin_password*]
+# (Optional) Admin Password for Midonet API
+# Defaults to hiera('admin_password')
+#
+# [*bind_address*]
+# (Optional) The address to bind Cassandra and Midonet API to
+# Defaults to hiera('neutron::bind_host')
#
# [*keystone_admin_token*]
# (Optional) The Keystone Admin Token
# Defaults to hiera('keystone::admin_token')
#
-# [*zookeeper_client_ip*]
-# (Optional) The IP of the Zookeeper Client
-# Defaults to hiera('neutron::bind_host')
-#
-# [*zookeeper_hostnames*]
-# (Optional) The IPs of the Zookeeper Servers
-# Defaults to hiera('controller_node_names')
-#
# [*neutron_api_node_ips*]
# (Optional) The IPs of the Neutron API hosts
# Defaults to hiera('neutron_api_node_ips')
#
-# [*bind_address*]
-# (Optional) The address to bind Cassandra and Midonet API to
-# Defaults to hiera('neutron::bind_host')
-#
-# [*admin_password*]
-# (Optional) Admin Password for Midonet API
-# Defaults to hiera('admin_password')
-#
-# [*zk_on_controller*]
-# (Optional) Whether to put zookeeper on the controllers
-# Defaults to hiera('enable_zookeeper_on_controller')
-#
-# [*neutron_auth_tenant*]
-# (Optional) Tenant to use for Neutron authentication
-# Defaults to hiera('neutron::server::auth_tenant')
-#
# [*neutron_auth_password*]
# (Optional) Password to use for Neutron authentication
-# Defaults to hiera('neutron::server::auth_password')
+# Defaults to hiera('neutron::server::password')
#
-# [*step*]
-# (Optional) The current step in deployment. See tripleo-heat-templates
-# for more details.
-# Defaults to hiera('step')
+# [*neutron_auth_tenant*]
+# (Optional) Tenant to use for Neutron authentication
+# Defaults to hiera('neutron::server::project_name')
#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*vip*]
+# (Optional) Public Virtual IP Address for this cloud
+# Defaults to hiera('public_virtual_ip')
+#
+# [*zk_on_controller*]
+# (Optional) Whether to put zookeeper on the controllers
+# Defaults to hiera('enable_zookeeper_on_controller')
+#
+# [*zookeeper_client_ip*]
+# (Optional) The IP of the Zookeeper Client
+# Defaults to hiera('neutron::bind_host')
+#
+# [*zookeeper_hostnames*]
+# (Optional) The IPs of the Zookeeper Servers
+# Defaults to hiera('controller_node_names')
+#
class tripleo::profile::base::neutron::midonet (
- $vip = hiera('public_virtual_ip'),
+ $admin_password = hiera('admin_password', ''),
+ $bind_address = hiera('neutron::bind_host', ''),
$keystone_admin_token = hiera('keystone::admin_token', ''),
- $zookeeper_client_ip = hiera('neutron::bind_host', ''),
- $zookeeper_hostnames = hiera('controller_node_names', ''),
$neutron_api_node_ips = hiera('neutron_api_node_ips', ''),
- $bind_address = hiera('neutron::bind_host', ''),
- $admin_password = hiera('admin_password', ''),
- $zk_on_controller = hiera('enable_zookeeper_on_controller', ''),
- $neutron_auth_tenant = hiera('neutron::server::auth_tenant', ''),
- $neutron_auth_password = hiera('neutron::server::auth_password', ''),
+ $neutron_auth_password = hiera('neutron::keystone::authtoken::password', ''),
+ $neutron_auth_tenant = hiera('neutron::keystone::authtoken::project_name', ''),
$step = hiera('step'),
+ $vip = hiera('public_virtual_ip'),
+ $zk_on_controller = hiera('enable_zookeeper_on_controller', ''),
+ $zookeeper_client_ip = hiera('neutron::bind_host', ''),
+ $zookeeper_hostnames = hiera('controller_node_names', ''),
) {
-
include ::tripleo::profile::base::neutron
+ include ::tripleo::profile::base::neutron::agents::midonet
if $step >= 4 {
- class { '::neutron':
- service_plugins => []
- }
# Run zookeeper in the controller if configured
if zk_on_controller {
@@ -106,11 +98,6 @@ class tripleo::profile::base::neutron::midonet (
}
}
- class {'::tripleo::network::midonet::agent':
- zookeeper_servers => $neutron_api_node_ips,
- cassandra_seeds => $neutron_api_node_ips
- }
-
class {'::tripleo::network::midonet::api':
zookeeper_servers => $neutron_api_node_ips,
vip => $vip,
diff --git a/manifests/profile/base/neutron/opendaylight.pp b/manifests/profile/base/neutron/opendaylight.pp
new file mode 100644
index 0000000..ffe28ce
--- /dev/null
+++ b/manifests/profile/base/neutron/opendaylight.pp
@@ -0,0 +1,46 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::opendaylight
+#
+# OpenDaylight Neutron profile for TripleO
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+# [*primary_controller*]
+# (Optional) The hostname of the first controller
+# Defaults to hiera('bootstrap_nodeid', undef)
+#
+class tripleo::profile::base::neutron::opendaylight (
+ $step = hiera('step'),
+ $primary_controller = hiera('bootstrap_nodeid', undef),
+) {
+
+ include ::tripleo::profile::base::neutron
+
+ if ! str2bool(hiera('opendaylight::enable_l3')) {
+ include ::tripleo::profile::base::neutron::l3
+ }
+
+ if $step >= 1 {
+ # Configure ODL only on first controller
+ if hiera('odl_on_controller') and $primary_controller == downcase($::hostname) {
+ include ::opendaylight
+ }
+ }
+}
diff --git a/manifests/profile/base/neutron/ovs.pp b/manifests/profile/base/neutron/ovs.pp
index f801511..a4e0cd3 100644
--- a/manifests/profile/base/neutron/ovs.pp
+++ b/manifests/profile/base/neutron/ovs.pp
@@ -26,7 +26,6 @@
class tripleo::profile::base::neutron::ovs(
$step = hiera('step'),
) {
-
include ::tripleo::profile::base::neutron
if $step >= 4 {
diff --git a/manifests/profile/base/neutron/plugins/ml2.pp b/manifests/profile/base/neutron/plugins/ml2.pp
index 04c6244..4f4de0b 100644
--- a/manifests/profile/base/neutron/plugins/ml2.pp
+++ b/manifests/profile/base/neutron/plugins/ml2.pp
@@ -18,24 +18,29 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*mechanism_drivers*]
# (Optional) The mechanism drivers to use with the Ml2 plugin
# Defaults to hiera('neutron::plugins::ml2::mechanism_drivers')
#
-# [*sync_db*]
-# (Optional) Whether to run Neutron DB sync operations
-# Defaults to undef
-#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::plugins::ml2 (
- $mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
- $sync_db = true,
- $step = hiera('step'),
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
+ $step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
include ::tripleo::profile::base::neutron
@@ -57,7 +62,14 @@ class tripleo::profile::base::neutron::plugins::ml2 (
if 'bsn_ml2' in $mechanism_drivers {
include ::neutron::plugins::ml2::bigswitch::restproxy
- include ::neutron::agents::bigswitch
+ }
+
+ if 'opendaylight' in $mechanism_drivers {
+ include ::tripleo::profile::base::neutron::plugins::ml2::opendaylight
+ }
+
+ if 'ovn' in $mechanism_drivers {
+ include ::tripleo::profile::base::neutron::plugins::ml2::ovn
}
}
}
diff --git a/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp
new file mode 100644
index 0000000..f25aea6
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/ml2/opendaylight.pp
@@ -0,0 +1,54 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::plugins::ml2::opendaylight
+#
+# OpenDaylight ML2 Neutron profile for TripleO
+#
+# === Parameters
+#
+# [*odl_port*]
+# (Optional) Port to use for OpenDaylight
+# Defaults to hiera('opendaylight::odl_rest_port')
+#
+# [*conn_proto*]
+# (Optional) Protocol to use to for ODL REST access
+# Defaults to hiera('opendaylight::nb_connection_protocol')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::plugins::ml2::opendaylight (
+ $odl_port = hiera('opendaylight::odl_rest_port'),
+ $conn_proto = hiera('opendaylight::nb_connection_protocol'),
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ # Figure out ODL IP
+ if hiera('odl_on_controller') {
+ $odl_url_ip = hiera('opendaylight_api_vip')
+ } else {
+ $odl_url_ip = hiera('opendaylight::odl_bind_ip')
+ }
+
+ if ! $odl_url_ip { fail('OpenDaylight Controller IP/VIP is Empty') }
+
+ class { '::neutron::plugins::ml2::opendaylight':
+ odl_url => "${conn_proto}://${odl_url_ip}:${odl_port}/controller/nb/v2/neutron";
+ }
+ }
+}
diff --git a/manifests/profile/base/neutron/plugins/ml2/ovn.pp b/manifests/profile/base/neutron/plugins/ml2/ovn.pp
new file mode 100644
index 0000000..46477a7
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/ml2/ovn.pp
@@ -0,0 +1,46 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::plugins::ml2::ovn
+#
+# OVN Neutron ML2 profile for tripleo
+#
+# [*ovn_db_host*]
+# The IP-Address/Hostname where OVN DBs are deployed
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::plugins::ml2::ovn (
+ $ovn_db_host,
+ $step = hiera('step')
+) {
+ if $step >= 4 {
+ if $::hostname == $ovn_db_host {
+ # NOTE: we might split northd from plugin later, in the case of
+ # micro-services, where neutron-server & northd are not in the same
+ # containers
+ include ::ovn::northd
+ }
+ $ovn_nb_port = hiera('ovn::northbound::port')
+ $ovn_sb_port = hiera('ovn::southbound::port')
+ class { '::neutron::plugins::ml2::ovn':
+ ovn_nb_connection => "tcp:${ovn_db_host}:${ovn_nb_port}",
+ ovn_sb_connection => "tcp:${ovn_db_host}:${ovn_sb_port}",
+ }
+ }
+}
+
diff --git a/manifests/profile/base/neutron/plugins/nuage.pp b/manifests/profile/base/neutron/plugins/nuage.pp
index 5d3661e..0843ec4 100644
--- a/manifests/profile/base/neutron/plugins/nuage.pp
+++ b/manifests/profile/base/neutron/plugins/nuage.pp
@@ -16,19 +16,24 @@
#
# Nuage Neutron profile for tripleo
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*sync_db*]
-# (Optional) Whether to run Neutron DB sync operations
-# Defaults to undef
-#
class tripleo::profile::base::neutron::plugins::nuage (
- $step = hiera('step'),
- $sync_db = true,
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
include ::tripleo::profile::base::neutron
diff --git a/manifests/profile/base/neutron/plugins/opencontrail.pp b/manifests/profile/base/neutron/plugins/opencontrail.pp
index 96d7421..fbf46e7 100644
--- a/manifests/profile/base/neutron/plugins/opencontrail.pp
+++ b/manifests/profile/base/neutron/plugins/opencontrail.pp
@@ -16,19 +16,24 @@
#
# Opencontrail Neutron profile for tripleo
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*sync_db*]
-# (Optional) Whether to run Neutron DB sync operations
-# Defaults to undef
-#
class tripleo::profile::base::neutron::plugins::opencontrail (
- $step = hiera('step'),
- $sync_db = true,
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
include ::tripleo::profile::base::neutron
diff --git a/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp b/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp
new file mode 100644
index 0000000..7548046
--- /dev/null
+++ b/manifests/profile/base/neutron/plugins/ovs/opendaylight.pp
@@ -0,0 +1,73 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::plugins::ovs::opendaylight
+#
+# OpenDaylight Neutron OVS profile for TripleO
+#
+# === Parameters
+#
+# [*odl_port*]
+# (Optional) Port to use for OpenDaylight
+# Defaults to hiera('opendaylight::odl_rest_port')
+#
+# [*odl_check_url*]
+# (Optional) URL path used to check if ODL is up
+# Defaults to hiera('opendaylight_check_url')
+#
+# [*odl_api_ips*]
+# (Optional) List of OpenStack Controller IPs for ODL API
+# Defaults to hiera('opendaylight_api_node_ips')
+#
+# [*conn_proto*]
+# (Optional) Protocol to use to for ODL REST access
+# Defaults to hiera('opendaylight::nb_connection_protocol')
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::plugins::ovs::opendaylight (
+ $odl_port = hiera('opendaylight::odl_rest_port'),
+ $odl_check_url = hiera('opendaylight_check_url'),
+ $odl_api_ips = hiera('opendaylight_api_node_ips'),
+ $conn_proto = hiera('opendaylight::nb_connection_protocol'),
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+ # Figure out ODL IP (and VIP if on controller)
+ if hiera('odl_on_controller') {
+ $opendaylight_controller_ip = $odl_api_ips[0]
+ $odl_url_ip = hiera('opendaylight_api_vip')
+ } else {
+ $opendaylight_controller_ip = hiera('opendaylight::odl_bind_ip')
+ $odl_url_ip = $opendaylight_controller_ip
+ }
+
+ if ! $opendaylight_controller_ip { fail('OpenDaylight Controller IP is Empty') }
+
+ if ! $odl_url_ip { fail('OpenDaylight API VIP is Empty') }
+
+ # Build URL to check if ODL is up before connecting OVS
+ $opendaylight_url = "${conn_proto}://${odl_url_ip}:${odl_port}/${odl_check_url}"
+
+ class { '::neutron::plugins::ovs::opendaylight':
+ tunnel_ip => hiera('neutron::agents::ml2::ovs::local_ip'),
+ odl_check_url => $opendaylight_url,
+ odl_ovsdb_iface => "tcp:${opendaylight_controller_ip}:6640",
+ }
+ }
+}
diff --git a/manifests/profile/base/neutron/plugins/plumgrid.pp b/manifests/profile/base/neutron/plugins/plumgrid.pp
index f5cd273..bc73d29 100644
--- a/manifests/profile/base/neutron/plugins/plumgrid.pp
+++ b/manifests/profile/base/neutron/plugins/plumgrid.pp
@@ -18,19 +18,24 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*sync_db*]
-# (Optional) Whether to run Neutron DB sync operations
-# Defaults to undef
-#
class tripleo::profile::base::neutron::plugins::plumgrid (
- $step = hiera('step'),
- $sync_db = true,
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
include ::tripleo::profile::base::neutron
diff --git a/manifests/profile/base/neutron/server.pp b/manifests/profile/base/neutron/server.pp
index 8b5539e..5a1b377 100644
--- a/manifests/profile/base/neutron/server.pp
+++ b/manifests/profile/base/neutron/server.pp
@@ -18,24 +18,46 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::server (
- $step = hiera('step'),
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
include ::tripleo::profile::base::neutron
- if $step >= 3 {
+ if $step >= 3 and $sync_db {
include ::neutron::db::mysql
}
- if $step >= 4 {
+ # We start neutron-server on the bootstrap node first, because
+ # it will try to populate tables and we need to make sure this happens
+ # before it starts on other nodes
+ if $step >= 4 and $sync_db {
include ::neutron::server::notifications
- include ::neutron::server
+ # We need to override the hiera value neutron::server::sync_db which is set
+ # to true
+ class { '::neutron::server':
+ sync_db => $sync_db,
+ }
+ }
+ if $step >= 5 and !$sync_db {
+ include ::neutron::server::notifications
+ class { '::neutron::server':
+ sync_db => $sync_db,
+ }
}
-
}
diff --git a/manifests/profile/base/neutron/sriov.pp b/manifests/profile/base/neutron/sriov.pp
new file mode 100644
index 0000000..00ecc21
--- /dev/null
+++ b/manifests/profile/base/neutron/sriov.pp
@@ -0,0 +1,43 @@
+# Copyright 2016 Red Hat, Inc.
+#
+# 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.
+#
+# == Class: tripleo::profile::base::neutron::sriov
+#
+# Neutron SR-IOV nic Agent profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+# [*mechanism_drivers*]
+# (Optional) The mechanism drivers to use with the Ml2 plugin
+# Defaults to hiera('neutron::plugins::ml2::mechanism_drivers')
+#
+
+class tripleo::profile::base::neutron::sriov(
+ $step = hiera('step'),
+ $mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
+) {
+
+ if $step >= 4 {
+ if 'sriovnicswitch' in $mechanism_drivers {
+ include ::neutron::agents::ml2::sriov
+ include ::tripleo::host::sriov
+ }
+ }
+
+}