1 heat_template_version: pike
4 Apache service configured with Puppet. Note this is typically included
5 automatically via other services which run via Apache.
8 ApacheMaxRequestWorkers:
10 description: Maximum number of simultaneously processed requests.
14 description: Maximum number of Apache processes.
18 description: Mapping of service_name -> network name. Typically set
19 via parameter_defaults in the resource registry. This
20 mapping overrides those in ServiceNetMapDefaults.
27 description: Role name on which the service is applied
31 description: Parameters specific to the role
35 description: Mapping of service endpoint -> protocol. Typically set
36 via parameter_defaults in the resource registry.
42 default: '/etc/ipa/ca.crt'
44 description: Specifies the default CA cert to use if TLS is used for
45 services in the internal network.
49 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
57 # NOTE(jaosorior) Get unique network names to create
58 # certificates for those. We skip the tenant network since
59 # we don't need a certificate for that, and the external
60 # is for HAProxy so it isn't used for apache either.
62 expression: list($.data.map.items().map($1[1])).distinct().where($ != external and $ != tenant)
65 get_param: ServiceNetMap
69 description: Role data for the Apache role.
75 # for the given network; replacement examples (eg. for internal_api):
77 # internal_api_uri -> [IP]
78 # internal_api_subnet - > IP/CIDR
79 apache::ip: {get_param: [ServiceNetMap, ApacheNetwork]}
80 apache::default_vhost: false
81 apache::server_signature: 'Off'
82 apache::server_tokens: 'Prod'
83 apache_remote_proxy_ips_network:
85 template: "NETWORK_subnet"
87 NETWORK: {get_param: [ServiceNetMap, ApacheNetwork]}
88 apache::mod::prefork::maxclients: { get_param: ApacheMaxRequestWorkers }
89 apache::mod::prefork::serverlimit: { get_param: ApacheServerLimit }
90 apache::mod::remoteip::proxy_ips:
91 - "%{hiera('apache_remote_proxy_ips_network')}"
93 - internal_tls_enabled
95 generate_service_certificates: true
96 apache::mod::ssl::ssl_ca: {get_param: InternalTLSCAFile}
97 tripleo::certmonger::apache_dirs::certificate_dir: '/etc/pki/tls/certs/httpd'
98 tripleo::certmonger::apache_dirs::key_dir: '/etc/pki/tls/private/httpd'
99 apache_certificates_specs:
104 service_certificate: '/etc/pki/tls/certs/httpd/httpd-NETWORK.crt'
105 service_key: '/etc/pki/tls/private/httpd/httpd-NETWORK.key'
106 hostname: "%{hiera('fqdn_NETWORK')}"
107 principal: "HTTP/%{hiera('fqdn_NETWORK')}"
109 NETWORK: {get_attr: [ApacheNetworks, value]}
113 - internal_tls_enabled
121 $NETWORK: {get_attr: [ApacheNetworks, value]}
124 - name: Check if httpd is deployed
125 command: systemctl is-enabled httpd
128 register: httpd_enabled
129 - name: "PreUpgrade step0,validation: Check service httpd is running"
130 shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
131 when: httpd_enabled.rc == 0
132 tags: step0,validation
133 - name: Ensure mod_ssl package is installed
135 yum: name=mod_ssl state=latest