Browse Source

Horizon service cleanups for hiera json hook

This patch resolves a few issues I noticed when porting our
Horizon service to support the new heat hiera agent hook (which
uses Json instead of Yaml).

 -we only need to set django_debug if the string is non-empty. This
  should match previous behavior.

 -remove the duplicated NeutronMechanismDrivers setting. This is already
  managed in the neutron services and shouldn't be set here.

Change-Id: I473e110bb9b14cb8f57d41c4fc398871548726b0
Partial-bug: #1596373
tags/6.0.0.0b1
Dan Prince 2 years ago
parent
commit
133edad130
1 changed files with 34 additions and 35 deletions
  1. 34
    35
      puppet/services/horizon.yaml

+ 34
- 35
puppet/services/horizon.yaml View File

@@ -24,7 +24,7 @@ parameters:
24 24
     type: json
25 25
   HorizonAllowedHosts:
26 26
     default: '*'
27
-    description: A list of IP/Hostname for the server Horizonis running on.
27
+    description: A list of IP/Hostname for the server Horizon is running on.
28 28
                  Used for header checks.
29 29
     type: comma_delimited_list
30 30
   HorizonSecret:
@@ -32,11 +32,6 @@ parameters:
32 32
     type: string
33 33
     hidden: true
34 34
     default: ''
35
-  NeutronMechanismDrivers:
36
-    default: 'openvswitch'
37
-    description: |
38
-        The mechanism drivers for the Neutron tenant network.
39
-    type: comma_delimited_list
40 35
   MemcachedIPv6:
41 36
     default: false
42 37
     description: Enable IPv6 features in Memcached.
@@ -45,6 +40,10 @@ parameters:
45 40
     default: 'overcloud-horizon'
46 41
     type: string
47 42
 
43
+conditions:
44
+
45
+  debug_empty: {equals : [{get_param: Debug}, '']}
46
+
48 47
 outputs:
49 48
   role_data:
50 49
     description: Role data for the Horizon role.
@@ -52,34 +51,34 @@ outputs:
52 51
       service_name: horizon
53 52
       monitoring_subscription: {get_param: MonitoringSubscriptionHorizon}
54 53
       config_settings:
55
-        horizon::allowed_hosts: {get_param: HorizonAllowedHosts}
56
-        neutron::plugins::ml2::mechanism_drivers:
57
-          str_replace:
58
-            template: MECHANISMS
59
-            params:
60
-              MECHANISMS: {get_param: NeutronMechanismDrivers}
61
-        tripleo.horizon.firewall_rules:
62
-          '126 horizon':
63
-            dport:
64
-              - 80
65
-              - 443
66
-        horizon::disable_password_reveal: true
67
-        horizon::cache_backend: django.core.cache.backends.memcached.MemcachedCache
68
-        horizon::django_session_engine: 'django.contrib.sessions.backends.cache'
69
-        horizon::vhost_extra_params:
70
-          add_listen: false
71
-          priority: 10
72
-          access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
73
-        horizon::bind_address: {get_param: [ServiceNetMap, HorizonNetwork]}
74
-        horizon::django_debug: {get_param: Debug}
75
-        horizon::keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
76
-        horizon::secret_key:
77
-          yaql:
78
-            expression: $.data.passwords.where($ != '').first()
79
-            data:
80
-              passwords:
81
-                - {get_param: HorizonSecret}
82
-                - {get_param: [DefaultPasswords, horizon_secret]}
83
-        memcached_ipv6: {get_param: MemcachedIPv6}
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::disable_password_reveal: true
62
+          horizon::cache_backend: django.core.cache.backends.memcached.MemcachedCache
63
+          horizon::django_session_engine: 'django.contrib.sessions.backends.cache'
64
+          horizon::vhost_extra_params:
65
+            add_listen: false
66
+            priority: 10
67
+            access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
68
+          horizon::bind_address: {get_param: [ServiceNetMap, HorizonNetwork]}
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
+        -
79
+          if:
80
+          - debug_empty
81
+          - {}
82
+          - horizon::django_debug: {get_param: Debug}
84 83
       step_config: |
85 84
         include ::tripleo::profile::base::horizon

Loading…
Cancel
Save