1 heat_template_version: pike
4 OpenStack containerized Horizon service
10 DockerHorizonConfigImage:
11 description: The container image to use for the horizon config_volume
15 description: Mapping of service endpoint -> protocol. Typically set
16 via parameter_defaults in the resource registry.
20 description: Dictionary packing service data
24 description: Mapping of service_name -> network name. Typically set
25 via parameter_defaults in the resource registry. This
26 mapping overrides those in ServiceNetMapDefaults.
33 description: Role name on which the service is applied
37 description: Parameters specific to the role
45 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
50 type: ./containers-common.yaml
53 type: ../../puppet/services/horizon.yaml
55 EndpointMap: {get_param: EndpointMap}
56 ServiceData: {get_param: ServiceData}
57 ServiceNetMap: {get_param: ServiceNetMap}
58 DefaultPasswords: {get_param: DefaultPasswords}
59 RoleName: {get_param: RoleName}
60 RoleParameters: {get_param: RoleParameters}
64 description: Role data for the Horizon API role.
66 service_name: {get_attr: [HorizonBase, role_data, service_name]}
69 - get_attr: [HorizonBase, role_data, config_settings]
70 - horizon::vhost_extra_params:
73 access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
74 options: ['FollowSymLinks','MultiViews']
75 - horizon::secure_cookies: false
76 logging_source: {get_attr: [HorizonBase, role_data, logging_source]}
77 logging_groups: {get_attr: [HorizonBase, role_data, logging_groups]}
78 step_config: {get_attr: [HorizonBase, role_data, step_config]}
79 service_config_settings: {get_attr: [HorizonBase, role_data, service_config_settings]}
80 # BEGIN DOCKER SETTINGS
82 config_volume: horizon
83 puppet_tags: horizon_config
84 step_config: {get_attr: [HorizonBase, role_data, step_config]}
85 config_image: {get_param: DockerHorizonConfigImage}
87 /var/lib/kolla/config_files/horizon.json:
88 command: /usr/sbin/httpd -DFOREGROUND
90 - source: "/var/lib/kolla/config_files/src/*"
93 preserve_properties: true
95 - path: /var/log/horizon/
98 # FIXME Apache tries to write a .lock file there
99 - path: /usr/share/openstack-dashboard/openstack_dashboard/local/
105 image: &horizon_image {get_param: DockerHorizonImage}
107 # NOTE Set ownership for /var/log/horizon/horizon.log file here,
108 # otherwise it's created by root when generating django cache.
109 # FIXME Apache needs to read files in /etc/openstack-dashboard
110 # Need to set permissions to match the BM case,
111 # http://paste.openstack.org/show/609819/
112 command: ['/bin/bash', '-c', 'touch /var/log/horizon/horizon.log && chown -R apache:apache /var/log/horizon && chmod -R a+rx /etc/openstack-dashboard']
114 - /var/log/containers/horizon:/var/log/horizon
115 - /var/log/containers/httpd/horizon:/var/log/httpd
116 - /var/lib/config-data/horizon/etc/:/etc/
119 image: *horizon_image
125 - {get_attr: [ContainersCommon, volumes]}
127 - /var/lib/kolla/config_files/horizon.json:/var/lib/kolla/config_files/config.json:ro
128 - /var/lib/config-data/puppet-generated/horizon/:/var/lib/kolla/config_files/src:ro
129 - /var/log/containers/horizon:/var/log/horizon
130 - /var/log/containers/httpd/horizon:/var/log/httpd
133 - internal_tls_enabled
134 - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
138 - internal_tls_enabled
139 - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
142 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
144 - name: create persistent logs directory
149 - /var/log/containers/horizon
150 - /var/log/containers/httpd/horizon
152 - name: Stop and disable horizon service (running under httpd)
154 service: name=httpd state=stopped enabled=no
156 get_attr: [HorizonBase, role_data, metadata_settings]