From 29d39b338ed9fca45590885db7e11666ec37ff45 Mon Sep 17 00:00:00 2001 From: Artur Zarzycki Date: Tue, 12 Jan 2016 12:39:44 +0100 Subject: [PATCH] Cinder ubuntu binary container Change-Id: Idfdeee030441a61e5bb1936dea9e5e84c243f156 Partially-Implements: blueprint binary-ubuntu --- docker/cinder/cinder-api/Dockerfile.j2 | 6 ++++++ docker/cinder/cinder-backup/Dockerfile.j2 | 10 ++++++++++ docker/cinder/cinder-base/Dockerfile.j2 | 9 +++++++++ docker/cinder/cinder-scheduler/Dockerfile.j2 | 10 ++++++++++ docker/cinder/cinder-volume/Dockerfile.j2 | 6 ++++++ 5 files changed, 41 insertions(+) diff --git a/docker/cinder/cinder-api/Dockerfile.j2 b/docker/cinder/cinder-api/Dockerfile.j2 index e0769302c0..d9b819e5dc 100644 --- a/docker/cinder/cinder-api/Dockerfile.j2 +++ b/docker/cinder/cinder-api/Dockerfile.j2 @@ -7,6 +7,12 @@ MAINTAINER {{ maintainer }} RUN yum install -y python-keystone \ && yum clean all + {% elif base_distro in ['ubuntu'] %} + +RUN apt-get install -y --no-install-recommends \ + cinder-api \ + && apt-get clean + {% endif %} {% endif %} diff --git a/docker/cinder/cinder-backup/Dockerfile.j2 b/docker/cinder/cinder-backup/Dockerfile.j2 index 0549823593..74a5ebea16 100644 --- a/docker/cinder/cinder-backup/Dockerfile.j2 +++ b/docker/cinder/cinder-backup/Dockerfile.j2 @@ -1,6 +1,16 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }} MAINTAINER {{ maintainer }} +{% if install_type == 'binary' %} + {% if base_distro in ['ubuntu'] %} + +RUN apt-get install -y --no-install-recommends \ + cinder-backup \ + && apt-get clean + + {% endif %} +{% endif %} + {{ include_footer }} USER cinder diff --git a/docker/cinder/cinder-base/Dockerfile.j2 b/docker/cinder/cinder-base/Dockerfile.j2 index c2e091e527..fdb26c8dec 100644 --- a/docker/cinder/cinder-base/Dockerfile.j2 +++ b/docker/cinder/cinder-base/Dockerfile.j2 @@ -13,6 +13,15 @@ RUN yum -y install openstack-cinder \ && yum clean all \ && mkdir -p /etc/ceph + {% elif base_distro in ['ubuntu'] %} + +RUN apt-get install -y --no-install-recommends \ + cinder-common \ + ceph-common \ + lvm2 \ + && apt-get clean \ + && mkdir -p /etc/ceph + {% endif %} {% elif install_type == 'source' %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} diff --git a/docker/cinder/cinder-scheduler/Dockerfile.j2 b/docker/cinder/cinder-scheduler/Dockerfile.j2 index 0549823593..2e2a126758 100644 --- a/docker/cinder/cinder-scheduler/Dockerfile.j2 +++ b/docker/cinder/cinder-scheduler/Dockerfile.j2 @@ -1,6 +1,16 @@ FROM {{ namespace }}/{{ image_prefix }}cinder-base:{{ tag }} MAINTAINER {{ maintainer }} +{% if install_type == 'binary' %} + {% if base_distro in ['ubuntu'] %} + +RUN apt-get install -y --no-install-recommends \ + cinder-scheduler \ + && apt-get clean + + {% endif %} +{% endif %} + {{ include_footer }} USER cinder diff --git a/docker/cinder/cinder-volume/Dockerfile.j2 b/docker/cinder/cinder-volume/Dockerfile.j2 index e3aef3fc27..7a98145ef6 100644 --- a/docker/cinder/cinder-volume/Dockerfile.j2 +++ b/docker/cinder/cinder-volume/Dockerfile.j2 @@ -9,6 +9,12 @@ RUN yum install -y \ scsi-target-utils \ && yum clean all + {% elif base_distro in ['ubuntu'] %} + +RUN apt-get install -y --no-install-recommends \ + cinder-volume \ + && apt-get clean + {% endif %} {% endif %}