1 heat_template_version: pike
4 OpenStack containerized Horizon service
9 default: 'tripleoupstream'
13 default: 'centos-binary-horizon:latest'
17 description: Mapping of service endpoint -> protocol. Typically set
18 via parameter_defaults in the resource registry.
22 description: Mapping of service_name -> network name. Typically set
23 via parameter_defaults in the resource registry. This
24 mapping overrides those in ServiceNetMapDefaults.
31 description: Role name on which the service is applied
35 description: Parameters specific to the role
41 type: ./containers-common.yaml
44 type: ../../puppet/services/horizon.yaml
46 EndpointMap: {get_param: EndpointMap}
47 ServiceNetMap: {get_param: ServiceNetMap}
48 DefaultPasswords: {get_param: DefaultPasswords}
49 RoleName: {get_param: RoleName}
50 RoleParameters: {get_param: RoleParameters}
54 description: Role data for the Horizon API role.
56 service_name: {get_attr: [HorizonBase, role_data, service_name]}
59 - get_attr: [HorizonBase, role_data, config_settings]
60 - horizon::vhost_extra_params:
63 access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
64 options: ['FollowSymLinks','MultiViews']
65 - horizon::secure_cookies: false
66 step_config: {get_attr: [HorizonBase, role_data, step_config]}
67 service_config_settings: {get_attr: [HorizonBase, role_data, service_config_settings]}
68 # BEGIN DOCKER SETTINGS
70 config_volume: horizon
71 puppet_tags: horizon_config
72 step_config: {get_attr: [HorizonBase, role_data, step_config]}
73 config_image: &horizon_image
76 - [ {get_param: DockerNamespace}, {get_param: DockerHorizonImage} ]
78 /var/lib/kolla/config_files/horizon.json:
79 command: /usr/sbin/httpd -DFOREGROUND
81 - path: /var/log/horizon/
84 # FIXME Apache tries to write a .lock file there
85 - path: /usr/share/openstack-dashboard/openstack_dashboard/local/
93 # NOTE Set ownership for /var/log/horizon/horizon.log file here,
94 # otherwise it's created by root when generating django cache.
95 # FIXME Apache needs to read files in /etc/openstack-dashboard
96 # Need to set permissions to match the BM case,
97 # http://paste.openstack.org/show/609819/
98 command: ['/bin/bash', '-c', 'touch /var/log/horizon/horizon.log && chown -R apache:apache /var/log/horizon && chmod -R a+rx /etc/openstack-dashboard']
100 - /var/log/containers/horizon:/var/log/horizon
101 - /var/lib/config-data/horizon/etc/:/etc/
104 image: *horizon_image
110 - {get_attr: [ContainersCommon, volumes]}
112 - /var/lib/kolla/config_files/horizon.json:/var/lib/kolla/config_files/config.json:ro
113 - /var/lib/config-data/horizon/etc/httpd:/etc/httpd:ro
114 - /var/lib/config-data/horizon/etc/openstack-dashboard:/etc/openstack-dashboard:ro
115 - /var/log/containers/horizon:/var/log/horizon
117 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
119 - name: create persistent logs directory
121 path: /var/log/containers/horizon
124 - name: Stop and disable horizon service (running under httpd)
126 service: name=httpd state=stopped enabled=no
128 get_attr: [HorizonBase, role_data, metadata_settings]