1 heat_template_version: pike
4 OpenStack containerized HAproxy service for pacemaker
9 default: 'tripleoupstream'
13 default: 'centos-binary-haproxy:latest'
15 DockerHAProxyConfigImage:
16 description: The container image to use for the haproxy config_volume
17 default: 'centos-binary-haproxy:latest'
21 description: Dictionary packing service data
25 description: Mapping of service_name -> network name. Typically set
26 via parameter_defaults in the resource registry. This
27 mapping overrides those in ServiceNetMapDefaults.
34 description: Mapping of service endpoint -> protocol. Typically set
35 via parameter_defaults in the resource registry.
37 DeployedSSLCertificatePath:
38 default: '/etc/pki/tls/private/overcloud_endpoint.pem'
40 The filepath of the certificate as it will be stored in the controller.
44 description: Role name on which the service is applied
48 description: Parameters specific to the role
54 type: ../../../puppet/services/pacemaker/haproxy.yaml
56 EndpointMap: {get_param: EndpointMap}
57 ServiceData: {get_param: ServiceData}
58 ServiceNetMap: {get_param: ServiceNetMap}
59 DefaultPasswords: {get_param: DefaultPasswords}
60 RoleName: {get_param: RoleName}
61 RoleParameters: {get_param: RoleParameters}
65 description: Role data for the HAproxy role.
67 service_name: {get_attr: [HAProxyBase, role_data, service_name]}
70 - get_attr: [HAProxyBase, role_data, config_settings]
71 - tripleo::haproxy::haproxy_daemon: false
73 tripleo::profile::pacemaker::haproxy_bundle::haproxy_docker_image: &haproxy_image
76 - [ {get_param: DockerNamespace}, {get_param: DockerHAProxyImage} ]
78 service_config_settings: {get_attr: [HAProxyBase, role_data, service_config_settings]}
79 # BEGIN DOCKER SETTINGS
81 config_volume: haproxy
82 puppet_tags: haproxy_config
86 - - "exec {'wait-for-settle': command => '/bin/true' }"
87 - "class tripleo::firewall(){}; define tripleo::firewall::rule( $port = undef, $dport = undef, $sport = undef, $proto = undef, $action = undef, $state = undef, $source = undef, $iniface = undef, $chain = undef, $destination = undef, $extras = undef){}"
88 - "['pcmk_bundle', 'pcmk_resource', 'pcmk_property', 'pcmk_constraint', 'pcmk_resource_default'].each |String $val| { noop_resource($val) }"
89 - 'include ::tripleo::profile::pacemaker::haproxy_bundle'
93 - [ {get_param: DockerNamespace}, {get_param: DockerHAProxyConfigImage} ]
94 volumes: &deployed_cert_mount
97 - - {get_param: DeployedSSLCertificatePath}
98 - {get_param: DeployedSSLCertificatePath}
101 /var/lib/kolla/config_files/haproxy.json:
102 command: haproxy -f /etc/haproxy/haproxy.cfg
104 - source: "/var/lib/kolla/config_files/src/*"
107 preserve_properties: true
124 - - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
125 - "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
127 TAGS: 'tripleo::firewall::rule,pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ip,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
131 - - 'include ::tripleo::profile::base::pacemaker'
132 - 'include ::tripleo::profile::pacemaker::haproxy_bundle'
133 image: *haproxy_image
136 - *deployed_cert_mount
138 # puppet saves iptables rules in /etc/sysconfig
139 - /etc/sysconfig:/etc/sysconfig:rw
140 # saving rules require accessing /usr/libexec/iptables/iptables.init, just bind-mount
141 # the necessary bit and prevent systemd to try to reload the service in the container
142 - /usr/libexec/iptables:/usr/libexec/iptables:ro
143 - /usr/libexec/initscripts/legacy-actions:/usr/libexec/initscripts/legacy-actions:ro
144 - /etc/hosts:/etc/hosts:ro
145 - /etc/localtime:/etc/localtime:ro
146 - /etc/puppet:/tmp/puppet-etc:ro
147 - /usr/share/openstack-puppet/modules:/usr/share/openstack-puppet/modules:ro
148 - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
149 - /dev/shm:/dev/shm:rw
151 get_attr: [HAProxyBase, role_data, metadata_settings]