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: Mapping of service_name -> network name. Typically set
22 via parameter_defaults in the resource registry. This
23 mapping overrides those in ServiceNetMapDefaults.
30 description: Mapping of service endpoint -> protocol. Typically set
31 via parameter_defaults in the resource registry.
33 DeployedSSLCertificatePath:
34 default: '/etc/pki/tls/private/overcloud_endpoint.pem'
36 The filepath of the certificate as it will be stored in the controller.
40 description: Role name on which the service is applied
44 description: Parameters specific to the role
50 type: ../../../puppet/services/pacemaker/haproxy.yaml
52 EndpointMap: {get_param: EndpointMap}
53 ServiceNetMap: {get_param: ServiceNetMap}
54 DefaultPasswords: {get_param: DefaultPasswords}
55 RoleName: {get_param: RoleName}
56 RoleParameters: {get_param: RoleParameters}
60 description: Role data for the HAproxy role.
62 service_name: {get_attr: [HAProxyBase, role_data, service_name]}
65 - get_attr: [HAProxyBase, role_data, config_settings]
66 - tripleo::haproxy::haproxy_daemon: false
68 tripleo::profile::pacemaker::haproxy_bundle::haproxy_docker_image: &haproxy_image
71 - [ {get_param: DockerNamespace}, {get_param: DockerHAProxyImage} ]
73 service_config_settings: {get_attr: [HAProxyBase, role_data, service_config_settings]}
74 # BEGIN DOCKER SETTINGS
76 config_volume: haproxy
77 puppet_tags: haproxy_config
81 - - "exec {'wait-for-settle': command => '/bin/true' }"
82 - "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){}"
83 - "['pcmk_bundle', 'pcmk_resource', 'pcmk_property', 'pcmk_constraint', 'pcmk_resource_default'].each |String $val| { noop_resource($val) }"
84 - 'include ::tripleo::profile::pacemaker::haproxy_bundle'
88 - [ {get_param: DockerNamespace}, {get_param: DockerHAProxyConfigImage} ]
89 volumes: &deployed_cert_mount
92 - - {get_param: DeployedSSLCertificatePath}
93 - {get_param: DeployedSSLCertificatePath}
96 /var/lib/kolla/config_files/haproxy.json:
97 command: haproxy -f /etc/haproxy/haproxy.cfg
113 - - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
114 - "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
116 TAGS: 'tripleo::firewall::rule,pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ip,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
120 - - 'include ::tripleo::profile::base::pacemaker'
121 - 'include ::tripleo::profile::pacemaker::haproxy_bundle'
122 image: *haproxy_image
125 - *deployed_cert_mount
127 # puppet saves iptables rules in /etc/sysconfig
128 - /etc/sysconfig:/etc/sysconfig:rw
129 # saving rules require accessing /usr/libexec/iptables/iptables.init, just bind-mount
130 # the necessary bit and prevent systemd to try to reload the service in the container
131 - /usr/libexec/iptables:/usr/libexec/iptables:ro
132 - /usr/libexec/initscripts/legacy-actions:/usr/libexec/initscripts/legacy-actions:ro
133 - /etc/hosts:/etc/hosts:ro
134 - /etc/localtime:/etc/localtime:ro
135 - /etc/puppet:/tmp/puppet-etc:ro
136 - /usr/share/openstack-puppet/modules:/usr/share/openstack-puppet/modules:ro
137 - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
138 - /dev/shm:/dev/shm:rw
140 get_attr: [HAProxyBase, role_data, metadata_settings]