56794f300a
Canonical are packaging gnocchi-api package with apache and python3 by default. We cannot test it in CI since we cannot run py2 and py3 on the same node with apache wsgi. Canonical helped us by packaging python2 support back into python-gnocchi package so we change our wsgi usage to use this package and set the new wsgi script path. We still want users to be able to install only gnocchi-api since they might not run apache wsgi even though its installed by default. Adds installation of rados and redis packages for python3 when needed, this is because all gnocchi components will still be running in py3, also CLI such as gnocchi-upgrade but the gnocchi-api is in wsgi using py2. Because of that we still need to install the py2 packages. Enables acceptance testing for Debian based operating systems. Change-Id: I070f88dd40ca4129cbd3abf5b4f5ecb511b2895e
50 lines
1.7 KiB
Puppet
50 lines
1.7 KiB
Puppet
# ==Class: gnocchi::params
|
|
#
|
|
# Parameters for puppet-gnocchi
|
|
#
|
|
class gnocchi::params {
|
|
include ::openstacklib::defaults
|
|
|
|
$client_package_name = 'python-gnocchiclient'
|
|
$rados_package_name = 'python-rados'
|
|
$common_package_name = 'gnocchi-common'
|
|
$api_service_name = 'gnocchi-api'
|
|
$metricd_package_name = 'gnocchi-metricd'
|
|
$metricd_service_name = 'gnocchi-metricd'
|
|
$statsd_package_name = 'gnocchi-statsd'
|
|
$statsd_service_name = 'gnocchi-statsd'
|
|
$group = 'gnocchi'
|
|
|
|
case $::osfamily {
|
|
'RedHat': {
|
|
$api_package_name = 'gnocchi-api'
|
|
$sqlite_package_name = undef
|
|
$indexer_package_name = 'openstack-gnocchi-indexer-sqlalchemy'
|
|
$gnocchi_wsgi_script_path = '/var/www/cgi-bin/gnocchi'
|
|
$gnocchi_wsgi_script_source = '/usr/bin/gnocchi-api'
|
|
$pymysql_package_name = undef
|
|
$cradox_package_name = 'python2-cradox'
|
|
$redis_package_name = 'python-redis'
|
|
}
|
|
'Debian': {
|
|
if $::operatingsystem == 'Ubuntu' {
|
|
$api_package_name = 'python-gnocchi'
|
|
$gnocchi_wsgi_script_source = '/usr/bin/python2-gnocchi-api'
|
|
} else {
|
|
$api_package_name = 'gnocchi-api'
|
|
$gnocchi_wsgi_script_source = '/usr/share/gnocchi-common/app.wsgi'
|
|
}
|
|
|
|
$sqlite_package_name = 'python-pysqlite2'
|
|
$gnocchi_wsgi_script_path = '/usr/lib/cgi-bin/gnocchi'
|
|
$pymysql_package_name = 'python-pymysql'
|
|
$redis_package_name = 'python-redis'
|
|
$cradox_package_name = undef
|
|
}
|
|
default: {
|
|
fail("Unsupported osfamily: ${::osfamily} operatingsystem")
|
|
}
|
|
|
|
} # Case $::osfamily
|
|
}
|