Customizations for Swift
This patchset contains customization of Dockerfile of Swift containers. Change-Id: I69250c4d9f6cc3949c9b9b52ea4b0cc2aec0231e Partially-implements: blueprint third-party-plugin-support
This commit is contained in:
parent
e4259f805b
commit
503120657e
@ -1,22 +1,21 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set swift_acount_packages = ['openstack-swift-account'] %}
|
||||||
RUN yum -y install \
|
|
||||||
openstack-swift-account \
|
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
{% set swift_acount_packages = ['swift-account'] %}
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
swift-account \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN {{ macros.install_packages(swift_acount_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block swift_account_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER swift
|
USER swift
|
||||||
|
@ -1,35 +1,25 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set swift_base_packages = ['openstack-swift'] %}
|
||||||
RUN yum -y install \
|
|
||||||
openstack-swift \
|
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
{% set swift_base_packages = ['swift'] %}
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
swift \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }}
|
||||||
|
|
||||||
{% elif install_type == 'source' %}
|
{% elif install_type == 'source' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set swift_base_packages = ['liberasurecode-devel'] %}
|
||||||
RUN yum -y install \
|
|
||||||
liberasurecode-devel \
|
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
{% set swift_base_packages = ['liberasurecode-dev'] %}
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
liberasurecode-dev \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN {{ macros.install_packages(swift_base_packages | customizable("packages")) }}
|
||||||
ADD swift-base-archive /swift-base-source
|
ADD swift-base-archive /swift-base-source
|
||||||
RUN ln -s swift-base-source/* swift \
|
RUN ln -s swift-base-source/* swift \
|
||||||
&& useradd --user-group 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 mkdir -p /opt/swift
|
||||||
|
|
||||||
RUN usermod -a -G kolla swift
|
RUN usermod -a -G kolla swift
|
||||||
|
|
||||||
|
{% block swift_base_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set swift_container_packages = ['openstack-swift-container'] %}
|
||||||
RUN yum -y install \
|
|
||||||
openstack-swift-container \
|
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
{% set swift_container_packages = ['swift-container'] %}
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
swift-container \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN {{ macros.install_packages(swift_container_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block swift_container_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER swift
|
USER swift
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set swift_object_packages = ['openstack-swift-object'] %}
|
||||||
RUN yum -y install \
|
|
||||||
openstack-swift-object \
|
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
{% set swift_object_packages = ['swift-object'] %}
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
swift-object \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN {{ macros.install_packages(swift_object_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block swift_object_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER swift
|
USER swift
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if install_type == 'binary' %}
|
{% if install_type == 'binary' %}
|
||||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set swift_proxy_server_packages = ['openstack-swift-proxy'] %}
|
||||||
RUN yum -y install \
|
|
||||||
openstack-swift-proxy \
|
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu'] %}
|
{% elif base_distro in ['ubuntu'] %}
|
||||||
|
{% set swift_proxy_server_packages = ['swift-proxy'] %}
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
swift-proxy \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN {{ macros.install_packages(swift_proxy_server_packages | customizable("packages")) }}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block swift_proxy_server_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER swift
|
USER swift
|
||||||
|
@ -1,23 +1,20 @@
|
|||||||
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
FROM {{ namespace }}/{{ image_prefix }}swift-base:{{ tag }}
|
||||||
MAINTAINER {{ maintainer }}
|
MAINTAINER {{ maintainer }}
|
||||||
|
|
||||||
|
{% import "macros.j2" as macros with context %}
|
||||||
|
|
||||||
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
|
{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %}
|
||||||
|
{% set swift_rsyncd_packages = ['rsync'] %}
|
||||||
RUN yum -y install \
|
|
||||||
rsync \
|
|
||||||
&& yum clean all
|
|
||||||
|
|
||||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||||
|
{% set swift_rsyncd_packages = ['rsync'] %}
|
||||||
RUN apt-get -y install --no-install-recommends \
|
|
||||||
rsync \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
RUN {{ macros.install_packages(swift_rsyncd_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
|
||||||
|
|
||||||
|
{% block swift_rsyncd_footer %}{% endblock %}
|
||||||
|
{% block footer %}{% endblock %}
|
||||||
{{ include_footer }}
|
{{ include_footer }}
|
||||||
|
|
||||||
USER swift
|
USER swift
|
||||||
|
Loading…
Reference in New Issue
Block a user