Add a storm-base image

Refactor storm image dependencies. Previously we had:

base -> storm -> monasca-thresh

Both storm and monasca-thresh images are final, and each includes a
footer. This causes issues when the footer expects to be at the end of
the image, or there to be only a single footer. In particular, since
I2592a736206eaec811290e9fbdbf2540c0518ffe, the footer used in CI jobs
reverts to the public package mirrors.

This change introduces a storm-base image, and refactors the dependency
chain:

base -> storm-base -> storm
base -> storm-base -> monasca-thresh

Related-Bug: #1902101

Change-Id: I53e8ba8d4baa4434cf3c49ed94d1f7cb44099bee
This commit is contained in:
Mark Goddard 2021-01-12 16:18:51 +00:00
parent e0faaaaefb
commit 93204ecfec
4 changed files with 16 additions and 8 deletions

View File

@ -1,10 +1,8 @@
FROM {{ namespace }}/{{ infra_image_prefix }}storm:{{ tag }}
FROM {{ namespace }}/{{ infra_image_prefix }}storm-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
USER root
{% block monasca_thresh_header %}{% endblock %}
{% import "macros.j2" as macros with context %}

View File

@ -3,7 +3,7 @@ FROM {{ namespace }}/{{ infra_image_prefix }}base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block storm %}{% endblock %}
{% block storm_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
@ -52,7 +52,4 @@ ENV PYTHON={{ '/usr/bin/python' ~ distro_python_version }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block storm_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER storm
{% block storm_base_footer %}{% endblock %}

View File

@ -0,0 +1,13 @@
FROM {{ namespace }}/{{ infra_image_prefix }}storm-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block storm_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% block storm_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER storm