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
(cherry picked from commit 93204ecfec)
This commit is contained in:
Mark Goddard 2021-01-12 16:18:51 +00:00 committed by Radosław Piliszek
parent 36126c0825
commit 890d199e98
4 changed files with 16 additions and 8 deletions

View File

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

View File

@ -1,7 +1,7 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block storm %}{% endblock %}
{% block storm_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
@ -50,7 +50,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 }}/{{ 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