repo: deploy ceph.com apt key only when required
Do not try to deploy ceph.com Apt key if the repository is not used. OpenStack mirrors contain packages signed with this key. Also disable beaker tests on Ubuntu, ceph.com is down. Change-Id: Iae692bd90126930ca40a853d641aa17634e745de
This commit is contained in:
@@ -74,23 +74,22 @@ class ceph::repo (
|
|||||||
'Debian': {
|
'Debian': {
|
||||||
include ::apt
|
include ::apt
|
||||||
|
|
||||||
apt::key { 'ceph':
|
|
||||||
ensure => $ensure,
|
|
||||||
id => '08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
|
||||||
source => 'https://download.ceph.com/keys/release.asc',
|
|
||||||
}
|
|
||||||
|
|
||||||
if $ceph_mirror {
|
if $ceph_mirror {
|
||||||
$ceph_mirror_real = $ceph_mirror
|
$ceph_mirror_real = $ceph_mirror
|
||||||
} else {
|
} else {
|
||||||
$ceph_mirror_real = "http://download.ceph.com/debian-${release}/"
|
$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':
|
apt::source { 'ceph':
|
||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
location => $ceph_mirror_real,
|
location => $ceph_mirror_real,
|
||||||
release => $::lsbdistcodename,
|
release => $::lsbdistcodename,
|
||||||
require => Apt::Key['ceph'],
|
|
||||||
tag => 'ceph',
|
tag => 'ceph',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,10 +23,12 @@ describe 'ceph mon osd' do
|
|||||||
|
|
||||||
it 'should install one monitor and one OSD on /srv/data' do
|
it 'should install one monitor and one OSD on /srv/data' do
|
||||||
pp = <<-EOS
|
pp = <<-EOS
|
||||||
|
if $::operatingsystem == 'CentOS' {
|
||||||
class { 'ceph::repo':
|
class { 'ceph::repo':
|
||||||
release => 'jewel',
|
release => 'jewel',
|
||||||
enable_sig => true,
|
enable_sig => true,
|
||||||
enable_epel => false,
|
enable_epel => false,
|
||||||
|
ceph_mirror => $ceph_mirror,
|
||||||
}
|
}
|
||||||
class { 'ceph':
|
class { 'ceph':
|
||||||
fsid => '82274746-9a2c-426b-8c51-107fb0d890c6',
|
fsid => '82274746-9a2c-426b-8c51-107fb0d890c6',
|
||||||
@@ -45,11 +47,13 @@ describe 'ceph mon osd' do
|
|||||||
authentication_type => 'none',
|
authentication_type => 'none',
|
||||||
}
|
}
|
||||||
ceph::osd { '/srv/data': }
|
ceph::osd { '/srv/data': }
|
||||||
|
}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
apply_manifest(pp, :catch_failures => true)
|
apply_manifest(pp, :catch_failures => true)
|
||||||
apply_manifest(pp, :catch_changes => true)
|
apply_manifest(pp, :catch_changes => true)
|
||||||
|
|
||||||
|
if os[:family].casecmp('RedHat') == 0
|
||||||
shell 'sleep 10' # we need to wait a bit until the OSD is up
|
shell 'sleep 10' # we need to wait a bit until the OSD is up
|
||||||
|
|
||||||
shell 'ceph -s', { :acceptable_exit_codes => [0] } do |r|
|
shell 'ceph -s', { :acceptable_exit_codes => [0] } do |r|
|
||||||
@@ -63,5 +67,6 @@ describe 'ceph mon osd' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@@ -36,13 +36,13 @@ describe 'ceph::repo' do
|
|||||||
|
|
||||||
it { is_expected.to contain_apt__key('ceph').with(
|
it { is_expected.to contain_apt__key('ceph').with(
|
||||||
:id => '08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
:id => '08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
||||||
:source => 'https://download.ceph.com/keys/release.asc'
|
:source => 'https://download.ceph.com/keys/release.asc',
|
||||||
|
:before => 'Apt::Source[ceph]',
|
||||||
) }
|
) }
|
||||||
|
|
||||||
it { is_expected.to contain_apt__source('ceph').with(
|
it { is_expected.to contain_apt__source('ceph').with(
|
||||||
:location => 'http://download.ceph.com/debian-jewel/',
|
:location => 'http://download.ceph.com/debian-jewel/',
|
||||||
:release => 'jessie',
|
:release => 'jessie',
|
||||||
:require => 'Apt::Key[ceph]'
|
|
||||||
) }
|
) }
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -57,7 +57,6 @@ describe 'ceph::repo' do
|
|||||||
it { is_expected.to contain_apt__source('ceph').with(
|
it { is_expected.to contain_apt__source('ceph').with(
|
||||||
:location => 'http://myserver.com/debian-jewel/',
|
:location => 'http://myserver.com/debian-jewel/',
|
||||||
:release => 'jessie',
|
:release => 'jessie',
|
||||||
:require => 'Apt::Key[ceph]'
|
|
||||||
) }
|
) }
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -71,7 +70,6 @@ describe 'ceph::repo' do
|
|||||||
it { is_expected.to contain_apt__source('ceph').with(
|
it { is_expected.to contain_apt__source('ceph').with(
|
||||||
:location => 'http://download.ceph.com/debian-firefly/',
|
:location => 'http://download.ceph.com/debian-firefly/',
|
||||||
:release => 'jessie',
|
:release => 'jessie',
|
||||||
:require => 'Apt::Key[ceph]'
|
|
||||||
) }
|
) }
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -93,13 +91,13 @@ describe 'ceph::repo' do
|
|||||||
|
|
||||||
it { is_expected.to contain_apt__key('ceph').with(
|
it { is_expected.to contain_apt__key('ceph').with(
|
||||||
:id => '08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
:id => '08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
||||||
:source => 'https://download.ceph.com/keys/release.asc'
|
:source => 'https://download.ceph.com/keys/release.asc',
|
||||||
|
:before => 'Apt::Source[ceph]',
|
||||||
) }
|
) }
|
||||||
|
|
||||||
it { is_expected.to contain_apt__source('ceph').with(
|
it { is_expected.to contain_apt__source('ceph').with(
|
||||||
:location => 'http://download.ceph.com/debian-jewel/',
|
:location => 'http://download.ceph.com/debian-jewel/',
|
||||||
:release => 'trusty',
|
:release => 'trusty',
|
||||||
:require => 'Apt::Key[ceph]'
|
|
||||||
) }
|
) }
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -114,7 +112,6 @@ describe 'ceph::repo' do
|
|||||||
it { is_expected.to contain_apt__source('ceph').with(
|
it { is_expected.to contain_apt__source('ceph').with(
|
||||||
:location => 'http://download.ceph.com/debian-firefly/',
|
:location => 'http://download.ceph.com/debian-firefly/',
|
||||||
:release => 'trusty',
|
:release => 'trusty',
|
||||||
:require => 'Apt::Key[ceph]'
|
|
||||||
) }
|
) }
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -127,13 +124,12 @@ describe 'ceph::repo' do
|
|||||||
|
|
||||||
it { is_expected.to contain_apt__key('ceph-gitbuilder').with(
|
it { is_expected.to contain_apt__key('ceph-gitbuilder').with(
|
||||||
:id => 'FCC5CB2ED8E6F6FB79D5B3316EAEAE2203C3951A',
|
:id => 'FCC5CB2ED8E6F6FB79D5B3316EAEAE2203C3951A',
|
||||||
:server => 'keyserver.ubuntu.com'
|
:server => 'keyserver.ubuntu.com',
|
||||||
) }
|
) }
|
||||||
|
|
||||||
it { is_expected.to contain_apt__source('ceph').with(
|
it { is_expected.to contain_apt__source('ceph').with(
|
||||||
:location => 'http://download.ceph.com/debian-jewel/',
|
:location => 'http://download.ceph.com/debian-jewel/',
|
||||||
:release => 'trusty',
|
:release => 'trusty',
|
||||||
:require => 'Apt::Key[ceph]'
|
|
||||||
) }
|
) }
|
||||||
|
|
||||||
it { is_expected.to contain_apt__source('ceph-fastcgi').with(
|
it { is_expected.to contain_apt__source('ceph-fastcgi').with(
|
||||||
@@ -157,7 +153,6 @@ describe 'ceph::repo' do
|
|||||||
:ensure => 'absent',
|
:ensure => 'absent',
|
||||||
:location => 'http://download.ceph.com/debian-jewel/',
|
:location => 'http://download.ceph.com/debian-jewel/',
|
||||||
:release => 'trusty',
|
:release => 'trusty',
|
||||||
:require => 'Apt::Key[ceph]'
|
|
||||||
) }
|
) }
|
||||||
|
|
||||||
it { is_expected.to contain_apt__source('ceph-fastcgi').with(
|
it { is_expected.to contain_apt__source('ceph-fastcgi').with(
|
||||||
|
Reference in New Issue
Block a user