Only copy plugin-archive into image for source builds

The plugin mechanism is meant to be for source install type only.

Change-Id: I1371a253236b09dc62ea91dce6d652e1c5603015
Closes-Bug: #1681345
This commit is contained in:
Martin André 2017-04-10 10:48:10 +02:00
parent 501f6656ba
commit 15543949b1
3 changed files with 20 additions and 19 deletions

View File

@ -5,7 +5,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %} {% import "macros.j2" as macros with context %}
{% if install_type == 'source' %}
ADD plugins-archive / ADD plugins-archive /
{% endif %}
COPY keystone_bootstrap.sh /usr/local/bin/kolla_keystone_bootstrap COPY keystone_bootstrap.sh /usr/local/bin/kolla_keystone_bootstrap
COPY extend_start.sh /usr/local/bin/kolla_extend_start COPY extend_start.sh /usr/local/bin/kolla_extend_start

View File

@ -33,22 +33,21 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
'oslo-vmware' 'oslo-vmware'
] %} ] %}
RUN {{ macros.install_pip(neutron_server_pip_packages | customizable("pip_packages")) }}
{% endif %}
ADD plugins-archive /
{% set neutron_server_plugins_pip_packages = [ {% set neutron_server_plugins_pip_packages = [
'/plugins/*' '/plugins/*'
] %} ] %}
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start ADD plugins-archive /
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \ RUN {{ macros.install_pip(neutron_server_pip_packages | customizable("pip_packages")) }} \
&& if [ "$(ls /plugins)" ]; then \ && if [ "$(ls /plugins)" ]; then \
{{ macros.install_pip(neutron_server_plugins_pip_packages | customizable("pip_packages")) }}; \ {{ macros.install_pip(neutron_server_plugins_pip_packages | customizable("pip_packages")) }}; \
fi fi
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start
RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start
{% block neutron_server_footer %}{% endblock %} {% block neutron_server_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}

View File

@ -113,23 +113,22 @@ RUN mkdir -p /etc/ceph
] ]
%} %}
RUN {{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages")) }}
{% endif %}
ADD plugins-archive /
{% set nova_compute_plugins_pip_packages = [ {% set nova_compute_plugins_pip_packages = [
'/plugins/*' '/plugins/*'
] %} ] %}
COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start ADD plugins-archive /
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \ RUN {{ macros.install_pip(nova_compute_pip_packages | customizable("pip_packages")) }} \
&& rm -f /etc/machine-id \
&& if [ "$(ls /plugins)" ]; then \ && if [ "$(ls /plugins)" ]; then \
{{ macros.install_pip(nova_compute_plugins_pip_packages | customizable("pip_packages")) }}; \ {{ macros.install_pip(nova_compute_plugins_pip_packages | customizable("pip_packages")) }}; \
fi fi
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_nova_extend_start
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
&& rm -f /etc/machine-id
ENV PATH $PATH:/lib/udev ENV PATH $PATH:/lib/udev
{% block nova_compute_footer %}{% endblock %} {% block nova_compute_footer %}{% endblock %}