aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.fixtures.yml3
-rw-r--r--manifests/certmonger/haproxy.pp10
-rw-r--r--manifests/haproxy.pp37
-rw-r--r--manifests/network/contrail/analytics.pp109
-rw-r--r--manifests/network/contrail/config.pp120
-rw-r--r--manifests/network/contrail/control.pp85
-rw-r--r--manifests/network/contrail/database.pp15
-rw-r--r--manifests/network/contrail/webui.pp78
-rw-r--r--manifests/profile/base/database/mongodb.pp7
-rw-r--r--manifests/profile/base/haproxy.pp3
-rw-r--r--manifests/profile/base/swift/add_devices.pp5
-rw-r--r--manifests/profile/base/swift/proxy.pp2
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp2
-rw-r--r--manifests/profile/pacemaker/manila.pp170
-rw-r--r--metadata.json2
-rw-r--r--spec/classes/tripleo_profile_base_swift_proxy_spec.rb89
16 files changed, 413 insertions, 324 deletions
diff --git a/.fixtures.yml b/.fixtures.yml
index 9e8eb3b..fae4a8c 100644
--- a/.fixtures.yml
+++ b/.fixtures.yml
@@ -4,6 +4,9 @@ fixtures:
'stdlib': 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
'haproxy': 'git://github.com/puppetlabs/puppetlabs-haproxy.git'
'concat': 'git://github.com/puppetlabs/puppetlabs-concat.git'
+ 'openstacklib': 'git://github.com/openstack/puppet-openstacklib.git'
+ 'swift': 'git://github.com/openstack/puppet-swift.git'
+ 'memcached': 'git://github.com/saz/puppet-memcached.git'
'midonet':
repo: 'git://github.com/midonet/puppet-midonet.git'
ref: 'v2015.06.7'
diff --git a/manifests/certmonger/haproxy.pp b/manifests/certmonger/haproxy.pp
index 0168227..504acf3 100644
--- a/manifests/certmonger/haproxy.pp
+++ b/manifests/certmonger/haproxy.pp
@@ -47,6 +47,7 @@ define tripleo::certmonger::haproxy (
$postsave_cmd,
$principal = undef,
){
+ include ::haproxy::params
certmonger_certificate { "${title}-cert":
hostname => $hostname,
dnsname => $hostname,
@@ -56,10 +57,11 @@ define tripleo::certmonger::haproxy (
principal => $principal,
}
concat { $service_pem :
- ensure => present,
- mode => '0640',
- owner => 'haproxy',
- group => 'haproxy',
+ ensure => present,
+ mode => '0640',
+ owner => 'haproxy',
+ group => 'haproxy',
+ require => Package[$::haproxy::params::package_name],
}
concat::fragment { "${title}-cert-fragment":
target => $service_pem,
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 6044eba..6a81731 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -155,7 +155,7 @@
#
# [*nova_novncproxy*]
# (optional) Enable or not Nova novncproxy binding
-# Defaults to hiera('nova_vncproxy_enabled', false)
+# Defaults to hiera('nova_vnc_proxy_enabled', false)
#
# [*ceilometer*]
# (optional) Enable or not Ceilometer API binding
@@ -238,6 +238,10 @@
# (optional) Enable or not OpenDaylight binding
# Defaults to hiera('opendaylight_api_enabled', false)
#
+# [*zaqar_ws*]
+# (optional) Enable or not Zaqar Websockets binding
+# Defaults to false
+#
# [*service_ports*]
# (optional) Hash that contains the values to override from the service ports
# The available keys to modify the services' ports are:
@@ -287,6 +291,10 @@
# 'zaqar_api_ssl_port' (Defaults to 13888)
# 'ceph_rgw_port' (Defaults to 8080)
# 'ceph_rgw_ssl_port' (Defaults to 13808)
+# 'zaqar_ws_port' (Defaults to 9000)
+# 'zaqar_ws_ssl_port' (Defaults to 9000)
+# * Note that for zaqar's websockets we don't support having a different
+# port for SSL, because it ignores the handshake.
# Defaults to {}
#
class tripleo::haproxy (
@@ -320,7 +328,7 @@ class tripleo::haproxy (
$glance_registry = hiera('glance_registry_enabled', false),
$nova_osapi = hiera('nova_api_enabled', false),
$nova_metadata = hiera('nova_api_enabled', false),
- $nova_novncproxy = hiera('nova_vncproxy_enabled', false),
+ $nova_novncproxy = hiera('nova_vnc_proxy_enabled', false),
$ceilometer = hiera('ceilometer_api_enabled', false),
$aodh = hiera('aodh_api_enabled', false),
$gnocchi = hiera('gnocchi_api_enabled', false),
@@ -341,6 +349,7 @@ class tripleo::haproxy (
$zaqar_api = hiera('zaqar_api_enabled', false),
$ceph_rgw = hiera('ceph_rgw_enabled', false),
$opendaylight = hiera('opendaylight_api_enabled', false),
+ $zaqar_ws = hiera('zaqar_api_enabled', false),
$service_ports = {}
) {
$default_service_ports = {
@@ -390,6 +399,8 @@ class tripleo::haproxy (
zaqar_api_ssl_port => 13888,
ceph_rgw_port => 8080,
ceph_rgw_ssl_port => 13808,
+ zaqar_ws_port => 9000,
+ zaqar_ws_ssl_port => 9000,
}
$ports = merge($default_service_ports, $service_ports)
@@ -982,4 +993,26 @@ class tripleo::haproxy (
options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
}
}
+
+ if $zaqar_ws {
+ ::tripleo::haproxy::endpoint { 'zaqar_ws':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('zaqar_ws_vip', $controller_virtual_ip),
+ service_port => $ports[zaqar_ws_port],
+ ip_addresses => hiera('zaqar_ws_node_ips', $controller_hosts_real),
+ server_names => $controller_hosts_names_real,
+ mode => 'http',
+ haproxy_listen_bind_param => [], # We don't use a transparent proxy here
+ listen_options => {
+ # NOTE(jaosorior): Websockets have more overhead in establishing
+ # connections than regular HTTP connections. Also, since it begins
+ # as an HTTP connection and then "upgrades" to a TCP connection, some
+ # timeouts get overriden by others at certain times of the connection.
+ # The following values were taken from the following site:
+ # http://blog.haproxy.com/2012/11/07/websockets-load-balancing-with-haproxy/
+ 'timeout' => ['connect 5s', 'client 25s', 'server 25s', 'tunnel 3600s'],
+ },
+ public_ssl_port => $ports[zaqar_ws_ssl_port],
+ }
+ }
}
diff --git a/manifests/network/contrail/analytics.pp b/manifests/network/contrail/analytics.pp
index 57fd815..4359a43 100644
--- a/manifests/network/contrail/analytics.pp
+++ b/manifests/network/contrail/analytics.pp
@@ -19,129 +19,138 @@
#
# == Parameters:
#
+# [*host_ip*]
+# (required) host IP address of Analytics
+# String (IPv4) value.
+#
# [*admin_password*]
-# (required) admin password
+# (optional) admin password
# String value.
+# Defaults to hiera('contrail::admin_password')
#
# [*admin_tenant_name*]
-# (required) admin tenant name.
+# (optional) admin tenant name.
# String value.
+# Defaults to hiera('contrail::admin_tenant_name')
#
# [*admin_token*]
-# (required) admin token
+# (optional) admin token
# String value.
+# Defaults to hiera('contrail::admin_token')
#
# [*admin_user*]
-# (required) admin user name.
+# (optional) admin user name.
# String value.
+# Defaults to hiera('contrail::admin_user')
#
# [*auth_host*]
-# (required) keystone server ip address
+# (optional) keystone server ip address
# String (IPv4) value.
-#
-# [*cassandra_server_list*]
-# (required) List IPs+port of Cassandra servers
-# Array of strings value.
-#
-# [*disc_server_ip*]
-# (required) IPv4 address of discovery server.
-# String (IPv4) value.
-#
-# [*host_ip*]
-# (required) host IP address of Analytics
-# String (IPv4) value.
-#
-# [*kafka_broker_list*]
-# (required) List IPs+port of kafka servers
-# Array of strings value.
-#
-# [*zk_server_ip*]
-# (required) List IPs+port of Zookeeper servers
-# Array of strings value.
+# Defaults to hiera('contrail::auth_host')
#
# [*auth_port*]
-# (required) keystone port.
+# (optional) keystone port.
# Integer value.
-# Defaults to 35357.
+# Defaults to hiera('contrail::auth_port')
#
# [*auth_protocol*]
-# (required) authentication protocol.
+# (optional) authentication protocol.
# String value.
-# Defaults to http.
+# Defaults to hiera('contrail::auth_protocol')
+#
+# [*cassandra_server_list*]
+# (optional) List IPs+port of Cassandra servers
+# Array of strings value.
+# Defaults to hiera('contrail::cassandra_server_list')
#
# [*collector_http_server_port*]
-# (required) Collector http port
+# (optional) Collector http port
# Integer value.
# Defaults to 8089
#
# [*collector_sandesh_port*]
-# (required) Collector sandesh port
+# (optional) Collector sandesh port
# Integer value.
# Defaults to 8086
#
+# [*disc_server_ip*]
+# (optional) IPv4 address of discovery server.
+# String (IPv4) value.
+# Defaults to hiera('contrail::disc_server_ip')
+#
# [*disc_server_port*]
-# (required) port Discovery server listens on.
+# (optional) port Discovery server listens on.
# Integer value.
-# Defaults to 5998
+# Defaults to hiera('contrail::disc_server_port')
#
# [*http_server_port*]
-# (required) Analytics http port
+# (optional) Analytics http port
# Integer value.
# Defaults to 8090
#
# [*insecure*]
-# (required) insecure mode.
+# (optional) insecure mode.
# Boolean value.
-# Defaults to false
+# Defaults to falsehiera('contrail::insecure')
+#
+# [*kafka_broker_list*]
+# (optional) List IPs+port of kafka servers
+# Array of strings value.
+# Defaults to hiera('contrail::kafka_broker_list')
+#
+# [*memcached_servers*]
+# (optional) IPv4 address of memcached servers
+# String (IPv4) value + port
+# Defaults to hiera('contrail::memcached_server')
#
# [*redis_server*]
-# (required) IPv4 address of redis server.
+# (optional) IPv4 address of redis server.
# String (IPv4) value.
# Defaults to '127.0.0.1'.
#
# [*redis_server_port*]
-# (required) port Redis server listens on.
+# (optional) port Redis server listens on.
# Integer value.
# Defaults to 6379
#
# [*rest_api_ip*]
-# (required) IP address Analytics rest interface listens on
+# (optional) IP address Analytics rest interface listens on
# String (IPv4) value.
# Defaults to '0.0.0.0'
#
# [*rest_api_port*]
-# (required) Analytics rest port
+# (optional) Analytics rest port
# Integer value.
# Defaults to 8081
#
-# [*memcached_servers*]
-# (optional) IPv4 address of memcached servers
-# String (IPv4) value + port
-# Defaults to '127.0.0.1:12111'
+# [*zk_server_ip*]
+# (optional) List IPs+port of Zookeeper servers
+# Array of strings value.
+# Defaults to hiera('contrail::zk_server_ip')
#
class tripleo::network::contrail::analytics(
+ $host_ip,
$admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
- $cassandra_server_list = hiera('contrail::cassandra_server_list'),
- $disc_server_ip = hiera('contrail::disc_server_ip'),
- $host_ip,
- $kafka_broker_list = hiera('contrail::kafka_broker_list'),
- $zk_server_ip = hiera('contrail::zk_server_ip'),
$auth_port = hiera('contrail::auth_port'),
$auth_protocol = hiera('contrail::auth_protocol'),
+ $cassandra_server_list = hiera('contrail::cassandra_server_list'),
$collector_http_server_port = 8089,
$collector_sandesh_port = 8086,
+ $disc_server_ip = hiera('contrail::disc_server_ip'),
$disc_server_port = hiera('contrail::disc_server_port'),
$http_server_port = 8090,
$insecure = hiera('contrail::insecure'),
+ $kafka_broker_list = hiera('contrail::kafka_broker_list'),
+ $memcached_servers = hiera('contrail::memcached_server'),
$redis_server = '127.0.0.1',
$redis_server_port = 6379,
$rest_api_ip = '0.0.0.0',
$rest_api_port = 8081,
- $memcached_servers = hiera('contrail::memcached_server'),
+ $zk_server_ip = hiera('contrail::zk_server_ip'),
)
{
class {'::contrail::keystone':
diff --git a/manifests/network/contrail/config.pp b/manifests/network/contrail/config.pp
index 9a9e9bd..7b9c85f 100644
--- a/manifests/network/contrail/config.pp
+++ b/manifests/network/contrail/config.pp
@@ -19,34 +19,6 @@
#
# == Parameters:
#
-# [*admin_password*]
-# (required) admin password
-# String value.
-#
-# [*admin_tenant_name*]
-# (required) admin tenant name.
-# String value.
-#
-# [*admin_token*]
-# (required) admin token
-# String value.
-#
-# [*admin_user*]
-# (required) admin user name.
-# String value.
-#
-# [*auth_host*]
-# (required) keystone server ip address
-# String (IPv4) value.
-#
-# [*cassandra_server_list*]
-# (required) List IPs+port of Cassandra servers
-# Array of strings value.
-#
-# [*disc_server_ip*]
-# (required) IPv4 address of discovery server.
-# String (IPv4) value.
-#
# [*ifmap_password*]
# (required) ifmap password
# String value.
@@ -63,71 +35,107 @@
# (required) IPv4 address of rabbit server.
# String (IPv4) value.
#
-# [*zk_server_ip*]
-# (required) List IPs+port of Zookeeper servers
-# Array of strings value.
+# [*admin_password*]
+# (optional) admin password
+# String value.
+# Defaults to hiera('contrail::admin_password')
+#
+# [*admin_tenant_name*]
+# (optional) admin tenant name.
+# String value.
+# Defaults to hiera('contrail::admin_tenant_name')
+#
+# [*admin_token*]
+# (optional) admin token
+# String value.
+# Defaults to hiera('contrail::admin_token')
+#
+# [*admin_user*]
+# (optional) admin user name.
+# String value.
+# Defaults to hiera('contrail::admin_user')
#
# [*auth*]
-# (required) Authentication method.
-# Defaults to 'keystone'.
+# (optional) Authentication method.
+# Defaults to hiera('contrail::auth')
+#
+# [*auth_host*]
+# (optional) keystone server ip address
+# String (IPv4) value.
+# Defaults to hiera('contrail::auth_host')
#
# [*auth_port*]
-# (required) keystone port.
-# Defaults to 35357.
+# (optional) keystone port.
+# Defaults to hiera('contrail::auth_port')
#
# [*auth_protocol*]
-# (required) authentication protocol.
-# Defaults to http.
+# (optional) authentication protocol.
+# Defaults to hiera('contrail::auth_protocol')
+#
+# [*cassandra_server_list*]
+# (optional) List IPs+port of Cassandra servers
+# Array of strings value.
+# Defaults to hiera('contrail::cassandra_server_list')
+#
+# [*disc_server_ip*]
+# (optional) IPv4 address of discovery server.
+# String (IPv4) value.
+# Defaults to hiera('contrail::disc_server_ip')
#
# [*insecure*]
-# (required) insecure mode.
-# Defaults to false
+# (optional) insecure mode.
+# Defaults to hiera('contrail::insecure')
#
# [*listen_ip_address*]
-# (required) IP address to listen on.
+# (optional) IP address to listen on.
# String (IPv4) value.
-# Defaults to '0.0.0.0'.
+# Defaults to '0.0.0.0'
#
# [*listen_port*]
-# (required) Listen port for config-api
-# Defaults to 8082.
+# (optional) Listen port for config-api
+# Defaults to 8082
#
# [*memcached_servers*]
# (optional) IPv4 address of memcached servers
# String (IPv4) value + port
-# Defaults to '127.0.0.1:12111'
+# Defaults to hiera('contrail::memcached_server')
#
# [*multi_tenancy*]
-# (required) Defines if mutli-tenancy is enabled.
-# Defaults to 'true'.
+# (optional) Defines if mutli-tenancy is enabled.
+# Defaults to hiera('contrail::multi_tenancy')
#
# [*redis_server*]
-# (required) IPv4 address of redis server.
+# (optional) IPv4 address of redis server.
# String (IPv4) value.
-# Defaults to '127.0.0.1'.
+# Defaults to '127.0.0.1'
+#
+# [*zk_server_ip*]
+# (optional) List IPs+port of Zookeeper servers
+# Array of strings value.
+# Defaults to hiera('contrail::zk_server_ip')
#
class tripleo::network::contrail::config(
- $admin_password = hiera('contrail::admin_password'),
- $admin_tenant_name = hiera('contrail::admin_tenant_name'),
- $admin_token = hiera('contrail::admin_token'),
- $admin_user = hiera('contrail::admin_user'),
- $auth_host = hiera('contrail::auth_host'),
- $cassandra_server_list = hiera('contrail::cassandra_server_list'),
- $disc_server_ip = hiera('contrail::disc_server_ip'),
$ifmap_password,
$ifmap_server_ip,
$ifmap_username,
$rabbit_server,
- $zk_server_ip = hiera('contrail::zk_server_ip'),
+ $admin_password = hiera('contrail::admin_password'),
+ $admin_tenant_name = hiera('contrail::admin_tenant_name'),
+ $admin_token = hiera('contrail::admin_token'),
+ $admin_user = hiera('contrail::admin_user'),
$auth = hiera('contrail::auth'),
+ $auth_host = hiera('contrail::auth_host'),
$auth_port = hiera('contrail::auth_port'),
$auth_protocol = hiera('contrail::auth_protocol'),
+ $cassandra_server_list = hiera('contrail::cassandra_server_list'),
+ $disc_server_ip = hiera('contrail::disc_server_ip'),
$insecure = hiera('contrail::insecure'),
$listen_ip_address = '0.0.0.0',
$listen_port = 8082,
$memcached_servers = hiera('contrail::memcached_server'),
$multi_tenancy = hiera('contrail::multi_tenancy'),
$redis_server = '127.0.0.1',
+ $zk_server_ip = hiera('contrail::zk_server_ip'),
)
{
validate_ip_address($listen_ip_address)
diff --git a/manifests/network/contrail/control.pp b/manifests/network/contrail/control.pp
index 8e1f4b8..2e50108 100644
--- a/manifests/network/contrail/control.pp
+++ b/manifests/network/contrail/control.pp
@@ -19,84 +19,83 @@
#
# == Parameters:
#
+# [*host_ip*]
+# (required) host IP address of Control
+# String (IPv4) value.
+#
+# [*ifmap_password*]
+# (required) ifmap password
+# String value.
+#
+# [*ifmap_username*]
+# (optional) ifmap username
+# String value.
+# Defaults to hiera('contrail::ifmap_username'),
+#
# [*admin_password*]
-# (required) admin password
+# (optional) admin password
# String value.
+# Defaults to hiera('contrail::admin_password'),
#
# [*admin_tenant_name*]
-# (required) admin tenant name.
+# (optional) admin tenant name.
# String value.
+# Defaults to hiera('contrail::admin_tenant_name'),
#
# [*admin_token*]
-# (required) admin token
+# (optional) admin token
# String value.
+# Defaults to hiera('contrail::admin_token'),
#
# [*admin_user*]
-# (required) admin user name.
+# (optional) admin user name.
# String value.
+# Defaults to hiera('contrail::admin_user'),
#
# [*auth_host*]
-# (required) keystone server ip address
+# (optional) keystone server ip address
# String (IPv4) value.
-#
-# [*disc_server_ip*]
-# (required) IPv4 address of discovery server.
-# String (IPv4) value.
-#
-# [*host_ip*]
-# (required) host IP address of Control
-# String (IPv4) value.
-#
-# [*ifmap_password*]
-# (required) ifmap password
-# String value.
-#
-# [*ifmap_server_ip*]
-# (required) ifmap server ip address.
-# String value.
-#
-# [*ifmap_username*]
-# (required) ifmap username
-# String value.
+# Defaults to hiera('contrail::auth_host'),
#
# [*auth_port*]
-# (required) keystone port.
-# Defaults to 35357.
+# (optional) keystone port.
+# Defaults to hiera('contrail::auth_port'),
#
# [*auth_protocol*]
-# (required) authentication protocol.
-# Defaults to http.
+# (optional) authentication protocol.
+# Defaults to hiera('contrail::auth_protocol'),
+#
+# [*disc_server_ip*]
+# (optional) IPv4 address of discovery server.
+# String (IPv4) value.
+# Defaults to hiera('contrail::disc_server_ip'),
#
# [*disc_server_port*]
-# (required) port Discovery server listens on.
+# (optional) port Discovery server listens on.
# Integer value.
-# Defaults to 5998
+# Defaults to hiera('contrail::disc_server_port'),
#
# [*insecure*]
-# (required) insecure mode.
-# Defaults to false
+# (optional) insecure mode.
+# Defaults to hiera('contrail::insecure'),
#
# [*memcached_servers*]
# (optional) IPv4 address of memcached servers
# String (IPv4) value + port
-# Defaults to '127.0.0.1:12111'
-#
-# [*multi_tenancy*]
-# (required) Defines if mutli-tenancy is enabled.
-# Defaults to 'true'.
+# Defaults to hiera('contrail::memcached_servers'),
#
class tripleo::network::contrail::control(
+ $host_ip,
+ $ifmap_password,
+ $ifmap_username,
+ $admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
- $admin_password = hiera('contrail::admin_password'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
- $disc_server_ip = hiera('contrail::disc_server_ip'),
- $host_ip,
- $ifmap_password,
- $ifmap_username,
$auth_port = hiera('contrail::auth_port'),
$auth_protocol = hiera('contrail::auth_protocol'),
+ $disc_server_ip = hiera('contrail::disc_server_ip'),
$disc_server_port = hiera('contrail::disc_server_port'),
$insecure = hiera('contrail::insecure'),
$memcached_servers = hiera('contrail::memcached_server'),
diff --git a/manifests/network/contrail/database.pp b/manifests/network/contrail/database.pp
index 5fdfb97..58f2670 100644
--- a/manifests/network/contrail/database.pp
+++ b/manifests/network/contrail/database.pp
@@ -19,22 +19,23 @@
#
# == Parameters:
#
-# [*disc_server_ip*]
-# (required) IPv4 address of discovery server.
-# String (IPv4) value.
-#
# [*host_ip*]
# (required) host IP address of Database node
# String (IPv4) value.
#
+# [*disc_server_ip*]
+# (optional) IPv4 address of discovery server.
+# String (IPv4) value.
+# Defaults to hiera('contrail::disc_server_ip')
+#
# [*disc_server_port*]
-# (required) port Discovery server listens on.
+# (optional) port Discovery server listens on.
# Integer value.
-# Defaults to 5998
+# Defaults to hiera('contrail::disc_server_port')
#
class tripleo::network::contrail::database(
- $disc_server_ip = hiera('contrail::disc_server_ip'),
$host_ip,
+ $disc_server_ip = hiera('contrail::disc_server_ip'),
$disc_server_port = hiera('contrail::disc_server_port'),
)
{
diff --git a/manifests/network/contrail/webui.pp b/manifests/network/contrail/webui.pp
index f289923..0b308a4 100644
--- a/manifests/network/contrail/webui.pp
+++ b/manifests/network/contrail/webui.pp
@@ -19,84 +19,90 @@
#
# == Parameters:
#
+# [*contrail_analytics_vip*]
+# (required) VIP of Contrail Analytics
+# String (IPv4) value.
+#
+# [*contrail_config_vip*]
+# (required) VIP of Contrail Config
+# String (IPv4) value.
+#
+# [*neutron_vip*]
+# (required) VIP of Neutron
+# String (IPv4) value.
+#
# [*admin_password*]
-# (required) admin password
+# (optional) admin password
# String value.
+# Defaults to hiera('contrail::admin_password')
#
# [*admin_tenant_name*]
-# (required) admin tenant name.
+# (optional) admin tenant name.
# String value.
+# Defaults to hiera('contrail::admin_tenant_name')
#
# [*admin_token*]
-# (required) admin token
+# (optional) admin token
# String value.
+# Defaults to hiera('contrail::admin_token')
#
# [*admin_user*]
-# (required) admin user name.
+# (optional) admin user name.
# String value.
+# Defaults to hiera('contrail::admin_user')
#
# [*auth_host*]
-# (required) keystone server ip address
+# (optional) keystone server ip address
# String (IPv4) value.
+# Defaults to hiera('contrail::auth_host')
#
# [*cassandra_server_list*]
-# (required) List IPs+port of Cassandra servers
+# (optional) List IPs+port of Cassandra servers
# Array of strings value.
-#
-# [*contrail_analytics_vip*]
-# (required) VIP of Contrail Analytics
-# String (IPv4) value.
-#
-# [*contrail_config_vip*]
-# (required) VIP of Contrail Config
-# String (IPv4) value.
-#
-# [*neutron_vip*]
-# (required) VIP of Neutron
-# String (IPv4) value.
+# Defaults to hiera('contrail::cassandra_server_list')
#
# [*contrail_webui_http_port*]
-# (required) Webui HTTP Port
+# (optional) Webui HTTP Port
# Integer value.
# Defaults to 8080
#
# [*contrail_webui_https_port*]
-# (required) Webui HTTPS Port
+# (optional) Webui HTTPS Port
# Integer value.
# Defaults to 8143
#
# [*redis_ip*]
-# (required) IP of Redis
+# (optional) IP of Redis
# String (IPv4) value.
# Defaults to '127.0.0.1'
#
class tripleo::network::contrail::webui(
+ $contrail_analytics_vip,
+ $contrail_config_vip,
+ $neutron_vip,
$admin_password = hiera('contrail::admin_password'),
$admin_tenant_name = hiera('contrail::admin_tenant_name'),
$admin_token = hiera('contrail::admin_token'),
$admin_user = hiera('contrail::admin_user'),
$auth_host = hiera('contrail::auth_host'),
$cassandra_server_list = hiera('contrail::cassandra_server_list'),
- $contrail_analytics_vip,
- $contrail_config_vip,
- $neutron_vip,
$contrail_webui_http_port = 8080,
$contrail_webui_https_port = 8143,
$redis_ip = '127.0.0.1',
)
{
class {'::contrail::webui':
- openstack_vip => $auth_host,
- contrail_config_vip => $contrail_config_vip,
- contrail_analytics_vip => $contrail_analytics_vip,
- neutron_vip => $neutron_vip,
- cassandra_ip => $cassandra_server_list,
- redis_ip => $redis_ip,
- contrail_webui_http_port => $contrail_webui_http_port,
- contrail_webui_https_port => $contrail_webui_https_port,
- admin_user => $admin_user,
- admin_password => $admin_password,
- admin_token => $admin_token,
- admin_tenant_name => $admin_tenant_name,
+ openstack_vip => $auth_host,
+ contrail_config_vip => $contrail_config_vip,
+ contrail_analytics_vip => $contrail_analytics_vip,
+ neutron_vip => $neutron_vip,
+ cassandra_ip => $cassandra_server_list,
+ redis_ip => $redis_ip,
+ contrail_webui_http_port => $contrail_webui_http_port,
+ contrail_webui_https_port => $contrail_webui_https_port,
+ admin_user => $admin_user,
+ admin_password => $admin_password,
+ admin_token => $admin_token,
+ admin_tenant_name => $admin_tenant_name,
}
}
diff --git a/manifests/profile/base/database/mongodb.pp b/manifests/profile/base/database/mongodb.pp
index 1a19bb6..8967f5b 100644
--- a/manifests/profile/base/database/mongodb.pp
+++ b/manifests/profile/base/database/mongodb.pp
@@ -44,6 +44,13 @@ class tripleo::profile::base::database::mongodb (
include ::tripleo::profile::base::database::mongodbcommon
if $bootstrap_node == $::hostname {
+ # make sure we can connect to all servers before forming the replset
+ tripleo::profile::pacemaker::database::mongodbvalidator {
+ $tripleo::profile::base::database::mongodbcommon::mongodb_node_ips :
+ port => $tripleo::profile::base::database::mongodbcommon::port,
+ require => Service['mongodb'],
+ before => Mongodb_replset[$mongodb_replset],
+ }
mongodb_replset { $mongodb_replset :
members => $tripleo::profile::base::database::mongodbcommon::mongo_node_ips_with_port_nobr,
}
diff --git a/manifests/profile/base/haproxy.pp b/manifests/profile/base/haproxy.pp
index 68ff3e4..e018f36 100644
--- a/manifests/profile/base/haproxy.pp
+++ b/manifests/profile/base/haproxy.pp
@@ -79,6 +79,9 @@ class tripleo::profile::base::haproxy (
require => Class['::certmonger'],
}
create_resources('::tripleo::certmonger::haproxy', $certificates_specs)
+ # The haproxy fronends (or listen resources) depend on the certificate
+ # existing and need to be refreshed if it changed.
+ Tripleo::Certmonger::Haproxy<||> ~> Haproxy::Listen<||>
}
include ::tripleo::haproxy
diff --git a/manifests/profile/base/swift/add_devices.pp b/manifests/profile/base/swift/add_devices.pp
index bd4c91c..909ddd6 100644
--- a/manifests/profile/base/swift/add_devices.pp
+++ b/manifests/profile/base/swift/add_devices.pp
@@ -39,7 +39,10 @@ define tripleo::profile::base::swift::add_devices(
$zone = (($server_num%$swift_zones) + 1)
# add the rings
- $base = regsubst($name,'^r1.*-(.*)$','\1')
+ $base_notnormal = regsubst($name,'^r1.*-(.*)$','\1')
+ $ip_notnormal = regsubst($base_notnormal, ':%PORT%.*', '')
+ $ip = normalize_ip_for_uri($ip_notnormal)
+ $base = regsubst($base_notnormal, $ip_notnormal, $ip)
$object = regsubst($base, '%PORT%', '6000')
ring_object_device { $object:
zone => '1',
diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index a95d05f..9d50462 100644
--- a/manifests/profile/base/swift/proxy.pp
+++ b/manifests/profile/base/swift/proxy.pp
@@ -37,7 +37,7 @@ class tripleo::profile::base::swift::proxy (
$memcache_port = 11211,
) {
if $step >= 4 {
- $swift_memcache_servers = suffix($memcache_servers, ":${memcache_port}")
+ $swift_memcache_servers = suffix(any2array(normalize_ip_for_uri($memcache_servers)), ":${memcache_port}")
include ::swift::proxy
include ::swift::proxy::proxy_logging
include ::swift::proxy::healthcheck
diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp
index 4dc3770..4c54309 100644
--- a/manifests/profile/pacemaker/database/mysql.pp
+++ b/manifests/profile/pacemaker/database/mysql.pp
@@ -70,7 +70,7 @@ class tripleo::profile::pacemaker::database::mysql (
'wsrep_drupal_282555_workaround'=> '0',
'wsrep_causal_reads' => '0',
'wsrep_sst_method' => 'rsync',
- 'wsrep_provider_options' => "gmcast.listen_addr=tcp://[${mysql_bind_host}]:4567;",
+ 'wsrep_provider_options' => "gmcast.listen_addr=tcp://${mysql_bind_host}:4567;",
}
}
diff --git a/manifests/profile/pacemaker/manila.pp b/manifests/profile/pacemaker/manila.pp
index a7f91fc..45373f6 100644
--- a/manifests/profile/pacemaker/manila.pp
+++ b/manifests/profile/pacemaker/manila.pp
@@ -22,119 +22,14 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
-# [*cinder_volume_type*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::cinder_volume_type', '')
-#
-# [*driver_handles_share_servers*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::driver_handles_share_servers')
-#
-# [*manila_generic_enable*]
-# (Optional) Enable the generic backend.
-# Defaults to hiera('manila_generic_enable_backend', 'false')
-#
-# [*max_time_to_attach*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::max_time_to_attach')
-#
-# [*max_time_to_create_volume*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::max_time_to_create_volume')
-#
-# [*service_instance_flavor_id*]
-# (Optional)
-# Defaults to hiera('manila::service_instance::service_instance_flavor_id')
-#
-# [*service_instance_password*]
-# (Optional)
-# Defaults to hiera('manila::service_instance::service_instance_password')
-#
-# [*service_instance_smb_config_path*]
-# (Optional)
-# Defaults to downcase(hiera('manila::backend::generic::service_instance_smb_config_path'))
-#
-# [*service_instance_user*]
-# (Optional)
-# Defaults to hiera('manila::service_instance::service_instance_user')
-#
-# [*share_mount_path*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::share_mount_path')
-#
-# [*share_volume_fstype*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::share_volume_fstype')
-#
-# [*smb_template_config_path*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::smb_template_config_path')
-#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*volume_name_template*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::volume_name_template')
-#
-# [*volume_snapshot_name_template*]
-# (Optional)
-# Defaults to hiera('manila::backend::generic::volume_snapshot_name_template')
-#
-# [*manila_cephfsnative_enable*]
-# (Optional) Enable the CephFS Native backend.
-# Defaults to hiera('manila_cephfsnative_enable_backend', 'false')
-#
-# [*cephfs_handles_share_servers*]
-# (Optional)
-# Defaults to hiera('manila::backend::cephfsnative::driver_handles_share_servers', false)
-#
-# [*cephfs_backend_name*]
-# (Optional)
-# Defaults to hiera('manila::backend::cephfsnative::cephfs_backend_name')
-#
-# [*cephfs_conf_path*]
-# (Optional)
-# Defaults to hiera('manila::backend::cephfsnative::cephfs_conf_path')
-#
-# [*cephfs_auth_id*]
-# (Optional)
-# Defaults to hiera('manila::backend::cephfsnative::cephfs_auth_id')
-#
-# [*cephfs_cluster_name*]
-# (Optional)
-# Defaults to hiera('manila::backend::cephfsnative::cephfs_cluster_name')
-#
-# [*cephfs_enable_snapshots*]
-# (Optional)
-# Defaults to hiera('manila::backend::cephfsnative::cephfs_enable_snapshots')
-#
class tripleo::profile::pacemaker::manila (
$bootstrap_node = hiera('bootstrap_nodeid'),
- $cinder_volume_type = hiera('manila::backend::generic::cinder_volume_type', ''),
- $driver_handles_share_servers = hiera('manila::backend::generic::driver_handles_share_servers'),
- $manila_generic_enable = hiera('manila_generic_enable_backend', false),
- $max_time_to_attach = hiera('manila::backend::generic::max_time_to_attach'),
- $max_time_to_create_volume = hiera('manila::backend::generic::max_time_to_create_volume'),
- $service_instance_flavor_id = hiera('manila::service_instance::service_instance_flavor_id'),
- $service_instance_password = hiera('manila::service_instance::service_instance_password'),
- $service_instance_smb_config_path = hiera('manila::backend::generic::service_instance_smb_config_path'),
- $service_instance_user = hiera('manila::service_instance::service_instance_user'),
- $share_mount_path = hiera('manila::backend::generic::share_mount_path'),
- $share_volume_fstype = hiera('manila::backend::generic::share_volume_fstype'),
- $smb_template_config_path = hiera('manila::backend::generic::smb_template_config_path'),
$step = hiera('step'),
- $volume_name_template = hiera('manila::backend::generic::volume_name_template'),
- $volume_snapshot_name_template = hiera('manila::backend::generic::volume_snapshot_name_template'),
- $manila_cephfsnative_enable = hiera('manila::backend::cephfsnative::enable_backend', false),
- $cephfs_handles_share_servers = hiera('manila::backend::cephfsnative::driver_handles_share_servers'),
- $cephfs_backend_name = hiera('manila::backend::cephfsnative::cephfs_backend_name'),
- $cephfs_conf_path = hiera('manila::backend::cephfsnative::cephfs_conf_path'),
- $cephfs_auth_id = hiera('manila::backend::cephfsnative::cephfs_auth_id'),
- $cephfs_cluster_name = hiera('manila::backend::cephfsnative::cephfs_cluster_name'),
- $cephfs_enable_snapshots = hiera('manila::backend::cephfsnative::cephfs_enable_snapshots'),
) {
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
@@ -156,21 +51,26 @@ class tripleo::profile::pacemaker::manila (
include ::tripleo::profile::base::manila::scheduler
include ::tripleo::profile::base::manila::share
+ # manila generic:
+ $manila_generic_enable = hiera('manila_generic_enable_backend', false)
if $manila_generic_enable {
$manila_generic_backend = hiera('manila::backend::generic::title')
manila::backend::generic { $manila_generic_backend :
- driver_handles_share_servers => $driver_handles_share_servers,
- smb_template_config_path => $smb_template_config_path,
- volume_name_template => $volume_name_template ,
- volume_snapshot_name_template => $volume_snapshot_name_template,
- share_mount_path => $share_mount_path,
- max_time_to_create_volume => $max_time_to_create_volume,
- max_time_to_attach => $max_time_to_attach,
- service_instance_smb_config_path => $service_instance_smb_config_path,
- share_volume_fstype => $share_volume_fstype,
- cinder_volume_type => $cinder_volume_type,
+ driver_handles_share_servers => hiera('manila::backend::generic::driver_handles_share_servers', true),
+ max_time_to_attach => hiera('manila::backend::generic::max_time_to_attach'),
+ max_time_to_create_volume => hiera('manila::backend::generic::max_time_to_create_volume'),
+ service_instance_smb_config_path => hiera('manila::backend::generic::service_instance_smb_config_path'),
+ share_mount_path => hiera('manila::backend::generic::share_mount_path'),
+ share_volume_fstype => hiera('manila::backend::generic::share_volume_fstype'),
+ smb_template_config_path => hiera('manila::backend::generic::smb_template_config_path'),
+ volume_name_template => hiera('manila::backend::generic::volume_name_template'),
+ volume_snapshot_name_template => hiera('manila::backend::generic::volume_snapshot_name_template'),
+ cinder_volume_type => hiera('manila::backend::generic::cinder_volume_type'),
}
+ $service_instance_user = hiera('manila::service_instance::service_instance_user')
+ $service_instance_password = hiera('manila::service_instance::service_instance_password')
+ $service_instance_flavor_id = hiera('manila::service_instance::service_instance_flavor_id')
manila_config {
"${manila_generic_backend}/service_instance_user": value => $service_instance_user;
"${manila_generic_backend}/service_instance_password": value => $service_instance_password;
@@ -181,22 +81,48 @@ class tripleo::profile::pacemaker::manila (
}
# manila cephfsnative:
+ $manila_cephfsnative_enable = hiera('manila::backend::cephfsnative::enable_backend', false)
if $manila_cephfsnative_enable {
$manila_cephfsnative_backend = hiera('manila::backend::cephfsnative::title')
manila::backend::cephfsnative { $manila_cephfsnative_backend :
- driver_handles_share_servers => $cephfs_handles_share_servers,
- cephfs_backend_name => $cephfs_backend_name,
- cephfs_conf_path => $cephfs_conf_path,
- cephfs_auth_id => $cephfs_auth_id,
- cephfs_cluster_name => $cephfs_cluster_name,
- cephfs_enable_snapshots => $cephfs_enable_snapshots,
+ 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_cluster_name => hiera('manila::backend::cephfsnative::cephfs_cluster_name'),
+ cephfs_enable_snapshots => hiera('manila::backend::cephfsnative::cephfs_enable_snapshots'),
+ }
+ }
+
+ # manila netapp:
+ $manila_netapp_enable = hiera('manila_netapp_enable_backend', false)
+ if $manila_netapp_enable {
+ $manila_netapp_backend = hiera('manila::backend::netapp::title')
+ manila::backend::netapp { $manila_netapp_backend :
+ driver_handles_share_servers => hiera('manila::backend::netapp::driver_handles_share_servers', true),
+ netapp_login => hiera('manila::backend::netapp::netapp_login'),
+ netapp_password => hiera('manila::backend::netapp::netapp_password'),
+ netapp_server_hostname => hiera('manila::backend::netapp::netapp_server_hostname'),
+ netapp_transport_type => hiera('manila::backend::netapp::netapp_transport_type'),
+ netapp_storage_family => hiera('manila::backend::netapp::netapp_storage_family'),
+ netapp_server_port => hiera('manila::backend::netapp::netapp_server_port'),
+ netapp_volume_name_template => hiera('manila::backend::netapp::netapp_volume_name_template'),
+ netapp_vserver => hiera('manila::backend::netapp::netapp_vserver'),
+ netapp_vserver_name_template => hiera('manila::backend::netapp::netapp_vserver_name_template'),
+ netapp_lif_name_template => hiera('manila::backend::netapp::netapp_lif_name_template'),
+ netapp_aggregate_name_search_pattern => hiera('manila::backend::netapp::netapp_aggregate_name_search_pattern'),
+ netapp_root_volume_aggregate => hiera('manila::backend::netapp::netapp_root_volume_aggregate'),
+ netapp_root_volume_name => hiera('manila::backend::netapp::netapp_root_volume'),
+ netapp_port_name_search_pattern => hiera('manila::backend::netapp::netapp_port_name_search_pattern'),
+ netapp_trace_flags => hiera('manila::backend::netapp::netapp_trace_flags'),
}
}
$manila_enabled_backends = delete_undef_values(
[
$manila_generic_backend,
- $manila_cephfsnative_backend
+ $manila_cephfsnative_backend,
+ $manila_netapp_backend
]
)
class { '::manila::backends' :
diff --git a/metadata.json b/metadata.json
index 7ad9745..dfeb9b1 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,6 +1,6 @@
{
"name": "openstack-tripleo",
- "version": "5.0.0",
+ "version": "5.1.0",
"author": "OpenStack Contributors",
"summary": "Puppet module for TripleO",
"license": "Apache-2.0",
diff --git a/spec/classes/tripleo_profile_base_swift_proxy_spec.rb b/spec/classes/tripleo_profile_base_swift_proxy_spec.rb
new file mode 100644
index 0000000..da80950
--- /dev/null
+++ b/spec/classes/tripleo_profile_base_swift_proxy_spec.rb
@@ -0,0 +1,89 @@
+#
+# Copyright (C) 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.
+
+require 'spec_helper'
+
+describe 'tripleo::profile::base::swift::proxy' do
+
+ let :params do
+ { }
+ end
+
+ shared_examples_for 'tripleo swift proxy base profile' do
+
+ let :pre_condition do
+ "class { '::swift':
+ swift_hash_path_prefix => 'foo',
+ }
+ include ::memcached
+ class { '::swift::proxy':
+ proxy_local_net_ip => '127.0.0.1',
+ }"
+ end
+
+ context 'with ipv4 memcache servers' do
+ before :each do
+ params.merge!(
+ :step => 4,
+ :memcache_servers => ['192.168.0.1', '192.168.0.2'],
+ )
+ end
+
+ it 'configure swift proxy cache with ipv4 ips' do
+ is_expected.to contain_class('swift::proxy::cache').with({
+ :memcache_servers => ['192.168.0.1:11211', '192.168.0.2:11211']
+ })
+ end
+ end
+
+ context 'with ipv6 memcache servers' do
+ before :each do
+ params.merge!(
+ :step => 4,
+ :memcache_servers => ['::1', '::2'],
+ )
+ end
+
+ it 'configure swift proxy cache with ipv6 ips' do
+ is_expected.to contain_class('swift::proxy::cache').with({
+ :memcache_servers => ['[::1]:11211', '[::2]:11211']
+ })
+ end
+ end
+
+ end
+
+ context 'on Debian platforms' do
+ let :facts do
+ { :osfamily => 'Debian',
+ :processorcount => 1 }
+ end
+
+ it_configures 'tripleo swift proxy base profile'
+ end
+
+ context 'on RedHat platforms' do
+ let :facts do
+ {
+ :osfamily => 'RedHat',
+ :operatingsystemrelease => '7.1',
+ :processorcount => 1,
+ }
+ end
+
+ it_configures 'tripleo swift proxy base profile'
+ end
+
+end