aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/profile/base/ceilometer.pp10
-rw-r--r--manifests/profile/base/ceilometer/collector.pp38
-rw-r--r--manifests/profile/base/neutron.pp7
-rw-r--r--manifests/profile/base/neutron/agents/midonet.pp56
-rw-r--r--manifests/profile/base/neutron/agents/nuage.pp62
-rw-r--r--manifests/profile/base/neutron/midonet.pp9
-rw-r--r--manifests/profile/pacemaker/ceilometer.pp39
-rw-r--r--manifests/profile/pacemaker/ceilometer/api.pp7
-rw-r--r--manifests/profile/pacemaker/neutron.pp4
9 files changed, 161 insertions, 71 deletions
diff --git a/manifests/profile/base/ceilometer.pp b/manifests/profile/base/ceilometer.pp
index 97e1bb8..88818de 100644
--- a/manifests/profile/base/ceilometer.pp
+++ b/manifests/profile/base/ceilometer.pp
@@ -23,18 +23,12 @@
# for more details.
# Defaults to hiera('step')
#
-# [*sync_db*]
-# (Optional) Whether to run db sync
-# Defaults to true
-#
class tripleo::profile::base::ceilometer (
- $step = hiera('step'),
- $sync_db = true,
+ $step = hiera('step'),
) {
- if $step >= 4 or ($step >= 3 and $sync_db) {
+ if $step >= 3 {
include ::ceilometer
- include ::ceilometer::db
include ::ceilometer::config
}
diff --git a/manifests/profile/base/ceilometer/collector.pp b/manifests/profile/base/ceilometer/collector.pp
index 34ee90b..c294e56 100644
--- a/manifests/profile/base/ceilometer/collector.pp
+++ b/manifests/profile/base/ceilometer/collector.pp
@@ -33,16 +33,44 @@ class tripleo::profile::base::ceilometer::collector (
$sync_db = true,
) {
+ $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
+ # MongoDB
+ if $ceilometer_backend == 'mongodb' {
+ # NOTE(gfidente): We need to pass the list of IPv6 addresses *with* port and
+ # without the brackets as 'members' argument for the 'mongodb_replset'
+ # resource.
+ if str2bool(hiera('mongodb::server::ipv6', false)) {
+ $mongo_node_ips_with_port_prefixed = prefix(hiera('mongo_node_ips'), '[')
+ $mongo_node_ips_with_port = suffix($mongo_node_ips_with_port_prefixed, ']:27017')
+ $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017')
+ } else {
+ $mongo_node_ips_with_port = suffix(hiera('mongo_node_ips'), ':27017')
+ $mongo_node_ips_with_port_nobr = suffix(hiera('mongo_node_ips'), ':27017')
+ }
+ $mongo_node_string = join($mongo_node_ips_with_port, ',')
+
+ $mongodb_replset = hiera('mongodb::server::replset')
+ $ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
+ }
+
include ::tripleo::profile::base::ceilometer
+ if $step >= 2 and $sync_db and $ceilometer_backend == 'mysql' {
+ include ::ceilometer::db::mysql
+ }
+
if $step >= 3 and $sync_db {
- $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
- if $ceilometer_backend == 'mysql' {
- include ::ceilometer::db::mysql
- }
+ include ::ceilometer::db::sync
}
- if $step >= 4 {
+ if $step >= 4 or ($step >= 3 and $sync_db) {
+ if $ceilometer_backend == 'mongodb' {
+ class { '::ceilometer::db' :
+ database_connection => $ceilometer_mongodb_conn_string,
+ }
+ } else {
+ include ::ceilometer::db
+ }
include ::ceilometer::collector
include ::ceilometer::dispatcher::gnocchi
}
diff --git a/manifests/profile/base/neutron.pp b/manifests/profile/base/neutron.pp
index d5efa81..1ee2d90 100644
--- a/manifests/profile/base/neutron.pp
+++ b/manifests/profile/base/neutron.pp
@@ -18,19 +18,14 @@
#
# === Parameters
#
-# [*sync_db*]
-# (Optional) Whether to run db sync
-# Defaults to true
-#
# [*step*]
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron (
- $sync_db = true,
$step = hiera('step'),
) {
- if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
+ if hiera('step') >= 3 {
include ::neutron
include ::neutron::config
}
diff --git a/manifests/profile/base/neutron/agents/midonet.pp b/manifests/profile/base/neutron/agents/midonet.pp
new file mode 100644
index 0000000..52cafa9
--- /dev/null
+++ b/manifests/profile/base/neutron/agents/midonet.pp
@@ -0,0 +1,56 @@
+# 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
+#
+# [*neutron_api_node_ips*]
+# (Optional) The IPs of the Neutron API hosts
+# Defaults to hiera('neutron_api_node_ips')
+#
+# [*midonet_libvirt_qemu_data*]
+# (Optional) qemu.conf data for midonet.
+# Defaults to hiera('midonet_libvirt_qemu_data')
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::agents::midonet (
+ $neutron_api_node_ips = hiera('neutron_api_node_ips', ''),
+ $midonet_libvirt_qemu_data = hiera('midonet_libvirt_qemu_data', ''),
+ $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..c50feb2
--- /dev/null
+++ b/manifests/profile/base/neutron/agents/nuage.pp
@@ -0,0 +1,62 @@
+# 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_os_tenant_name*]
+# (Optional) Nova tenant name
+# Defaults to hiera('nova_os_tenant_name')
+#
+# [*nova_os_password*]
+# (Optional) Nova password
+# Defaults to hiera('nova_password')
+#
+# [*nova_metadata_ip*]
+# (Optional) Nova metadata node IPs
+# Defaults to hiera('nova_metadata_node_ips')
+#
+# [*nova_auth_ip*]
+# (Optional) Nova auth IP
+# Defaults to hiera('keystone_public_api_virtual_ip')
+#
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::agents::nuage (
+ $nova_os_tenant_name = hiera('nova::api::admin_tenant_name', ''),
+ $nova_os_password = hiera('nova_password', ''),
+ $nova_metadata_ip = hiera('nova_metadata_node_ips', ''),
+ $nova_auth_ip = hiera('keystone_public_api_virtual_ip', ''),
+ $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/midonet.pp b/manifests/profile/base/neutron/midonet.pp
index 972856f..3276b82 100644
--- a/manifests/profile/base/neutron/midonet.pp
+++ b/manifests/profile/base/neutron/midonet.pp
@@ -82,11 +82,9 @@ class tripleo::profile::base::neutron::midonet (
) {
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 +104,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/pacemaker/ceilometer.pp b/manifests/profile/pacemaker/ceilometer.pp
index 0c21807..23021fc 100644
--- a/manifests/profile/pacemaker/ceilometer.pp
+++ b/manifests/profile/pacemaker/ceilometer.pp
@@ -27,47 +27,18 @@
# for more details.
# Defaults to hiera('step')
#
-# [*sync_db*]
-# (Optional) Whether to run db sync
-# Defaults to undef
-#
class tripleo::profile::pacemaker::ceilometer (
$bootstrap_node = hiera('bootstrap_nodeid'),
$step = hiera('step'),
- $sync_db = true,
) {
- if $::hostname == downcase($bootstrap_node) {
- $pacemaker_master = true
- } else {
- $pacemaker_master = false
- }
-
include ::tripleo::profile::base::ceilometer
- if $step >= 5 and $pacemaker_master {
- $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
- case $ceilometer_backend {
- /mysql/: {
- pacemaker::resource::service { $::ceilometer::params::agent_central_service_name:
- clone_params => 'interleave=true',
- require => Pacemaker::Resource::Ocf['openstack-core'],
- }
- }
- default: {
- pacemaker::resource::service { $::ceilometer::params::agent_central_service_name:
- clone_params => 'interleave=true',
- require => [Pacemaker::Resource::Ocf['openstack-core'],
- Pacemaker::Resource::Service[$::mongodb::params::service_name]],
- }
- }
- }
-
- if $sync_db {
- if $ceilometer_backend == 'mysql' {
- class { '::ceilometer::db::mysql':
- require => Exec['galera-ready'],
- }
+ $ceilometer_backend = downcase(hiera('ceilometer_backend', 'mongodb'))
+ if $step >= 5 and $::hostname == downcase($bootstrap_node) {
+ if $ceilometer_backend == 'mysql' {
+ class { '::ceilometer::db::mysql':
+ require => Exec['galera-ready'],
}
}
diff --git a/manifests/profile/pacemaker/ceilometer/api.pp b/manifests/profile/pacemaker/ceilometer/api.pp
index cfe103a..3006be8 100644
--- a/manifests/profile/pacemaker/ceilometer/api.pp
+++ b/manifests/profile/pacemaker/ceilometer/api.pp
@@ -40,13 +40,6 @@ class tripleo::profile::pacemaker::ceilometer::api (
pacemaker::resource::service { $::ceilometer::params::api_service_name :
clone_params => 'interleave=true',
}
- pacemaker::constraint::colocation { 'ceilometer-delay-with-ceilometer-api-colocation':
- source => 'delay-clone',
- target => "${::ceilometer::params::api_service_name}-clone",
- score => 'INFINITY',
- require => [Pacemaker::Resource::Service[$::ceilometer::params::api_service_name],
- Pacemaker::Resource::Ocf['delay']],
- }
}
}
diff --git a/manifests/profile/pacemaker/neutron.pp b/manifests/profile/pacemaker/neutron.pp
index fff731d..75a75b3 100644
--- a/manifests/profile/pacemaker/neutron.pp
+++ b/manifests/profile/pacemaker/neutron.pp
@@ -61,9 +61,7 @@ class tripleo::profile::pacemaker::neutron (
stop => '/bin/true',
}
- class { '::tripleo::profile::base::neutron':
- sync_db => ($::hostname == downcase($pacemaker_master)),
- }
+ include ::tripleo::profile::base::neutron
if $step >= 4 {
include ::neutron::params