Syntax updates to OOO network isolation file
[apex.git] / build / aodh-puppet-tripleo.patch
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
5
6 Add Aodh (Ceilometer Alarming) support in TripleO Loadbalancer config.
7
8 Change-Id: I891985da9248a88c6ce2df1dd186881f582605ee
9 ---
10  manifests/loadbalancer.pp | 43 +++++++++++++++++++++++++++++++++++++++++++
11  1 file changed, 43 insertions(+)
12
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
17 @@ -130,6 +130,11 @@
18  #  When set, enables SSL on the Ceilometer public API endpoint using the specified file.
19  #  Defaults to undef
20  #
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.
24 +#  Defaults to undef
25 +#
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.
29 @@ -198,6 +203,10 @@
30  #  (optional) Enable or not Ceilometer API binding
31  #  Defaults to false
32  #
33 +# [*aodh*]
34 +#  (optional) Enable or not Aodh API binding
35 +#  Defaults to false
36 +#
37  # [*swift_proxy_server*]
38  #  (optional) Enable or not Swift API binding
39  #  Defaults to false
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,
51    $ceilometer                = false,
52 +  $aodh                      = false,
53    $swift_proxy_server        = false,
54    $heat_api                  = false,
55    $heat_cloudwatch           = false,
56 @@ -421,6 +432,11 @@ class tripleo::loadbalancer (
57    } else {
58      $ceilometer_bind_certificate = $service_certificate
59    }
60 +  if $aodh_certificate {
61 +    $aodh_bind_certificate = $aodh_certificate
62 +  } else {
63 +    $aodh_bind_certificate = $service_certificate
64 +  }
65    if $swift_certificate {
66      $swift_bind_certificate = $swift_certificate
67    } else {
68 @@ -558,6 +574,19 @@ class tripleo::loadbalancer (
69      }
70    }
71  
72 +  $aodh_api_vip = hiera('aodh_api_vip', $controller_virtual_ip)
73 +  if $aodh_bind_certificate {
74 +    $aodh_bind_opts = {
75 +      "${aodh_api_vip}:8042" => [],
76 +      "${public_virtual_ip}:13042" => ['ssl', 'crt', $aodh_bind_certificate],
77 +    }
78 +  } else {
79 +    $aodh_bind_opts = {
80 +      "${aodh_api_vip}:8042" => [],
81 +      "${public_virtual_ip}:8042" => [],
82 +    }
83 +  }
84 +
85    $swift_proxy_vip = hiera('swift_proxy_vip', $controller_virtual_ip)
86    if $swift_bind_certificate {
87      $swift_bind_opts = {
88 @@ -840,6 +869,20 @@ class tripleo::loadbalancer (
89      }
90    }
91  
92 +  if $aodh {
93 +    haproxy::listen { 'aodh':
94 +      bind             => $aodh_bind_opts,
95 +      collect_exported => false,
96 +    }
97 +    haproxy::balancermember { 'aodh':
98 +      listening_service => 'aodh',
99 +      ports             => '8042',
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'],
103 +    }
104 +  }
105 +
106    if $swift_proxy_server {
107      haproxy::listen { 'swift_proxy_server':
108        bind             => $swift_bind_opts,
109 -- 
110 1.8.3.1
111