aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile')
-rw-r--r--manifests/profile/base/ceph/mds.pp35
-rw-r--r--manifests/profile/base/ceph/rgw.pp37
-rw-r--r--manifests/profile/base/cinder/volume.pp29
-rw-r--r--manifests/profile/base/cinder/volume/hpelefthand.pp71
-rw-r--r--manifests/profile/base/database/mysql.pp4
-rw-r--r--manifests/profile/base/docker_registry.pp73
-rw-r--r--manifests/profile/base/etcd.pp66
-rw-r--r--manifests/profile/base/glance/api.pp16
-rw-r--r--manifests/profile/base/glance/registry.pp14
-rw-r--r--manifests/profile/base/heat.pp2
-rw-r--r--manifests/profile/base/keystone.pp3
-rw-r--r--manifests/profile/base/metrics/collectd.pp88
-rw-r--r--manifests/profile/base/metrics/collectd/plugin_helper.pp6
-rw-r--r--manifests/profile/base/neutron/agents/ovn.pp14
-rw-r--r--manifests/profile/base/neutron/opendaylight.pp19
-rw-r--r--manifests/profile/base/neutron/ovn_northd.pp40
-rw-r--r--manifests/profile/base/neutron/plugins/ml2.pp12
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/ovn.pp25
-rw-r--r--manifests/profile/base/nova.pp55
-rw-r--r--manifests/profile/base/nova/api.pp23
-rw-r--r--manifests/profile/base/nova/compute/libvirt.pp2
-rw-r--r--manifests/profile/base/nova/placement.pp98
-rw-r--r--manifests/profile/base/pacemaker.pp5
-rw-r--r--manifests/profile/base/panko.pp1
-rw-r--r--manifests/profile/base/sshd.pp61
-rw-r--r--manifests/profile/base/swift/proxy.pp27
-rw-r--r--manifests/profile/base/swift/storage.pp2
-rw-r--r--manifests/profile/base/time/ntp.pp28
-rw-r--r--manifests/profile/pacemaker/cinder/backup.pp4
-rw-r--r--manifests/profile/pacemaker/cinder/volume.pp4
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp8
-rw-r--r--manifests/profile/pacemaker/database/redis.pp4
-rw-r--r--manifests/profile/pacemaker/haproxy.pp4
-rw-r--r--manifests/profile/pacemaker/manila.pp43
-rw-r--r--manifests/profile/pacemaker/rabbitmq.pp4
35 files changed, 827 insertions, 100 deletions
diff --git a/manifests/profile/base/ceph/mds.pp b/manifests/profile/base/ceph/mds.pp
new file mode 100644
index 0000000..c5c7654
--- /dev/null
+++ b/manifests/profile/base/ceph/mds.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.
+#
+# == Class: tripleo::profile::base::ceph::mds
+#
+# Ceph MDS profile for tripleo
+#
+# === Parameters
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::ceph::mds (
+ $step = hiera('step'),
+) {
+
+ include ::tripleo::profile::base::ceph
+
+ if $step >= 3 {
+ include ::ceph::profile::mds
+ }
+}
diff --git a/manifests/profile/base/ceph/rgw.pp b/manifests/profile/base/ceph/rgw.pp
index 2ecca52..8443de0 100644
--- a/manifests/profile/base/ceph/rgw.pp
+++ b/manifests/profile/base/ceph/rgw.pp
@@ -29,6 +29,10 @@
# [*keystone_admin_token*]
# The keystone admin token
#
+# [*rgw_keystone_version*] The api version for keystone.
+# Possible values 'v2.0', 'v3'
+# Optional. Default is 'v2.0'
+#
# [*keystone_url*]
# The internal or admin url for keystone
#
@@ -44,9 +48,10 @@ class tripleo::profile::base::ceph::rgw (
$keystone_admin_token,
$keystone_url,
$rgw_key,
- $civetweb_bind_ip = '127.0.0.1',
- $civetweb_bind_port = '8080',
- $step = hiera('step'),
+ $civetweb_bind_ip = '127.0.0.1',
+ $civetweb_bind_port = '8080',
+ $rgw_keystone_version = 'v2.0',
+ $step = hiera('step'),
) {
include ::tripleo::profile::base::ceph
@@ -58,7 +63,8 @@ class tripleo::profile::base::ceph::rgw (
include ::ceph::profile::base
ceph::rgw { $rgw_name:
frontend_type => 'civetweb',
- rgw_frontends => "civetweb port=${civetweb_bind_ip_real}:${civetweb_bind_port}"
+ rgw_frontends => "civetweb port=${civetweb_bind_ip_real}:${civetweb_bind_port}",
+ user => 'ceph',
}
ceph::key { "client.${rgw_name}":
secret => $rgw_key,
@@ -69,11 +75,24 @@ class tripleo::profile::base::ceph::rgw (
}
if $step >= 4 {
- ceph::rgw::keystone { $rgw_name:
- rgw_keystone_accepted_roles => ['admin', '_member_', 'Member'],
- use_pki => false,
- rgw_keystone_admin_token => $keystone_admin_token,
- rgw_keystone_url => $keystone_url,
+ if $rgw_keystone_version == 'v2.0' {
+ ceph::rgw::keystone { $rgw_name:
+ rgw_keystone_accepted_roles => ['admin', '_member_', 'Member'],
+ use_pki => false,
+ rgw_keystone_admin_token => $keystone_admin_token,
+ rgw_keystone_url => $keystone_url,
+ user => 'ceph',
+ }
+ }
+ else
+ {
+ ceph::rgw::keystone { $rgw_name:
+ rgw_keystone_accepted_roles => ['admin', '_member_', 'Member'],
+ use_pki => false,
+ rgw_keystone_url => $keystone_url,
+ rgw_keystone_version => $rgw_keystone_version,
+ user => 'ceph',
+ }
}
}
}
diff --git a/manifests/profile/base/cinder/volume.pp b/manifests/profile/base/cinder/volume.pp
index 64927b6..7663b6f 100644
--- a/manifests/profile/base/cinder/volume.pp
+++ b/manifests/profile/base/cinder/volume.pp
@@ -22,6 +22,10 @@
# (Optional) Whether to enable the delsc backend
# Defaults to true
#
+# [*cinder_enable_hpelefthand_backend*]
+# (Optional) Whether to enable the hpelefthand backend
+# Defaults to false
+#
# [*cinder_enable_eqlx_backend*]
# (Optional) Whether to enable the eqlx backend
# Defaults to true
@@ -52,14 +56,15 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::cinder::volume (
- $cinder_enable_dellsc_backend = false,
- $cinder_enable_eqlx_backend = false,
- $cinder_enable_iscsi_backend = true,
- $cinder_enable_netapp_backend = false,
- $cinder_enable_nfs_backend = false,
- $cinder_enable_rbd_backend = false,
- $cinder_user_enabled_backends = hiera('cinder_user_enabled_backends', undef),
- $step = hiera('step'),
+ $cinder_enable_dellsc_backend = false,
+ $cinder_enable_hpelefthand_backend = false,
+ $cinder_enable_eqlx_backend = false,
+ $cinder_enable_iscsi_backend = true,
+ $cinder_enable_netapp_backend = false,
+ $cinder_enable_nfs_backend = false,
+ $cinder_enable_rbd_backend = false,
+ $cinder_user_enabled_backends = hiera('cinder_user_enabled_backends', undef),
+ $step = hiera('step'),
) {
include ::tripleo::profile::base::cinder
@@ -73,6 +78,13 @@ class tripleo::profile::base::cinder::volume (
$cinder_dellsc_backend_name = undef
}
+ if $cinder_enable_hpelefthand_backend {
+ include ::tripleo::profile::base::cinder::volume::hpelefthand
+ $cinder_hpelefthand_backend_name = hiera('cinder::backend::hpelefthand_iscsi::volume_backend_name', 'tripleo_hpelefthand')
+ } else {
+ $cinder_hpelefthand_backend_name = undef
+ }
+
if $cinder_enable_eqlx_backend {
include ::tripleo::profile::base::cinder::volume::eqlx
$cinder_eqlx_backend_name = hiera('cinder::backend::eqlx::volume_backend_name', 'tripleo_eqlx')
@@ -112,6 +124,7 @@ class tripleo::profile::base::cinder::volume (
$cinder_rbd_backend_name,
$cinder_eqlx_backend_name,
$cinder_dellsc_backend_name,
+ $cinder_hpelefthand_backend_name,
$cinder_netapp_backend_name,
$cinder_nfs_backend_name,
$cinder_user_enabled_backends])
diff --git a/manifests/profile/base/cinder/volume/hpelefthand.pp b/manifests/profile/base/cinder/volume/hpelefthand.pp
new file mode 100644
index 0000000..32f0976
--- /dev/null
+++ b/manifests/profile/base/cinder/volume/hpelefthand.pp
@@ -0,0 +1,71 @@
+# Copyright 2016 Hewlett-Packard Enterprise.
+#
+# 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::cinder::volume::hpelefthand
+#
+# Cinder Volume hpelefthand profile for tripleo
+#
+# === Parameters
+#
+# [*backend_name*]
+# (Optional) Name given to the Cinder backend stanza
+# Defaults to 'tripleo_hpelefthand'
+#
+# [*cinder_hpelefthand_api_url*]
+# (required) url for api access to lefthand - example https://10.x.x.x:8080/api/v1
+#
+# [*cinder_hpelefthand_username*]
+# (required) Username for HPElefthand admin user
+#
+# [*cinder_hpelefthand_password*]
+# (required) Password for hpelefthand_username
+#
+# [*cinder_hpelefthand_iscsi_chap_enabled*]
+# (required) setting to false by default
+#
+# [*cinder_hpelefthand_clustername*]
+# (required) clustername of hpelefthand
+#
+# [*cinder_hpelefthand_debug*]
+# (required) setting to false by default
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::cinder::volume::hpelefthand (
+ $backend_name = hiera('cinder::backend::hpelefthand_iscsi::volume_backend_name', 'tripleo_hpelefthand'),
+ $cinder_hpelefthand_username = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_username', undef),
+ $cinder_hpelefthand_password = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_password', undef),
+ $cinder_hpelefthand_clustername = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_clustername', undef),
+ $cinder_hpelefthand_api_url = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_api_url', undef),
+ $cinder_hpelefthand_iscsi_chap_enabled = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_iscsi_chap_enabled', undef),
+ $cinder_hpelefthand_debug = hiera('cinder::backend::hpelefthand_iscsi::hpelefthand_debug', undef),
+ $step = hiera('step'),
+) {
+ include ::tripleo::profile::base::cinder::volume
+
+ if $step >= 4 {
+ cinder::backend::hpelefthand_iscsi { $backend_name :
+ hpelefthand_username => $cinder_hpelefthand_username,
+ hpelefthand_password => $cinder_hpelefthand_password,
+ hpelefthand_clustername => $cinder_hpelefthand_clustername,
+ hpelefthand_api_url => $cinder_hpelefthand_api_url,
+ hpelefthand_iscsi_chap_enabled => $cinder_hpelefthand_iscsi_chap_enabled,
+ hpelefthand_debug => $cinder_hpelefthand_debug,
+ }
+ }
+
+}
diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp
index a039439..1692108 100644
--- a/manifests/profile/base/database/mysql.pp
+++ b/manifests/profile/base/database/mysql.pp
@@ -66,6 +66,7 @@
# for more details.
# Defaults to hiera('step')
#
+#
class tripleo::profile::base::database::mysql (
$bind_address = $::hostname,
$bootstrap_node = hiera('bootstrap_nodeid', undef),
@@ -178,6 +179,9 @@ class tripleo::profile::base::database::mysql (
include ::nova::db::mysql
include ::nova::db::mysql_api
}
+ if hiera('nova_placement_enabled', false) {
+ include ::nova::db::mysql_placement
+ }
if hiera('sahara_api_enabled', false) {
include ::sahara::db::mysql
}
diff --git a/manifests/profile/base/docker_registry.pp b/manifests/profile/base/docker_registry.pp
new file mode 100644
index 0000000..05a516d
--- /dev/null
+++ b/manifests/profile/base/docker_registry.pp
@@ -0,0 +1,73 @@
+# Copyright 2017 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::docker_registry
+#
+# Docker Registry profile for tripleo
+#
+# === Parameters:
+#
+# [*registry_host*]
+# (String) IP address on which the Docker registry is listening on
+# Defaults to hiera('controller_host')
+#
+# [*registry_port*]
+# (Integer) The port on which the Docker registry is listening on
+# Defaults to 8787
+#
+# [*controller_admin_vip*]
+# (String) VIP of the host
+# Defaults to hiera('controller_admin_vip')
+#
+class tripleo::profile::base::docker_registry (
+ $registry_host = hiera('controller_host'),
+ $registry_port = 8787,
+ $controller_admin_vip = hiera('controller_admin_vip'),
+) {
+ # We want a v2 registry
+ package{'docker-registry':
+ ensure => absent,
+ }
+ package{'docker-distribution': }
+ package{'docker': }
+ file { '/etc/docker-distribution/registry/config.yml' :
+ ensure => file,
+ content => template('tripleo/docker_distribution/registry_config.yml.erb'),
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ require => Package['docker-distribution'],
+ notify => Service['docker-distribution'],
+ }
+ file_line { 'docker insecure registry':
+ path => '/etc/sysconfig/docker',
+ line => join ([
+ 'INSECURE_REGISTRY="',
+ '--insecure-registry ', $registry_host, ':', $registry_port, ' ',
+ '--insecure-registry ', $controller_admin_vip, ':', $registry_port, '"']),
+ match => 'INSECURE_REGISTRY=',
+ require => Package['docker'],
+ notify => Service['docker'],
+ }
+ service { 'docker-distribution':
+ ensure => running,
+ enable => true,
+ require => Package['docker-distribution'],
+ }
+ service { 'docker':
+ ensure => running,
+ enable => true,
+ require => Package['docker'],
+ }
+}
diff --git a/manifests/profile/base/etcd.pp b/manifests/profile/base/etcd.pp
new file mode 100644
index 0000000..505e29f
--- /dev/null
+++ b/manifests/profile/base/etcd.pp
@@ -0,0 +1,66 @@
+# 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::etcd
+#
+# etcd profile for tripleo
+#
+# === Parameters
+#
+# [*bind_ip*]
+# (optional) IP to bind etcd service to.
+# Defaults to '127.0.0.1'.
+#
+# [*client_port*]
+# (optional) etcd client listening port.
+# Defaults to '2379'.
+#
+# [*peer_port*]
+# (optional) etcd peer listening port.
+# Defaults to '2380'.
+#
+# [*nodes*]
+# (Optional) Array of host(s) for etcd nodes.
+# Defaults to hiera('etcd_node_ips', []).
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::etcd (
+ $bind_ip = '127.0.0.1',
+ $client_port = '2379',
+ $peer_port = '2380',
+ $nodes = hiera('etcd_node_names', []),
+ $step = hiera('step'),
+) {
+ if $step >= 1 {
+ if count($nodes) > 1 {
+ $cluster_enabled = true
+ } else {
+ $cluster_enabled = false
+ }
+
+ class {'::etcd':
+ listen_client_urls => "http://${bind_ip}:${client_port}",
+ advertise_client_urls => "http://${bind_ip}:${client_port}",
+ listen_peer_urls => "http://${bind_ip}:${peer_port}",
+ initial_advertise_peer_urls => "http://${bind_ip}:${peer_port}",
+ initial_cluster => regsubst($nodes, '.+', "\\0=http://\\0:${peer_port}"),
+ cluster_enabled => $cluster_enabled,
+ proxy => 'off',
+ }
+ }
+}
diff --git a/manifests/profile/base/glance/api.pp b/manifests/profile/base/glance/api.pp
index 5ba7a0b..8945fff 100644
--- a/manifests/profile/base/glance/api.pp
+++ b/manifests/profile/base/glance/api.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
# [*glance_backend*]
# (Optional) Glance backend(s) to use.
# Defaults to downcase(hiera('glance_backend', 'swift'))
@@ -40,6 +44,7 @@
# Defaults to hiera('glance::notify::rabbitmq::rabbit_port', 5672)
class tripleo::profile::base::glance::api (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$glance_nfs_enabled = false,
$step = hiera('step'),
@@ -47,11 +52,17 @@ class tripleo::profile::base::glance::api (
$rabbit_port = hiera('glance::notify::rabbitmq::rabbit_port', 5672),
) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
+
if $step >= 1 and $glance_nfs_enabled {
include ::tripleo::glance::nfs_mount
}
- if $step >= 4 {
+ if $step >= 4 or ($step >= 3 and $sync_db) {
case $glance_backend {
'swift': { $backend_store = 'glance.store.swift.Store' }
'file': { $backend_store = 'glance.store.filesystem.Store' }
@@ -65,7 +76,8 @@ class tripleo::profile::base::glance::api (
include ::glance
include ::glance::config
class { '::glance::api':
- stores => $glance_store,
+ stores => $glance_store,
+ sync_db => $sync_db,
}
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
class { '::glance::notify::rabbitmq' :
diff --git a/manifests/profile/base/glance/registry.pp b/manifests/profile/base/glance/registry.pp
index 9e2be9d..cd40aeb 100644
--- a/manifests/profile/base/glance/registry.pp
+++ b/manifests/profile/base/glance/registry.pp
@@ -19,6 +19,7 @@
# === Parameters
#
# [*bootstrap_node*]
+# DEPRECATED
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
@@ -32,23 +33,16 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::glance::registry (
- $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $bootstrap_node = undef,
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$step = hiera('step'),
) {
- if $::hostname == downcase($bootstrap_node) {
- $sync_db = true
- } else {
- $sync_db = false
- }
- if $step >= 4 or ( $step >= 3 and $sync_db ) {
+ if $step >= 4 {
# TODO: notifications, scrubber, etc.
include ::glance
include ::glance::config
- class { '::glance::registry' :
- sync_db => $sync_db,
- }
+ include ::glance::registry
include ::glance::notify::rabbitmq
include join(['::glance::backend::', $glance_backend])
}
diff --git a/manifests/profile/base/heat.pp b/manifests/profile/base/heat.pp
index c743ce0..6e7e5f6 100644
--- a/manifests/profile/base/heat.pp
+++ b/manifests/profile/base/heat.pp
@@ -59,9 +59,7 @@ class tripleo::profile::base::heat (
manage_user => false,
manage_role => false,
}
- }
- if $step >= 4 {
$rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
class { '::heat' :
notification_driver => $notification_driver,
diff --git a/manifests/profile/base/keystone.pp b/manifests/profile/base/keystone.pp
index 26e7b1f..a388def 100644
--- a/manifests/profile/base/keystone.pp
+++ b/manifests/profile/base/keystone.pp
@@ -236,6 +236,9 @@ class tripleo::profile::base::keystone (
if hiera('nova_api_enabled', false) {
include ::nova::keystone::auth
}
+ if hiera('nova_placement_enabled', false) {
+ include ::nova::keystone::auth_placement
+ }
if hiera('panko_api_enabled', false) {
include ::panko::keystone::auth
}
diff --git a/manifests/profile/base/metrics/collectd.pp b/manifests/profile/base/metrics/collectd.pp
new file mode 100644
index 0000000..0f738d1
--- /dev/null
+++ b/manifests/profile/base/metrics/collectd.pp
@@ -0,0 +1,88 @@
+# == Class: tripleo::profile::base::metrics::collectd
+#
+# Collectd configuration for TripleO
+#
+# === Parameters
+#
+# [*collectd_plugins*]
+# (Optional) List. A list of collectd plugins to configure (the
+# corresponding collectd::plugin::NAME class must exist in the
+# collectd package).
+#
+# [*collectd_server*]
+# (Optional) String. The name or address of a collectd server to
+# which we should send metrics.
+#
+# [*collectd_port*]
+# (Optional) Integer. The port to which we will connect on the
+# collectd server.
+#
+# [*collectd_username*]
+# (Optional) String. Username for authenticating to the remote
+# collectd server.
+#
+# [*collectd_password*]
+# (Optional) String. Password for authenticating to the remote
+# collectd server.
+#
+# [*collectd_securitylevel*]
+# (Optional) String.
+#
+# [*collectd_interface*]
+# (Optional) String. Name of a network interface.
+#
+# [*collectd_graphite_server*]
+# (Optional) String. The name or address of a graphite server to
+# which we should send metrics.
+#
+# [*collectd_graphite_port*]
+# (Optional) Integer. This is the port to which we will connect on
+# the graphite server. Defaults to 2004.
+#
+# [*collectd_graphite_prefix*]
+# (Optional) String. Prefix to add to metric names. Defaults to
+# 'overcloud.'.
+#
+# [*collectd_graphite_protocol*]
+# (Optional) String. One of 'udp' or 'tcp'.
+#
+class tripleo::profile::base::metrics::collectd (
+ $collectd_plugins = [],
+
+ $collectd_server = undef,
+ $collectd_port = 25826,
+ $collectd_username = undef,
+ $collectd_password = undef,
+ $collectd_securitylevel = undef,
+
+ $collectd_graphite_server = undef,
+ $collectd_graphite_port = 2004,
+ $collectd_graphite_prefix = undef,
+ $collectd_graphite_protocol = 'udp'
+) {
+ include ::collectd
+ ::tripleo::profile::base::metrics::collectd::plugin_helper { $collectd_plugins: }
+
+ if ! ($collectd_graphite_protocol in ['udp', 'tcp']) {
+ fail("collectd_graphite_protocol must be one of 'udp' or 'tcp'")
+ }
+
+ if $collectd_server {
+ ::collectd::plugin::network::server { $collectd_server:
+ username => $collectd_username,
+ password => $collectd_password,
+ port => $collectd_port,
+ securitylevel => $collectd_securitylevel,
+ }
+ }
+
+ if $collectd_graphite_server {
+ ::collectd::plugin::write_graphite::carbon { 'openstack_graphite':
+ graphitehost => $collectd_graphite_server,
+ graphiteport => $collectd_graphite_port,
+ graphiteprefix => $collectd_graphite_prefix,
+ protocol => $collectd_graphite_protocol,
+ }
+ }
+}
+
diff --git a/manifests/profile/base/metrics/collectd/plugin_helper.pp b/manifests/profile/base/metrics/collectd/plugin_helper.pp
new file mode 100644
index 0000000..b624ee1
--- /dev/null
+++ b/manifests/profile/base/metrics/collectd/plugin_helper.pp
@@ -0,0 +1,6 @@
+# We use this to transform a list of unqualified plugin names
+# (like ['disk', 'ntpd']) into the correct collectd plugin classes.
+define tripleo::profile::base::metrics::collectd::plugin_helper (
+) {
+ include "collectd::plugin::${title}"
+}
diff --git a/manifests/profile/base/neutron/agents/ovn.pp b/manifests/profile/base/neutron/agents/ovn.pp
index 443b164..a593092 100644
--- a/manifests/profile/base/neutron/agents/ovn.pp
+++ b/manifests/profile/base/neutron/agents/ovn.pp
@@ -17,7 +17,12 @@
# OVN Neutron agent profile for tripleo
#
# [*ovn_db_host*]
-# The IP-Address/Hostname where OVN DBs are deployed
+# (Optional) The IP-Address where OVN DBs are listening.
+# Defaults to hiera('ovn_dbs_vip')
+#
+# [*ovn_sbdb_port*]
+# (Optional) Port number on which southbound database is listening
+# Defaults to hiera('ovn::southbound::port')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -25,14 +30,13 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::agents::ovn (
- $ovn_db_host,
- $step = hiera('step')
+ $ovn_db_host = hiera('ovn_dbs_vip'),
+ $ovn_sbdb_port = hiera('ovn::southbound::port'),
+ $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/opendaylight.pp b/manifests/profile/base/neutron/opendaylight.pp
index a3f46ec..556fe63 100644
--- a/manifests/profile/base/neutron/opendaylight.pp
+++ b/manifests/profile/base/neutron/opendaylight.pp
@@ -22,24 +22,19 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
-# [*primary_controller*]
-# (Optional) The hostname of the first controller
+# [*primary_node*]
+# (Optional) The hostname of the first node of this role type
# Defaults to hiera('bootstrap_nodeid', undef)
#
class tripleo::profile::base::neutron::opendaylight (
- $step = hiera('step'),
- $primary_controller = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
+ $primary_node = 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 $primary_controller == downcase($::hostname) {
+ # Configure ODL only on first node of the role where this service is
+ # applied
+ if $primary_node == downcase($::hostname) {
include ::opendaylight
}
}
diff --git a/manifests/profile/base/neutron/ovn_northd.pp b/manifests/profile/base/neutron/ovn_northd.pp
new file mode 100644
index 0000000..0b46d5c
--- /dev/null
+++ b/manifests/profile/base/neutron/ovn_northd.pp
@@ -0,0 +1,40 @@
+# 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 northd 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')
+#
+class tripleo::profile::base::neutron::ovn_northd (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $step = hiera('step'),
+) {
+ if $step >= 4 {
+ # Note this only runs on the first node in the cluster when
+ # deployed on a role where multiple nodes exist.
+ if $::hostname == downcase($bootstrap_node) {
+ include ::ovn::northd
+ }
+ }
+}
+
diff --git a/manifests/profile/base/neutron/plugins/ml2.pp b/manifests/profile/base/neutron/plugins/ml2.pp
index 4f4de0b..52d4ca1 100644
--- a/manifests/profile/base/neutron/plugins/ml2.pp
+++ b/manifests/profile/base/neutron/plugins/ml2.pp
@@ -64,12 +64,22 @@ class tripleo::profile::base::neutron::plugins::ml2 (
include ::neutron::plugins::ml2::bigswitch::restproxy
}
- if 'opendaylight' in $mechanism_drivers {
+ if ('opendaylight' in $mechanism_drivers) or ('opendaylight_v2' in $mechanism_drivers) {
include ::tripleo::profile::base::neutron::plugins::ml2::opendaylight
}
if 'ovn' in $mechanism_drivers {
include ::tripleo::profile::base::neutron::plugins::ml2::ovn
}
+
+ if 'fujitsu_cfab' in $mechanism_drivers {
+ include ::neutron::plugins::ml2::fujitsu
+ include ::neutron::plugins::ml2::fujitsu::cfab
+ }
+
+ if 'fujitsu_fossw' in $mechanism_drivers {
+ include ::neutron::plugins::ml2::fujitsu
+ include ::neutron::plugins::ml2::fujitsu::fossw
+ }
}
}
diff --git a/manifests/profile/base/neutron/plugins/ml2/ovn.pp b/manifests/profile/base/neutron/plugins/ml2/ovn.pp
index 46477a7..b5b7a0a 100644
--- a/manifests/profile/base/neutron/plugins/ml2/ovn.pp
+++ b/manifests/profile/base/neutron/plugins/ml2/ovn.pp
@@ -17,7 +17,16 @@
# OVN Neutron ML2 profile for tripleo
#
# [*ovn_db_host*]
-# The IP-Address/Hostname where OVN DBs are deployed
+# The IP-Address where OVN DBs are listening.
+# Defaults to hiera('ovn_dbs_vip')
+#
+# [*ovn_nb_port*]
+# (Optional) Port number on which northbound database is listening
+# Defaults to hiera('ovn::northbound::port')
+#
+# [*ovn_sb_port*]
+# (Optional) Port number on which southbound database is listening
+# Defaults to hiera('ovn::southbound::port')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -25,18 +34,12 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::neutron::plugins::ml2::ovn (
- $ovn_db_host,
- $step = hiera('step')
+ $ovn_db_host = hiera('ovn_dbs_vip'),
+ $ovn_nb_port = hiera('ovn::northbound::port'),
+ $ovn_sb_port = hiera('ovn::southbound::port'),
+ $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/nova.pp b/manifests/profile/base/nova.pp
index 7f1c862..dae627c 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -30,6 +30,30 @@
# (Optional) Whether or not manage Nova Live migration
# Defaults to false
#
+# [*messaging_driver*]
+# Driver for messaging service.
+# Defaults to hiera('messaging_service_name', 'rabbit')
+#
+# [*messaging_hosts*]
+# list of the messaging host fqdns
+# Defaults to hiera('rabbitmq_node_names')
+#
+# [*messaging_password*]
+# Password for messaging nova queue
+# Defaults to hiera('nova::rabbit_password')
+#
+# [*messaging_port*]
+# IP port for messaging service
+# Defaults to hiera('nova::rabbit_port', 5672)
+#
+# [*messaging_username*]
+# Username for messaging nova queue
+# Defaults to hiera('nova::rabbit_userid', 'guest')
+#
+# [*messaging_use_ssl*]
+# Flag indicating ssl usage.
+# Defaults to hiera('nova::rabbit_use_ssl', '0')
+#
# [*nova_compute_enabled*]
# (Optional) Whether or not nova-compute is enabled.
# Defaults to false
@@ -38,22 +62,18 @@
# (Optional) The current step of the deployment
# Defaults to hiera('step')
#
-# [*rabbit_hosts*]
-# list of the rabbbit host fqdns
-# Defaults to hiera('rabbitmq_node_names')
-#
-# [*rabbit_port*]
-# IP port for rabbitmq service
-# Defaults to hiera('nova::rabbit_port', 5672)
-
class tripleo::profile::base::nova (
$bootstrap_node = hiera('bootstrap_nodeid', undef),
$libvirt_enabled = false,
$manage_migration = false,
+ $messaging_driver = hiera('messaging_service_name', 'rabbit'),
+ $messaging_hosts = any2array(hiera('rabbitmq_node_names', undef)),
+ $messaging_password = hiera('nova::rabbit_password'),
+ $messaging_port = hiera('nova::rabbit_port', '5672'),
+ $messaging_username = hiera('nova::rabbit_userid', 'guest'),
+ $messaging_use_ssl = hiera('nova::rabbit_use_ssl', '0'),
$nova_compute_enabled = false,
$step = hiera('step'),
- $rabbit_hosts = hiera('rabbitmq_node_names', undef),
- $rabbit_port = hiera('nova::rabbit_port', 5672),
) {
if $::hostname == downcase($bootstrap_node) {
$sync_db = true
@@ -67,10 +87,19 @@ class tripleo::profile::base::nova (
$memcache_servers = suffix(hiera('memcached_node_ips'), ':11211')
}
- if hiera('step') >= 4 or (hiera('step') >= 3 and $sync_db) {
- $rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
+ if $step >= 4 or ($step >= 3 and $sync_db) {
+ $messaging_use_ssl_real = sprintf('%s', bool2num(str2bool($messaging_use_ssl)))
+ # TODO(ccamacho): remove sprintf once we properly type the port, needs
+ # to be a string for the os_transport_url function.
class { '::nova' :
- rabbit_hosts => $rabbit_endpoints,
+ default_transport_url => os_transport_url({
+ 'transport' => $messaging_driver,
+ 'hosts' => $messaging_hosts,
+ 'port' => sprintf('%s', $messaging_port),
+ 'username' => $messaging_username,
+ 'password' => $messaging_password,
+ 'ssl' => $messaging_use_ssl_real,
+ }),
}
include ::nova::config
class { '::nova::cache':
diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp
index e660990..8ded3ef 100644
--- a/manifests/profile/base/nova/api.pp
+++ b/manifests/profile/base/nova/api.pp
@@ -85,6 +85,27 @@ class tripleo::profile::base::nova::api (
$tls_keyfile = undef
}
+ if ($step >= 3 and $sync_db) {
+ $messaging_hosts_real = any2array($::tripleo::profile::base::nova::messaging_hosts)
+ # TODO(aschultz): remove sprintf once we properly type the port, needs
+ # to be a string for the os_transport_url function.
+ $messaging_port_real = sprintf('%s', $::tripleo::profile::base::nova::messaging_port)
+ $messaging_use_ssl_real = sprintf('%s', bool2num(str2bool($::tripleo::profile::base::nova::messaging_use_ssl)))
+
+ #TODO(emilien): enable it again when it's fixed upstream in nova
+ # https://bugs.launchpad.net/tripleo/+bug/1649341
+ # class { '::nova::db::sync_cell_v2':
+ # transport_url => os_transport_url({
+ # 'transport' => $::tripleo::profile::base::nova::messaging_driver,
+ # 'hosts' => $messaging_hosts_real,
+ # 'port' => $messaging_port_real,
+ # 'username' => $::tripleo::profile::base::nova::messaging_username,
+ # 'password' => $::tripleo::profile::base::nova::messaging_password,
+ # 'ssl' => $messaging_use_ssl_real,
+ # }),
+ # }
+ }
+
if $step >= 4 or ($step >= 3 and $sync_db) {
if hiera('nova::use_ipv6', false) {
@@ -101,7 +122,7 @@ class tripleo::profile::base::nova::api (
sync_db => $sync_db,
sync_db_api => $sync_db,
}
- class { '::nova::wsgi::apache':
+ class { '::nova::wsgi::apache_api':
ssl_cert => $tls_certfile,
ssl_key => $tls_keyfile,
}
diff --git a/manifests/profile/base/nova/compute/libvirt.pp b/manifests/profile/base/nova/compute/libvirt.pp
index 956f8ad..6767f6b 100644
--- a/manifests/profile/base/nova/compute/libvirt.pp
+++ b/manifests/profile/base/nova/compute/libvirt.pp
@@ -60,6 +60,8 @@ class tripleo::profile::base::nova::compute::libvirt (
}
}
+ include ::nova::compute::libvirt::qemu
+
}
}
diff --git a/manifests/profile/base/nova/placement.pp b/manifests/profile/base/nova/placement.pp
new file mode 100644
index 0000000..7edd4e8
--- /dev/null
+++ b/manifests/profile/base/nova/placement.pp
@@ -0,0 +1,98 @@
+# 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::nova::placement
+#
+# Nova Placement API profile for tripleo
+#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('bootstrap_nodeid')
+#
+# [*certificates_specs*]
+# (Optional) The specifications to give to certmonger for the certificate(s)
+# it will create.
+# Example with hiera:
+# apache_certificates_specs:
+# httpd-internal_api:
+# hostname: <overcloud controller fqdn>
+# service_certificate: <service certificate path>
+# service_key: <service key path>
+# principal: "haproxy/<overcloud controller fqdn>"
+# Defaults to hiera('apache_certificate_specs', {}).
+#
+# [*enable_internal_tls*]
+# (Optional) Whether TLS in the internal network is enabled or not.
+# Defaults to hiera('enable_internal_tls', false)
+#
+# [*generate_service_certificates*]
+# (Optional) Whether or not certmonger will generate certificates for
+# HAProxy. This could be as many as specified by the $certificates_specs
+# variable.
+# Note that this doesn't configure the certificates in haproxy, it merely
+# creates the certificates.
+# Defaults to hiera('generate_service_certificate', false).
+#
+# [*nova_placement_network*]
+# (Optional) The network name where the nova placement endpoint is listening on.
+# This is set by t-h-t.
+# Defaults to hiera('nova_placement_network', undef)
+#
+# [*step*]
+# (Optional) The current step in deployment. See tripleo-heat-templates
+# for more details.
+# Defaults to hiera('step')
+#
+class tripleo::profile::base::nova::placement (
+ $bootstrap_node = hiera('bootstrap_nodeid', undef),
+ $certificates_specs = hiera('apache_certificates_specs', {}),
+ $enable_internal_tls = hiera('enable_internal_tls', false),
+ $generate_service_certificates = hiera('generate_service_certificates', false),
+ $nova_placement_network = hiera('nova_placement_network', undef),
+ $step = hiera('step'),
+) {
+ if $::hostname == downcase($bootstrap_node) {
+ $sync_db = true
+ } else {
+ $sync_db = false
+ }
+
+ include ::tripleo::profile::base::nova
+
+ if $enable_internal_tls {
+ if $generate_service_certificates {
+ ensure_resources('tripleo::certmonger::httpd', $certificates_specs)
+ }
+
+ if !$nova_placement_network {
+ fail('nova_placement_network is not set in the hieradata.')
+ }
+ $tls_certfile = $certificates_specs["httpd-${nova_placement_network}"]['service_certificate']
+ $tls_keyfile = $certificates_specs["httpd-${nova_placement_network}"]['service_key']
+ } else {
+ $tls_certfile = undef
+ $tls_keyfile = undef
+ }
+
+ if $step >= 4 {
+ include ::nova::placement
+
+ class { '::nova::wsgi::apache_placement':
+ ssl_cert => $tls_certfile,
+ ssl_key => $tls_keyfile,
+ }
+ }
+
+}
+
diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp
index cc5fd8a..671f1e7 100644
--- a/manifests/profile/base/pacemaker.pp
+++ b/manifests/profile/base/pacemaker.pp
@@ -31,7 +31,7 @@ class tripleo::profile::base::pacemaker (
try_sleep => 3,
}
- if $::hostname == downcase(hiera('bootstrap_nodeid')) {
+ if $::hostname == downcase(hiera('pacemaker_short_bootstrap_node_name')) {
$pacemaker_master = true
} else {
$pacemaker_master = false
@@ -40,7 +40,8 @@ class tripleo::profile::base::pacemaker (
$enable_fencing = str2bool(hiera('enable_fencing', false)) and $step >= 5
if $step >= 1 {
- $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G'))
+ $pacemaker_short_node_names = join(hiera('pacemaker_short_node_names'), ',')
+ $pacemaker_cluster_members = downcase(regsubst($pacemaker_short_node_names, ',', ' ', 'G'))
$corosync_ipv6 = str2bool(hiera('corosync_ipv6', false))
if $corosync_ipv6 {
$cluster_setup_extras = { '--token' => hiera('corosync_token_timeout', 1000), '--ipv6' => '' }
diff --git a/manifests/profile/base/panko.pp b/manifests/profile/base/panko.pp
index 4abed56..880cf7d 100644
--- a/manifests/profile/base/panko.pp
+++ b/manifests/profile/base/panko.pp
@@ -40,6 +40,7 @@ class tripleo::profile::base::panko (
if $step >= 4 or ($step >= 3 and $sync_db) {
include ::panko
+ include ::panko::db
include ::panko::config
include ::panko::db::sync
}
diff --git a/manifests/profile/base/sshd.pp b/manifests/profile/base/sshd.pp
new file mode 100644
index 0000000..e7916c1
--- /dev/null
+++ b/manifests/profile/base/sshd.pp
@@ -0,0 +1,61 @@
+# 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::profile::base::sshd
+#
+# SSH profile for tripleo
+#
+# === Parameters
+#
+# [*bannertext*]
+# The text used within SSH Banner
+# Defaults to hiera('BannerText')
+#
+class tripleo::profile::base::sshd (
+ $bannertext = hiera('BannerText', undef),
+) {
+
+ if $bannertext {
+ $action = 'set'
+ } else {
+ $action = 'rm'
+ }
+
+ package {'openssh-server':
+ ensure => installed,
+ }
+
+ augeas { 'sshd_config_banner':
+ context => '/files/etc/ssh/sshd_config',
+ changes => [ "${action} Banner /etc/issue" ],
+ notify => Service['sshd']
+ }
+
+ file { '/etc/issue':
+ ensure => file,
+ backup => false,
+ content => $bannertext,
+ owner => 'root',
+ group => 'root',
+ mode => '0600'
+ }
+
+ service { 'sshd':
+ ensure => 'running',
+ enable => true,
+ hasstatus => false,
+ require => Package['openssh-server'],
+ }
+}
diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index 974a725..5bd75bd 100644
--- a/manifests/profile/base/swift/proxy.pp
+++ b/manifests/profile/base/swift/proxy.pp
@@ -37,14 +37,19 @@
#
# [*rabbit_port*]
# IP port for rabbitmq service
-# Defaults to hiera('swift::proxy::ceilometer::rabbit_port', 5672)
+# Defaults to 5672
+#
+# [*ceilometer_enabled*]
+# Whether the ceilometer pipeline is enabled.
+# Defaults to true
#
class tripleo::profile::base::swift::proxy (
- $step = hiera('step'),
- $memcache_servers = hiera('memcached_node_ips'),
- $memcache_port = 11211,
- $rabbit_hosts = hiera('rabbitmq_node_names', undef),
- $rabbit_port = hiera('swift::proxy::ceilometer::rabbit_port', 5672),
+ $step = hiera('step'),
+ $memcache_servers = hiera('memcached_node_ips'),
+ $memcache_port = 11211,
+ $rabbit_hosts = hiera('rabbitmq_node_names', undef),
+ $rabbit_port = 5672,
+ $ceilometer_enabled = true,
) {
if $step >= 4 {
$swift_memcache_servers = suffix(any2array(normalize_ip_for_uri($memcache_servers)), ":${memcache_port}")
@@ -64,8 +69,10 @@ class tripleo::profile::base::swift::proxy (
include ::swift::proxy::formpost
include ::swift::proxy::bulk
$swift_rabbit_hosts = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
- class { '::swift::proxy::ceilometer':
- rabbit_hosts => $swift_rabbit_hosts,
+ if $ceilometer_enabled {
+ class { '::swift::proxy::ceilometer':
+ rabbit_hosts => $swift_rabbit_hosts,
+ }
}
include ::swift::proxy::versioned_writes
include ::swift::proxy::slo
@@ -73,5 +80,9 @@ class tripleo::profile::base::swift::proxy (
include ::swift::proxy::copy
include ::swift::proxy::container_quotas
include ::swift::proxy::account_quotas
+
+ class { '::swift::objectexpirer':
+ memcache_servers => $swift_memcache_servers
+ }
}
}
diff --git a/manifests/profile/base/swift/storage.pp b/manifests/profile/base/swift/storage.pp
index 568be66..5018d77 100644
--- a/manifests/profile/base/swift/storage.pp
+++ b/manifests/profile/base/swift/storage.pp
@@ -34,8 +34,10 @@ class tripleo::profile::base::swift::storage (
) {
if $step >= 4 {
if $enable_swift_storage {
+ include ::swift
include ::swift::config
include ::swift::storage::disks
+ include ::swift::storage::loopbacks
include ::swift::storage::all
if(!defined(File['/srv/node'])) {
file { '/srv/node':
diff --git a/manifests/profile/base/time/ntp.pp b/manifests/profile/base/time/ntp.pp
new file mode 100644
index 0000000..c6ce309
--- /dev/null
+++ b/manifests/profile/base/time/ntp.pp
@@ -0,0 +1,28 @@
+# Copyright 2017 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::profile::base::ntp
+#
+# Enable NTP via composable services.
+#
+
+class tripleo::profile::base::time::ntp {
+ # if installed, we don't want chrony to conflict with ntp.
+ package { 'chrony':
+ ensure => 'purged',
+ before => Service['ntp'],
+ }
+ include ::ntp
+}
diff --git a/manifests/profile/pacemaker/cinder/backup.pp b/manifests/profile/pacemaker/cinder/backup.pp
index 63988d6..4e33a34 100644
--- a/manifests/profile/pacemaker/cinder/backup.pp
+++ b/manifests/profile/pacemaker/cinder/backup.pp
@@ -20,7 +20,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('cinder_backup_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -28,7 +28,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::cinder::backup (
- $bootstrap_node = hiera('bootstrap_nodeid'),
+ $bootstrap_node = hiera('cinder_backup_short_bootstrap_node_name'),
$step = hiera('step'),
) {
diff --git a/manifests/profile/pacemaker/cinder/volume.pp b/manifests/profile/pacemaker/cinder/volume.pp
index 46e8b79..b03a1f4 100644
--- a/manifests/profile/pacemaker/cinder/volume.pp
+++ b/manifests/profile/pacemaker/cinder/volume.pp
@@ -20,7 +20,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('cinder_volume_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -28,7 +28,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::cinder::volume (
- $bootstrap_node = hiera('bootstrap_nodeid'),
+ $bootstrap_node = hiera('cinder_volume_short_bootstrap_node_name'),
$step = hiera('step'),
) {
Service <| tag == 'cinder::volume' |> {
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index edd09bd..3506cb1 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*bootstrap_node*]
+# (Optional) The hostname of the node responsible for bootstrapping tasks
+# Defaults to hiera('mysql_short_bootstrap_node_name')
+#
# [*bind_address*]
# (Optional) The address that the local mysql instance should bind to.
# Defaults to $::hostname
@@ -33,11 +37,12 @@
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::database::mysql (
+ $bootstrap_node = hiera('mysql_short_bootstrap_node_name'),
$bind_address = $::hostname,
$gmcast_listen_addr = hiera('mysql_bind_host'),
$step = hiera('step'),
) {
- if $::hostname == downcase(hiera('bootstrap_nodeid')) {
+ if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
} else {
$pacemaker_master = false
@@ -100,6 +105,7 @@ class tripleo::profile::pacemaker::database::mysql (
}
class { '::tripleo::profile::base::database::mysql':
+ bootstrap_node => $bootstrap_node,
manage_resources => false,
remove_default_accounts => $remove_default_accounts,
mysql_server_options => $mysqld_options,
diff --git a/manifests/profile/pacemaker/database/redis.pp b/manifests/profile/pacemaker/database/redis.pp
index 37c36aa..7490fa0 100644
--- a/manifests/profile/pacemaker/database/redis.pp
+++ b/manifests/profile/pacemaker/database/redis.pp
@@ -20,7 +20,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('redis_short_bootstrap_node_name')
#
# [*enable_load_balancer*]
# (Optional) Whether load balancing is enabled for this cluster
@@ -37,7 +37,7 @@
# or 10240 (default in redis systemd limits)
#
class tripleo::profile::pacemaker::database::redis (
- $bootstrap_node = hiera('bootstrap_nodeid'),
+ $bootstrap_node = hiera('redis_short_bootstrap_node_name'),
$enable_load_balancer = hiera('enable_load_balancer', true),
$step = hiera('step'),
$redis_file_limit = hiera('redis_file_limit', 10240),
diff --git a/manifests/profile/pacemaker/haproxy.pp b/manifests/profile/pacemaker/haproxy.pp
index 605bb15..b326761 100644
--- a/manifests/profile/pacemaker/haproxy.pp
+++ b/manifests/profile/pacemaker/haproxy.pp
@@ -20,7 +20,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('haproxy_short_bootstrap_node_name')
#
# [*enable_load_balancer*]
# (Optional) Whether load balancing is enabled for this cluster
@@ -32,7 +32,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::haproxy (
- $bootstrap_node = hiera('bootstrap_nodeid'),
+ $bootstrap_node = hiera('haproxy_short_bootstrap_node_name'),
$enable_load_balancer = hiera('enable_load_balancer', true),
$step = hiera('step'),
) {
diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp
index 8d6c2a7..547a86f 100644
--- a/manifests/profile/pacemaker/manila.pp
+++ b/manifests/profile/pacemaker/manila.pp
@@ -30,9 +30,15 @@
# (Optional) Whether or not the cephfs backend is enabled
# Defaults to hiera('manila_backend_cephfs_enabled', false)
#
+# [*ceph_mds_enabled*]
+# (Optional) Whether or not the ceph mds is enabled. This option is used
+# to distinguish if an external ceph is used or if ceph is deployed by
+# tripleo. By default ceph mds is not deployed by tripleo.
+# Defaults to hiera('ceph_mds_enabled', false)
+#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('manila_share_short_bootstrap_node_name')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@@ -43,7 +49,8 @@ class tripleo::profile::pacemaker::manila (
$backend_generic_enabled = hiera('manila_backend_generic_enabled', false),
$backend_netapp_enabled = hiera('manila_backend_netapp_enabled', false),
$backend_cephfs_enabled = hiera('manila_backend_cephfs_enabled', false),
- $bootstrap_node = hiera('bootstrap_nodeid'),
+ $ceph_mds_enabled = hiera('ceph_mds_enabled', false),
+ $bootstrap_node = hiera('manila_share_short_bootstrap_node_name'),
$step = hiera('step'),
) {
if $::hostname == downcase($bootstrap_node) {
@@ -61,8 +68,6 @@ class tripleo::profile::pacemaker::manila (
stop => '/bin/true',
}
- include ::tripleo::profile::base::manila::api
- include ::tripleo::profile::base::manila::scheduler
include ::tripleo::profile::base::manila::share
if $step >= 4 {
@@ -97,14 +102,42 @@ class tripleo::profile::pacemaker::manila (
# manila cephfsnative:
if $backend_cephfs_enabled {
$manila_cephfsnative_backend = hiera('manila::backend::cephfsnative::title')
+ $cephfs_auth_id = hiera('manila::backend::cephfsnative::cephfs_auth_id')
+ $keyring_path = "/etc/ceph/ceph.client.${cephfs_auth_id}.keyring"
+
+ # $ceph_mds_enabled is used to distinguish if an external ceph is used or
+ # if ceph is deployed by TripleO
+ if $ceph_mds_enabled {
+ include ::ceph::profile::fs
+ }
+
manila::backend::cephfsnative { $manila_cephfsnative_backend :
driver_handles_share_servers => hiera('manila::backend::cephfsnative::driver_handles_share_servers', false),
share_backend_name => hiera('manila::backend::cephfsnative::share_backend_name'),
cephfs_conf_path => hiera('manila::backend::cephfsnative::cephfs_conf_path'),
- cephfs_auth_id => hiera('manila::backend::cephfsnative::cephfs_auth_id'),
+ cephfs_auth_id => $cephfs_auth_id,
cephfs_cluster_name => hiera('manila::backend::cephfsnative::cephfs_cluster_name'),
cephfs_enable_snapshots => hiera('manila::backend::cephfsnative::cephfs_enable_snapshots'),
}
+
+ ceph::key { "client.${cephfs_auth_id}" :
+ secret => hiera('manila::backend::cephfsnative::ceph_client_key'),
+ keyring_path => $keyring_path,
+ # inject the new key into ceph cluster only if ceph is deployed by
+ # tripleo (if external ceph is used it should be added manually)
+ inject => $ceph_mds_enabled,
+ user => 'manila',
+ cap_mds => 'allow *',
+ cap_mon => 'allow r, allow command \"auth del\", allow command \"auth caps\", \
+allow command \"auth get\", allow command \"auth get-or-create\"',
+ cap_osd => 'allow rw'
+ }
+
+ ceph_config {
+ "client.${cephfs_auth_id}/keyring": value => $keyring_path;
+ "client.${cephfs_auth_id}/client mount uid": value => 0;
+ "client.${cephfs_auth_id}/client mount gid": value => 0;
+ }
}
# manila netapp:
diff --git a/manifests/profile/pacemaker/rabbitmq.pp b/manifests/profile/pacemaker/rabbitmq.pp
index dba01e3..85ebe34 100644
--- a/manifests/profile/pacemaker/rabbitmq.pp
+++ b/manifests/profile/pacemaker/rabbitmq.pp
@@ -20,7 +20,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
-# Defaults to hiera('bootstrap_nodeid')
+# Defaults to hiera('rabbitmq_short_bootstrap_node_name')
#
# [*erlang_cookie*]
# (Optional) Content of erlang cookie.
@@ -42,7 +42,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::pacemaker::rabbitmq (
- $bootstrap_node = hiera('bootstrap_nodeid'),
+ $bootstrap_node = hiera('rabbitmq_short_bootstrap_node_name'),
$erlang_cookie = hiera('rabbitmq::erlang_cookie'),
$user_ha_queues = hiera('rabbitmq::nr_ha_queues', 0),
$rabbit_nodes = hiera('rabbitmq_node_names'),