From: Walter Huf Date: Wed, 30 Jul 2014 16:44:58 +0000 (-0500) Subject: Apt-pins the Ceph version to the Ceph repo version X-Git-Tag: v0.8.0~23^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ca20c992b88435d51d620a5854b284f4fa5bb649;p=ceph-cookbooks.git Apt-pins the Ceph version to the Ceph repo version Ubuntu 14.04 ships a newer version than this cookbook defaults to. This pin allows for easy installation of the same Ceph version across multiple Ubuntu versions --- diff --git a/recipes/apt.rb b/recipes/apt.rb index d101b00..df1422b 100644 --- a/recipes/apt.rb +++ b/recipes/apt.rb @@ -9,6 +9,12 @@ when 'jessie' then 'sid' else node['lsb']['codename'] end +apt_preference 'ceph_repo' do + package_name '*' + pin 'origin "ceph.com"' + pin_priority '1001' +end + apt_repository 'ceph' do repo_name 'ceph' uri node['ceph']['debian'][branch]['repository'] diff --git a/test/integration/aio/bats/version.bats b/test/integration/aio/bats/version.bats new file mode 100644 index 0000000..93abb29 --- /dev/null +++ b/test/integration/aio/bats/version.bats @@ -0,0 +1,6 @@ +@test "ceph is installed from the official repo" { + cephversion=`apt-cache policy ceph | grep -B 1 ceph.com | head -n 1 | sed 's/^[^0-9]\+\([^ ]\+\).*/\1/'` + installedversion=`apt-cache policy ceph | grep 'Installed:' | awk '{print $2}'` + test "$cephversion" = "$installedversion" +} +