Adds missing firewall rules for OpenDaylight API service
[apex-tripleo-heat-templates.git] / puppet / services / horizon.yaml
index 1ea686b..e59dc20 100644 (file)
@@ -24,69 +24,64 @@ parameters:
     type: json
   HorizonAllowedHosts:
     default: '*'
-    description: A list of IP/Hostname allowed to connect to horizon
+    description: A list of IP/Hostname for the server Horizon is running on.
+                 Used for header checks.
     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
+  MonitoringSubscriptionHorizon:
+    default: 'overcloud-horizon'
+    type: string
+
+conditions:
+
+  debug_empty: {equals : [{get_param: Debug}, '']}
 
 outputs:
   role_data:
     description: Role data for the Horizon role.
     value:
       service_name: horizon
+      monitoring_subscription: {get_param: MonitoringSubscriptionHorizon}
       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}
+        map_merge:
+        - horizon::allowed_hosts: {get_param: HorizonAllowedHosts}
+          tripleo.horizon.firewall_rules:
+            '126 horizon':
+              dport:
+                - 80
+                - 443
+          horizon::enable_secure_proxy_ssl_header: true
+          horizon::disable_password_reveal: true
+          horizon::enforce_password_check: true
+          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\"'
+            options: ['FollowSymLinks','MultiViews']
+          horizon::bind_address: {get_param: [ServiceNetMap, HorizonNetwork]}
+          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}
+        -
+          if:
+          - debug_empty
+          - {}
+          - horizon::django_debug: {get_param: Debug}
       step_config: |
         include ::tripleo::profile::base::horizon