aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/services/horizon.yaml
blob: 1ea686b9b20770b8e013c5e949a0c825c0b1a8ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
heat_template_version: 2016-10-14

description: >
  Horizon service configured with Puppet

parameters:
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  Debug:
    default: ''
    description: Set to True to enable debugging on all services.
    type: string
  DefaultPasswords:
    default: {}
    type: json
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  HorizonAllowedHosts:
    default: '*'
    description: A list of IP/Hostname allowed to connect to horizon
    type: comma_delimited_list
  HorizonSecret:
    description: Secret key for Django
    type: string
    hidden: true
    default: ''
  NeutronMechanismDrivers:
    default: 'openvswitch'
    description: |
        The mechanism drivers for the Neutron tenant network.
    type: comma_delimited_list
  MemcachedIPv6:
    default: false
    description: Enable IPv6 features in Memcached.
    type: boolean

outputs:
  role_data:
    description: Role data for the Horizon role.
    value:
      service_name: horizon
      config_settings:
        horizon::allowed_hosts: {get_param: HorizonAllowedHosts}
        neutron::plugins::ml2::mechanism_drivers:
          str_replace:
            template: MECHANISMS
            params:
              MECHANISMS: {get_param: NeutronMechanismDrivers}
        tripleo.horizon.firewall_rules:
          '126 horizon':
            dport:
              - 80
              - 443
        horizon::cache_backend: django.core.cache.backends.memcached.MemcachedCache
        horizon::django_session_engine: 'django.contrib.sessions.backends.cache'
        horizon::vhost_extra_params:
          add_listen: false
          priority: 10
          access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
        # NOTE: bind IP is found in Heat replacing the network name with the local node IP
        # for the given network; replacement examples (eg. for internal_api):
        # internal_api -> IP
        # internal_api_uri -> [IP]
        # internal_api_subnet - > IP/CIDR
        apache::ip: {get_param: [ServiceNetMap, HorizonNetwork]}
        apache_remote_proxy_ips_network:
          str_replace:
            template: "NETWORK_subnet"
            params:
              NETWORK: {get_param: [ServiceNetMap, HorizonNetwork]}
        apache::mod::remoteip::proxy_ips:
          - "%{hiera('apache_remote_proxy_ips_network')}"
        horizon::bind_address: {get_param: [ServiceNetMap, HorizonNetwork]}
        horizon::django_debug: {get_param: Debug}
        horizon::keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
        horizon::secret_key:
          yaql:
            expression: $.data.passwords.where($ != '').first()
            data:
              passwords:
                - {get_param: HorizonSecret}
                - {get_param: [DefaultPasswords, horizon_secret]}
        memcached_ipv6: {get_param: MemcachedIPv6}
      step_config: |
        include ::tripleo::profile::base::horizon