1 heat_template_version: pike
4 HAproxy service configured with Puppet
9 description: Dictionary packing service data
13 description: Mapping of service_name -> network name. Typically set
14 via parameter_defaults in the resource registry. This
15 mapping overrides those in ServiceNetMapDefaults.
22 description: Role name on which the service is applied
26 description: Parameters specific to the role
30 description: Mapping of service endpoint -> protocol. Typically set
31 via parameter_defaults in the resource registry.
35 description: Whether to deploy a LoadBalancer, set to false when an external load balancer is used.
38 description: Password for HAProxy stats endpoint
42 description: User for HAProxy stats endpoint
47 description: Syslog address where HAproxy will send its log
51 description: Whether or not to enable the HAProxy stats interface.
54 description: The password for the redis service account.
57 MonitoringSubscriptionHaproxy:
58 default: 'overcloud-haproxy'
61 default: '/etc/ipa/ca.crt'
63 description: Specifies the default CA cert to use if TLS is used for
64 services in the internal network.
65 InternalTLSCRLPEMFile:
66 default: '/etc/pki/CA/crl/overcloud-crl.pem'
68 description: Specifies the default CRL PEM file to use for revocation if
69 TLS is used for services in the internal network.
74 type: OS::TripleO::Services::HAProxyPublicTLS
76 ServiceData: {get_param: ServiceData}
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}
84 type: OS::TripleO::Services::HAProxyInternalTLS
86 ServiceData: {get_param: ServiceData}
87 ServiceNetMap: {get_param: ServiceNetMap}
88 DefaultPasswords: {get_param: DefaultPasswords}
89 EndpointMap: {get_param: EndpointMap}
90 RoleName: {get_param: RoleName}
91 RoleParameters: {get_param: RoleParameters}
95 description: Role data for the HAproxy role.
98 monitoring_subscription: {get_param: MonitoringSubscriptionHaproxy}
101 - get_attr: [HAProxyPublicTLS, role_data, config_settings]
102 - get_attr: [HAProxyInternalTLS, role_data, config_settings]
103 - tripleo.haproxy.firewall_rules:
106 tripleo::haproxy::haproxy_log_address: {get_param: HAProxySyslogAddress}
107 tripleo::haproxy::haproxy_stats_user: {get_param: HAProxyStatsUser}
108 tripleo::haproxy::haproxy_stats_password: {get_param: HAProxyStatsPassword}
109 tripleo::haproxy::redis_password: {get_param: RedisPassword}
110 tripleo::haproxy::ca_bundle: {get_param: InternalTLSCAFile}
111 tripleo::haproxy::crl_file: {get_param: InternalTLSCRLPEMFile}
112 tripleo::haproxy::haproxy_stats: {get_param: HAProxyStatsEnabled}
113 enable_load_balancer: {get_param: EnableLoadBalancer}
114 tripleo::profile::base::haproxy::certificates_specs:
116 - get_attr: [HAProxyPublicTLS, role_data, certificates_specs]
117 - get_attr: [HAProxyInternalTLS, role_data, certificates_specs]
119 include ::tripleo::profile::base::haproxy
121 - name: Check if haproxy is deployed
122 command: systemctl is-enabled haproxy
125 register: haproxy_enabled
126 - name: "PreUpgrade step0,validation: Check service haproxy is running"
127 shell: /usr/bin/systemctl show 'haproxy' --property ActiveState | grep '\bactive\b'
128 when: haproxy_enabled.rc == 0
129 tags: step0,validation
130 - name: Stop haproxy service
132 when: haproxy_enabled.rc == 0
133 service: name=haproxy state=stopped
134 - name: Start haproxy service
135 tags: step4 # Needed at step 4 for mysql
136 when: haproxy_enabled.rc == 0
137 service: name=haproxy state=started
140 - {get_attr: [HAProxyPublicTLS, role_data, metadata_settings]}
141 - {get_attr: [HAProxyInternalTLS, role_data, metadata_settings]}