d7f1075720826a805169a79804b24204adac9071
[apex-tripleo-heat-templates.git] / puppet / services / horizon.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   Horizon service configured with Puppet
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   Debug:
14     default: ''
15     description: Set to True to enable debugging on all services.
16     type: string
17   DefaultPasswords:
18     default: {}
19     type: json
20   EndpointMap:
21     default: {}
22     description: Mapping of service endpoint -> protocol. Typically set
23                  via parameter_defaults in the resource registry.
24     type: json
25   HorizonAllowedHosts:
26     default: '*'
27     description: A list of IP/Hostname for the server Horizon is running on.
28                  Used for header checks.
29     type: comma_delimited_list
30   HorizonSecret:
31     description: Secret key for Django
32     type: string
33     hidden: true
34     default: ''
35   MemcachedIPv6:
36     default: false
37     description: Enable IPv6 features in Memcached.
38     type: boolean
39   MonitoringSubscriptionHorizon:
40     default: 'overcloud-horizon'
41     type: string
42
43 conditions:
44
45   debug_empty: {equals : [{get_param: Debug}, '']}
46
47 outputs:
48   role_data:
49     description: Role data for the Horizon role.
50     value:
51       service_name: horizon
52       monitoring_subscription: {get_param: MonitoringSubscriptionHorizon}
53       config_settings:
54         map_merge:
55         - horizon::allowed_hosts: {get_param: HorizonAllowedHosts}
56           tripleo.horizon.firewall_rules:
57             '126 horizon':
58               dport:
59                 - 80
60                 - 443
61           horizon::enable_secure_proxy_ssl_header: true
62           horizon::disable_password_reveal: true
63           horizon::enforce_password_check: true
64           horizon::disallow_iframe_embed: true
65           horizon::cache_backend: django.core.cache.backends.memcached.MemcachedCache
66           horizon::django_session_engine: 'django.contrib.sessions.backends.cache'
67           horizon::vhost_extra_params:
68             add_listen: false
69             priority: 10
70             access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
71             options: ['FollowSymLinks','MultiViews']
72           horizon::bind_address: {get_param: [ServiceNetMap, HorizonNetwork]}
73           horizon::keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
74           horizon::secret_key:
75             yaql:
76               expression: $.data.passwords.where($ != '').first()
77               data:
78                 passwords:
79                   - {get_param: HorizonSecret}
80                   - {get_param: [DefaultPasswords, horizon_secret]}
81           memcached_ipv6: {get_param: MemcachedIPv6}
82         -
83           if:
84           - debug_empty
85           - {}
86           - horizon::django_debug: {get_param: Debug}
87       step_config: |
88         include ::tripleo::profile::base::horizon