From eab7b68399cf2249c4f081ae850a21c1b97fcf7c Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Mon, 10 Aug 2015 19:29:02 +0300 Subject: [PATCH] Create auxiliary repo with fuel version Fuel 7.0 auxiliary repo should be created as /etc/yum.repos.d/7.0_auxiliary This helps with upgrade/rollback process for Fuel Master. The configuration for auxiliary repository on deployed Fuel nodes is unchanged. Change-Id: Iec2645ddbee6b1b6b9e5c2816707b275542ef51b Partial-Bug: #1480282 --- deployment/puppet/nailgun/examples/host-only.pp | 1 + deployment/puppet/nailgun/examples/host-upgrade.pp | 1 + .../puppet/nailgun/manifests/auxiliaryrepos.pp | 13 +++++++------ deployment/puppet/nailgun/manifests/host.pp | 4 +++- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/deployment/puppet/nailgun/examples/host-only.pp b/deployment/puppet/nailgun/examples/host-only.pp index 976070b765..121141711a 100644 --- a/deployment/puppet/nailgun/examples/host-only.pp +++ b/deployment/puppet/nailgun/examples/host-only.pp @@ -30,6 +30,7 @@ class { 'osnailyfacter::atop': } class { 'nailgun::host': production => $production, + fuel_version => $::fuel_version['VERSION']['release'], cobbler_host => $::fuel_settings['ADMIN_NETWORK']['ipaddress'], nailgun_group => $nailgun_group, nailgun_user => $nailgun_user, diff --git a/deployment/puppet/nailgun/examples/host-upgrade.pp b/deployment/puppet/nailgun/examples/host-upgrade.pp index 5d34900482..a298d7fd09 100644 --- a/deployment/puppet/nailgun/examples/host-upgrade.pp +++ b/deployment/puppet/nailgun/examples/host-upgrade.pp @@ -25,6 +25,7 @@ class { 'nailgun::packages': } class { 'nailgun::host': production => $production, + fuel_version => $::fuel_version['VERSION']['release'], cobbler_host => $::fuel_settings['ADMIN_NETWORK']['ipaddress'], nailgun_group => $nailgun_group, nailgun_user => $nailgun_user, diff --git a/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp b/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp index 8b97b47671..41a25704dd 100644 --- a/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp +++ b/deployment/puppet/nailgun/manifests/auxiliaryrepos.pp @@ -1,6 +1,7 @@ class nailgun::auxiliaryrepos( - $repo_root = '/var/www/nailgun', - $priority = '15', + $fuel_version, + $repo_root = '/var/www/nailgun', + $priority = '15', ){ $centos_dir = "${repo_root}/centos/auxiliary/" @@ -16,11 +17,11 @@ class nailgun::auxiliaryrepos( File[$centos_dir] -> Package['createrepo'] -> Exec["createrepo ${centos_dir}"] -> - Yumrepo['auxiliary'] + Yumrepo["${fuel_version}_auxiliary"] - yumrepo { 'auxiliary': - name => 'auxiliary', - descr => 'auxillary', + yumrepo { "${fuel_version}_auxiliary": + name => "${fuel_version}_auxiliary", + descr => "${fuel_version}_auxiliary", baseurl => "file://${centos_dir}", gpgcheck => '0', priority => $priority, diff --git a/deployment/puppet/nailgun/manifests/host.pp b/deployment/puppet/nailgun/manifests/host.pp index fb2c823131..7597a72dbe 100644 --- a/deployment/puppet/nailgun/manifests/host.pp +++ b/deployment/puppet/nailgun/manifests/host.pp @@ -1,5 +1,6 @@ class nailgun::host( $production, +$fuel_version, $cobbler_host = '127.0.0.1', $dns_search = 'domain.tld', $dns_domain = 'domain.tld', @@ -27,7 +28,8 @@ $admin_iface = 'eth0', } class { 'nailgun::auxiliaryrepos': - repo_root => $repo_root, + fuel_version => $fuel_version, + repo_root => $repo_root, } nailgun::sshkeygen { '/root/.ssh/id_rsa':