Merge "Enable proxy headers parsing for Ceilometer"
[apex-tripleo-heat-templates.git] / puppet / services / haproxy.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   HAproxy service configured with Puppet
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   HAProxyStatsPassword:
22     description: Password for HAProxy stats endpoint
23     hidden: true
24     type: string
25   HAProxyStatsUser:
26     description: User for HAProxy stats endpoint
27     default: admin
28     type: string
29   HAProxySyslogAddress:
30     default: /dev/log
31     description: Syslog address where HAproxy will send its log
32     type: string
33   RedisPassword:
34     description: The password for Redis
35     type: string
36     hidden: true
37   ControlVirtualInterface:
38     default: 'br-ex'
39     description: Interface where virtual ip will be assigned.
40     type: string
41   PublicVirtualInterface:
42     default: 'br-ex'
43     description: >
44         Specifies the interface where the public-facing virtual ip will be assigned.
45         This should be int_public when a VLAN is being used.
46     type: string
47   MonitoringSubscriptionHaproxy:
48     default: 'overcloud-haproxy'
49     type: string
50
51 resources:
52
53   HAProxyPublicTLS:
54     type: OS::TripleO::Services::HAProxyPublicTLS
55     properties:
56       ServiceNetMap: {get_param: ServiceNetMap}
57       DefaultPasswords: {get_param: DefaultPasswords}
58       EndpointMap: {get_param: EndpointMap}
59
60   HAProxyInternalTLS:
61     type: OS::TripleO::Services::HAProxyInternalTLS
62     properties:
63       ServiceNetMap: {get_param: ServiceNetMap}
64       DefaultPasswords: {get_param: DefaultPasswords}
65       EndpointMap: {get_param: EndpointMap}
66
67 outputs:
68   role_data:
69     description: Role data for the HAproxy role.
70     value:
71       service_name: haproxy
72       monitoring_subscription: {get_param: MonitoringSubscriptionHaproxy}
73       config_settings:
74         map_merge:
75           - get_attr: [HAProxyPublicTLS, role_data, config_settings]
76           - get_attr: [HAProxyInternalTLS, role_data, config_settings]
77           - tripleo.haproxy.firewall_rules:
78               '107 haproxy stats':
79                 dport: 1993
80             tripleo::haproxy::haproxy_log_address: {get_param: HAProxySyslogAddress}
81             tripleo::haproxy::haproxy_stats_user: {get_param: HAProxyStatsUser}
82             tripleo::haproxy::haproxy_stats_password: {get_param: HAProxyStatsPassword}
83             tripleo::haproxy::redis_password: {get_param: RedisPassword}
84             tripleo::haproxy::control_virtual_interface: {get_param: ControlVirtualInterface}
85             tripleo::haproxy::public_virtual_interface: {get_param: PublicVirtualInterface}
86             tripleo::profile::base::haproxy::certificates_specs:
87               map_merge:
88                 - get_attr: [HAProxyPublicTLS, role_data, certificates_specs]
89                 - get_attr: [HAProxyInternalTLS, role_data, certificates_specs]
90       step_config: |
91         include ::tripleo::profile::base::haproxy