1 heat_template_version: pike
4 OpenStack containerized Horizon service
9 default: 'tripleoupstream'
13 default: 'centos-binary-horizon:latest'
15 DockerHorizonConfigImage:
16 description: The container image to use for the horizon config_volume
17 default: 'centos-binary-horizon:latest'
21 description: Mapping of service endpoint -> protocol. Typically set
22 via parameter_defaults in the resource registry.
26 description: Mapping of service_name -> network name. Typically set
27 via parameter_defaults in the resource registry. This
28 mapping overrides those in ServiceNetMapDefaults.
35 description: Role name on which the service is applied
39 description: Parameters specific to the role
45 type: ./containers-common.yaml
48 type: ../../puppet/services/horizon.yaml
50 EndpointMap: {get_param: EndpointMap}
51 ServiceNetMap: {get_param: ServiceNetMap}
52 DefaultPasswords: {get_param: DefaultPasswords}
53 RoleName: {get_param: RoleName}
54 RoleParameters: {get_param: RoleParameters}
58 description: Role data for the Horizon API role.
60 service_name: {get_attr: [HorizonBase, role_data, service_name]}
63 - get_attr: [HorizonBase, role_data, config_settings]
64 - horizon::vhost_extra_params:
67 access_log_format: '%a %l %u %t \"%r\" %>s %b \"%%{}{Referer}i\" \"%%{}{User-Agent}i\"'
68 options: ['FollowSymLinks','MultiViews']
69 - horizon::secure_cookies: false
70 step_config: {get_attr: [HorizonBase, role_data, step_config]}
71 service_config_settings: {get_attr: [HorizonBase, role_data, service_config_settings]}
72 # BEGIN DOCKER SETTINGS
74 config_volume: horizon
75 puppet_tags: horizon_config
76 step_config: {get_attr: [HorizonBase, role_data, step_config]}
80 - [ {get_param: DockerNamespace}, {get_param: DockerHorizonConfigImage} ]
82 /var/lib/kolla/config_files/horizon.json:
83 command: /usr/sbin/httpd -DFOREGROUND
85 - source: "/var/lib/kolla/config_files/src/*"
88 preserve_properties: true
90 - path: /var/log/horizon/
93 # FIXME Apache tries to write a .lock file there
94 - path: /usr/share/openstack-dashboard/openstack_dashboard/local/
100 image: &horizon_image
103 - [ {get_param: DockerNamespace}, {get_param: DockerHorizonImage} ]
105 # NOTE Set ownership for /var/log/horizon/horizon.log file here,
106 # otherwise it's created by root when generating django cache.
107 # FIXME Apache needs to read files in /etc/openstack-dashboard
108 # Need to set permissions to match the BM case,
109 # http://paste.openstack.org/show/609819/
110 command: ['/bin/bash', '-c', 'touch /var/log/horizon/horizon.log && chown -R apache:apache /var/log/horizon && chmod -R a+rx /etc/openstack-dashboard']
112 - /var/log/containers/horizon:/var/log/horizon
113 - /var/lib/config-data/horizon/etc/:/etc/
116 image: *horizon_image
122 - {get_attr: [ContainersCommon, volumes]}
124 - /var/lib/kolla/config_files/horizon.json:/var/lib/kolla/config_files/config.json:ro
125 - /var/lib/config-data/puppet-generated/horizon/:/var/lib/kolla/config_files/src:ro
126 - /var/log/containers/horizon:/var/log/horizon
128 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
130 - name: create persistent logs directory
132 path: /var/log/containers/horizon
135 - name: Stop and disable horizon service (running under httpd)
137 service: name=httpd state=stopped enabled=no
139 get_attr: [HorizonBase, role_data, metadata_settings]