1 heat_template_version: pike
4 HAproxy service configured with Puppet
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.
18 description: Role name on which the service is applied
22 description: Parameters specific to the role
26 description: Mapping of service endpoint -> protocol. Typically set
27 via parameter_defaults in the resource registry.
30 description: Password for HAProxy stats endpoint
34 description: User for HAProxy stats endpoint
39 description: Syslog address where HAproxy will send its log
43 description: Whether or not to enable the HAProxy stats interface.
46 description: The password for Redis
49 MonitoringSubscriptionHaproxy:
50 default: 'overcloud-haproxy'
53 default: '/etc/ipa/ca.crt'
55 description: Specifies the default CA cert to use if TLS is used for
56 services in the internal network.
57 InternalTLSCRLPEMFile:
58 default: '/etc/pki/CA/crl/overcloud-crl.pem'
60 description: Specifies the default CRL PEM file to use for revocation if
61 TLS is used for services in the internal network.
66 type: OS::TripleO::Services::HAProxyPublicTLS
68 ServiceNetMap: {get_param: ServiceNetMap}
69 DefaultPasswords: {get_param: DefaultPasswords}
70 EndpointMap: {get_param: EndpointMap}
71 RoleName: {get_param: RoleName}
72 RoleParameters: {get_param: RoleParameters}
75 type: OS::TripleO::Services::HAProxyInternalTLS
77 ServiceNetMap: {get_param: ServiceNetMap}
78 DefaultPasswords: {get_param: DefaultPasswords}
79 EndpointMap: {get_param: EndpointMap}
80 RoleName: {get_param: RoleName}
81 RoleParameters: {get_param: RoleParameters}
85 description: Role data for the HAproxy role.
88 monitoring_subscription: {get_param: MonitoringSubscriptionHaproxy}
91 - get_attr: [HAProxyPublicTLS, role_data, config_settings]
92 - get_attr: [HAProxyInternalTLS, role_data, config_settings]
93 - tripleo.haproxy.firewall_rules:
96 tripleo::haproxy::haproxy_log_address: {get_param: HAProxySyslogAddress}
97 tripleo::haproxy::haproxy_stats_user: {get_param: HAProxyStatsUser}
98 tripleo::haproxy::haproxy_stats_password: {get_param: HAProxyStatsPassword}
99 tripleo::haproxy::redis_password: {get_param: RedisPassword}
100 tripleo::haproxy::ca_bundle: {get_param: InternalTLSCAFile}
101 tripleo::haproxy::crl_file: {get_param: InternalTLSCRLPEMFile}
102 tripleo::haproxy::haproxy_stats: {get_param: HAProxyStatsEnabled}
103 tripleo::profile::base::haproxy::certificates_specs:
105 - get_attr: [HAProxyPublicTLS, role_data, certificates_specs]
106 - get_attr: [HAProxyInternalTLS, role_data, certificates_specs]
108 include ::tripleo::profile::base::haproxy
110 - name: Check if haproxy is deployed
111 command: systemctl is-enabled haproxy
114 register: haproxy_enabled
115 - name: "PreUpgrade step0,validation: Check service haproxy is running"
116 shell: /usr/bin/systemctl show 'haproxy' --property ActiveState | grep '\bactive\b'
117 when: haproxy_enabled.rc == 0
118 tags: step0,validation
119 - name: Stop haproxy service
121 when: haproxy_enabled.rc == 0
122 service: name=haproxy state=stopped
123 - name: Start haproxy service
124 tags: step4 # Needed at step 4 for mysql
125 when: haproxy_enabled.rc == 0
126 service: name=haproxy state=started
129 - {get_attr: [HAProxyPublicTLS, role_data, metadata_settings]}
130 - {get_attr: [HAProxyInternalTLS, role_data, metadata_settings]}