2015-11-06 14:43:25 -05:00
|
|
|
class openstack_integration::repos {
|
|
|
|
|
2018-07-02 09:31:53 +02:00
|
|
|
# To make beaker tests work.
|
|
|
|
if $::ceph_version != '' {
|
|
|
|
$ceph_version_real = $::ceph_version
|
|
|
|
} else {
|
2018-07-26 10:35:22 +02:00
|
|
|
$ceph_version_real = 'mimic'
|
2018-07-02 09:31:53 +02:00
|
|
|
}
|
2015-11-06 14:43:25 -05:00
|
|
|
case $::osfamily {
|
|
|
|
'Debian': {
|
2018-04-11 08:28:49 +02:00
|
|
|
case $::os_package_type {
|
2018-04-03 13:44:31 +02:00
|
|
|
'ubuntu': {
|
|
|
|
include ::apt
|
|
|
|
class { '::openstack_extras::repo::debian::ubuntu':
|
2018-05-06 14:18:52 +02:00
|
|
|
release => 'rocky',
|
2018-04-03 13:44:31 +02:00
|
|
|
package_require => true,
|
|
|
|
uca_location => pick($::uca_mirror_host, 'http://ubuntu-cloud.archive.canonical.com/ubuntu'),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
'debian': {
|
|
|
|
include ::apt
|
|
|
|
class { '::openstack_extras::repo::debian::debian':
|
|
|
|
release => 'queens',
|
|
|
|
package_require => true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default: {
|
2018-04-11 08:28:49 +02:00
|
|
|
fail("Unsupported package type (${::os_package_type})")
|
2018-04-03 13:44:31 +02:00
|
|
|
}
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
2018-08-20 15:25:13 +02:00
|
|
|
# Ceph is both packaged on UCA and official download.ceph.com packages
|
|
|
|
# which we mirror. We want to use the official packages or our mirror.
|
|
|
|
if $::nodepool_mirror_host != '' {
|
|
|
|
$ceph_version_cap = capitalize($ceph_version_real)
|
|
|
|
apt::pin { 'ceph':
|
|
|
|
priority => 1001,
|
|
|
|
originator => "Ceph ${ceph_version_cap}",
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
apt::pin { 'ceph':
|
|
|
|
priority => 1001,
|
|
|
|
origin => 'download.ceph.com',
|
|
|
|
}
|
2016-01-25 17:50:43 -05:00
|
|
|
}
|
2017-04-03 10:15:36 +02:00
|
|
|
$enable_sig = false
|
|
|
|
$enable_epel = false
|
2018-07-02 09:31:53 +02:00
|
|
|
$ceph_mirror = pick($::ceph_mirror_host, "http://download.ceph.com/debian-${ceph_version_real}/")
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
|
|
|
'RedHat': {
|
|
|
|
class { '::openstack_extras::repo::redhat::redhat':
|
2017-03-30 14:43:25 -04:00
|
|
|
manage_rdo => false,
|
|
|
|
manage_epel => false,
|
|
|
|
centos_mirror_url => $::centos_mirror_host,
|
|
|
|
repo_hash => {
|
2017-12-21 10:36:27 -07:00
|
|
|
'master-puppet-passed-ci' => {
|
2017-03-31 09:31:40 -04:00
|
|
|
'baseurl' => pick($::rdo_mirror_host, 'https://trunk.rdoproject.org/centos7-master/puppet-passed-ci/'),
|
2017-12-21 10:36:27 -07:00
|
|
|
'descr' => 'master puppet-passed-ci',
|
2015-12-09 21:00:40 -05:00
|
|
|
'gpgcheck' => 'no',
|
|
|
|
'priority' => 1,
|
|
|
|
},
|
2017-12-21 10:36:27 -07:00
|
|
|
'master-delorean-deps' => {
|
|
|
|
'baseurl' => pick($::deps_mirror_host, 'https://trunk.rdoproject.org/centos7-master/deps/latest/'),
|
|
|
|
'descr' => 'master delorean-deps',
|
2016-05-19 10:51:51 +02:00
|
|
|
'gpgcheck' => 'no',
|
|
|
|
},
|
2016-11-15 17:42:37 -07:00
|
|
|
},
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
2018-06-19 17:32:27 +02:00
|
|
|
# TODO(tobasco): Remove this CBS candidate repo for Mimic when Storage SIG release it.
|
2018-07-02 09:31:53 +02:00
|
|
|
$ceph_mirror_fallback = $ceph_version_real ? {
|
2018-06-19 17:32:27 +02:00
|
|
|
'mimic' => 'http://cbs.centos.org/repos/storage7-ceph-mimic-candidate/x86_64/os/',
|
2018-07-02 09:31:53 +02:00
|
|
|
default => "https://buildlogs.centos.org/centos/7/storage/x86_64/ceph-${ceph_version_real}/"
|
2018-06-19 17:32:27 +02:00
|
|
|
}
|
|
|
|
$ceph_mirror = pick($::ceph_mirror_host, $ceph_mirror_fallback)
|
2017-04-03 10:15:36 +02:00
|
|
|
# On CentOS, deploy Ceph using SIG repository and get rid of EPEL.
|
|
|
|
# https://wiki.centos.org/SpecialInterestGroup/Storage/
|
|
|
|
if $::operatingsystem == 'CentOS' {
|
|
|
|
$enable_sig = true
|
|
|
|
$enable_epel = false
|
|
|
|
} else {
|
|
|
|
$enable_sig = false
|
|
|
|
$enable_epel = true
|
|
|
|
}
|
2018-07-03 20:04:26 +05:30
|
|
|
# Remove Fedora Base repos as stable-base repo is configured which includes
|
|
|
|
# all required packages
|
|
|
|
if $::operatingsystem == 'Fedora' {
|
|
|
|
tidy { 'delete-fedora-base-repos':
|
|
|
|
path => '/etc/yum.repos.d',
|
|
|
|
recurse => true,
|
|
|
|
matches => [ 'fedora*.repo' ],
|
|
|
|
rmdirs => false,
|
|
|
|
require => Class['::openstack_extras::repo::redhat::redhat'],
|
|
|
|
}
|
|
|
|
}
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
|
|
|
default: {
|
|
|
|
fail("Unsupported osfamily (${::osfamily})")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-12 14:25:58 -04:00
|
|
|
class { '::ceph::repo':
|
|
|
|
enable_sig => $enable_sig,
|
|
|
|
enable_epel => $enable_epel,
|
2017-04-03 10:15:36 +02:00
|
|
|
ceph_mirror => $ceph_mirror,
|
2016-04-12 14:25:58 -04:00
|
|
|
}
|
2016-01-25 17:50:43 -05:00
|
|
|
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|