2017-02-17 11:12:36 +01:00
|
|
|
heat_template_version: pike
|
2016-06-29 15:25:23 +02:00
|
|
|
|
|
|
|
description: >
|
|
|
|
Horizon service configured with Puppet
|
|
|
|
|
|
|
|
parameters:
|
2016-08-11 23:07:46 +02:00
|
|
|
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
|
2016-08-26 12:41:53 -04:00
|
|
|
Debug:
|
|
|
|
default: ''
|
|
|
|
description: Set to True to enable debugging on all services.
|
|
|
|
type: string
|
2016-08-17 09:26:05 -04:00
|
|
|
DefaultPasswords:
|
|
|
|
default: {}
|
|
|
|
type: json
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName:
|
|
|
|
default: ''
|
|
|
|
description: Role name on which the service is applied
|
|
|
|
type: string
|
|
|
|
RoleParameters:
|
|
|
|
default: {}
|
|
|
|
description: Parameters specific to the role
|
|
|
|
type: json
|
2016-06-29 15:25:23 +02:00
|
|
|
EndpointMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
|
|
via parameter_defaults in the resource registry.
|
|
|
|
type: json
|
|
|
|
HorizonAllowedHosts:
|
|
|
|
default: '*'
|
2016-11-03 07:44:17 -04:00
|
|
|
description: A list of IP/Hostname for the server Horizon is running on.
|
2016-08-30 09:56:54 +02:00
|
|
|
Used for header checks.
|
2016-06-29 15:25:23 +02:00
|
|
|
type: comma_delimited_list
|
2016-12-21 13:57:47 +00:00
|
|
|
HorizonPasswordValidator:
|
|
|
|
description: Regex for password validation
|
|
|
|
type: string
|
|
|
|
default: ''
|
|
|
|
HorizonPasswordValidatorHelp:
|
|
|
|
description: Help text for password validation
|
|
|
|
type: string
|
|
|
|
default: ''
|
2016-08-26 12:41:53 -04:00
|
|
|
HorizonSecret:
|
|
|
|
description: Secret key for Django
|
|
|
|
type: string
|
|
|
|
hidden: true
|
|
|
|
default: ''
|
2017-03-07 13:13:52 +00:00
|
|
|
HorizonSecureCookies:
|
|
|
|
description: Set CSRF_COOKIE_SECURE / SESSION_COOKIE_SECURE in Horizon
|
|
|
|
type: boolean
|
|
|
|
default: true
|
2016-08-26 12:41:53 -04:00
|
|
|
MemcachedIPv6:
|
|
|
|
default: false
|
|
|
|
description: Enable IPv6 features in Memcached.
|
|
|
|
type: boolean
|
2016-06-09 15:39:22 +02:00
|
|
|
MonitoringSubscriptionHorizon:
|
|
|
|
default: 'overcloud-horizon'
|
|
|
|
type: string
|
2016-06-29 15:25:23 +02:00
|
|
|
|
2016-11-03 07:44:17 -04:00
|
|
|
conditions:
|
|
|
|
|
|
|
|
debug_empty: {equals : [{get_param: Debug}, '']}
|
|
|
|
|
2016-06-29 15:25:23 +02:00
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Horizon role.
|
|
|
|
value:
|
2016-07-19 16:08:22 -04:00
|
|
|
service_name: horizon
|
2016-06-09 15:39:22 +02:00
|
|
|
monitoring_subscription: {get_param: MonitoringSubscriptionHorizon}
|
2016-06-29 15:25:23 +02:00
|
|
|
config_settings:
|
2016-11-03 07:44:17 -04:00
|
|
|
map_merge:
|
|
|
|
- horizon::allowed_hosts: {get_param: HorizonAllowedHosts}
|
|
|
|
tripleo.horizon.firewall_rules:
|
|
|
|
'126 horizon':
|
|
|
|
dport:
|
|
|
|
- 80
|
|
|
|
- 443
|
2016-12-09 09:28:05 +02:00
|
|
|
horizon::enable_secure_proxy_ssl_header: true
|
2016-11-03 07:44:17 -04:00
|
|
|
horizon::disable_password_reveal: true
|
2016-11-15 13:51:36 +00:00
|
|
|
horizon::enforce_password_check: true
|
2016-12-09 11:41:19 +00:00
|
|
|
horizon::disallow_iframe_embed: true
|
2016-11-03 07:44:17 -04:00
|
|
|
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\"'
|
2016-11-17 19:30:11 -05:00
|
|
|
options: ['FollowSymLinks','MultiViews']
|
2016-11-03 07:44:17 -04:00
|
|
|
horizon::bind_address: {get_param: [ServiceNetMap, HorizonNetwork]}
|
2017-03-10 12:25:40 -05:00
|
|
|
horizon::keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
|
2016-12-21 13:57:47 +00:00
|
|
|
horizon::password_validator: {get_param: [HorizonPasswordValidator]}
|
|
|
|
horizon::password_validator_help: {get_param: [HorizonPasswordValidatorHelp]}
|
2016-11-03 07:44:17 -04:00
|
|
|
horizon::secret_key:
|
|
|
|
yaql:
|
|
|
|
expression: $.data.passwords.where($ != '').first()
|
|
|
|
data:
|
|
|
|
passwords:
|
|
|
|
- {get_param: HorizonSecret}
|
|
|
|
- {get_param: [DefaultPasswords, horizon_secret]}
|
2017-03-07 13:13:52 +00:00
|
|
|
horizon::secure_cookies: {get_param: [HorizonSecureCookies]}
|
2016-11-03 07:44:17 -04:00
|
|
|
memcached_ipv6: {get_param: MemcachedIPv6}
|
|
|
|
-
|
|
|
|
if:
|
|
|
|
- debug_empty
|
|
|
|
- {}
|
|
|
|
- horizon::django_debug: {get_param: Debug}
|
2016-06-29 15:25:23 +02:00
|
|
|
step_config: |
|
|
|
|
include ::tripleo::profile::base::horizon
|
2017-02-23 12:58:16 -05:00
|
|
|
# Ansible tasks to handle upgrade
|
|
|
|
upgrade_tasks:
|
|
|
|
- name: Check if httpd is deployed
|
|
|
|
command: systemctl is-enabled httpd
|
2017-02-27 13:04:08 -05:00
|
|
|
tags: common
|
2017-02-23 12:58:16 -05:00
|
|
|
ignore_errors: True
|
|
|
|
register: httpd_enabled
|
|
|
|
- name: "PreUpgrade step0,validation: Check if httpd is running"
|
|
|
|
shell: >
|
|
|
|
/usr/bin/systemctl show 'httpd' --property ActiveState |
|
|
|
|
grep '\bactive\b'
|
|
|
|
when: httpd_enabled.rc == 0
|
|
|
|
tags: step0,validation
|
|
|
|
- name: Stop Horizon (under httpd)
|
2017-02-24 22:31:29 +01:00
|
|
|
tags: step1
|
2017-02-27 13:04:08 -05:00
|
|
|
when: httpd_enabled.rc == 0
|
2017-02-23 12:58:16 -05:00
|
|
|
service: name=httpd state=stopped
|
2017-04-26 17:37:49 +02:00
|
|
|
service_config_settings:
|
|
|
|
haproxy:
|
|
|
|
tripleo.horizon.firewall_rules:
|
|
|
|
'127 horizon':
|
|
|
|
dport:
|
|
|
|
- 80
|
|
|
|
- 443
|