CentOS 8 support
- Update package names - Migrate to using apache2_mod_wsgi resource and require apache2 ~> 8.6 - Update ChefSpec Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-database/+/815139 Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-ops-messaging/+/815137 Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-integration-test/+/815171 Change-Id: Ib21c5b2dbd13aa57de926e71db62d042374cabd4 Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
parent
e76dcb39e1
commit
f052ede42b
|
@ -37,7 +37,7 @@ Cookbooks
|
|||
|
||||
The following cookbooks are dependencies:
|
||||
|
||||
- 'apache2', '~> 8.1'
|
||||
- 'apache2', '~> 8.6'
|
||||
- 'openstack-common', '>= 20.0.0'
|
||||
- 'openstackclient'
|
||||
|
||||
|
|
|
@ -139,26 +139,46 @@ default['openstack']['identity']['group'] = 'keystone'
|
|||
|
||||
# platform defaults
|
||||
case node['platform_family']
|
||||
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||
when 'rhel'
|
||||
# platform specific package and service name options
|
||||
default['openstack']['identity']['platform'] = {
|
||||
'memcache_python_packages' => ['python-memcached'],
|
||||
# TODO(ramereth): python2-urllib3 is here to workaround an issue if
|
||||
# it's already been installed from the base repository which is
|
||||
# incompatible with what's shipped with RDO. This should be removed
|
||||
# once fixed upstream.
|
||||
'keystone_packages' =>
|
||||
%w(
|
||||
mod_wsgi
|
||||
openstack-keystone
|
||||
openstack-selinux
|
||||
python2-urllib3
|
||||
),
|
||||
'keystone_apache2_site' => 'keystone', # currently unused on RHEL
|
||||
'keystone_service' => 'openstack-keystone',
|
||||
'keystone_process_name' => 'keystone-all',
|
||||
'package_options' => '',
|
||||
}
|
||||
case node['platform_version'].to_i
|
||||
when 8
|
||||
default['openstack']['identity']['platform'] = {
|
||||
'memcache_python_packages' => ['python3-memcached'],
|
||||
# TODO(ramereth): python3-urllib3 is here to workaround an issue if
|
||||
# it's already been installed from the base repository which is
|
||||
# incompatible with what's shipped with RDO. This should be removed
|
||||
# once fixed upstream.
|
||||
'keystone_packages' =>
|
||||
%w(
|
||||
openstack-keystone
|
||||
openstack-selinux
|
||||
python3-urllib3
|
||||
),
|
||||
'keystone_apache2_site' => 'keystone', # currently unused on RHEL
|
||||
'keystone_service' => 'openstack-keystone',
|
||||
'keystone_process_name' => 'keystone-all',
|
||||
'package_options' => '',
|
||||
}
|
||||
when 7
|
||||
default['openstack']['identity']['platform'] = {
|
||||
'memcache_python_packages' => ['python-memcached'],
|
||||
# TODO(ramereth): python2-urllib3 is here to workaround an issue if
|
||||
# it's already been installed from the base repository which is
|
||||
# incompatible with what's shipped with RDO. This should be removed
|
||||
# once fixed upstream.
|
||||
'keystone_packages' =>
|
||||
%w(
|
||||
openstack-keystone
|
||||
openstack-selinux
|
||||
python2-urllib3
|
||||
),
|
||||
'keystone_apache2_site' => 'keystone', # currently unused on RHEL
|
||||
'keystone_service' => 'openstack-keystone',
|
||||
'keystone_process_name' => 'keystone-all',
|
||||
'package_options' => '',
|
||||
}
|
||||
end
|
||||
when 'debian'
|
||||
# platform specific package and service name options
|
||||
default['openstack']['identity']['platform'] = {
|
||||
|
@ -166,7 +186,6 @@ when 'debian'
|
|||
'keystone_packages' =>
|
||||
%w(
|
||||
keystone
|
||||
libapache2-mod-wsgi-py3
|
||||
python3-keystone
|
||||
),
|
||||
'keystone_apache2_site' => platform?('ubuntu') ? 'keystone' : 'wsgi-keystone',
|
||||
|
|
|
@ -9,7 +9,7 @@ version '20.0.0'
|
|||
supports os
|
||||
end
|
||||
|
||||
depends 'apache2', '~> 8.1'
|
||||
depends 'apache2', '~> 8.6'
|
||||
depends 'openstackclient'
|
||||
depends 'openstack-common', '>= 20.0.0'
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ apache2_install 'openstack' do
|
|||
listen "#{bind_address}:#{bind_service['port']}"
|
||||
end
|
||||
|
||||
apache2_module 'wsgi'
|
||||
apache2_mod_wsgi 'openstack'
|
||||
apache2_module 'ssl' if node['openstack']['identity']['ssl']['enabled']
|
||||
|
||||
# create the keystone apache directory
|
||||
|
|
|
@ -2,23 +2,34 @@
|
|||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-identity::server-apache' do
|
||||
describe 'redhat' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
cached(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
ALL_RHEL.each do |p|
|
||||
context "redhat #{p[:version]}" do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(p) }
|
||||
let(:node) { runner.node }
|
||||
cached(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
include_context 'identity_stubs'
|
||||
include_context 'identity_stubs'
|
||||
|
||||
it 'upgrades memcache python packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python-memcached')
|
||||
end
|
||||
it 'upgrades keystone packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package openstack-keystone')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package openstack-selinux')
|
||||
end
|
||||
|
||||
it 'upgrades keystone packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package openstack-keystone')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package openstack-selinux')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package mod_wsgi')
|
||||
case p
|
||||
when REDHAT_7
|
||||
it 'upgrades python packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python-memcached')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python2-urllib3')
|
||||
end
|
||||
|
||||
when REDHAT_8
|
||||
it 'upgrades python packages' do
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python3-memcached')
|
||||
expect(chef_run).to upgrade_package('identity cookbook package python3-urllib3')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -323,7 +323,7 @@ describe 'openstack-identity::server-apache' do
|
|||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to enable_apache2_module('wsgi')
|
||||
expect(chef_run).to create_apache2_mod_wsgi('openstack')
|
||||
end
|
||||
|
||||
it do
|
||||
|
|
|
@ -8,11 +8,21 @@ RSpec.configure do |config|
|
|||
config.file_cache_path = '/var/chef/cache'
|
||||
end
|
||||
|
||||
REDHAT_OPTS = {
|
||||
REDHAT_7 = {
|
||||
platform: 'redhat',
|
||||
version: '7',
|
||||
}.freeze
|
||||
|
||||
REDHAT_8 = {
|
||||
platform: 'redhat',
|
||||
version: '8',
|
||||
}.freeze
|
||||
|
||||
ALL_RHEL = [
|
||||
REDHAT_7,
|
||||
REDHAT_8,
|
||||
].freeze
|
||||
|
||||
UBUNTU_OPTS = {
|
||||
platform: 'ubuntu',
|
||||
version: '18.04',
|
||||
|
|
Loading…
Reference in New Issue