Customizations for Designate
This patchset contains customization of Dockerfile of designate containers Change-Id: I846437df7c3c417846f1c771883e5eb266b78a37 Partially-implements: blueprint third-party-plugin-support Signed-off-by: Eduardo Gonzalez <dabarren@gmail.com>
This commit is contained in:
parent
e4259f805b
commit
d2215eab04
@ -1,22 +1,18 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}designate-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-designate-api \
|
||||
&& yum clean all
|
||||
|
||||
{% set designate_api_packages = ['openstack-designate-api'] %}
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
|
||||
RUN apt-get -y install --no-install-recommends \
|
||||
designate-api \
|
||||
&& apt-get clean
|
||||
|
||||
{% set designate_api_packages = ['designate-api'] %}
|
||||
{% endif %}
|
||||
RUN {{ macros.install_packages(designate_api_packages | customizable("packages")) }}
|
||||
{% endif %}
|
||||
|
||||
{% block designate_api_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
||||
|
@ -1,24 +1,25 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||
{% set designate_backend_bind9_packages = ['bind'] %}
|
||||
|
||||
RUN yum -y install \
|
||||
bind \
|
||||
&& yum clean all \
|
||||
&& mkdir -p /var/lib/kolla/ \
|
||||
RUN {{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }}
|
||||
RUN mkdir -p /var/lib/kolla/ \
|
||||
&& cp -pr /var/named /var/lib/kolla/var-named
|
||||
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
{% set designate_backend_bind9_packages = ['bind9'] %}
|
||||
|
||||
RUN apt-get -y install --no-install-recommends \
|
||||
bind9 \
|
||||
&& apt-get clean
|
||||
RUN {{ macros.install_packages(designate_backend_bind9_packages | customizable("packages")) }}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% block designate_backend_bind9_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
||||
|
@ -1,5 +1,6 @@
|
||||
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'] %}
|
||||
@ -8,24 +9,27 @@ MAINTAINER {{ maintainer }}
|
||||
# is needed in all services. This is probably a packaging bug. We do
|
||||
# need the complete policy file because of some of the containers'
|
||||
# requiring it. Remove the package when the file is moved though.
|
||||
RUN yum -y install \
|
||||
openstack-designate-api \
|
||||
openstack-designate-common \
|
||||
python-tooz \
|
||||
python2-oslo-reports \
|
||||
python2-suds \
|
||||
&& yum clean all \
|
||||
&& cp /etc/designate/policy.json /tmp/ \
|
||||
{% set designate_base_packages = [
|
||||
'openstack-designate-api',
|
||||
'openstack-designate-common',
|
||||
'python-tooz',
|
||||
'python2-oslo-reports',
|
||||
'python2-suds'
|
||||
] %}
|
||||
|
||||
RUN {{ macros.install_packages(designate_base_packages | customizable("packages")) }}
|
||||
RUN cp /etc/designate/policy.json /tmp/ \
|
||||
&& rpm -e openstack-designate-api \
|
||||
&& mv /tmp/policy.json /etc/designate/ \
|
||||
&& chown designate: /etc/designate/policy.json
|
||||
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
{% set designate_base_packages = [
|
||||
'designate-common',
|
||||
'python-tooz'
|
||||
] %}
|
||||
|
||||
RUN apt-get -y install --no-install-recommends \
|
||||
designate-common \
|
||||
python-tooz \
|
||||
&& apt-get clean
|
||||
RUN {{ macros.install_packages(designate_base_packages | customizable("packages")) }}
|
||||
|
||||
{% endif %}
|
||||
{% elif install_type == 'source' %}
|
||||
@ -39,12 +43,14 @@ RUN ln -s designate-base-source/* designate \
|
||||
&& mv /etc/designate/rootwrap.conf.sample /etc/designate/rootwrap.conf \
|
||||
&& chown -R designate: /etc/designate /var/log/designate /home/designate \
|
||||
&& sed -i 's|^exec_dirs.*|exec_dirs=/var/lib/kolla/venv/bin,/sbin,/usr/sbin,/bin,/usr/bin,/usr/local/bin,/usr/local/sbin|g' /etc/designate/rootwrap.conf
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN touch /usr/local/bin/kolla_designate_extend_start \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_designate_extend_start
|
||||
|
||||
{% block designate_base_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
RUN usermod -a -G kolla designate
|
||||
|
@ -1,26 +1,21 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}designate-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-designate-central \
|
||||
&& yum clean all
|
||||
|
||||
{% set designate_central_packages = ['openstack-designate-central'] %}
|
||||
{% elif base_distro in ['ubuntu']%}
|
||||
|
||||
RUN apt-get -y install --no-install-recommends \
|
||||
designate-central \
|
||||
&& apt-get clean
|
||||
|
||||
{% set designate_central_packages = ['designate-central'] %}
|
||||
{% endif %}
|
||||
RUN {{ macros.install_packages(designate_central_packages | customizable("packages")) }}
|
||||
{% endif %}
|
||||
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
||||
{% block designate_central_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
||||
|
@ -1,22 +1,18 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}designate-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-designate-mdns \
|
||||
&& yum clean all
|
||||
|
||||
{% set designate_mdns_packages = ['openstack-designate-mdns'] %}
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
|
||||
RUN apt-get -y install --no-install-recommends \
|
||||
designate-mdns \
|
||||
&& apt-get clean
|
||||
|
||||
{% set designate_mdns_packages = ['designate-mdns'] %}
|
||||
{% endif %}
|
||||
RUN {{ macros.install_packages(designate_mdns_packages | customizable("packages")) }}
|
||||
{% endif %}
|
||||
|
||||
{% block designate_mdns_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
||||
|
25
docker/designate/designate-pool-manager/Dockerfile.j2
Normal file
25
docker/designate/designate-pool-manager/Dockerfile.j2
Normal file
@ -0,0 +1,25 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||
# The bind9 package here is only to provide the rndc binary.
|
||||
{% set designate_pool_manager_packages = [
|
||||
'bind',
|
||||
'openstack-designate-pool-manager'
|
||||
] %}
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
{% set designate_pool_manager_packages = [
|
||||
'bind9',
|
||||
'designate-pool-manager'
|
||||
] %}
|
||||
{% endif %}
|
||||
RUN {{ macros.install_packages(designate_pool_manager_packages | customizable("packages")) }}
|
||||
{% endif %}
|
||||
|
||||
{% block designate_pool_manager_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
@ -1,25 +0,0 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}designate-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
# The bind9 package here is only to provide the rndc binary.
|
||||
RUN yum -y install \
|
||||
bind \
|
||||
openstack-designate-pool-manager \
|
||||
&& yum clean all
|
||||
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
|
||||
RUN apt-get -y install --no-install-recommends \
|
||||
bind9 \
|
||||
designate-pool-manager \
|
||||
&& apt-get clean
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
@ -1,24 +1,24 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}designate-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-designate-sink \
|
||||
python-designateclient \
|
||||
&& yum clean all
|
||||
|
||||
{% set designate_sink_packages = [
|
||||
'openstack-designate-sink',
|
||||
'python-designateclient'
|
||||
] %}
|
||||
{% elif base_distro in ['ubuntu'] %}
|
||||
|
||||
RUN apt-get -y install --no-install-recommends \
|
||||
designate-sink \
|
||||
designateclient \
|
||||
&& apt-get clean
|
||||
|
||||
{% set designate_sink_packages = [
|
||||
'designate-sink',
|
||||
'designateclient'
|
||||
] %}
|
||||
{% endif %}
|
||||
RUN {{ macros.install_packages(designate_sink_packages | customizable("packages")) }}
|
||||
{% endif %}
|
||||
|
||||
{% block designate_sink_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER designate
|
||||
|
Loading…
Reference in New Issue
Block a user