1 heat_template_version: ocata
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.
44 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
52 # NOTE(jaosorior) Get unique network names to create
53 # certificates for those. We skip the tenant network since
54 # we don't need a certificate for that, and the external
55 # is for HAProxy so it isn't used for apache either.
57 expression: list($.data.map.items().map($1[1])).distinct().where($ != external and $ != tenant)
60 get_param: ServiceNetMap
64 description: Role data for the Apache role.
70 # for the given network; replacement examples (eg. for internal_api):
72 # internal_api_uri -> [IP]
73 # internal_api_subnet - > IP/CIDR
74 apache::ip: {get_param: [ServiceNetMap, ApacheNetwork]}
75 apache::default_vhost: false
76 apache::server_signature: 'Off'
77 apache::server_tokens: 'Prod'
78 apache_remote_proxy_ips_network:
80 template: "NETWORK_subnet"
82 NETWORK: {get_param: [ServiceNetMap, ApacheNetwork]}
83 apache::mod::prefork::maxclients: { get_param: ApacheMaxRequestWorkers }
84 apache::mod::prefork::serverlimit: { get_param: ApacheServerLimit }
85 apache::mod::remoteip::proxy_ips:
86 - "%{hiera('apache_remote_proxy_ips_network')}"
88 - internal_tls_enabled
90 generate_service_certificates: true
91 tripleo::certmonger::apache_dirs::certificate_dir: '/etc/pki/tls/certs/httpd'
92 tripleo::certmonger::apache_dirs::key_dir: '/etc/pki/tls/private/httpd'
93 apache_certificates_specs:
98 service_certificate: '/etc/pki/tls/certs/httpd/httpd-NETWORK.crt'
99 service_key: '/etc/pki/tls/private/httpd/httpd-NETWORK.key'
100 hostname: "%{hiera('fqdn_NETWORK')}"
101 principal: "HTTP/%{hiera('fqdn_NETWORK')}"
103 NETWORK: {get_attr: [ApacheNetworks, value]}
107 - internal_tls_enabled
115 $NETWORK: {get_attr: [ApacheNetworks, value]}
118 - name: Check if httpd is deployed
119 command: systemctl is-enabled httpd
122 register: httpd_enabled
123 - name: "PreUpgrade step0,validation: Check service httpd is running"
124 shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
125 when: httpd_enabled.rc == 0
126 tags: step0,validation
127 - name: Ensure mod_ssl package is installed
129 yum: name=mod_ssl state=latest