diff options
Diffstat (limited to 'bigtop-deploy/puppet/manifests/bigtop_repo.pp')
-rw-r--r-- | bigtop-deploy/puppet/manifests/bigtop_repo.pp | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/bigtop-deploy/puppet/manifests/bigtop_repo.pp b/bigtop-deploy/puppet/manifests/bigtop_repo.pp index 51971b9f..ed22f819 100644 --- a/bigtop-deploy/puppet/manifests/bigtop_repo.pp +++ b/bigtop-deploy/puppet/manifests/bigtop_repo.pp @@ -16,15 +16,19 @@ class bigtop_repo { case $::operatingsystem { /(OracleLinux|Amazon|CentOS|Fedora|RedHat)/: { - $default_repo = "http://bigtop-repos.s3.amazonaws.com/releases/1.0.0/centos/7/x86_64" - yumrepo { "Bigtop": - baseurl => hiera("bigtop::bigtop_repo_uri", $default_repo), - descr => "Bigtop packages", - enabled => 1, + $default_repo = "http://bigtop-repos.s3.amazonaws.com/releases/1.2.0/centos/7/x86_64" + $baseurls_array = any2array(hiera("bigtop::bigtop_repo_uri", $default_repo)) + each ($baseurls_array) |$count, $baseurl| { + yumrepo { "Bigtop_$count": + baseurl => $baseurl, + descr => "Bigtop packages", + enabled => 1, gpgcheck => 0, - } - Yumrepo<||> -> Package<||> + } + Yumrepo<||> -> Package<||> + } } + /(Ubuntu|Debian)/: { include stdlib include apt @@ -32,20 +36,28 @@ class bigtop_repo { $lower_os = downcase($operatingsystem) # We use code name such as trusty for Ubuntu instead of release version in bigtop's binary convenience repos if ($operatingsystem == "Ubuntu") { $release = $lsbdistcodename } else { $release = $operatingsystemmajrelease } - $default_repo = "http://bigtop-repos.s3.amazonaws.com/releases/1.0.0/${lower_os}/${release}/x86_64" + $default_repo = "http://bigtop-repos.s3.amazonaws.com/releases/1.2.0/${lower_os}/${release}/x86_64" + $baseurls_array = any2array(hiera("bigtop::bigtop_repo_uri", $default_repo)) + # I couldn't enforce the sequence -> anymore because of this + # https://twitter.com/c0sin/status/875869783979196416 apt::conf { "disable_keys": content => "APT::Get::AllowUnauthenticated 1;", ensure => present - } -> - apt::source { "Bigtop": - location => hiera("bigtop::bigtop_repo_uri", $default_repo), - release => "bigtop", - repos => "contrib", - # BIGTOP-2796. Give Bigtop repo higher priority to solve zookeeper package conflict probem on Ubuntu - pin => "900", - ensure => present, - } -> + } + each ($baseurls_array) |$count, $baseurl| { + notify {"Baseurl: $baseurl" :} + apt::source { "Bigtop_$count": + location => $baseurl, + release => "bigtop", + repos => "contrib", + # BIGTOP-2796. Give Bigtop repo higher priority to solve zookeeper package conflict probem on Ubuntu + pin => "900", + ensure => present, + } + } + # It seems that calling update explicitely isn't needed because as far I can see + # it is getting called automatically. Perhaps this was needed for older versions? exec {'bigtop-apt-update': command => '/usr/bin/apt-get update' } |