2015-11-06 14:43:25 -05:00
|
|
|
class openstack_integration::repos {
|
|
|
|
|
2023-10-14 23:52:06 +09:00
|
|
|
$ceph_version_real = pick($facts['ceph_version'], 'reef')
|
2022-11-21 10:03:41 +09:00
|
|
|
|
2023-03-01 10:29:37 +09:00
|
|
|
if $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '22') >= 0 {
|
2023-01-23 14:04:07 +09:00
|
|
|
# NOTE(tkajinam): Upstream ceph repository does not provide packages for
|
|
|
|
# Ubuntu Jammy, so we use packages from UCA.
|
|
|
|
$enable_ceph_repository = false
|
2022-11-21 10:03:41 +09:00
|
|
|
} else {
|
|
|
|
$enable_ceph_repository = true
|
|
|
|
}
|
|
|
|
|
2023-03-01 10:29:37 +09:00
|
|
|
case $facts['os']['family'] {
|
2015-11-06 14:43:25 -05:00
|
|
|
'Debian': {
|
2023-03-01 10:29:37 +09:00
|
|
|
case $facts['os']['name'] {
|
2022-01-05 22:44:55 +09:00
|
|
|
'Ubuntu': {
|
2019-12-08 12:59:28 +01:00
|
|
|
include apt
|
|
|
|
class { 'openstack_extras::repo::debian::ubuntu':
|
2023-10-05 01:05:24 +09:00
|
|
|
release => 'bobcat',
|
2018-04-03 13:44:31 +02:00
|
|
|
package_require => true,
|
2023-03-01 10:29:37 +09:00
|
|
|
uca_location => pick($facts['uca_mirror_host'], 'http://ubuntu-cloud.archive.canonical.com/ubuntu'),
|
2018-04-03 13:44:31 +02:00
|
|
|
}
|
|
|
|
}
|
2022-01-05 22:44:55 +09:00
|
|
|
'Debian': {
|
2019-12-08 12:59:28 +01:00
|
|
|
include apt
|
|
|
|
class { 'openstack_extras::repo::debian::debian':
|
2023-10-05 01:05:24 +09:00
|
|
|
release => 'bobcat',
|
2018-04-03 13:44:31 +02:00
|
|
|
package_require => true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default: {
|
2023-03-01 10:29:37 +09:00
|
|
|
fail("Unsupported package type (${facts['os']['name']})")
|
2018-04-03 13:44:31 +02:00
|
|
|
}
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
2022-06-08 09:20:10 +09:00
|
|
|
|
2023-10-14 23:52:06 +09:00
|
|
|
$ceph_mirror = pick($facts['ceph_mirror_host'], "http://download.ceph.com/debian-${ceph_version_real}/")
|
2022-11-21 10:03:41 +09:00
|
|
|
if $enable_ceph_repository {
|
|
|
|
# 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.
|
2023-10-14 23:52:06 +09:00
|
|
|
if $ceph_mirror !~ '^http://download.ceph.com/.*' {
|
2022-11-21 10:03:41 +09:00
|
|
|
$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',
|
|
|
|
}
|
2018-08-20 15:25:13 +02:00
|
|
|
}
|
2016-01-25 17:50:43 -05:00
|
|
|
}
|
2022-06-08 09:20:10 +09:00
|
|
|
|
2017-04-03 10:15:36 +02:00
|
|
|
$enable_sig = false
|
|
|
|
$enable_epel = false
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
|
|
|
'RedHat': {
|
2023-10-14 23:52:06 +09:00
|
|
|
$centos_mirror = pick(
|
|
|
|
$facts['centos_mirror_host'],
|
|
|
|
'http://mirror.stream.centos.org'
|
|
|
|
)
|
|
|
|
$delorean_repo = pick(
|
|
|
|
$facts['delorean_repo_path'],
|
|
|
|
"https://trunk.rdoproject.org/centos${facts['os']['release']['major']}-master/puppet-passed-ci/delorean.repo"
|
|
|
|
)
|
|
|
|
$delorean_deps_repo = pick(
|
|
|
|
$facts['delorean_deps_repo_path'],
|
|
|
|
"https://trunk.rdoproject.org/centos${facts['os']['release']['major']}-master/delorean-deps.repo"
|
|
|
|
)
|
2020-10-29 01:09:34 +09:00
|
|
|
|
2019-12-08 12:59:28 +01:00
|
|
|
class { 'openstack_extras::repo::redhat::redhat':
|
2017-03-30 14:43:25 -04:00
|
|
|
manage_rdo => false,
|
|
|
|
manage_epel => false,
|
2020-07-13 00:11:19 +02:00
|
|
|
centos_mirror_url => $centos_mirror,
|
2020-07-21 08:36:06 +09:00
|
|
|
repo_source_hash => {
|
2020-10-29 01:09:34 +09:00
|
|
|
'delorean.repo' => $delorean_repo,
|
|
|
|
'delorean-deps.repo' => $delorean_deps_repo
|
2020-08-19 22:42:53 +09:00
|
|
|
},
|
2020-09-18 09:58:07 +09:00
|
|
|
repo_replace => false,
|
2020-08-19 22:42:53 +09:00
|
|
|
update_packages => true,
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
2022-06-07 23:28:52 +09:00
|
|
|
|
2023-10-14 23:52:06 +09:00
|
|
|
$ceph_mirror = pick(
|
|
|
|
$facts['ceph_mirror_host'],
|
|
|
|
"${centos_mirror}/SIGs/${facts['os']['release']['major']}-stream/storage/x86_64/ceph-${ceph_version_real}/"
|
|
|
|
)
|
2022-11-21 10:01:14 +09:00
|
|
|
|
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/
|
2023-10-14 23:52:06 +09:00
|
|
|
$enable_sig = true
|
|
|
|
$enable_epel = false
|
2020-12-09 21:34:30 +09:00
|
|
|
|
2022-11-21 10:01:14 +09:00
|
|
|
exec { 'enable-crb':
|
|
|
|
command => 'dnf config-manager --enable crb',
|
2022-03-22 00:01:06 +09:00
|
|
|
path => '/usr/bin/',
|
2022-11-21 10:01:14 +09:00
|
|
|
unless => 'test 0 -ne $(dnf repolist --enabled crb | wc -l)'
|
2018-07-03 20:04:26 +05:30
|
|
|
}
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
|
|
|
default: {
|
2023-03-01 10:29:37 +09:00
|
|
|
fail("Unsupported osfamily (${facts['os']['family']})")
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-21 10:03:41 +09:00
|
|
|
if $enable_ceph_repository {
|
2020-05-11 00:41:58 +02:00
|
|
|
class { 'ceph::repo':
|
|
|
|
enable_sig => $enable_sig,
|
|
|
|
enable_epel => $enable_epel,
|
|
|
|
ceph_mirror => $ceph_mirror,
|
|
|
|
}
|
2018-08-22 23:51:30 +02:00
|
|
|
}
|
|
|
|
|
2022-11-21 10:27:30 +09:00
|
|
|
# NOTE(tobias-urdin): Needed where augeas is used, like puppet-ovn.
|
|
|
|
package { 'ruby-augeas':
|
|
|
|
ensure => 'present',
|
|
|
|
}
|
|
|
|
|
2023-03-01 10:29:37 +09:00
|
|
|
if $facts['os']['family'] == 'RedHat' {
|
2018-12-11 12:51:01 +01:00
|
|
|
# NOTE(tobias-urdin): Install libibverbs to fix an issue where OVS outputs errors
|
|
|
|
# that causes the puppet-openvswitch module to fail parsing the output.
|
2020-09-21 20:14:07 +02:00
|
|
|
# This issue does not occur in integration testing but only module tests since some
|
2018-12-11 12:51:01 +01:00
|
|
|
# other package (probably nova) causes this package to be installed, or the yum upgrade
|
|
|
|
# part in integration catches it.
|
|
|
|
# Reported upstream: https://bugzilla.redhat.com/show_bug.cgi?id=1658141
|
|
|
|
package { 'libibverbs':
|
|
|
|
ensure => 'present',
|
|
|
|
}
|
2020-09-16 11:10:34 +02:00
|
|
|
|
|
|
|
Yumrepo<||> -> Package<| title == 'ruby-augeas' |>
|
2016-04-12 14:25:58 -04:00
|
|
|
}
|
2015-11-06 14:43:25 -05:00
|
|
|
}
|