puppet-horizon/manifests/params.pp
Thomas Goirand 0eada93284 Do not run collectstatic or compress in Debian
The Debian packages are handling compress & collectstatic in a
different way as for Ubuntu. This patch avoids running them,
and offload that works to the package. The original collectstatic
indicated that it was a workaround for Debian. See
I813b5f6067bb6ecce279cab7278d9227c4d31d28. Because of this, the
logic around the collectstatic exec has been limited to only
RedHat packaging.

Note that the variable os_package_type can be defined if we're
using Debian packages on top of Ubuntu (this is achieved by
installing the puppet-openstack-debian-fact package on Ubuntu).
This has been discussed in Tokyo with Emilien.

Also, this package fixes the configuration file path for Apache.

Change-Id: I3fbb1b576dd61ddd92921e9f12edfe5df21fddd0
Co-Authored-By: Alex Schultz <aschultz@mirantis.com>
2015-11-17 16:17:24 -06:00

48 lines
2.0 KiB
Puppet

# these parameters need to be accessed from several locations and
# should be considered to be constant
class horizon::params {
$logdir = '/var/log/horizon'
$django_wsgi = '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'
$manage_py = '/usr/share/openstack-dashboard/manage.py'
case $::osfamily {
'RedHat': {
$http_service = 'httpd'
$http_modwsgi = 'mod_wsgi'
$package_name = 'openstack-dashboard'
$config_file = '/etc/openstack-dashboard/local_settings'
$httpd_config_file = '/etc/httpd/conf.d/openstack-dashboard.conf'
$httpd_listen_config_file = '/etc/httpd/conf/httpd.conf'
$root_url = '/dashboard'
$apache_user = 'apache'
$apache_group = 'apache'
$wsgi_user = 'dashboard'
$wsgi_group = 'dashboard'
}
'Debian': {
$http_service = 'apache2'
$config_file = '/etc/openstack-dashboard/local_settings.py'
$httpd_listen_config_file = '/etc/apache2/ports.conf'
$root_url = '/horizon'
$apache_user = 'www-data'
$apache_group = 'www-data'
$wsgi_user = 'horizon'
$wsgi_group = 'horizon'
case $::os_package_type {
'debian': {
$package_name = 'openstack-dashboard-apache'
$httpd_config_file = '/etc/apache2/sites-available/openstack-dashboard-alias-only.conf'
}
default: {
$package_name = 'openstack-dashboard'
$httpd_config_file = '/etc/apache2/conf-available/openstack-dashboard.conf'
}
}
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")
}
}
}