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:
parent
a9818a2e95
commit
939307f497
@ -74,23 +74,22 @@ class ceph::repo (
|
||||
'Debian': {
|
||||
include ::apt
|
||||
|
||||
apt::key { 'ceph':
|
||||
ensure => $ensure,
|
||||
id => '08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
||||
source => 'https://download.ceph.com/keys/release.asc',
|
||||
}
|
||||
|
||||
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,
|
||||
require => Apt::Key['ceph'],
|
||||
tag => 'ceph',
|
||||
}
|
||||
|
||||
|
@ -23,43 +23,48 @@ describe 'ceph mon osd' do
|
||||
|
||||
it 'should install one monitor and one OSD on /srv/data' do
|
||||
pp = <<-EOS
|
||||
class { 'ceph::repo':
|
||||
release => 'jewel',
|
||||
enable_sig => true,
|
||||
enable_epel => false,
|
||||
if $::operatingsystem == 'CentOS' {
|
||||
class { 'ceph::repo':
|
||||
release => 'jewel',
|
||||
enable_sig => true,
|
||||
enable_epel => false,
|
||||
ceph_mirror => $ceph_mirror,
|
||||
}
|
||||
class { 'ceph':
|
||||
fsid => '82274746-9a2c-426b-8c51-107fb0d890c6',
|
||||
mon_host => $::ipaddress,
|
||||
authentication_type => 'none',
|
||||
osd_pool_default_size => '1',
|
||||
osd_pool_default_min_size => '1',
|
||||
osd_max_object_namespace_len => '64',
|
||||
osd_max_object_name_len => '256',
|
||||
}
|
||||
ceph_config {
|
||||
'global/osd_journal_size': value => '100';
|
||||
}
|
||||
ceph::mon { 'a':
|
||||
public_addr => $::ipaddress,
|
||||
authentication_type => 'none',
|
||||
}
|
||||
ceph::osd { '/srv/data': }
|
||||
}
|
||||
class { 'ceph':
|
||||
fsid => '82274746-9a2c-426b-8c51-107fb0d890c6',
|
||||
mon_host => $::ipaddress,
|
||||
authentication_type => 'none',
|
||||
osd_pool_default_size => '1',
|
||||
osd_pool_default_min_size => '1',
|
||||
osd_max_object_namespace_len => '64',
|
||||
osd_max_object_name_len => '256',
|
||||
}
|
||||
ceph_config {
|
||||
'global/osd_journal_size': value => '100';
|
||||
}
|
||||
ceph::mon { 'a':
|
||||
public_addr => $::ipaddress,
|
||||
authentication_type => 'none',
|
||||
}
|
||||
ceph::osd { '/srv/data': }
|
||||
EOS
|
||||
|
||||
apply_manifest(pp, :catch_failures => true)
|
||||
apply_manifest(pp, :catch_changes => true)
|
||||
|
||||
shell 'sleep 10' # we need to wait a bit until the OSD is up
|
||||
if os[:family].casecmp('RedHat') == 0
|
||||
shell 'sleep 10' # we need to wait a bit until the OSD is up
|
||||
|
||||
shell 'ceph -s', { :acceptable_exit_codes => [0] } do |r|
|
||||
expect(r.stdout).to match(/1 mons at/)
|
||||
expect(r.stderr).to be_empty
|
||||
end
|
||||
shell 'ceph -s', { :acceptable_exit_codes => [0] } do |r|
|
||||
expect(r.stdout).to match(/1 mons at/)
|
||||
expect(r.stderr).to be_empty
|
||||
end
|
||||
|
||||
shell 'ceph osd tree | grep osd.0', { :acceptable_exit_codes => [0] } do |r|
|
||||
expect(r.stdout).to match(/up/)
|
||||
expect(r.stderr).to be_empty
|
||||
shell 'ceph osd tree | grep osd.0', { :acceptable_exit_codes => [0] } do |r|
|
||||
expect(r.stdout).to match(/up/)
|
||||
expect(r.stderr).to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -36,13 +36,13 @@ describe 'ceph::repo' do
|
||||
|
||||
it { is_expected.to contain_apt__key('ceph').with(
|
||||
: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(
|
||||
:location => 'http://download.ceph.com/debian-jewel/',
|
||||
:release => 'jessie',
|
||||
:require => 'Apt::Key[ceph]'
|
||||
) }
|
||||
|
||||
end
|
||||
@ -57,7 +57,6 @@ describe 'ceph::repo' do
|
||||
it { is_expected.to contain_apt__source('ceph').with(
|
||||
:location => 'http://myserver.com/debian-jewel/',
|
||||
:release => 'jessie',
|
||||
:require => 'Apt::Key[ceph]'
|
||||
) }
|
||||
end
|
||||
|
||||
@ -71,7 +70,6 @@ describe 'ceph::repo' do
|
||||
it { is_expected.to contain_apt__source('ceph').with(
|
||||
:location => 'http://download.ceph.com/debian-firefly/',
|
||||
:release => 'jessie',
|
||||
:require => 'Apt::Key[ceph]'
|
||||
) }
|
||||
end
|
||||
|
||||
@ -93,13 +91,13 @@ describe 'ceph::repo' do
|
||||
|
||||
it { is_expected.to contain_apt__key('ceph').with(
|
||||
: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(
|
||||
:location => 'http://download.ceph.com/debian-jewel/',
|
||||
:release => 'trusty',
|
||||
:require => 'Apt::Key[ceph]'
|
||||
) }
|
||||
|
||||
end
|
||||
@ -114,7 +112,6 @@ describe 'ceph::repo' do
|
||||
it { is_expected.to contain_apt__source('ceph').with(
|
||||
:location => 'http://download.ceph.com/debian-firefly/',
|
||||
:release => 'trusty',
|
||||
:require => 'Apt::Key[ceph]'
|
||||
) }
|
||||
end
|
||||
|
||||
@ -127,13 +124,12 @@ describe 'ceph::repo' do
|
||||
|
||||
it { is_expected.to contain_apt__key('ceph-gitbuilder').with(
|
||||
:id => 'FCC5CB2ED8E6F6FB79D5B3316EAEAE2203C3951A',
|
||||
:server => 'keyserver.ubuntu.com'
|
||||
:server => 'keyserver.ubuntu.com',
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_apt__source('ceph').with(
|
||||
:location => 'http://download.ceph.com/debian-jewel/',
|
||||
:release => 'trusty',
|
||||
:require => 'Apt::Key[ceph]'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_apt__source('ceph-fastcgi').with(
|
||||
@ -157,7 +153,6 @@ describe 'ceph::repo' do
|
||||
:ensure => 'absent',
|
||||
:location => 'http://download.ceph.com/debian-jewel/',
|
||||
:release => 'trusty',
|
||||
:require => 'Apt::Key[ceph]'
|
||||
) }
|
||||
|
||||
it { is_expected.to contain_apt__source('ceph-fastcgi').with(
|
||||
|
Loading…
x
Reference in New Issue
Block a user