Merge "Customizations for Swift"

This commit is contained in:
Jenkins 2016-08-16 11:20:30 +00:00 committed by Gerrit Code Review
commit e3ca26f9e5
6 changed files with 56 additions and 70 deletions

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-swift-account \
&& yum clean all
{% set swift_acount_packages = ['openstack-swift-account'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
swift-account \
&& apt-get clean
{% set swift_acount_packages = ['swift-account'] %}
{% endif %}
RUN {{ macros.install_packages(swift_acount_packages | customizable("packages")) }}
{% endif %}
{% block swift_account_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER swift

View File

@ -1,35 +1,25 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-swift \
&& yum clean all
{% set swift_base_packages = ['openstack-swift'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
swift \
&& apt-get clean
{% set swift_base_packages = ['swift'] %}
{% endif %}
RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
liberasurecode-devel \
&& yum clean all
{% set swift_base_packages = ['liberasurecode-devel'] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
liberasurecode-dev \
&& apt-get clean
{% set swift_base_packages = ['liberasurecode-dev'] %}
{% endif %}
RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }}
ADD swift-base-archive /swift-base-source
RUN ln -s swift-base-source/* swift \
&& useradd --user-group swift \
@ -56,3 +46,6 @@ COPY build-swift-ring.py /usr/local/bin/kolla_build_swift_ring
RUN mkdir -p /opt/swift
RUN usermod -a -G kolla swift
{% block swift_base_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-swift-container \
&& yum clean all
{% set swift_container_packages = ['openstack-swift-container'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
swift-container \
&& apt-get clean
{% set swift_container_packages = ['swift-container'] %}
{% endif %}
RUN {{ macros.install_packages(swift_container_packages | customizable("packages")) }}
{% endif %}
{% block swift_container_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER swift

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-swift-object \
&& yum clean all
{% set swift_object_packages = ['openstack-swift-object'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
swift-object \
&& apt-get clean
{% set swift_object_packages = ['swift-object'] %}
{% endif %}
RUN {{ macros.install_packages(swift_object_packages | customizable("packages")) }}
{% endif %}
{% block swift_object_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER swift

View File

@ -1,22 +1,21 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-swift-proxy \
&& yum clean all
{% set swift_proxy_server_packages = ['openstack-swift-proxy'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
swift-proxy \
&& apt-get clean
{% set swift_proxy_server_packages = ['swift-proxy'] %}
{% endif %}
RUN {{ macros.install_packages(swift_proxy_server_packages | customizable("packages")) }}
{% endif %}
{% block swift_proxy_server_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER swift

View File

@ -1,23 +1,20 @@
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
rsync \
&& yum clean all
{% set swift_rsyncd_packages = ['rsync'] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
rsync \
&& apt-get clean
{% set swift_rsyncd_packages = ['rsync'] %}
{% endif %}
RUN {{ macros.install_packages(swift_rsyncd_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block swift_rsyncd_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}
USER swift