Use python3 packages on Ubuntu
Python2.7 is going EOL soon, let us deploy python3 for Rocky from the start, so we avoid having to switch later. Also update Berksfile to allow dependency testing and require chef >= 14 now. Change-Id: Id4c06c8fc136ae3cde97e751373049db989de21e
This commit is contained in:
parent
65e61a916d
commit
87d4d2ed40
12
Berksfile
12
Berksfile
@ -2,8 +2,10 @@ source 'https://supermarket.chef.io'
|
||||
|
||||
metadata
|
||||
|
||||
cookbook 'openstack-common',
|
||||
git: 'https://opendev.org/openstack/cookbook-openstack-common'
|
||||
|
||||
cookbook 'openstackclient',
|
||||
git: 'https://opendev.org/openstack/cookbook-openstackclient'
|
||||
%w(-common client).each do |cookbook|
|
||||
if Dir.exist?("../cookbook-openstack#{cookbook}")
|
||||
cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}"
|
||||
else
|
||||
cookbook "openstack#{cookbook}", git: "https://opendev.org/openstack/cookbook-openstack#{cookbook}"
|
||||
end
|
||||
end
|
||||
|
@ -149,8 +149,8 @@ when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||
when 'debian'
|
||||
# platform specific package and service name options
|
||||
default['openstack']['identity']['platform'] = {
|
||||
'memcache_python_packages' => ['python-memcache'],
|
||||
'keystone_packages' => ['keystone'],
|
||||
'memcache_python_packages' => ['python3-memcache'],
|
||||
'keystone_packages' => ['libapache2-mod-wsgi-py3', 'python3-keystone', 'keystone'],
|
||||
'keystone_service' => 'keystone',
|
||||
'keystone_process_name' => 'keystone-all',
|
||||
'package_overrides' => '',
|
||||
|
@ -15,6 +15,6 @@ depends 'openstackclient'
|
||||
|
||||
depends 'apache2', '5.0.1'
|
||||
|
||||
issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
|
||||
source_url 'https://github.com/openstack/cookbook-openstack-identity' if respond_to?(:source_url)
|
||||
chef_version '>= 12.5' if respond_to?(:chef_version)
|
||||
issues_url 'https://launchpad.net/openstack-chef'
|
||||
source_url 'https://opendev.org/openstack/cookbook-openstack-identity'
|
||||
chef_version '>= 14.0'
|
||||
|
@ -242,7 +242,15 @@ node.normal['apache']['listen'] = apache_listen.uniq
|
||||
|
||||
# include the apache2 default recipe and the recipes for mod_wsgi
|
||||
include_recipe 'apache2'
|
||||
include_recipe 'apache2::mod_wsgi'
|
||||
# TODO(jh): hardcoded to include py2 mod-wsgi package
|
||||
# include_recipe 'apache2::mod_wsgi'
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
apache_module 'wsgi'
|
||||
when 'rhel', 'fedora', 'arch', 'amazon'
|
||||
include_recipe 'apache2::mod_wsgi'
|
||||
end
|
||||
|
||||
# include the apache2 mod_ssl recipe if ssl is enabled for identity
|
||||
include_recipe 'apache2::mod_ssl' if node['openstack']['identity']['ssl']['enabled']
|
||||
|
||||
|
@ -32,14 +32,15 @@ describe 'openstack-identity::server-apache' do
|
||||
end
|
||||
|
||||
it 'upgrades mysql python packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python-mysqldb')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python3-mysqldb')
|
||||
end
|
||||
|
||||
it 'upgrades memcache python packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python-memcache')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python3-memcache')
|
||||
end
|
||||
|
||||
it 'upgrades keystone packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python3-keystone')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package keystone')
|
||||
end
|
||||
|
||||
@ -284,7 +285,7 @@ describe 'openstack-identity::server-apache' do
|
||||
describe 'apache recipes' do
|
||||
it 'include apache recipes' do
|
||||
expect(chef_run).to include_recipe('apache2')
|
||||
expect(chef_run).to include_recipe('apache2::mod_wsgi')
|
||||
expect(chef_run).not_to include_recipe('apache2::mod_wsgi')
|
||||
expect(chef_run).not_to include_recipe('apache2::mod_ssl')
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user