df52ad58e39a2e95b2207e73de924725c304fbec
[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 allowed to connect to horizon
28     type: comma_delimited_list
29   HorizonSecret:
30     description: Secret key for Django
31     type: string
32     hidden: true
33     default: ''
34   NeutronMechanismDrivers:
35     default: 'openvswitch'
36     description: |
37         The mechanism drivers for the Neutron tenant network.
38     type: comma_delimited_list
39   MemcachedIPv6:
40     default: false
41     description: Enable IPv6 features in Memcached.
42     type: boolean
43
44 outputs:
45   role_data:
46     description: Role data for the Horizon role.
47     value:
48       service_name: horizon
49       config_settings:
50         horizon::allowed_hosts: {get_param: HorizonAllowedHosts}
51         neutron::plugins::ml2::mechanism_drivers:
52           str_replace:
53             template: MECHANISMS
54             params:
55               MECHANISMS: {get_param: NeutronMechanismDrivers}
56         tripleo.horizon.firewall_rules:
57           '126 horizon':
58             dport:
59               - 80
60               - 443
61         horizon::cache_backend: django.core.cache.backends.memcached.MemcachedCache
62         horizon::django_session_engine: 'django.contrib.sessions.backends.cache'
63         horizon::vhost_extra_params:
64           add_listen: false
65           priority: 10
66           access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
67         horizon::bind_address: {get_param: [ServiceNetMap, HorizonNetwork]}
68         horizon::django_debug: {get_param: Debug}
69         horizon::keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
70         horizon::secret_key:
71           yaql:
72             expression: $.data.passwords.where($ != '').first()
73             data:
74               passwords:
75                 - {get_param: HorizonSecret}
76                 - {get_param: [DefaultPasswords, horizon_secret]}
77         memcached_ipv6: {get_param: MemcachedIPv6}
78       step_config: |
79         include ::tripleo::profile::base::horizon