From 7910044803dfdca5236815ddea1b4fed6e720ab2 Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 20 Nov 2015 10:39:50 +0100 Subject: [PATCH] Pin specific version of Ceph Change-Id: Ie358064b507729b9606683ce1a0e8feac7646030 Implements: blueprint pin-ceph --- docker/base/Dockerfile.j2 | 8 ++++++++ docker/base/apt_preferences | 3 +++ docker/base/ceph.yum.repo | 2 ++ docker/base/sources.list | 3 +++ docker/base/versionlock.list | 11 +++++++++++ 5 files changed, 27 insertions(+) create mode 100644 docker/base/apt_preferences create mode 100644 docker/base/versionlock.list diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index a550b6364c..0d497b8162 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -117,6 +117,12 @@ RUN yum install -y https://rdo.fedorapeople.org/rdo-release.rpm \ RUN yum update -y \ && yum clean all +# Pin package versions +RUN yum install -y \ + yum-plugin-versionlock \ + && yum clean all +COPY versionlock.list /etc/yum/pluginconf.d/ + {% if install_type == 'binary' %} # Install base packages @@ -147,10 +153,12 @@ RUN yum -y install \ ENV DEBIAN_FRONTEND noninteractive COPY sources.list /etc/apt/ +COPY apt_preferences /etc/apt/preferences RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB \ && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 391A9AA2147192839E9DB0315EDB1B62EC4926EA \ && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 08B73419AC32B4E966C1A330E84AC2C0460F3994 \ && apt-get update \ && apt-get upgrade -y \ && apt-get dist-upgrade -y \ diff --git a/docker/base/apt_preferences b/docker/base/apt_preferences new file mode 100644 index 0000000000..8a7d703809 --- /dev/null +++ b/docker/base/apt_preferences @@ -0,0 +1,3 @@ +Package: * +Pin: origin "download.ceph.com", v=0.94.5-1trusty +Pin-Priority: 700 diff --git a/docker/base/ceph.yum.repo b/docker/base/ceph.yum.repo index c78135e45a..d7c1fdfca4 100644 --- a/docker/base/ceph.yum.repo +++ b/docker/base/ceph.yum.repo @@ -2,6 +2,7 @@ name=Ceph x86_64 packages baseurl=http://ceph.com/rpm-hammer/el7/x86_64 enabled=1 +priority=2 gpgcheck=1 type=rpm-md gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc @@ -11,6 +12,7 @@ timeout=90 name=Ceph noarch packages baseurl=http://ceph.com/rpm-hammer/el7/noarch enabled=1 +priority=2 gpgcheck=1 type=rpm-md gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc diff --git a/docker/base/sources.list b/docker/base/sources.list index bbce99219f..a57d337a06 100644 --- a/docker/base/sources.list +++ b/docker/base/sources.list @@ -15,3 +15,6 @@ deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main # Percona repo (for xtrabackup) deb http://repo.percona.com/apt trusty main + +# Ceph repo +deb http://download.ceph.com/debian-hammer/ trusty main diff --git a/docker/base/versionlock.list b/docker/base/versionlock.list new file mode 100644 index 0000000000..a6b6bb609a --- /dev/null +++ b/docker/base/versionlock.list @@ -0,0 +1,11 @@ +1:ceph-0.94.5-0.el7.centos.* +1:ceph-common-0.94.5-0.el7.centos.* +1:ceph-debuginfo-0.94.5-0.el7.centos.* +1:ceph-devel-compat-0.94.5-0.el7.centos.* +1:ceph-libs-compat-0.94.5-0.el7.centos.* +1:libcephfs1-0.94.5-0.el7.centos.* +1:librados2-0.94.5-0.el7.centos.* +1:librbd1-0.94.5-0.el7.centos.* +1:python-cephfs-0.94.5-0.el7.centos.* +1:python-rados-0.94.5-0.el7.centos.* +1:python-rbd-0.94.5-0.el7.centos.*