
Commit da0cedce6f
assumed that the
user and group for Horizon in Red Hat platforms was 'dashboard', due
to the following lines being present in openstack-dashboard.conf:
WSGIDaemonProcess dashboard
WSGIProcessGroup dashboard
Actually, based on [1], this does not mean that, and the RPM packages
do not create such user, so we should switch that to the apache user.
[1] http://modwsgi.readthedocs.io/en/latest/configuration-directives/WSGIDaemonProcess.html
Change-Id: I52766ac0521951cc8c857e51a61823410585bed5
50 lines
2.1 KiB
Puppet
50 lines
2.1 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 = 'apache'
|
|
$wsgi_group = 'apache'
|
|
$memcache_package = 'python-memcached'
|
|
}
|
|
'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'
|
|
$memcache_package = 'python-memcache'
|
|
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")
|
|
}
|
|
}
|
|
}
|