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/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/ml2.pp64
-rw-r--r--manifests/profile/base/neutron/ovs.pp1
-rw-r--r--manifests/profile/base/neutron/plugins/ml2.pp23
-rw-r--r--manifests/profile/base/neutron/plugins/nuage.pp20
-rw-r--r--manifests/profile/base/neutron/plugins/opencontrail.pp20
-rw-r--r--manifests/profile/base/neutron/plugins/plumgrid.pp20
-rw-r--r--manifests/profile/base/neutron/server.pp32
13 files changed, 232 insertions, 166 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/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..9104cc3 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::server::password', ''),
+ $neutron_auth_tenant = hiera('neutron::server::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/ml2.pp b/manifests/profile/base/neutron/ml2.pp
deleted file mode 100644
index 59c74c8..0000000
--- a/manifests/profile/base/neutron/ml2.pp
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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::ml2
-#
-# Neutron ML2 driver profile for tripleo
-#
-# === Parameters
-#
-# [*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::ml2 (
- $mechanism_drivers = hiera('neutron::plugins::ml2::mechanism_drivers'),
- $sync_db = true,
- $step = hiera('step'),
-) {
-
- warning('This class is going is deprecated and will be removed very soon, replaced by tripleo::profile::base::neutron::plugins::ml2.')
-
- if $step >= 4 or ( $step >= 3 and $sync_db ) {
- include ::neutron::plugins::ml2
- include ::tripleo::profile::base::neutron
-
- if 'cisco_n1kv' in $mechanism_drivers {
- include ::tripleo::profile::base::neutron::n1k
- }
-
- if 'cisco_ucsm' in $mechanism_drivers {
- include ::neutron::plugins::ml2::cisco::ucsm
- }
-
- if 'cisco_nexus' in $mechanism_drivers {
- include ::neutron::plugins::ml2::cisco::nexus
- include ::neutron::plugins::ml2::cisco::type_nexus_vxlan
- }
-
- if 'bsn_ml2' in $mechanism_drivers {
- include ::neutron::plugins::ml2::bigswitch::restproxy
- include ::neutron::agents::bigswitch
- }
- }
-}
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 b462e1b..c89bc02 100644
--- a/manifests/profile/base/neutron/plugins/ml2.pp
+++ b/manifests/profile/base/neutron/plugins/ml2.pp
@@ -18,28 +18,34 @@
#
# === 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
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::ml2
- include ::tripleo::profile::base::neutron
if 'cisco_n1kv' in $mechanism_drivers {
include ::tripleo::profile::base::neutron::n1k
@@ -56,7 +62,6 @@ class tripleo::profile::base::neutron::plugins::ml2 (
if 'bsn_ml2' in $mechanism_drivers {
include ::neutron::plugins::ml2::bigswitch::restproxy
- include ::neutron::agents::bigswitch
}
}
}
diff --git a/manifests/profile/base/neutron/plugins/nuage.pp b/manifests/profile/base/neutron/plugins/nuage.pp
index 20f93db..0843ec4 100644
--- a/manifests/profile/base/neutron/plugins/nuage.pp
+++ b/manifests/profile/base/neutron/plugins/nuage.pp
@@ -16,19 +16,27 @@
#
# 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
+
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::nuage
}
diff --git a/manifests/profile/base/neutron/plugins/opencontrail.pp b/manifests/profile/base/neutron/plugins/opencontrail.pp
index 1fcb627..fbf46e7 100644
--- a/manifests/profile/base/neutron/plugins/opencontrail.pp
+++ b/manifests/profile/base/neutron/plugins/opencontrail.pp
@@ -16,19 +16,27 @@
#
# 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
+
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::opencontrail
}
diff --git a/manifests/profile/base/neutron/plugins/plumgrid.pp b/manifests/profile/base/neutron/plugins/plumgrid.pp
index 7f645b9..bc73d29 100644
--- a/manifests/profile/base/neutron/plugins/plumgrid.pp
+++ b/manifests/profile/base/neutron/plugins/plumgrid.pp
@@ -18,19 +18,27 @@
#
# === 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
+
if $step >= 4 or ( $step >= 3 and $sync_db ) {
include ::neutron::plugins::plumgrid
}
diff --git a/manifests/profile/base/neutron/server.pp b/manifests/profile/base/neutron/server.pp
index 320f83c..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 >= 2 {
+ 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,
+ }
}
-
}