aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/keepalived.pp18
-rw-r--r--manifests/pacemaker/resource_restart_flag.pp35
-rw-r--r--manifests/profile/base/aodh.pp10
-rw-r--r--manifests/profile/base/ceilometer.pp9
-rw-r--r--manifests/profile/base/cinder.pp9
-rw-r--r--manifests/profile/base/cinder/volume/iscsi.pp5
-rw-r--r--manifests/profile/base/glance/api.pp9
-rw-r--r--manifests/profile/base/gnocchi/metricd.pp4
-rw-r--r--manifests/profile/base/gnocchi/statsd.pp4
-rw-r--r--manifests/profile/base/haproxy.pp14
-rw-r--r--manifests/profile/base/heat.pp6
-rw-r--r--manifests/profile/base/heat/api.pp3
-rw-r--r--manifests/profile/base/heat/api_cfn.pp3
-rw-r--r--manifests/profile/base/heat/api_cloudwatch.pp3
-rw-r--r--manifests/profile/base/heat/engine.pp3
-rw-r--r--manifests/profile/base/ironic.pp8
-rw-r--r--manifests/profile/base/ironic/conductor.pp18
-rw-r--r--manifests/profile/base/keystone.pp6
-rw-r--r--manifests/profile/base/logging/fluentd.pp180
-rw-r--r--manifests/profile/base/manila/api.pp11
-rw-r--r--manifests/profile/base/neutron.pp11
-rw-r--r--manifests/profile/base/neutron/midonet.pp4
-rw-r--r--manifests/profile/base/neutron/opencontrail/vrouter.pp (renamed from manifests/profile/base/monitoring/fluentd.pp)27
-rw-r--r--manifests/profile/base/neutron/plumgrid.pp45
-rw-r--r--manifests/profile/base/nova.pp9
-rw-r--r--manifests/profile/base/pacemaker.pp4
-rw-r--r--manifests/profile/base/sahara.pp8
-rw-r--r--manifests/profile/base/swift/proxy.pp15
-rw-r--r--manifests/profile/base/swift/ringbuilder.pp30
-rw-r--r--manifests/profile/pacemaker/cinder/backup.pp6
-rw-r--r--manifests/profile/pacemaker/cinder/volume.pp6
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp6
-rw-r--r--manifests/profile/pacemaker/database/redis.pp8
-rw-r--r--manifests/profile/pacemaker/haproxy.pp6
-rw-r--r--manifests/profile/pacemaker/manila.pp6
-rw-r--r--manifests/profile/pacemaker/rabbitmq.pp6
-rw-r--r--manifests/vip_hosts.pp39
37 files changed, 553 insertions, 41 deletions
diff --git a/manifests/keepalived.pp b/manifests/keepalived.pp
index 45d772e..c0fb3ef 100644
--- a/manifests/keepalived.pp
+++ b/manifests/keepalived.pp
@@ -54,6 +54,11 @@
# A string.
# Defaults to false
#
+# [*redis_virtual_ip*]
+# Virtual IP on the redis service.
+# A string.
+# Defaults to false
+#
class tripleo::keepalived (
$controller_virtual_ip,
$control_virtual_interface,
@@ -62,6 +67,7 @@ class tripleo::keepalived (
$internal_api_virtual_ip = false,
$storage_virtual_ip = false,
$storage_mgmt_virtual_ip = false,
+ $redis_virtual_ip = false,
) {
case $::osfamily {
@@ -141,4 +147,16 @@ class tripleo::keepalived (
}
}
+ if $redis_virtual_ip and $redis_virtual_ip != $controller_virtual_ip {
+ $redis_virtual_interface = interface_for_ip($redis_virtual_ip)
+ # KEEPALIVE STORAGE MANAGEMENT NETWORK
+ keepalived::instance { '56':
+ interface => $redis_virtual_interface,
+ virtual_ips => [join([$redis_virtual_ip, ' dev ', $redis_virtual_interface])],
+ state => 'MASTER',
+ track_script => ['haproxy'],
+ priority => 101,
+ }
+ }
+
}
diff --git a/manifests/pacemaker/resource_restart_flag.pp b/manifests/pacemaker/resource_restart_flag.pp
new file mode 100644
index 0000000..aded802
--- /dev/null
+++ b/manifests/pacemaker/resource_restart_flag.pp
@@ -0,0 +1,35 @@
+# 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.
+#
+# == Define: tripleo::pacemaker::resource_restart_flag
+#
+# Creates a flag file on the filesystem to signify that a pacemaker
+# resource needs restarting (usually to pick up config changes after
+# they've been written on all nodes).
+#
+# === Parameters
+#
+# [*title*]
+# The resource name in Pacemaker to restart. If it's a cloned
+# resource, the name should include the '-clone' part.
+#
+define tripleo::pacemaker::resource_restart_flag() {
+
+ exec { "${title} resource restart flag":
+ command => "touch /var/lib/tripleo/pacemaker-restarts/${title}",
+ path => ['/bin','/usr/bin','/sbin','/usr/sbin'],
+ refreshonly => true,
+ }
+
+}
diff --git a/manifests/profile/base/aodh.pp b/manifests/profile/base/aodh.pp
index 07c0a88..2fad5b3 100644
--- a/manifests/profile/base/aodh.pp
+++ b/manifests/profile/base/aodh.pp
@@ -27,9 +27,15 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+#
+
class tripleo::profile::base::aodh (
$step = hiera('step'),
$bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $::hostname == downcase($bootstrap_node) {
@@ -43,7 +49,9 @@ class tripleo::profile::base::aodh (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
- include ::aodh
+ class { '::aodh' :
+ rabbit_hosts => $rabbit_hosts,
+ }
include ::aodh::auth
include ::aodh::config
include ::aodh::client
diff --git a/manifests/profile/base/ceilometer.pp b/manifests/profile/base/ceilometer.pp
index 88818de..aaf904f 100644
--- a/manifests/profile/base/ceilometer.pp
+++ b/manifests/profile/base/ceilometer.pp
@@ -23,12 +23,19 @@
# for more details.
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::ceilometer (
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $step >= 3 {
- include ::ceilometer
+ class { '::ceilometer' :
+ rabbit_hosts => $rabbit_hosts,
+ }
include ::ceilometer::config
}
diff --git a/manifests/profile/base/cinder.pp b/manifests/profile/base/cinder.pp
index 43d95b4..510ea40 100644
--- a/manifests/profile/base/cinder.pp
+++ b/manifests/profile/base/cinder.pp
@@ -30,10 +30,15 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::cinder (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$cinder_enable_db_purge = true,
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -42,7 +47,9 @@ class tripleo::profile::base::cinder (
}
if $step >= 4 or ($step >= 3 and $sync_db) {
- include ::cinder
+ class { '::cinder' :
+ rabbit_hosts => $rabbit_hosts,
+ }
include ::cinder::config
}
diff --git a/manifests/profile/base/cinder/volume/iscsi.pp b/manifests/profile/base/cinder/volume/iscsi.pp
index d1d22bb..8baaf1c 100644
--- a/manifests/profile/base/cinder/volume/iscsi.pp
+++ b/manifests/profile/base/cinder/volume/iscsi.pp
@@ -52,8 +52,11 @@ class tripleo::profile::base::cinder::volume::iscsi (
size => join([$cinder_lvm_loop_device_size, 'M']),
}
+ # NOTE(gfidente): never emit in hieradata:
+ # key: [ipv6]
+ # as it will cause hiera parsing errors
cinder::backend::iscsi { $backend_name :
- iscsi_ip_address => $cinder_iscsi_address,
+ iscsi_ip_address => normalize_ip_for_uri($cinder_iscsi_address),
iscsi_helper => $cinder_iscsi_helper,
}
}
diff --git a/manifests/profile/base/glance/api.pp b/manifests/profile/base/glance/api.pp
index 845fd41..ecffd7f 100644
--- a/manifests/profile/base/glance/api.pp
+++ b/manifests/profile/base/glance/api.pp
@@ -27,9 +27,14 @@
# for more details.
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::glance::api (
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $step >= 4 {
@@ -48,7 +53,9 @@ class tripleo::profile::base::glance::api (
class { '::glance::api':
stores => $glance_store,
}
- include ::glance::notify::rabbitmq
+ class { '::glance::notify::rabbitmq' :
+ rabbit_hosts => $rabbit_hosts,
+ }
include join(['::glance::backend::', $glance_backend])
}
diff --git a/manifests/profile/base/gnocchi/metricd.pp b/manifests/profile/base/gnocchi/metricd.pp
index 4d7eb89..e69bbd5 100644
--- a/manifests/profile/base/gnocchi/metricd.pp
+++ b/manifests/profile/base/gnocchi/metricd.pp
@@ -28,7 +28,9 @@ class tripleo::profile::base::gnocchi::metricd (
) {
include ::tripleo::profile::base::gnocchi
- if $step >= 4 {
+ if $step >= 5 {
include ::gnocchi::metricd
+ Keystone_endpoint<||> -> Service['gnocchi-metricd']
+ Keystone_user_role<||> -> Service['gnocchi-metricd']
}
}
diff --git a/manifests/profile/base/gnocchi/statsd.pp b/manifests/profile/base/gnocchi/statsd.pp
index 775b043..1fe4067 100644
--- a/manifests/profile/base/gnocchi/statsd.pp
+++ b/manifests/profile/base/gnocchi/statsd.pp
@@ -28,7 +28,9 @@ class tripleo::profile::base::gnocchi::statsd (
) {
include ::tripleo::profile::base::gnocchi
- if $step >= 4 {
+ if $step >= 5 {
include ::gnocchi::statsd
+ Keystone_endpoint<||> -> Service['gnocchi-statsd']
+ Keystone_user_role<||> -> Service['gnocchi-statsd']
}
}
diff --git a/manifests/profile/base/haproxy.pp b/manifests/profile/base/haproxy.pp
index 4f2f850..68ff3e4 100644
--- a/manifests/profile/base/haproxy.pp
+++ b/manifests/profile/base/haproxy.pp
@@ -82,6 +82,20 @@ class tripleo::profile::base::haproxy (
}
include ::tripleo::haproxy
+
+ unless hiera('tripleo::haproxy::haproxy_service_manage', true) {
+ # Reload HAProxy configuration if the haproxy class has refreshed or any
+ # HAProxy frontend endpoint has changed.
+ exec { 'haproxy-reload':
+ command => 'systemctl reload haproxy',
+ path => ['/usr/bin', '/usr/sbin'],
+ refreshonly => true,
+ onlyif => 'pcs property | grep -q "maintenance-mode.*true"',
+ subscribe => Class['::haproxy']
+ }
+ Haproxy::Listen<||> ~> Exec['haproxy-reload']
+ Haproxy::Balancermember<||> ~> Exec['haproxy-reload']
+ }
}
}
diff --git a/manifests/profile/base/heat.pp b/manifests/profile/base/heat.pp
index cafe95e..027ab7e 100644
--- a/manifests/profile/base/heat.pp
+++ b/manifests/profile/base/heat.pp
@@ -35,11 +35,16 @@
# for more details.
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::heat (
$bootstrap_node = downcase(hiera('bootstrap_nodeid')),
$manage_db_purge = hiera('heat_enable_db_purge', true),
$notification_driver = 'messaging',
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
# Domain resources will be created at step5 on the bootstrap_node so we
# configure heat.conf at step3 and 4 but actually create the domain later.
@@ -54,6 +59,7 @@ class tripleo::profile::base::heat (
if $step >= 4 {
class { '::heat' :
notification_driver => $notification_driver,
+ rabbit_hosts => $rabbit_hosts,
}
include ::heat::config
include ::heat::cors
diff --git a/manifests/profile/base/heat/api.pp b/manifests/profile/base/heat/api.pp
index 68de12b..7166298 100644
--- a/manifests/profile/base/heat/api.pp
+++ b/manifests/profile/base/heat/api.pp
@@ -26,8 +26,9 @@
class tripleo::profile::base::heat::api (
$step = hiera('step'),
) {
+ include ::tripleo::profile::base::heat
+
if $step >= 4 {
- include ::tripleo::profile::base::heat
include ::heat::api
}
}
diff --git a/manifests/profile/base/heat/api_cfn.pp b/manifests/profile/base/heat/api_cfn.pp
index 7c80fc6..c1adae6 100644
--- a/manifests/profile/base/heat/api_cfn.pp
+++ b/manifests/profile/base/heat/api_cfn.pp
@@ -26,8 +26,9 @@
class tripleo::profile::base::heat::api_cfn (
$step = hiera('step'),
) {
+ include ::tripleo::profile::base::heat
+
if $step >= 4 {
- include ::tripleo::profile::base::heat
include ::heat::api_cfn
}
}
diff --git a/manifests/profile/base/heat/api_cloudwatch.pp b/manifests/profile/base/heat/api_cloudwatch.pp
index 6362275..3004db9 100644
--- a/manifests/profile/base/heat/api_cloudwatch.pp
+++ b/manifests/profile/base/heat/api_cloudwatch.pp
@@ -26,8 +26,9 @@
class tripleo::profile::base::heat::api_cloudwatch (
$step = hiera('step'),
) {
+ include ::tripleo::profile::base::heat
+
if $step >= 4 {
- include ::tripleo::profile::base::heat
include ::heat::api_cloudwatch
}
}
diff --git a/manifests/profile/base/heat/engine.pp b/manifests/profile/base/heat/engine.pp
index 32a711f..112fad8 100644
--- a/manifests/profile/base/heat/engine.pp
+++ b/manifests/profile/base/heat/engine.pp
@@ -37,12 +37,13 @@ class tripleo::profile::base::heat::engine (
$sync_db = false
}
+ include ::tripleo::profile::base::heat
+
if $step >= 3 and $sync_db {
include ::heat::db::mysql
}
if $step >= 4 or ( $step >= 3 and $sync_db ) {
- include ::tripleo::profile::base::heat
include ::heat::engine
}
diff --git a/manifests/profile/base/ironic.pp b/manifests/profile/base/ironic.pp
index da89839..6c0769a 100644
--- a/manifests/profile/base/ironic.pp
+++ b/manifests/profile/base/ironic.pp
@@ -26,9 +26,14 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::ironic (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
# Database is accessed by both API and conductor, hence it's here.
if $::hostname == downcase($bootstrap_node) {
@@ -43,7 +48,8 @@ class tripleo::profile::base::ironic (
if $step >= 4 or ($step >= 3 and $sync_db) {
class { '::ironic':
- sync_db => $sync_db,
+ sync_db => $sync_db,
+ rabbit_hosts => $rabbit_hosts,
}
include ::ironic::cors
diff --git a/manifests/profile/base/ironic/conductor.pp b/manifests/profile/base/ironic/conductor.pp
index 2cb61fb..4824648 100644
--- a/manifests/profile/base/ironic/conductor.pp
+++ b/manifests/profile/base/ironic/conductor.pp
@@ -22,15 +22,27 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*manage_pxe*]
+# (Optional) Whether to manage the PXE/iPXE environment for the conductor.
+# Defaults to true
+#
class tripleo::profile::base::ironic::conductor (
$step = hiera('step'),
+ $manage_pxe = true,
) {
include ::tripleo::profile::base::ironic
if $step >= 4 {
- include ::ironic::drivers::deploy
- include ::ironic::drivers::ipmi
- include ::ironic::drivers::pxe
include ::ironic::conductor
+ include ::ironic::drivers::pxe
+ if $manage_pxe {
+ include ::ironic::pxe
+ }
+
+ # Configure a few popular drivers
+ include ::ironic::drivers::drac
+ include ::ironic::drivers::ilo
+ include ::ironic::drivers::ipmi
+ include ::ironic::drivers::ssh
}
}
diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp
index 6c5d7fb..fd38869 100644
--- a/manifests/profile/base/keystone.pp
+++ b/manifests/profile/base/keystone.pp
@@ -31,10 +31,15 @@
# for more details.
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::keystone (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$manage_db_purge = hiera('keystone_enable_db_purge', true),
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -54,6 +59,7 @@ class tripleo::profile::base::keystone (
class { '::keystone':
sync_db => $sync_db,
enable_bootstrap => $sync_db,
+ rabbit_hosts => $rabbit_hosts,
}
include ::keystone::config
diff --git a/manifests/profile/base/logging/fluentd.pp b/manifests/profile/base/logging/fluentd.pp
new file mode 100644
index 0000000..3ed7d88
--- /dev/null
+++ b/manifests/profile/base/logging/fluentd.pp
@@ -0,0 +1,180 @@
+# 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::logging::fluentd
+#
+# FluentD configuration for TripleO
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) String. The current step of the deployment
+# Defaults to hiera('step')
+#
+# [*fluentd_sources*]
+# (Optional) List of dictionaries. A list of sources for fluentd.
+#
+# [*fluentd_filters*]
+# (Optional) List of dictionaries. A list of filters for fluentd.
+#
+# [*fluentd_servers*]
+# (Optional) List of dictionaries. A list of destination hosts for
+# fluentd. Each should be of the form {host=>'my.host.name',
+# 'port'=>24224}
+#
+# [*fluentd_groups*]
+# (Optional) List of strings. Add the 'fluentd' user to these groups.
+#
+# [*fluentd_pos_file_path*]
+# (Optional) String. Path to a directory that will be created
+# if it does not exist and made writable by the fluentd user.
+#
+# [*fluentd_use_ssl*]
+# (Optional) Boolean. If true, use the secure_forward plugin.
+#
+# [*fluentd_ssl_certificate*]
+# (Required if fluentd_use_ssl is true) PEM encoded certificate data from
+# for example "secure-forward-ca-generate".
+#
+# [*fluentd_shared_key*]
+# (Required if fluentd_use_ssl is true) Shared secret key for fluentd
+# secure-foward plugin.
+#
+# [*fluentd_listen_syslog*]
+# (Optional, default true) When true, fluentd will listen for syslog
+# messages on a local UDP port.
+#
+# [*fluentd_syslog_port*]
+# (Optional, default 42185) Port on which fluentd should listen if
+# $fluentd_listen_syslog is true.
+class tripleo::profile::base::logging::fluentd (
+ $step = hiera('step', undef),
+ $fluentd_sources = undef,
+ $fluentd_filters = undef,
+ $fluentd_servers = undef,
+ $fluentd_groups = undef,
+ $fluentd_pos_file_path = undef,
+ $fluentd_use_ssl = undef,
+ $fluentd_ssl_certificate = undef,
+ $fluentd_shared_key = undef,
+ $fluentd_listen_syslog = true,
+ $fluentd_syslog_port = 42185
+) {
+ if $step == undef or $step >= 3 {
+ include ::fluentd
+
+ if $fluentd_groups {
+ user { $::fluentd::config_owner:
+ ensure => present,
+ groups => $fluentd_groups,
+ membership => 'minimum',
+ }
+ }
+
+ if $fluentd_pos_file_path {
+ file { $fluentd_pos_file_path:
+ ensure => 'directory',
+ owner => $::fluentd::config_owner,
+ group => $::fluentd::config_group,
+ mode => '0750',
+ }
+ }
+
+ ::fluentd::plugin { 'rubygem-fluent-plugin-add':
+ plugin_provider => 'yum',
+ }
+
+ if $fluentd_sources {
+ ::fluentd::config { '100-openstack-sources.conf':
+ config => {
+ 'source' => $fluentd_sources,
+ }
+ }
+ }
+
+ if $fluentd_listen_syslog {
+ # fluentd will receive syslog messages by listening on a local udp
+ # socket.
+ ::fluentd::config { '110-system-sources.conf':
+ config => {
+ 'source' => {
+ 'type' => 'syslog',
+ 'tag' => 'system.messages',
+ 'port' => $fluentd_syslog_port,
+ }
+ }
+ }
+
+ file { '/etc/rsyslog.d/fluentd.conf':
+ content => "*.* @127.0.0.1:${fluentd_syslog_port}",
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ } ~> exec { 'reload rsyslog':
+ command => '/bin/systemctl restart rsyslog',
+ }
+ }
+
+ if $fluentd_filters {
+ ::fluentd::config { '200-openstack-filters.conf':
+ config => {
+ 'filter' => $fluentd_filters,
+ }
+ }
+ }
+
+ if $fluentd_servers and !empty($fluentd_servers) {
+ if $fluentd_use_ssl {
+ ::fluentd::plugin { 'rubygem-fluent-plugin-secure-forward':
+ plugin_provider => 'yum',
+ }
+
+ file {'/etc/fluentd/ca_cert.pem':
+ content => $fluentd_ssl_certificate,
+ owner => $::fluentd::config_owner,
+ group => $::fluentd::config_group,
+ mode => '0444',
+ }
+
+ ::fluentd::config { '300-openstack-matches.conf':
+ config => {
+ 'match' => {
+ # lint:ignore:single_quote_string_with_variables
+ # lint:ignore:quoted_booleans
+ 'type' => 'secure_forward',
+ 'tag_pattern' => '**',
+ 'self_hostname' => '${hostname}',
+ 'secure' => 'true',
+ 'ca_cert_path' => '/etc/fluentd/ca_cert.pem',
+ 'shared_key' => $fluentd_shared_key,
+ 'server' => $fluentd_servers,
+ # lint:endignore
+ # lint:endignore
+ }
+ }
+ }
+ } else {
+ ::fluentd::config { '300-openstack-matches.conf':
+ config => {
+ 'match' => {
+ 'type' => 'forward',
+ 'tag_pattern' => '**',
+ 'server' => $fluentd_servers,
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/manifests/profile/base/manila/api.pp b/manifests/profile/base/manila/api.pp
index 9a3a314..89ff810 100644
--- a/manifests/profile/base/manila/api.pp
+++ b/manifests/profile/base/manila/api.pp
@@ -23,11 +23,18 @@
# for more details.
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::manila::api (
- $step = hiera('step'),
+ $step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $step >= 4 {
- include ::manila
+ class { '::manila' :
+ rabbit_hosts => $rabbit_hosts,
+ }
include ::manila::api
}
}
diff --git a/manifests/profile/base/neutron.pp b/manifests/profile/base/neutron.pp
index 7b07b1f..90a5c23 100644
--- a/manifests/profile/base/neutron.pp
+++ b/manifests/profile/base/neutron.pp
@@ -22,11 +22,18 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::neutron (
- $step = hiera('step'),
+ $step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $step >= 3 {
- include ::neutron
+ class { '::neutron' :
+ rabbit_hosts => $rabbit_hosts,
+ }
include ::neutron::config
}
}
diff --git a/manifests/profile/base/neutron/midonet.pp b/manifests/profile/base/neutron/midonet.pp
index 9104cc3..3ba9dd9 100644
--- a/manifests/profile/base/neutron/midonet.pp
+++ b/manifests/profile/base/neutron/midonet.pp
@@ -67,8 +67,8 @@ class tripleo::profile::base::neutron::midonet (
$bind_address = hiera('neutron::bind_host', ''),
$keystone_admin_token = hiera('keystone::admin_token', ''),
$neutron_api_node_ips = hiera('neutron_api_node_ips', ''),
- $neutron_auth_password = hiera('neutron::server::password', ''),
- $neutron_auth_tenant = hiera('neutron::server::project_name', ''),
+ $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', ''),
diff --git a/manifests/profile/base/monitoring/fluentd.pp b/manifests/profile/base/neutron/opencontrail/vrouter.pp
index 8160452..90ab71c 100644
--- a/manifests/profile/base/monitoring/fluentd.pp
+++ b/manifests/profile/base/neutron/opencontrail/vrouter.pp
@@ -12,28 +12,29 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-# == Class: tripleo::profile::base::monitoring::fluentd
+# == Class: tripleo::profile::base::neutron::opencontrail::vrouter
#
-# FluentD configuration for TripleO
+# Opencontrail profile to run the contrail vrouter
#
# === Parameters
#
# [*step*]
-# (Optional) String. The current step of the deployment
+# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
-class tripleo::profile::base::monitoring::fluentd (
- $step = hiera('step', undef)
+class tripleo::profile::base::neutron::opencontrail::vrouter (
+ $step = hiera('step'),
) {
- if $step == undef or $step >= 3 {
- include ::fluentd
- ::fluentd::plugin { 'rubygem-fluent-plugin-add':
- plugin_provider => 'yum',
- }
+ if $step >= 4 {
+
+ include ::contrail::vrouter
+ # NOTE: it's not possible to use this class without a functional
+ # contrail controller up and running
+ #class {'::contrail::vrouter::provision_vrouter':
+ # require => Class['contrail::vrouter'],
+ #}
- ::fluentd::plugin { 'rubygem-fluent-plugin-elasticsearch':
- plugin_provider => 'yum',
- }
}
+
}
diff --git a/manifests/profile/base/neutron/plumgrid.pp b/manifests/profile/base/neutron/plumgrid.pp
new file mode 100644
index 0000000..03dc101
--- /dev/null
+++ b/manifests/profile/base/neutron/plumgrid.pp
@@ -0,0 +1,45 @@
+# 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::plumgrid
+#
+# Plumgrid Neutron helper profile (extra settings for compute, etc. roles)
+#
+# === Parameters
+# [*step*]
+# (Optional) The current step of the deployment
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::neutron::plumgrid (
+ $step = hiera('step'),
+) {
+
+ if $step >= 4 {
+
+ # forward all ipv4 traffic
+ # this is required for the vms to pass through the gateways public interface
+ sysctl::value { 'net.ipv4.ip_forward': value => '1' }
+
+ # ifc_ctl_pp needs to be invoked by root as part of the vif.py when a VM is powered on
+ file { '/etc/sudoers.d/ifc_ctl_sudoers':
+ ensure => file,
+ owner => root,
+ group => root,
+ mode => '0440',
+ content => "nova ALL=(root) NOPASSWD: /opt/pg/bin/ifc_ctl_pp *\n",
+ }
+
+ }
+
+}
diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp
index b43b8e8..74f0460 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -38,12 +38,17 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::nova (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$libvirt_enabled = false,
$manage_migration = false,
$nova_compute_enabled = false,
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -58,7 +63,9 @@ class tripleo::profile::base::nova (
}
if hiera('step') >= 4 or (hiera('step') >= 3 and $sync_db) {
- include ::nova
+ class { '::nova' :
+ rabbit_hosts => $rabbit_hosts,
+ }
include ::nova::config
class { '::nova::cache':
enabled => true,
diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp
index 2c70eab..0d628b5 100644
--- a/manifests/profile/base/pacemaker.pp
+++ b/manifests/profile/base/pacemaker.pp
@@ -75,6 +75,10 @@ class tripleo::profile::base::pacemaker (
Pacemaker::Resource::Service {
op_params => 'start timeout=200s stop timeout=200s',
}
+
+ file { '/var/lib/tripleo/pacemaker-restarts':
+ ensure => directory,
+ } ~> Tripleo::Pacemaker::Resource_restart_flag<||>
}
if $step >= 2 {
diff --git a/manifests/profile/base/sahara.pp b/manifests/profile/base/sahara.pp
index 96d23a6..cf0ee90 100644
--- a/manifests/profile/base/sahara.pp
+++ b/manifests/profile/base/sahara.pp
@@ -26,9 +26,14 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
+# [*rabbit_hosts*]
+# list of the rabbbit host IPs
+# Defaults to hiera('rabbitmq_node_ips')
+
class tripleo::profile::base::sahara (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$step = hiera('step'),
+ $rabbit_hosts = hiera('rabbitmq_node_ips', undef),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -38,7 +43,8 @@ class tripleo::profile::base::sahara (
if $step >= 4 or ($step >= 3 and $sync_db){
class { '::sahara':
- sync_db => $sync_db,
+ sync_db => $sync_db,
+ rabbit_hosts => $rabbit_hosts,
}
}
}
diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index 1e763a1..a95d05f 100644
--- a/manifests/profile/base/swift/proxy.pp
+++ b/manifests/profile/base/swift/proxy.pp
@@ -23,14 +23,27 @@
# for more details.
# Defaults to hiera('step')
#
+# [*memcache_servers*]
+# (Optional) List of memcache servers
+# Defaults to hiera('memcached_node_ips')
+#
+# [*memcache_port*]
+# (Optional) memcache port
+# Defaults to 11211
+#
class tripleo::profile::base::swift::proxy (
$step = hiera('step'),
+ $memcache_servers = hiera('memcached_node_ips'),
+ $memcache_port = 11211,
) {
if $step >= 4 {
+ $swift_memcache_servers = suffix($memcache_servers, ":${memcache_port}")
include ::swift::proxy
include ::swift::proxy::proxy_logging
include ::swift::proxy::healthcheck
- include ::swift::proxy::cache
+ class { '::swift::proxy::cache':
+ memcache_servers => $swift_memcache_servers
+ }
include ::swift::proxy::keystone
include ::swift::proxy::authtoken
include ::swift::proxy::staticweb
diff --git a/manifests/profile/base/swift/ringbuilder.pp b/manifests/profile/base/swift/ringbuilder.pp
index e0f67cd..98a09a0 100644
--- a/manifests/profile/base/swift/ringbuilder.pp
+++ b/manifests/profile/base/swift/ringbuilder.pp
@@ -26,7 +26,8 @@
# Defaults to true
#
# [*devices*]
-# (Optional) The swift devices
+# (Optional) DEPRECATED The swift devices
+# Should pass raw_disk_prefix, raw_disks and swift_storage_node_ips instead
# Defaults to ''
#
# [*step*]
@@ -38,12 +39,30 @@
# (Optional) The swift zones
# Defaults to 1
#
+# [*raw_disk_prefix*]
+# (Optional) Disk prefix used to create devices list
+# Defaults to 'r1z1-'
+#
+# [*raw_disks*]
+# (Optional) list of raw disks in format
+# [':%PORT%/device1', ':%PORT%/device2']
+# Combined with raw_disk_prefix and swift_storage_node_ips
+# to create devices list
+# Defaults to an empty list
+#
+# [*swift_storage_node_ips*]
+# (Optional) list of ip addresses for nodes running swift_storage service
+# Defaults to hiera('swift_storage_node_ips') or an empty list
+#
class tripleo::profile::base::swift::ringbuilder (
$replicas,
$build_ring = true,
- $devices = '',
+ $devices = undef,
$step = hiera('step'),
$swift_zones = '1',
+ $raw_disk_prefix = 'r1z1-',
+ $raw_disks = [],
+ $swift_storage_node_ips = hiera('swift_storage_node_ips', []),
) {
if $step >= 2 {
# pre-install swift here so we can build rings
@@ -54,8 +73,11 @@ class tripleo::profile::base::swift::ringbuilder (
validate_bool($build_ring)
if $build_ring {
-
- $device_array = strip(split(rstrip($devices), ','))
+ if $devices {
+ $device_array = strip(split(rstrip($devices), ','))
+ } else {
+ $device_array = tripleo_swift_devices($raw_disk_prefix, $swift_storage_node_ips, $raw_disks)
+ }
# create local rings
swift::ringbuilder::create{ ['object', 'account', 'container']:
diff --git a/manifests/profile/pacemaker/cinder/backup.pp b/manifests/profile/pacemaker/cinder/backup.pp
index 20a0104..72ec456 100644
--- a/manifests/profile/pacemaker/cinder/backup.pp
+++ b/manifests/profile/pacemaker/cinder/backup.pp
@@ -47,6 +47,12 @@ class tripleo::profile::pacemaker::cinder::backup (
include ::tripleo::profile::base::cinder::backup
+ if $step >= 3 and $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ Cinder_config<||>
+ ~>
+ tripleo::pacemaker::resource_restart_flag { "${::cinder::params::backup_service}": }
+ }
+
if $step >= 5 and $pacemaker_master {
pacemaker::resource::service { $::cinder::params::backup_service : }
}
diff --git a/manifests/profile/pacemaker/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp
index 5a581eb..82e2522 100644
--- a/manifests/profile/pacemaker/cinder/volume.pp
+++ b/manifests/profile/pacemaker/cinder/volume.pp
@@ -46,6 +46,12 @@ class tripleo::profile::pacemaker::cinder::volume (
include ::tripleo::profile::base::cinder::volume
+ if $step >= 3 and $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ Cinder_api_paste_ini<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::cinder::params::volume_service}"]
+ Cinder_config<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::cinder::params::volume_service}"]
+ tripleo::pacemaker::resource_restart_flag { "${::cinder::params::volume_service}": }
+ }
+
if $step >= 5 and $pacemaker_master {
pacemaker::resource::service { $::cinder::params::volume_service : }
}
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index 2715260..4dc3770 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -80,6 +80,12 @@ class tripleo::profile::pacemaker::database::mysql (
mysql_server_options => $mysqld_options,
}
+ if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ tripleo::pacemaker::resource_restart_flag { 'galera-master':
+ subscribe => File['mysql-config-file'],
+ }
+ }
+
if $step >= 2 {
if $pacemaker_master {
pacemaker::resource::ocf { 'galera' :
diff --git a/manifests/profile/pacemaker/database/redis.pp b/manifests/profile/pacemaker/database/redis.pp
index 8a37ce9..e081516 100644
--- a/manifests/profile/pacemaker/database/redis.pp
+++ b/manifests/profile/pacemaker/database/redis.pp
@@ -44,6 +44,14 @@ class tripleo::profile::pacemaker::database::redis (
if $step >= 1 {
include ::redis
+
+ if $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ tripleo::pacemaker::resource_restart_flag { 'redis-master':
+ # ouch, but trying to stay close how notification works in
+ # puppet-redis when pacemaker is not being used
+ subscribe => Exec["cp -p ${::redis::config_file_orig} ${::redis::config_file}"]
+ }
+ }
}
if $step >= 2 and $pacemaker_master {
diff --git a/manifests/profile/pacemaker/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp
index 1b83d9b..b2e127b 100644
--- a/manifests/profile/pacemaker/haproxy.pp
+++ b/manifests/profile/pacemaker/haproxy.pp
@@ -44,6 +44,12 @@ class tripleo::profile::pacemaker::haproxy (
$pacemaker_master = false
}
+ if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ tripleo::pacemaker::resource_restart_flag { 'haproxy-clone':
+ subscribe => Concat['/etc/haproxy/haproxy.cfg'],
+ }
+ }
+
if $step >= 2 and $pacemaker_master and $enable_load_balancer {
# FIXME: we should not have to access tripleo::haproxy class
# parameters here to configure pacemaker VIPs. The configuration
diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp
index 37c67ab..a7f91fc 100644
--- a/manifests/profile/pacemaker/manila.pp
+++ b/manifests/profile/pacemaker/manila.pp
@@ -202,6 +202,12 @@ class tripleo::profile::pacemaker::manila (
class { '::manila::backends' :
enabled_share_backends => $manila_enabled_backends,
}
+
+ if $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ Manila_api_paste_ini<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::manila::params::share_service}"]
+ Manila_config<||> ~> Tripleo::Pacemaker::Resource_restart_flag["${::manila::params::share_service}"]
+ tripleo::pacemaker::resource_restart_flag { "${::manila::params::share_service}": }
+ }
}
if $step >= 5 and $pacemaker_master {
diff --git a/manifests/profile/pacemaker/rabbitmq.pp b/manifests/profile/pacemaker/rabbitmq.pp
index 93edec9..1f25e8b 100644
--- a/manifests/profile/pacemaker/rabbitmq.pp
+++ b/manifests/profile/pacemaker/rabbitmq.pp
@@ -54,6 +54,12 @@ class tripleo::profile::pacemaker::rabbitmq (
require => Class['::rabbitmq'],
}
+ if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ tripleo::pacemaker::resource_restart_flag { 'rabbitmq-clone':
+ subscribe => Class['rabbitmq::service'],
+ }
+ }
+
if $step >= 2 and $pacemaker_master {
pacemaker::resource::ocf { 'rabbitmq':
ocf_agent_name => 'heartbeat:rabbitmq-cluster',
diff --git a/manifests/vip_hosts.pp b/manifests/vip_hosts.pp
new file mode 100644
index 0000000..7b260fd
--- /dev/null
+++ b/manifests/vip_hosts.pp
@@ -0,0 +1,39 @@
+# Copyright 2016 Red Hat, Inc.
+# All Rights Reserved.
+#
+# 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::vip_hosts
+#
+# Write the overcloud VIPs into /etc/hosts
+#
+# === Parameters
+#
+# [*hosts_spec*]
+# The specification of the hosts that will be added to the /etc/hosts file.
+# These come in the form of a hash that will be consumed by create_resources.
+# e.g.:
+# tripleo::hosts_spec:
+# host-1:
+# name: host1.domain
+# ip: 127.0.0.1
+# host-2:
+# name: host2.domain
+# ip: 127.0.0.2
+#
+class tripleo::vip_hosts (
+ $hosts_spec
+) {
+ create_resources('host', $hosts_spec)
+}
+