1 From 784cd3f4e6481b9c802db25ab379fccdab4bd1c3 Mon Sep 17 00:00:00 2001
2 From: Emilien Macchi <emilien@redhat.com>
3 Date: Tue, 3 Nov 2015 17:43:01 -0500
4 Subject: [PATCH] loadbalancer: add Aodh API support
6 Add Aodh (Ceilometer Alarming) support in TripleO Loadbalancer config.
8 Change-Id: I891985da9248a88c6ce2df1dd186881f582605ee
10 manifests/loadbalancer.pp | 43 +++++++++++++++++++++++++++++++++++++++++++
11 1 file changed, 43 insertions(+)
13 diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp
14 index 16a4f80..2fcfac6 100644
15 --- a/manifests/loadbalancer.pp
16 +++ b/manifests/loadbalancer.pp
18 # When set, enables SSL on the Ceilometer public API endpoint using the specified file.
21 +# [*aodh_certificate*]
22 +# Filename of an HAProxy-compatible certificate and key file
23 +# When set, enables SSL on the Aodh public API endpoint using the specified file.
26 # [*swift_certificate*]
27 # Filename of an HAProxy-compatible certificate and key file
28 # When set, enables SSL on the Swift public API endpoint using the specified file.
30 # (optional) Enable or not Ceilometer API binding
34 +# (optional) Enable or not Aodh API binding
37 # [*swift_proxy_server*]
38 # (optional) Enable or not Swift API binding
40 @@ -262,6 +271,7 @@ class tripleo::loadbalancer (
41 $glance_certificate = undef,
42 $nova_certificate = undef,
43 $ceilometer_certificate = undef,
44 + $aodh_certificate = undef,
45 $swift_certificate = undef,
46 $heat_certificate = undef,
47 $horizon_certificate = undef,
48 @@ -278,6 +288,7 @@ class tripleo::loadbalancer (
49 $nova_metadata = false,
50 $nova_novncproxy = false,
53 $swift_proxy_server = false,
55 $heat_cloudwatch = false,
56 @@ -421,6 +432,11 @@ class tripleo::loadbalancer (
58 $ceilometer_bind_certificate = $service_certificate
60 + if $aodh_certificate {
61 + $aodh_bind_certificate = $aodh_certificate
63 + $aodh_bind_certificate = $service_certificate
65 if $swift_certificate {
66 $swift_bind_certificate = $swift_certificate
68 @@ -558,6 +574,19 @@ class tripleo::loadbalancer (
72 + $aodh_api_vip = hiera('aodh_api_vip', $controller_virtual_ip)
73 + if $aodh_bind_certificate {
75 + "${aodh_api_vip}:8042" => [],
76 + "${public_virtual_ip}:13042" => ['ssl', 'crt', $aodh_bind_certificate],
80 + "${aodh_api_vip}:8042" => [],
81 + "${public_virtual_ip}:8042" => [],
85 $swift_proxy_vip = hiera('swift_proxy_vip', $controller_virtual_ip)
86 if $swift_bind_certificate {
88 @@ -840,6 +869,20 @@ class tripleo::loadbalancer (
93 + haproxy::listen { 'aodh':
94 + bind => $aodh_bind_opts,
95 + collect_exported => false,
97 + haproxy::balancermember { 'aodh':
98 + listening_service => 'aodh',
100 + ipaddresses => hiera('aodh_api_node_ips', $controller_hosts_real),
101 + server_names => $controller_hosts_names_real,
102 + options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
106 if $swift_proxy_server {
107 haproxy::listen { 'swift_proxy_server':
108 bind => $swift_bind_opts,