diff --git a/manifests/repo.pp b/manifests/repo.pp index ec1d1b7..ef717e7 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -1,233 +1,226 @@ # Copyright (C) 2013, 2014 iWeb Technologies Inc. # Copyright (C) 2013 Cloudwatt # Copyright (C) 2014 Nine Internet Solutions AG # Copyright (C) 2014 Catalyst IT Limited # Copyright (C) 2015 Red Hat # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Author: Loic Dachary # Author: Francois Charlier # Author: David Moreau Simard # Author: Andrew Woodward # Author: David Gurtner # Author: Ricardo Rocha # Author: Emilien Macchi # # == Class: ceph::repo # # Configure ceph APT repo for Ceph # # === Parameters: # # [*ensure*] The ensure state for package ressources. # Optional. Defaults to 'present'. # # [*release*] The name of the Ceph release to install # Optional. Default to 'nautilus' in ceph::params. # # [*fastcgi*] Install Ceph fastcgi apache module for Ceph # Optional. Defaults to 'false' # # [*proxy*] Proxy URL to be used for the yum repository, useful if you're behind a corporate firewall # Optional. Defaults to 'undef' # # [*proxy_username*] The username to be used for the proxy if one should be required # Optional. Defaults to 'undef' # # [*proxy_password*] The password to be used for the proxy if one should be required # Optional. Defaults to 'undef' # # [*enable_epel*] Whether or not enable EPEL repository. # Optional. Defaults to True # # [*enable_sig*] Whether or not enable SIG repository. # CentOS SIG repository contains Ceph packages built by CentOS community. # https://wiki.centos.org/SpecialInterestGroup/Storage/ # Optional. Defaults to False in ceph::params. # # [*ceph_mirror*] Ceph mirror used to download packages. # Optional. Defaults to undef. # class ceph::repo ( $ensure = present, $release = $ceph::params::release, $fastcgi = false, $proxy = undef, $proxy_username = undef, $proxy_password = undef, $enable_epel = true, $enable_sig = $ceph::params::enable_sig, $ceph_mirror = undef, ) inherits ceph::params { case $::osfamily { 'Debian': { include apt if $ceph_mirror { $ceph_mirror_real = $ceph_mirror } else { $ceph_mirror_real = "http://download.ceph.com/debian-${release}/" apt::key { 'ceph': ensure => $ensure, id => '08B73419AC32B4E966C1A330E84AC2C0460F3994', source => 'https://download.ceph.com/keys/release.asc', before => Apt::Source['ceph'], } } apt::source { 'ceph': ensure => $ensure, location => $ceph_mirror_real, release => $::lsbdistcodename, tag => 'ceph', } if $fastcgi { apt::key { 'ceph-gitbuilder': ensure => $ensure, id => 'FCC5CB2ED8E6F6FB79D5B3316EAEAE2203C3951A', server => 'keyserver.ubuntu.com', } apt::source { 'ceph-fastcgi': ensure => $ensure, location => "http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-${::lsbdistcodename}-${::hardwaremodel}-basic/ref/master", release => $::lsbdistcodename, require => Apt::Key['ceph-gitbuilder'], } } Apt::Source<| tag == 'ceph' |> -> Package<| tag == 'ceph' |> Exec['apt_update'] -> Package<| tag == 'ceph' |> } 'RedHat': { $enabled = $ensure ? { 'present' => '1', 'absent' => '0', default => absent, } # If you want to deploy Ceph using packages provided by CentOS SIG # https://wiki.centos.org/SpecialInterestGroup/Storage/ if $enable_sig { if $::operatingsystem != 'CentOS' { warning("CentOS SIG repository is only supported on CentOS operating system, \ not on ${::operatingsystem}, which can lead to packaging issues.") } if $ceph_mirror { $ceph_mirror_real = $ceph_mirror } else { # NOTE(tobias-urdin): mirror.centos.org doesnt have https support $ceph_mirror_real = "http://mirror.centos.org/centos/${::operatingsystemmajrelease}/storage/x86_64/ceph-${release}/" } yumrepo { 'ceph-luminous-sig': ensure => 'absent', } yumrepo { 'ceph-storage-sig': enabled => '1', baseurl => $ceph_mirror_real, descr => 'Ceph Storage SIG', mirrorlist => 'absent', gpgcheck => '0', } # Make sure we install the repo before any Package resource Yumrepo['ceph-luminous-sig'] -> Yumrepo['ceph-storage-sig'] -> Package<| tag == 'ceph' |> } else { # If you want to deploy Ceph using packages provided by ceph.com repositories. - if ((($::operatingsystem == 'RedHat' or $::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '7') < 0)) - or ($::operatingsystem == 'Fedora' and (versioncmp($::operatingsystemmajrelease, '19') < 0))) { - $el = '6' - } else { - $el = '7' - } + $el = $::operatingsystemmajrelease Yumrepo { proxy => $proxy, proxy_username => $proxy_username, proxy_password => $proxy_password, } - if ($::operatingsystem != 'Fedora') { - yumrepo { 'ext-ceph': - # puppet versions prior to 3.5 do not support ensure, use enabled instead - enabled => $enabled, - descr => "External Ceph ${release}", - name => "ext-ceph-${release}", - baseurl => "http://download.ceph.com/rpm-${release}/el${el}/\$basearch", - gpgcheck => '1', - gpgkey => 'https://download.ceph.com/keys/release.asc', - mirrorlist => absent, - priority => '10', # prefer ceph repos over EPEL - tag => 'ceph', - } + yumrepo { 'ext-ceph': + # puppet versions prior to 3.5 do not support ensure, use enabled instead + enabled => $enabled, + descr => "External Ceph ${release}", + name => "ext-ceph-${release}", + baseurl => "http://download.ceph.com/rpm-${release}/el${el}/\$basearch", + gpgcheck => '1', + gpgkey => 'https://download.ceph.com/keys/release.asc', + mirrorlist => absent, + priority => '10', # prefer ceph repos over EPEL + tag => 'ceph', + } + + yumrepo { 'ext-ceph-noarch': + # puppet versions prior to 3.5 do not support ensure, use enabled instead + enabled => $enabled, + descr => 'External Ceph noarch', + name => "ext-ceph-${release}-noarch", + baseurl => "http://download.ceph.com/rpm-${release}/el${el}/noarch", + gpgcheck => '1', + gpgkey => 'https://download.ceph.com/keys/release.asc', + mirrorlist => absent, + priority => '10', # prefer ceph repos over EPEL + tag => 'ceph', + } - yumrepo { 'ext-ceph-noarch': - # puppet versions prior to 3.5 do not support ensure, use enabled instead + if $fastcgi { + yumrepo { 'ext-ceph-fastcgi': enabled => $enabled, - descr => 'External Ceph noarch', - name => "ext-ceph-${release}-noarch", - baseurl => "http://download.ceph.com/rpm-${release}/el${el}/noarch", + descr => 'FastCGI basearch packages for Ceph', + name => 'ext-ceph-fastcgi', + baseurl => "http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel${el}-x86_64-basic/ref/master", gpgcheck => '1', - gpgkey => 'https://download.ceph.com/keys/release.asc', + gpgkey => 'https://download.ceph.com/keys/autobuild.asc', mirrorlist => absent, - priority => '10', # prefer ceph repos over EPEL + priority => '20', # prefer ceph repos over EPEL tag => 'ceph', } - - if $fastcgi { - yumrepo { 'ext-ceph-fastcgi': - enabled => $enabled, - descr => 'FastCGI basearch packages for Ceph', - name => 'ext-ceph-fastcgi', - baseurl => "http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel${el}-x86_64-basic/ref/master", - gpgcheck => '1', - gpgkey => 'https://download.ceph.com/keys/autobuild.asc', - mirrorlist => absent, - priority => '20', # prefer ceph repos over EPEL - tag => 'ceph', - } - } } # prefer ceph.com repos over EPEL package { 'yum-plugin-priorities': ensure => present, } } - if $enable_epel and ($::operatingsystem != 'Fedora') { + if $enable_epel { yumrepo { "ext-epel-${el}": # puppet versions prior to 3.5 do not support ensure, use enabled instead enabled => $enabled, descr => "External EPEL ${el}", name => "ext-epel-${el}", baseurl => absent, gpgcheck => '1', gpgkey => "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${el}", mirrorlist => "http://mirrors.fedoraproject.org/metalink?repo=epel-${el}&arch=\$basearch", priority => '20', # prefer ceph repos over EPEL tag => 'ceph', exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', } } Yumrepo<| tag == 'ceph' |> -> Package<| tag == 'ceph' |> } default: { fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ module ${module_name} only supports osfamily Debian and RedHat") } } } diff --git a/manifests/rgw/keystone.pp b/manifests/rgw/keystone.pp index 8a5d0c6..02735a2 100644 --- a/manifests/rgw/keystone.pp +++ b/manifests/rgw/keystone.pp @@ -1,101 +1,100 @@ # # Copyright (C) 2014 Catalyst IT Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Author: Ricardo Rocha # # Configures keystone auth/authz for the ceph radosgw. # ### == Name # # The RGW id. An alphanumeric string uniquely identifying the RGW. # ( example: radosgw.gateway ) # ### == Parameters # # [*rgw_keystone_admin_domain*] # (Required) The name of OpenStack domain with admin # privilege when using OpenStack Identity API v3. # # [*rgw_keystone_admin_project*] # (Optional) The name of OpenStack project with admin # privilege when using OpenStack Identity API v3 # # [*rgw_keystone_admin_user*] # (Required) The user name of OpenStack tenant with admin # privilege (Service Tenant). # # [*rgw_keystone_admin_password*] # (Required) The password for OpenStack admin user. # # [*rgw_keystone_url*] # (Optional) The internal or admin url for keystone. # Defaults to 'http://127.0.0.1:5000' # # [*rgw_keystone_accepted_roles*] # (Optional) Roles to accept from keystone. # Comma separated list of roles. # Defaults to 'member' # # [*rgw_keystone_token_cache_size*] # (Optional) How many tokens to keep cached. # Defaults to 500 # # [*rgw_s3_auth_use_keystone*] # (Optional) Whether to enable keystone auth for S3. # Defaults to true # # [*rgw_keystone_implicit_tenants*] # (Optional) Set 'true' for a private tenant for each user. # Defaults to true # define ceph::rgw::keystone ( $rgw_keystone_admin_domain, $rgw_keystone_admin_project, $rgw_keystone_admin_user, $rgw_keystone_admin_password, $rgw_keystone_url = 'http://127.0.0.1:5000', $rgw_keystone_accepted_roles = 'member', $rgw_keystone_token_cache_size = 500, $rgw_s3_auth_use_keystone = true, $rgw_keystone_implicit_tenants = true, ) { unless $name =~ /^radosgw\..+/ { fail("Define name must be started with 'radosgw.'") } ceph_config { "client.${name}/rgw_keystone_url": value => $rgw_keystone_url; "client.${name}/rgw_keystone_accepted_roles": value => join(any2array($rgw_keystone_accepted_roles), ','); "client.${name}/rgw_keystone_token_cache_size": value => $rgw_keystone_token_cache_size; "client.${name}/rgw_s3_auth_use_keystone": value => $rgw_s3_auth_use_keystone; "client.${name}/rgw_keystone_implicit_tenants": value => $rgw_keystone_implicit_tenants; } # FIXME(ykarel) Cleanup once https://tracker.ceph.com/issues/24228 is fixed for luminous - if ($::os['name'] == 'Fedora') or - ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) { + if ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) { ceph_config { "client.${name}/rgw_ldap_secret": value => ''; } } ceph_config { "client.${name}/rgw_keystone_api_version": value => 3; "client.${name}/rgw_keystone_admin_domain": value => $rgw_keystone_admin_domain; "client.${name}/rgw_keystone_admin_project": value => $rgw_keystone_admin_project; "client.${name}/rgw_keystone_admin_user": value => $rgw_keystone_admin_user; "client.${name}/rgw_keystone_admin_password": value => $rgw_keystone_admin_password; } } diff --git a/metadata.json b/metadata.json index dddac76..623ebad 100644 --- a/metadata.json +++ b/metadata.json @@ -1,86 +1,80 @@ { "name": "openstack-ceph", "version": "3.1.1", "author": "Puppet Ceph community and OpenStack Contributors", "summary": "Community Developed Ceph Module", "license": "Apache-2.0", "source": "git://github.com/openstack/puppet-ceph.git", "project_page": "https://launchpad.net/puppet-ceph", "issues_url": "https://bugs.launchpad.net/puppet-ceph", "requirements": [ { "name": "puppet", "version_requirement": ">= 6.0.0 < 7.0.0" } ], "operatingsystem_support": [ { "operatingsystem": "Debian", "operatingsystemrelease": [ "9" ] }, - { - "operatingsystem": "Fedora", - "operatingsystemrelease": [ - "24" - ] - }, { "operatingsystem": "RedHat", "operatingsystemrelease": [ "8" ] }, { "operatingsystem": "CentOS", "operatingsystemrelease": [ "8" ] }, { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "16.04", "18.04", "20.04" ] } ], "description": "Installs and configures Ceph.", "dependencies": [ { "name": "puppetlabs/apt", "version_requirement": ">=2.0.0 <4.0.0" }, { "name": "puppetlabs/apache", "version_requirement": ">=3.0.0" }, { "name": "puppetlabs/concat", "version_requirement": ">=1.2.1 <8.0.0" }, { "name": "puppetlabs/inifile", "version_requirement": ">=2.0.0 <3.0.0" }, { "name": "puppetlabs/stdlib", "version_requirement": ">=5.0.0 <8.0.0" }, { "name": "duritong/sysctl", "version_requirement": ">=0.0.1 <1.0.0" }, { "name": "openstack/openstacklib", "version_requirement": ">=9.0.0" }, { "name": "openstack/keystone", "version_requirement": ">=9.0.0" } ] } diff --git a/releasenotes/notes/drop-fedora-01b1484406c0c888.yaml b/releasenotes/notes/drop-fedora-01b1484406c0c888.yaml new file mode 100644 index 0000000..8fe95fc --- /dev/null +++ b/releasenotes/notes/drop-fedora-01b1484406c0c888.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Fedora is no longer supported. \ No newline at end of file diff --git a/spec/classes/ceph_repo_spec.rb b/spec/classes/ceph_repo_spec.rb index b6eaa5f..5e21b32 100644 --- a/spec/classes/ceph_repo_spec.rb +++ b/spec/classes/ceph_repo_spec.rb @@ -1,653 +1,653 @@ # -*- coding: utf-8 -*- # Copyright (C) iWeb Technologies Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Author: Francois Charlier # Author: David Moreau Simard # Author: Andrew Woodward require 'spec_helper' describe 'ceph::repo' do shared_examples 'ceph::repo on Debian' do before do facts.merge!( :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'jessie', :lsbdistrelease => '8' ) end context 'with default params' do it { should contain_apt__key('ceph').with( :id => '08B73419AC32B4E966C1A330E84AC2C0460F3994', :source => 'https://download.ceph.com/keys/release.asc', :before => 'Apt::Source[ceph]', )} it { should contain_apt__source('ceph').with( :location => 'http://download.ceph.com/debian-nautilus/', :release => 'jessie', )} end context 'when overriding ceph mirror' do let :params do { :ceph_mirror => 'http://myserver.com/debian-nautilus/' } end it { should contain_apt__source('ceph').with( :location => 'http://myserver.com/debian-nautilus/', :release => 'jessie', )} end context 'when overriding ceph release' do let :params do { :release => 'firefly' } end it { should contain_apt__source('ceph').with( :location => 'http://download.ceph.com/debian-firefly/', :release => 'jessie', )} end end shared_examples 'ceph::repo on Ubuntu' do before do facts.merge!( :osfamily => 'Debian', :lsbdistid => 'Ubuntu', :lsbdistcodename => 'trusty', :lsbdistrelease => '14.04', :hardwaremodel => 'x86_64' ) end context 'with default params' do it { should contain_apt__key('ceph').with( :id => '08B73419AC32B4E966C1A330E84AC2C0460F3994', :source => 'https://download.ceph.com/keys/release.asc', :before => 'Apt::Source[ceph]', )} it { should contain_apt__source('ceph').with( :location => 'http://download.ceph.com/debian-nautilus/', :release => 'trusty', )} end context 'when overriding ceph release' do let :params do { :release => 'firefly' } end it { should contain_apt__source('ceph').with( :location => 'http://download.ceph.com/debian-firefly/', :release => 'trusty', )} end context 'when wanting fast-cgi' do let :params do { :fastcgi => true } end it { should contain_apt__key('ceph-gitbuilder').with( :id => 'FCC5CB2ED8E6F6FB79D5B3316EAEAE2203C3951A', :server => 'keyserver.ubuntu.com', )} it { should contain_apt__source('ceph').with( :location => 'http://download.ceph.com/debian-nautilus/', :release => 'trusty', )} it { should contain_apt__source('ceph-fastcgi').with( :ensure => 'present', :location => 'http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master', :release => 'trusty', :require => 'Apt::Key[ceph-gitbuilder]' )} end context 'with ensure => absent to disable' do let :params do { :ensure => 'absent', :fastcgi => true } end it { should contain_apt__source('ceph').with( :ensure => 'absent', :location => 'http://download.ceph.com/debian-nautilus/', :release => 'trusty', )} it { should contain_apt__source('ceph-fastcgi').with( :ensure => 'absent', :location => 'http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master', :release => 'trusty', :require => 'Apt::Key[ceph-gitbuilder]' )} end end shared_examples 'ceph::repo on RHEL' do before do facts.merge!( :osfamily => 'RedHat', :operatingsystem => 'RedHat', - :operatingsystemmajrelease => '7' ) + :operatingsystemmajrelease => '8' ) end context 'with default params' do - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '1', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '1', :descr => 'External Ceph nautilus', :name => 'ext-ceph-nautilus', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '1', :descr => 'External Ceph noarch', :name => 'ext-ceph-nautilus-noarch', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} end context 'when overriding ceph release' do let :params do { :release => 'firefly' } end - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '1', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '1', :descr => 'External Ceph firefly', :name => 'ext-ceph-firefly', - :baseurl => 'http://download.ceph.com/rpm-firefly/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-firefly/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '1', :descr => 'External Ceph noarch', :name => 'ext-ceph-firefly-noarch', - :baseurl => 'http://download.ceph.com/rpm-firefly/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-firefly/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} end context 'when disabling EPEL' do let :params do { :enable_epel => false, } end - it { should_not contain_yumrepo('ext-epel-7') } + it { should_not contain_yumrepo('ext-epel-8') } end context 'when using a proxy for yum repositories' do let :params do { :proxy => 'http://someproxy.com:8080/', :proxy_username => 'proxyuser', :proxy_password => 'proxypassword' } end - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '1', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', :proxy => 'http://someproxy.com:8080/', :proxy_username => 'proxyuser', :proxy_password => 'proxypassword', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '1', :descr => 'External Ceph nautilus', :name => 'ext-ceph-nautilus', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10', :proxy => 'http://someproxy.com:8080/', :proxy_username => 'proxyuser', :proxy_password => 'proxypassword', )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '1', :descr => 'External Ceph noarch', :name => 'ext-ceph-nautilus-noarch', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10', :proxy => 'http://someproxy.com:8080/', :proxy_username => 'proxyuser', :proxy_password => 'proxypassword', )} end context 'with ensure => absent to disable' do let :params do { :ensure => 'absent', :fastcgi => true } end - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '0', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '0', :descr => 'External Ceph nautilus', :name => 'ext-ceph-nautilus', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '0', :descr => 'External Ceph noarch', :name => 'ext-ceph-nautilus-noarch', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-fastcgi').with( :enabled => '0', :descr => 'FastCGI basearch packages for Ceph', :name => 'ext-ceph-fastcgi', - :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel7-x86_64-basic/ref/master', + :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel8-x86_64-basic/ref/master', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/autobuild.asc', :mirrorlist => 'absent', :priority => '20' )} end context 'with ceph fast-cgi' do let :params do { :fastcgi => true } end - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '1', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '1', :descr => 'External Ceph nautilus', :name => 'ext-ceph-nautilus', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '1', :descr => 'External Ceph noarch', :name => 'ext-ceph-nautilus-noarch', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-fastcgi').with( :enabled => '1', :descr => 'FastCGI basearch packages for Ceph', :name => 'ext-ceph-fastcgi', - :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel7-x86_64-basic/ref/master', + :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel8-x86_64-basic/ref/master', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/autobuild.asc', :mirrorlist => 'absent', :priority => '20' )} end end shared_examples 'ceph::repo on CentOS' do before do facts.merge!( :osfamily => 'RedHat', :operatingsystem => 'CentOS', - :operatingsystemmajrelease => '7' ) + :operatingsystemmajrelease => '8' ) end context 'with default params' do - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '1', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '1', :descr => 'External Ceph nautilus', :name => 'ext-ceph-nautilus', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '1', :descr => 'External Ceph noarch', :name => 'ext-ceph-nautilus-noarch', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} end context 'when overriding ceph release' do let :params do { :release => 'firefly' } end - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '1', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '1', :descr => 'External Ceph firefly', :name => 'ext-ceph-firefly', - :baseurl => 'http://download.ceph.com/rpm-firefly/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-firefly/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '1', :descr => 'External Ceph noarch', :name => 'ext-ceph-firefly-noarch', - :baseurl => 'http://download.ceph.com/rpm-firefly/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-firefly/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} end context 'when using CentOS SIG repository' do let :params do { :enable_sig => true, } end - it { should_not contain_yumrepo('ext-epel-7') } + it { should_not contain_yumrepo('ext-epel-8') } it { should_not contain_yumrepo('ext-ceph') } it { should_not contain_yumrepo('ext-ceph-noarch') } it { should contain_yumrepo('ceph-luminous-sig').with_ensure('absent') } it { should contain_yumrepo('ceph-storage-sig').with( - :baseurl => 'http://mirror.centos.org/centos/7/storage/x86_64/ceph-nautilus/', + :baseurl => 'http://mirror.centos.org/centos/8/storage/x86_64/ceph-nautilus/', )} end context 'when using CentOS SIG repository from a mirror' do let :params do { :enable_sig => true, :ceph_mirror => 'https://mymirror/luminous/', } end - it { should_not contain_yumrepo('ext-epel-7') } + it { should_not contain_yumrepo('ext-epel-8') } it { should_not contain_yumrepo('ext-ceph') } it { should_not contain_yumrepo('ext-ceph-noarch') } it { should contain_yumrepo('ceph-luminous-sig').with_ensure('absent') } it { should contain_yumrepo('ceph-storage-sig').with( :baseurl => 'https://mymirror/luminous/', )} end context 'with ensure => absent to disable' do let :params do { :ensure => 'absent', :fastcgi => true } end - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '0', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '0', :descr => 'External Ceph nautilus', :name => 'ext-ceph-nautilus', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '0', :descr => 'External Ceph noarch', :name => 'ext-ceph-nautilus-noarch', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-fastcgi').with( :enabled => '0', :descr => 'FastCGI basearch packages for Ceph', :name => 'ext-ceph-fastcgi', - :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel7-x86_64-basic/ref/master', + :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel8-x86_64-basic/ref/master', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/autobuild.asc', :mirrorlist => 'absent', :priority => '20' )} end context 'with ceph fast-cgi' do let :params do { :fastcgi => true } end - it { should contain_yumrepo('ext-epel-7').with( + it { should contain_yumrepo('ext-epel-8').with( :enabled => '1', - :descr => 'External EPEL 7', - :name => 'ext-epel-7', + :descr => 'External EPEL 8', + :name => 'ext-epel-8', :baseurl => 'absent', :gpgcheck => '1', - :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7', - :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch', + :gpgkey => 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8', + :mirrorlist => 'http://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch', :priority => '20', :exclude => 'python-ceph-compat python-rbd python-rados python-cephfs', )} it { should contain_yumrepo('ext-ceph').with( :enabled => '1', :descr => 'External Ceph nautilus', :name => 'ext-ceph-nautilus', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/$basearch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/$basearch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-noarch').with( :enabled => '1', :descr => 'External Ceph noarch', :name => 'ext-ceph-nautilus-noarch', - :baseurl => 'http://download.ceph.com/rpm-nautilus/el7/noarch', + :baseurl => 'http://download.ceph.com/rpm-nautilus/el8/noarch', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/release.asc', :mirrorlist => 'absent', :priority => '10' )} it { should contain_yumrepo('ext-ceph-fastcgi').with( :enabled => '1', :descr => 'FastCGI basearch packages for Ceph', :name => 'ext-ceph-fastcgi', - :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel7-x86_64-basic/ref/master', + :baseurl => 'http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel8-x86_64-basic/ref/master', :gpgcheck => '1', :gpgkey => 'https://download.ceph.com/keys/autobuild.asc', :mirrorlist => 'absent', :priority => '20' )} end end on_supported_os({ :supported_os => OSDefaults.get_supported_os }).each do |os,facts| context "on #{os}" do let (:facts) do facts.merge!(OSDefaults.get_facts()) end it_behaves_like "ceph::repo on #{facts[:operatingsystem]}" if facts[:operatingsystem] == 'CentOS' it_behaves_like 'ceph::repo on RHEL' end end end end