Customizations for Ceph

This patchset contains customization of Dockerfile of Ceph
containers

Change-Id: I20bc27f2c4c6025ea35c8b48c40aee9919553254
Partially-implements: blueprint third-party-plugin-support
Signed-off-by: Eduardo Gonzalez <dabarren@gmail.com>
This commit is contained in:
Eduardo Gonzalez 2016-08-05 18:02:26 +02:00
parent 3071d32a3f
commit 304c69a91f
4 changed files with 26 additions and 18 deletions

View File

@ -1,27 +1,25 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% set ceph_base_packages = [
RUN yum -y install \ 'ceph',
ceph \ 'ceph-radosgw',
ceph-radosgw \ 'parted',
parted \ 'hdparm',
hdparm \ 'btrfs-progs'
btrfs-progs \ ] %}
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %} {% elif base_distro in ['ubuntu', 'debian'] %}
{% set ceph_base_packages = [
RUN apt-get -y install --no-install-recommends \ 'ceph',
ceph \ 'radosgw',
radosgw \ 'parted',
parted \ 'hdparm',
hdparm \ 'btrfs-tools'
btrfs-tools \ ] %}
&& apt-get clean
{% endif %} {% endif %}
RUN {{ macros.install_packages(ceph_base_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start
@ -29,3 +27,7 @@ RUN chmod 755 /usr/local/bin/kolla_extend_start
RUN useradd --user-group ceph \ RUN useradd --user-group ceph \
&& mkdir -p /home/ceph \ && mkdir -p /home/ceph \
&& chown -R ceph: /home/ceph && chown -R ceph: /home/ceph
{% block ceph_base_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -6,4 +6,6 @@ COPY fetch_ceph_keys.py /usr/bin/
COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/bin/fetch_ceph_keys.py RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/bin/fetch_ceph_keys.py
{% block ceph_mon_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}

View File

@ -4,4 +4,6 @@ MAINTAINER {{ maintainer }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block ceph_osd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}

View File

@ -1,4 +1,6 @@
FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }} FROM {{ namespace }}/{{ image_prefix }}ceph-base:{{ tag }}
MAINTAINER {{ maintainer }} MAINTAINER {{ maintainer }}
{% block ceph_rgw_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }} {{ include_footer }}