summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--manifests/firewall/rule.pp19
-rw-r--r--manifests/haproxy.pp49
-rw-r--r--manifests/haproxy/endpoint.pp29
-rw-r--r--manifests/packages.pp4
-rw-r--r--manifests/profile/base/ceilometer/api.pp7
-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/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.pp5
-rw-r--r--manifests/profile/base/neutron/plugins/ml2/ovn.pp25
-rw-r--r--manifests/profile/base/nova.pp46
-rw-r--r--manifests/profile/base/pacemaker.pp3
-rw-r--r--manifests/profile/base/swift/proxy.pp23
-rw-r--r--manifests/tls_proxy.pp60
-rw-r--r--manifests/vip_hosts.pp39
-rw-r--r--metadata.json4
-rw-r--r--releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml3
-rw-r--r--releasenotes/notes/use-reno-80402e5526a598aa.yaml6
-rw-r--r--releasenotes/source/_static/.placeholder0
-rw-r--r--releasenotes/source/conf.py262
-rw-r--r--releasenotes/source/index.rst8
-rw-r--r--releasenotes/source/unreleased.rst5
-rw-r--r--setup.cfg13
-rw-r--r--setup.py22
-rw-r--r--spec/classes/tripleo_firewall_spec.rb17
-rw-r--r--spec/classes/tripleo_profile_base_ceilometer_api_spec.rb16
-rw-r--r--spec/classes/tripleo_ui_spec.rb99
-rw-r--r--test-requirements.txt4
-rw-r--r--tox.ini8
34 files changed, 931 insertions, 115 deletions
diff --git a/.gitignore b/.gitignore
index 15c55ef..263f4a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,6 @@ coverage/
*.swp
*.iml
openstack/
+# Files created from releasenotes build
+releasenotes/build
+.tox
diff --git a/manifests/firewall/rule.pp b/manifests/firewall/rule.pp
index 6801dc4..816e6fe 100644
--- a/manifests/firewall/rule.pp
+++ b/manifests/firewall/rule.pp
@@ -77,8 +77,16 @@ define tripleo::firewall::rule (
$extras = {},
) {
+ if $port == 'all' {
+ warning("All ${proto} traffic will be open on this host.")
+ # undef so the IPtables rule won't have any port specified.
+ $port_real = undef
+ } else {
+ $port_real = $port
+ }
+
$basic = {
- 'port' => $port,
+ 'port' => $port_real,
'dport' => $dport,
'sport' => $sport,
'proto' => $proto,
@@ -100,6 +108,15 @@ define tripleo::firewall::rule (
$rule = merge($basic, $state_rule, $extras)
validate_hash($rule)
+ # This conditional will ensure that TCP and UDP firewall rules have
+ # a port specified in the configuration when using INPUT or OUTPUT chains.
+ # If not, the Puppet catalog will fail.
+ # If we don't do this sanity check, a user could create some TCP/UDP
+ # rules without port, and the result would be an iptables rule that allow any
+ # traffic on the host.
+ if ($proto in ['tcp', 'udp']) and (! ($port or $dport or $sport) and ($chain != 'FORWARD')) {
+ fail("${title} firewall rule cannot be created. TCP or UDP rules for INPUT or OUTPUT need port or sport or dport.")
+ }
create_resources('firewall', { "${title}" => $rule })
}
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 515f49a..c57666d 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -276,6 +276,10 @@
# (optional) Enable or not OpenDaylight binding
# Defaults to hiera('opendaylight_api_enabled', false)
#
+# [*ovn_dbs*]
+# (optional) Enable or not OVN northd binding
+# Defaults to hiera('ovn_dbs_enabled', false)
+#
# [*zaqar_ws*]
# (optional) Enable or not Zaqar Websockets binding
# Defaults to false
@@ -380,6 +384,10 @@
# (optional) Specify the network panko is running on.
# Defaults to hiera('panko_api_network', undef)
#
+# [*ovn_dbs_network*]
+# (optional) Specify the network ovn_dbs is running on.
+# Defaults to hiera('ovn_dbs_network', undef)
+#
# [*sahara_network*]
# (optional) Specify the network sahara is running on.
# Defaults to hiera('sahara_api_network', undef)
@@ -441,6 +449,8 @@
# 'nova_novnc_ssl_port' (Defaults to 13080)
# 'panko_api_port' (Defaults to 8779)
# 'panko_api_ssl_port' (Defaults to 13779)
+# 'ovn_nbdb_port' (Defaults to 6641)
+# 'ovn_sbdb_port' (Defaults to 6642)
# 'sahara_api_port' (Defaults to 8386)
# 'sahara_api_ssl_port' (Defaults to 13386)
# 'swift_proxy_port' (Defaults to 8080)
@@ -515,6 +525,7 @@ class tripleo::haproxy (
$zaqar_api = hiera('zaqar_api_enabled', false),
$ceph_rgw = hiera('ceph_rgw_enabled', false),
$opendaylight = hiera('opendaylight_api_enabled', false),
+ $ovn_dbs = hiera('ovn_dbs_enabled', false),
$zaqar_ws = hiera('zaqar_api_enabled', false),
$ui = hiera('enable_ui', false),
$aodh_network = hiera('aodh_api_network', undef),
@@ -540,6 +551,7 @@ class tripleo::haproxy (
$nova_novncproxy_network = hiera('nova_vnc_proxy_network', undef),
$nova_osapi_network = hiera('nova_api_network', undef),
$panko_network = hiera('panko_api_network', undef),
+ $ovn_dbs_network = hiera('ovn_dbs_network', undef),
$sahara_network = hiera('sahara_api_network', undef),
$swift_proxy_server_network = hiera('swift_proxy_network', undef),
$trove_network = hiera('trove_api_network', undef),
@@ -590,6 +602,8 @@ class tripleo::haproxy (
nova_novnc_ssl_port => 13080,
panko_api_port => 8779,
panko_api_ssl_port => 13779,
+ ovn_nbdb_port => 6641,
+ ovn_sbdb_port => 6642,
sahara_api_port => 8386,
sahara_api_ssl_port => 13386,
swift_proxy_port => 8080,
@@ -1318,6 +1332,39 @@ class tripleo::haproxy (
}
}
+
+ if $ovn_dbs {
+ # FIXME: is this config enough to ensure we only hit the first node in
+ # ovn_northd_node_ips ?
+ $ovn_db_listen_options = {
+ 'option' => [ 'tcpka' ],
+ 'timeout client' => '90m',
+ 'timeout server' => '90m',
+ 'stick-table' => 'type ip size 1000',
+ 'stick' => 'on dst',
+ }
+ ::tripleo::haproxy::endpoint { 'ovn_nbdb':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('ovn_dbs_vip', $controller_virtual_ip),
+ service_port => $ports[ovn_nbdb_port],
+ ip_addresses => hiera('ovn_dbs_node_ips', $controller_hosts_real),
+ server_names => hiera('ovn_dbs_node_names', $controller_hosts_names_real),
+ service_network => $ovn_dbs_network,
+ listen_options => $ovn_db_listen_options,
+ mode => 'tcp'
+ }
+ ::tripleo::haproxy::endpoint { 'ovn_sbdb':
+ public_virtual_ip => $public_virtual_ip,
+ internal_ip => hiera('ovn_dbs_vip', $controller_virtual_ip),
+ service_port => $ports[ovn_sbdb_port],
+ ip_addresses => hiera('ovn_dbs_node_ips', $controller_hosts_real),
+ server_names => hiera('ovn_dbs_node_names', $controller_hosts_names_real),
+ service_network => $ovn_dbs_network,
+ listen_options => $ovn_db_listen_options,
+ mode => 'tcp'
+ }
+ }
+
if $zaqar_ws {
::tripleo::haproxy::endpoint { 'zaqar_ws':
public_virtual_ip => $public_virtual_ip,
@@ -1331,7 +1378,7 @@ class tripleo::haproxy (
# 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.
+ # timeouts get overridden 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'],
diff --git a/manifests/haproxy/endpoint.pp b/manifests/haproxy/endpoint.pp
index 4311049..0bba245 100644
--- a/manifests/haproxy/endpoint.pp
+++ b/manifests/haproxy/endpoint.pp
@@ -149,14 +149,27 @@ define tripleo::haproxy::endpoint (
}
if hiera('manage_firewall', true) {
include ::tripleo::firewall
- $firewall_rules = {
- "100 ${name}_haproxy" => {
- 'dport' => $service_port,
- },
- "100 ${name}_haproxy_ssl" => {
- 'dport' => $public_ssl_port,
- },
+ # This block will construct firewall rules only when we specify
+ # a port for the regular service and also the ssl port for the service.
+ # It makes sure we're not trying to create TCP iptables rules where no port
+ # is specified.
+ if $service_port {
+ $haproxy_firewall_rules = {
+ "100 ${name}_haproxy" => {
+ 'dport' => $service_port,
+ },
+ }
+ }
+ if $public_ssl_port {
+ $haproxy_ssl_firewall_rules = {
+ "100 ${name}_haproxy_ssl" => {
+ 'dport' => $public_ssl_port,
+ },
+ }
+ }
+ $firewall_rules = merge($haproxy_firewall_rules, $haproxy_ssl_firewall_rules)
+ if $service_port or $public_ssl_port {
+ create_resources('tripleo::firewall::rule', $firewall_rules)
}
- create_resources('tripleo::firewall::rule', $firewall_rules)
}
}
diff --git a/manifests/packages.pp b/manifests/packages.pp
index ec2635a..147c76a 100644
--- a/manifests/packages.pp
+++ b/manifests/packages.pp
@@ -35,7 +35,7 @@ class tripleo::packages (
# required for stages
include ::stdlib
- if !$enable_install and !$enable_upgrade {
+ if !str2bool($enable_install) and !str2bool($enable_upgrade) {
case $::osfamily {
'RedHat': {
Package <| |> { provider => 'norpm' }
@@ -46,7 +46,7 @@ class tripleo::packages (
}
}
- if $enable_upgrade {
+ if str2bool($enable_upgrade) {
Package <| |> { ensure => 'latest' }
# Running the package upgrade before managing Services in the main stage.
# So we're sure that services will be able to restart with the new version
diff --git a/manifests/profile/base/ceilometer/api.pp b/manifests/profile/base/ceilometer/api.pp
index 6ef4748..2e7986b 100644
--- a/manifests/profile/base/ceilometer/api.pp
+++ b/manifests/profile/base/ceilometer/api.pp
@@ -18,6 +18,10 @@
#
# === Parameters
#
+# [*enable_legacy_api*]
+# (Optional) Enable legacy ceilometer api service.
+# Defaults to hiera('enable_legacy_api', false)
+#
# [*ceilometer_network*]
# (Optional) The network name where the ceilometer endpoint is listening on.
# This is set by t-h-t.
@@ -53,6 +57,7 @@
# Defaults to hiera('step')
#
class tripleo::profile::base::ceilometer::api (
+ $enable_legacy_api = hiera('enable_legacy_ceilometer_api', false),
$ceilometer_network = hiera('ceilometer_api_network', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
@@ -76,7 +81,7 @@ class tripleo::profile::base::ceilometer::api (
$tls_keyfile = undef
}
- if $step >= 4 {
+ if $step >= 4 and $enable_legacy_api {
include ::ceilometer::api
class { '::ceilometer::wsgi::apache':
ssl_cert => $tls_certfile,
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/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..c046850 100644
--- a/manifests/profile/base/neutron/plugins/ml2.pp
+++ b/manifests/profile/base/neutron/plugins/ml2.pp
@@ -71,5 +71,10 @@ class tripleo::profile::base::neutron::plugins::ml2 (
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
+ }
}
}
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..ab9700f 100644
--- a/manifests/profile/base/nova.pp
+++ b/manifests/profile/base/nova.pp
@@ -30,6 +30,26 @@
# (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')
+#
# [*nova_compute_enabled*]
# (Optional) Whether or not nova-compute is enabled.
# Defaults to false
@@ -38,22 +58,17 @@
# (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'),
$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
@@ -68,9 +83,16 @@ class tripleo::profile::base::nova (
}
if hiera('step') >= 4 or (hiera('step') >= 3 and $sync_db) {
- $rabbit_endpoints = suffix(any2array($rabbit_hosts), ":${rabbit_port}")
+ # 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,
+ }),
}
include ::nova::config
class { '::nova::cache':
diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp
index cc5fd8a..19eb52b 100644
--- a/manifests/profile/base/pacemaker.pp
+++ b/manifests/profile/base/pacemaker.pp
@@ -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/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index 974a725..7bbef1e 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
diff --git a/manifests/tls_proxy.pp b/manifests/tls_proxy.pp
new file mode 100644
index 0000000..36d6b6d
--- /dev/null
+++ b/manifests/tls_proxy.pp
@@ -0,0 +1,60 @@
+# 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::tls_proxy
+#
+# Sets up a TLS proxy using mod_proxy that redirects towards localhost.
+#
+# === Parameters
+#
+# [*ip*]
+# The IP address that the proxy will be listening on.
+#
+# [*port*]
+# The port that the proxy will be listening on.
+#
+# [*servername*]
+# The vhost servername that contains the FQDN to identify the virtual host.
+#
+# [*tls_cert*]
+# The path to the TLS certificate that the proxy will be serving.
+#
+# [*tls_key*]
+# The path to the key used for the specified certificate.
+#
+define tripleo::tls_proxy(
+ $ip,
+ $port,
+ $servername,
+ $tls_cert,
+ $tls_key,
+) {
+ ::apache::vhost { "${title}-proxy":
+ ensure => 'present',
+ docroot => undef, # This is required by the manifest
+ manage_docroot => false,
+ servername => $servername,
+ ip => $ip,
+ port => $port,
+ ssl => true,
+ ssl_cert => $tls_cert,
+ ssl_key => $tls_key,
+ request_headers => ['set X-Forwarded-Proto "https"'],
+ proxy_pass => {
+ path => '/',
+ url => "http://localhost:${port}/",
+ params => {retry => '10'},
+ }
+ }
+}
diff --git a/manifests/vip_hosts.pp b/manifests/vip_hosts.pp
deleted file mode 100644
index 7b260fd..0000000
--- a/manifests/vip_hosts.pp
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2016 Red Hat, Inc.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# == Class: tripleo::vip_hosts
-#
-# Write the overcloud VIPs into /etc/hosts
-#
-# === Parameters
-#
-# [*hosts_spec*]
-# The specification of the hosts that will be added to the /etc/hosts file.
-# These come in the form of a hash that will be consumed by create_resources.
-# e.g.:
-# tripleo::hosts_spec:
-# host-1:
-# name: host1.domain
-# ip: 127.0.0.1
-# host-2:
-# name: host2.domain
-# ip: 127.0.0.2
-#
-class tripleo::vip_hosts (
- $hosts_spec
-) {
- create_resources('host', $hosts_spec)
-}
-
diff --git a/metadata.json b/metadata.json
index 1aa1b4d..308c63a 100644
--- a/metadata.json
+++ b/metadata.json
@@ -9,8 +9,8 @@
"issues_url": "https://bugs.launchpad.net/puppet-tripleo",
"description": "Installs and configures Tripleo.",
"requirements": [
- { "name": "pe","version_requirement": "3.x" },
- { "name": "puppet","version_requirement": "3.x" }
+ { "name": "pe","version_requirement": "4.x" },
+ { "name": "puppet","version_requirement": "4.x" }
],
"operatingsystem_support": [
{
diff --git a/releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml b/releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml
new file mode 100644
index 0000000..a92cbae
--- /dev/null
+++ b/releasenotes/notes/hpelefthand_8474c416b0d411e6.yaml
@@ -0,0 +1,3 @@
+---
+features:
+ - Added hpelefthand_iscsi backend support for cinder
diff --git a/releasenotes/notes/use-reno-80402e5526a598aa.yaml b/releasenotes/notes/use-reno-80402e5526a598aa.yaml
new file mode 100644
index 0000000..8102962
--- /dev/null
+++ b/releasenotes/notes/use-reno-80402e5526a598aa.yaml
@@ -0,0 +1,6 @@
+---
+prelude: >
+ Release notes are generated by Reno.
+features:
+ - Release notes are no longer maintained by hand, we now use the reno tool to
+ manage them. \ No newline at end of file
diff --git a/releasenotes/source/_static/.placeholder b/releasenotes/source/_static/.placeholder
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/releasenotes/source/_static/.placeholder
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
new file mode 100644
index 0000000..be2f5ce
--- /dev/null
+++ b/releasenotes/source/conf.py
@@ -0,0 +1,262 @@
+# -*- coding: utf-8 -*-
+# 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.
+#
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+ 'oslosphinx',
+ 'reno.sphinxext',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'puppet-tripleo Release Notes'
+copyright = u'2016, Puppet TripleO Developers'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '6.0.0'
+# The full version, including alpha/beta/rc tags.
+release = '6.0.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = []
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'puppet-tripleoReleaseNotesdoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ ('index', 'puppet-tripleoReleaseNotes.tex', u'puppet-tripleo Release Notes Documentation',
+ u'2016, Puppet TripleO Developers', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ ('index', 'puppet-tripleoreleasenotes', u'puppet-tripleo Release Notes Documentation',
+ [u'2016, Puppet TripleO Developers'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ ('index', 'puppet-tripleoReleaseNotes', u'puppet-tripleo Release Notes Documentation',
+ u'2016, Puppet TripleO Developers', 'puppet-tripleoReleaseNotes', 'Puppet TripleO Project.',
+ 'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+# -- Options for Internationalization output ------------------------------
+locale_dirs = ['locale/']
diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst
new file mode 100644
index 0000000..c462aaa
--- /dev/null
+++ b/releasenotes/source/index.rst
@@ -0,0 +1,8 @@
+============================
+puppet-tripleo Release Notes
+============================
+
+.. toctree::
+ :maxdepth: 1
+
+ unreleased
diff --git a/releasenotes/source/unreleased.rst b/releasenotes/source/unreleased.rst
new file mode 100644
index 0000000..3bf0e9c
--- /dev/null
+++ b/releasenotes/source/unreleased.rst
@@ -0,0 +1,5 @@
+==============================
+ Current Series Release Notes
+==============================
+
+ .. release-notes:: \ No newline at end of file
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..5eab1d8
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,13 @@
+[metadata]
+name = puppet-tripleo
+summary = Puppet module for OpenStack TripleO
+description-file =
+ README.md
+author = Puppet Labs and OpenStack Contributors
+author-email = openstack-dev@lists.openstack.org
+home-page = http://www.openstack.org/
+classifier =
+ Intended Audience :: Developers
+ Intended Audience :: System Administrators
+ License :: OSI Approved :: Apache Software License
+ Operating System :: POSIX :: Linux \ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..7eeb36b
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
+#
+# 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.
+
+# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
+import setuptools
+
+setuptools.setup(
+ setup_requires=['pbr'],
+ pbr=True) \ No newline at end of file
diff --git a/spec/classes/tripleo_firewall_spec.rb b/spec/classes/tripleo_firewall_spec.rb
index 3116a51..3a1a0a0 100644
--- a/spec/classes/tripleo_firewall_spec.rb
+++ b/spec/classes/tripleo_firewall_spec.rb
@@ -74,7 +74,7 @@ describe 'tripleo::firewall' do
:firewall_rules => {
'300 add custom application 1' => {'port' => '999', 'proto' => 'udp', 'action' => 'accept'},
'301 add custom application 2' => {'port' => '8081', 'proto' => 'tcp', 'action' => 'accept'},
- '302 fwd custom cidr 1' => {'chain' => 'FORWARD', 'destination' => '192.0.2.0/24'},
+ '302 fwd custom cidr 1' => {'port' => 'all', 'chain' => 'FORWARD', 'destination' => '192.0.2.0/24'},
'303 add custom application 3' => {'dport' => '8081', 'proto' => 'tcp', 'action' => 'accept'},
'304 add custom application 4' => {'sport' => '1000', 'proto' => 'tcp', 'action' => 'accept'},
'305 add gre rule' => {'proto' => 'gre'}
@@ -96,7 +96,8 @@ describe 'tripleo::firewall' do
)
is_expected.to contain_firewall('302 fwd custom cidr 1').with(
:chain => 'FORWARD',
- :destination => '192.0.2.0/24',
+ :proto => 'tcp',
+ :destination => '192.0.2.0/24',
)
is_expected.to contain_firewall('303 add custom application 3').with(
:dport => '8081',
@@ -114,6 +115,18 @@ describe 'tripleo::firewall' do
end
end
+ context 'with TCP rule without port or dport or sport specified' do
+ before :each do
+ params.merge!(
+ :manage_firewall => true,
+ :firewall_rules => {
+ '500 wrong tcp rule' => {'proto' => 'tcp', 'action' => 'accept'},
+ }
+ )
+ end
+ it_raises 'a Puppet::Error', /500 wrong tcp rule firewall rule cannot be created. TCP or UDP rules for INPUT or OUTPUT need port or sport or dport./
+ end
+
end
on_supported_os.each do |os, facts|
diff --git a/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb b/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
index 935e9e8..2887d32 100644
--- a/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
+++ b/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
@@ -32,9 +32,10 @@ describe 'tripleo::profile::base::ceilometer::api' do
end
end
- context 'with step 4' do
+ context 'with step 4 and enable_legacy_api' do
let(:params) { {
- :step => 4,
+ :step => 4,
+ :enable_legacy_api => true,
} }
it 'should trigger complete configuration' do
@@ -42,6 +43,17 @@ describe 'tripleo::profile::base::ceilometer::api' do
is_expected.to contain_class('ceilometer::wsgi::apache')
end
end
+
+ context 'with step 4 and default enable_legacy_api' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should do nothing' do
+ is_expected.to_not contain_class('ceilometer::api')
+ is_expected.to_not contain_class('ceilometer::wsgi::apache')
+ end
+ end
end
diff --git a/spec/classes/tripleo_ui_spec.rb b/spec/classes/tripleo_ui_spec.rb
new file mode 100644
index 0000000..588a944
--- /dev/null
+++ b/spec/classes/tripleo_ui_spec.rb
@@ -0,0 +1,99 @@
+#
+# 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::ui' do
+ shared_examples_for 'tripleo::ui' do
+ let(:pre_condition) do
+ 'include ::apache'
+ end
+
+ context 'with required parameters' do
+ let(:params) { {
+ :servername => facts[:hostname],
+ :bind_host => '127.0.0.1',
+ :keystone_url => 'http://127.0.0.1:5000/'
+ } }
+
+ it 'should configure tripleo ui' do
+ is_expected.to contain_class('tripleo::ui')
+ is_expected.to contain_apache__vhost('tripleo-ui').with(
+ :ensure => 'present',
+ :servername => facts[:hostname],
+ :ip => '127.0.0.1',
+ :port => 3000,
+ :docroot => '/var/www/openstack-tripleo-ui/dist',
+ :options => [ 'Indexes', 'FollowSymLinks' ],
+ :fallbackresource => '/index.html'
+ )
+ is_expected.to contain_file('/etc/httpd/conf.d/openstack-tripleo-ui.conf').with_content(/cleaned by Puppet/)
+ is_expected.to contain_file('/var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js')
+ .with_content(/"keystone": "http:\/\/127.0.0.1:5000\/"/)
+ .with_content(/"zaqar_default_queue": "tripleo"/)
+ end
+ end
+
+ context 'with all parameters' do
+ let(:params) { {
+ :servername => 'custom.example.com',
+ :bind_host => '127.0.0.2',
+ :ui_port => 3001,
+ :keystone_url => 'http://127.0.0.1:1111/',
+ :heat_url => 'http://127.0.0.1:2222/',
+ :ironic_url => 'http://127.0.0.1:3333/',
+ :mistral_url => 'http://127.0.0.1:4444/',
+ :swift_url => 'http://127.0.0.1:5555/',
+ :zaqar_websocket_url => 'http://127.0.0.1:6666/',
+ :zaqar_default_queue => 'myqueue'
+ } }
+
+ it 'should configure tripleo ui' do
+ is_expected.to contain_class('tripleo::ui')
+ is_expected.to contain_apache__vhost('tripleo-ui').with(
+ :ensure => 'present',
+ :servername => 'custom.example.com',
+ :ip => '127.0.0.2',
+ :port => 3001,
+ :docroot => '/var/www/openstack-tripleo-ui/dist',
+ :options => [ 'Indexes', 'FollowSymLinks' ],
+ :fallbackresource => '/index.html'
+ )
+ is_expected.to contain_file('/etc/httpd/conf.d/openstack-tripleo-ui.conf').with_content(/cleaned by Puppet/)
+ is_expected.to contain_file('/var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js')
+ .with_content(/"keystone": "http:\/\/127.0.0.1:1111\/"/)
+ .with_content(/"heat": "http:\/\/127.0.0.1:2222\/"/)
+ .with_content(/"ironic": "http:\/\/127.0.0.1:3333\/"/)
+ .with_content(/"mistral": "http:\/\/127.0.0.1:4444\/"/)
+ .with_content(/"swift": "http:\/\/127.0.0.1:5555\/"/)
+ .with_content(/"zaqar-websocket": "http:\/\/127.0.0.1:6666\/"/)
+ .with_content(/"zaqar_default_queue": "myqueue"/)
+ end
+ end
+
+ end
+
+
+ on_supported_os.each do |os, facts|
+ context "on #{os}" do
+ let(:facts) do
+ facts.merge({ :hostname => 'node.example.com' })
+ end
+
+ it_behaves_like 'tripleo::ui'
+ end
+ end
+end
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..bedd666
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,4 @@
+# this is required for the docs build jobs
+sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
+oslosphinx>=2.5.0 # Apache-2.0
+reno>=0.1.1 # Apache-2.0
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..aea06c8
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,8 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+envlist = releasenotes
+
+[testenv:releasenotes]
+deps = -rtest-requirements.txt
+commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html