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
42 description: The password for Redis
45 MonitoringSubscriptionHaproxy:
46 default: 'overcloud-haproxy'
49 default: '/etc/ipa/ca.crt'
51 description: Specifies the default CA cert to use if TLS is used for
52 services in the internal network.
53 InternalTLSCRLPEMFile:
54 default: '/etc/pki/CA/crl/overcloud-crl.pem'
56 description: Specifies the default CRL PEM file to use for revocation if
57 TLS is used for services in the internal network.
62 type: OS::TripleO::Services::HAProxyPublicTLS
64 ServiceNetMap: {get_param: ServiceNetMap}
65 DefaultPasswords: {get_param: DefaultPasswords}
66 EndpointMap: {get_param: EndpointMap}
67 RoleName: {get_param: RoleName}
68 RoleParameters: {get_param: RoleParameters}
71 type: OS::TripleO::Services::HAProxyInternalTLS
73 ServiceNetMap: {get_param: ServiceNetMap}
74 DefaultPasswords: {get_param: DefaultPasswords}
75 EndpointMap: {get_param: EndpointMap}
76 RoleName: {get_param: RoleName}
77 RoleParameters: {get_param: RoleParameters}
81 description: Role data for the HAproxy role.
84 monitoring_subscription: {get_param: MonitoringSubscriptionHaproxy}
87 - get_attr: [HAProxyPublicTLS, role_data, config_settings]
88 - get_attr: [HAProxyInternalTLS, role_data, config_settings]
89 - tripleo.haproxy.firewall_rules:
92 tripleo::haproxy::haproxy_log_address: {get_param: HAProxySyslogAddress}
93 tripleo::haproxy::haproxy_stats_user: {get_param: HAProxyStatsUser}
94 tripleo::haproxy::haproxy_stats_password: {get_param: HAProxyStatsPassword}
95 tripleo::haproxy::redis_password: {get_param: RedisPassword}
96 tripleo::haproxy::ca_bundle: {get_param: InternalTLSCAFile}
97 tripleo::haproxy::crl_file: {get_param: InternalTLSCRLPEMFile}
98 tripleo::profile::base::haproxy::certificates_specs:
100 - get_attr: [HAProxyPublicTLS, role_data, certificates_specs]
101 - get_attr: [HAProxyInternalTLS, role_data, certificates_specs]
103 include ::tripleo::profile::base::haproxy
105 - name: Check if haproxy is deployed
106 command: systemctl is-enabled haproxy
109 register: haproxy_enabled
110 - name: "PreUpgrade step0,validation: Check service haproxy is running"
111 shell: /usr/bin/systemctl show 'haproxy' --property ActiveState | grep '\bactive\b'
112 when: haproxy_enabled.rc == 0
113 tags: step0,validation
114 - name: Stop haproxy service
116 when: haproxy_enabled.rc == 0
117 service: name=haproxy state=stopped
118 - name: Start haproxy service
119 tags: step4 # Needed at step 4 for mysql
120 when: haproxy_enabled.rc == 0
121 service: name=haproxy state=started
124 - {get_attr: [HAProxyPublicTLS, role_data, metadata_settings]}
125 - {get_attr: [HAProxyInternalTLS, role_data, metadata_settings]}