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: Mapping of service endpoint -> protocol. Typically set
28 via parameter_defaults in the resource registry.
36 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
44 # NOTE(jaosorior) Get unique network names to create
45 # certificates for those. We skip the tenant network since
46 # we don't need a certificate for that, and the external
47 # is for HAProxy so it isn't used for apache either.
49 expression: list($.data.map.items().map($1[1])).distinct().where($ != external and $ != tenant)
52 get_param: ServiceNetMap
56 description: Role data for the Apache role.
62 # for the given network; replacement examples (eg. for internal_api):
64 # internal_api_uri -> [IP]
65 # internal_api_subnet - > IP/CIDR
66 apache::ip: {get_param: [ServiceNetMap, ApacheNetwork]}
67 apache::server_signature: 'Off'
68 apache::server_tokens: 'Prod'
69 apache_remote_proxy_ips_network:
71 template: "NETWORK_subnet"
73 NETWORK: {get_param: [ServiceNetMap, ApacheNetwork]}
74 apache::mod::prefork::maxclients: { get_param: ApacheMaxRequestWorkers }
75 apache::mod::prefork::serverlimit: { get_param: ApacheServerLimit }
76 apache::mod::remoteip::proxy_ips:
77 - "%{hiera('apache_remote_proxy_ips_network')}"
79 generate_service_certificates: true
80 apache_certificates_specs:
85 service_certificate: '/etc/pki/tls/certs/httpd-NETWORK.crt'
86 service_key: '/etc/pki/tls/private/httpd-NETWORK.key'
87 hostname: "%{hiera('fqdn_NETWORK')}"
88 principal: "HTTP/%{hiera('fqdn_NETWORK')}"
90 NETWORK: {get_attr: [ApacheNetworks, value]}
93 - internal_tls_enabled
101 $NETWORK: {get_attr: [ApacheNetworks, value]}
104 - name: Check if httpd is deployed
105 command: systemctl is-enabled httpd
108 register: httpd_enabled
109 - name: "PreUpgrade step0,validation: Check service httpd is running"
110 shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
111 when: httpd_enabled.rc == 0
112 tags: step0,validation