Skip to content

Commit 756be41

Browse files
authored
Merge pull request #149 from stackhpc/upstream/xena-2022-07-25
Synchronise xena with upstream
2 parents 0c8ff7c + 4cf7c7c commit 756be41

File tree

23 files changed

+111
-42
lines changed

23 files changed

+111
-42
lines changed

doc/source/admin/image-building.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,17 @@ To remove a package from that list, say ``openstack-magnum-ui``, one would do:
283283
# Horizon
284284
{% set horizon_packages_remove = ['openstack-magnum-ui'] %}
285285
286+
Python packages build options
287+
-----------------------------
288+
289+
The block ``base_pip_conf`` in the ``base`` Dockerfile can be used to provide
290+
the PyPI build customisation options via the standard environment variables
291+
like ``PIP_INDEX_URL``, ``PIP_TRUSTED_HOST``, etc. Also here can be provided
292+
the standard environment variable ``UPPER_CONSTRAINTS_FILE`` used for building
293+
the ``bifrost_deploy`` container when PyPI upper-constraints needs to be
294+
overridden. Also this variable would be used in the ``kolla-toolbox`` if
295+
provided instead of the defaults.
296+
286297
Plugin functionality
287298
--------------------
288299

docker/base/Dockerfile.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,5 +395,12 @@ RUN touch /usr/local/bin/kolla_extend_start \
395395
&& chmod 2775 /var/log/kolla \
396396
&& rm -f /tmp/kolla_bashrc
397397

398+
{% block base_pip_conf %}
399+
# the variables like PIP_INDEX_URL, PIP_EXTRA_INDEX_URL, PIP_TRUSTED_HOST etc. should be defined here.
400+
# ENV PIP_INDEX_URL=https://pypi.python.org/simple
401+
# ENV PIP_TRUSTED_HOST=pypi.python.org
402+
# ENV UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ openstack_release }}
403+
{% endblock %}
404+
398405
{% block base_footer %}{% endblock %}
399406
CMD ["kolla_start"]

docker/fluentd/Dockerfile.j2

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,15 @@ RUN ln -s /bin/mkdir /usr/bin/mkdir
109109

110110
{% endblock %}
111111

112+
{% block fluentd_monasca_plugin_version %}
113+
ARG monasca_output_plugin_version=1.0.2
114+
ARG monasca_output_plugin_url=https://github.com/monasca/fluentd-monasca/archive/${monasca_output_plugin_version}.tar.gz
115+
{% endblock %}
116+
112117
{% block fluentd_monasca_plugin_install %}
113118
# Build and install Fluentd output plugin for Monasca API
114-
ARG monasca_output_plugin_tag=1.0.2
115-
ARG monasca_output_plugin_url=https://github.com/monasca/fluentd-monasca/archive/$monasca_output_plugin_tag.tar.gz
116119

117-
RUN curl $monasca_output_plugin_url -o /tmp/fluentd-monasca.tar.gz \
120+
RUN curl ${monasca_output_plugin_url} -o /tmp/fluentd-monasca.tar.gz \
118121
&& tar -xvf /tmp/fluentd-monasca.tar.gz -C /tmp \
119122
&& cd /tmp/fluentd-monasca-* \
120123
{%- if fluentd_user == 'fluentd' %}

docker/kafka/Dockerfile.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2929
{{ macros.install_packages(kafka_packages | customizable("packages")) }}
3030

3131
{% block kafka_version %}
32-
ENV kafka_version=2.0.1
33-
ENV kafka_scala_version=2.12
34-
ENV kafka_url=https://archive.apache.org/dist/kafka/${kafka_version}/kafka_${kafka_scala_version}-${kafka_version}.tgz
35-
ENV kafka_pkg_sha512sum=9773a85ef2898b4bae20481df4cfd5488bd195fffd700fcc874a9fa55065f6873f2ee12f46d2f6a6ccb5d5a93ddb7dec19227aef5d39d4f72b545ec63b24bb2f
32+
ARG kafka_version=2.0.1
33+
ARG kafka_scala_version=2.12
34+
ARG kafka_url=https://archive.apache.org/dist/kafka/${kafka_version}/kafka_${kafka_scala_version}-${kafka_version}.tgz
35+
ARG kafka_pkg_sha512sum=9773a85ef2898b4bae20481df4cfd5488bd195fffd700fcc874a9fa55065f6873f2ee12f46d2f6a6ccb5d5a93ddb7dec19227aef5d39d4f72b545ec63b24bb2f
3636
{% endblock %}
3737

3838
{% block kafka_install %}

docker/kolla-toolbox/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
6868

6969
{% block kolla_toolbox_upper_constraints %}
7070
RUN mkdir -p /requirements \
71-
&& curl -o /requirements/upper-constraints.txt https://releases.openstack.org/constraints/upper/{{ openstack_release }} \
71+
&& curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \
7272
&& {{ macros.install_pip(kolla_toolbox_pip_virtualenv_packages | customizable("pip_virtualenv_packages")) }} \
7373
&& virtualenv --system-site-packages {{ virtualenv_path }}
7474
{% endblock %}

docker/mariadb/mariadb-base/Dockerfile.j2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
2424

2525
{{ macros.install_packages(mariadb_base_packages | customizable("packages")) }}
2626

27-
RUN curl -o /usr/bin/clustercheck https://src.fedoraproject.org/rpms/mariadb/raw/10.3/f/clustercheck.sh \
27+
{% block mariadb_clustercheck_version %}
28+
ARG mariadb_clustercheck_version=10.3
29+
ARG mariadb_clustercheck_url=https://src.fedoraproject.org/rpms/mariadb/raw/${mariadb_clustercheck_version}/f/clustercheck.sh
30+
{% endblock %}
31+
32+
RUN curl -o /usr/bin/clustercheck ${mariadb_clustercheck_url} \
2833
&& chmod 755 /usr/bin/clustercheck
2934

3035
{% block mariadb_base_footer %}{% endblock %}

docker/neutron/neutron-base/extend_start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ else
1313
fi
1414

1515
# set legacy iptables to allow kernels not supporting iptables-nft
16-
if $UPDATE_ALTERNATIVES --query iptables; then
16+
# CentOS has update-alternatives 1.13, so use --display (not --query)
17+
if $UPDATE_ALTERNATIVES --display iptables; then
1718
# NOTE(yoctozepto): Kolla-Ansible does not always set KOLLA_LEGACY_IPTABLES;
1819
# the workaround below ensures it gets set to `false` in such cases to fix
1920
# this code under `set -o nounset`.

docker/prometheus/prometheus-alertmanager/Dockerfile.j2

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
66
{% block prometheus_alertmanager_header %}{% endblock %}
77

88
{% block prometheus_alertmanager_repository_version %}
9-
ENV prometheus_alertmanager_version=0.20.0
9+
ARG prometheus_alertmanager_version=0.20.0
10+
ARG prometheus_alertmanager_archive=alertmanager-${prometheus_alertmanager_version}.linux-{{debian_arch}}.tar.gz
11+
ARG prometheus_alertmanager_sha256sums_url=https://github.com/prometheus/alertmanager/releases/download/v${prometheus_alertmanager_version}/sha256sums.txt
12+
ARG prometheus_alertmanager_download_url=https://github.com/prometheus/alertmanager/releases/download/v${prometheus_alertmanager_version}/${prometheus_alertmanager_archive}
1013
{% endblock %}
1114

1215
{% block prometheus_alertmanager_install %}
13-
RUN curl -o /tmp/prometheus_alertmanager.tar.gz https://github.com/prometheus/alertmanager/releases/download/v${prometheus_alertmanager_version}/alertmanager-${prometheus_alertmanager_version}.linux-{{debian_arch}}.tar.gz \
14-
&& tar xvf /tmp/prometheus_alertmanager.tar.gz -C /opt/ \
15-
&& rm -f /tmp/prometheus_alertmanager.tar.gz \
16+
RUN cd /tmp && curl -o ${prometheus_alertmanager_archive} ${prometheus_alertmanager_download_url} \
17+
&& curl ${prometheus_alertmanager_sha256sums_url} -w '' | sha256sum --ignore-missing -c - \
18+
&& tar xvf /tmp/${prometheus_alertmanager_archive} -C /opt/ \
19+
&& rm -f /tmp/${prometheus_alertmanager_archive} \
1620
&& ln -s /opt/alertmanager* /opt/prometheus_alertmanager
1721
{% endblock %}
1822

docker/prometheus/prometheus-blackbox-exporter/Dockerfile.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
88
{% import "macros.j2" as macros with context %}
99

1010
{% block prometheus_blackbox_exporter_repository_version %}
11-
ENV blackbox_exporter_version=0.16.0
11+
ARG blackbox_exporter_version=0.16.0
12+
ARG blackbox_exporter_url=https://github.com/prometheus/blackbox_exporter/releases/download/v${blackbox_exporter_version}/blackbox_exporter-${blackbox_exporter_version}.linux-{{debian_arch}}.tar.gz
1213
{% endblock %}
1314

1415
{% if base_package_type == 'rpm' %}
@@ -24,7 +25,7 @@ ENV blackbox_exporter_version=0.16.0
2425
{{ macros.install_packages(blackbox_packages | customizable("packages")) }}
2526

2627
{% block prometheus_blackbox_exporter_install %}
27-
RUN curl -o /tmp/blackbox_exporter.tar.gz https://github.com/prometheus/blackbox_exporter/releases/download/v${blackbox_exporter_version}/blackbox_exporter-${blackbox_exporter_version}.linux-{{debian_arch}}.tar.gz \
28+
RUN curl -o /tmp/blackbox_exporter.tar.gz ${blackbox_exporter_url} \
2829
&& tar xvf /tmp/blackbox_exporter.tar.gz -C /opt/ \
2930
&& rm -f /tmp/blackbox_exporter.tar.gz \
3031
&& ln -s /opt/blackbox_exporter* /opt/blackbox_exporter

docker/prometheus/prometheus-cadvisor/Dockerfile.j2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
88
{% import "macros.j2" as macros with context %}
99

1010
{% block prometheus_cadvisor_repository_version %}
11-
ENV prometheus_cadvisor_version=0.38.7
12-
ENV prometheus_cadvisor_sha256sum=fdb86c256df682cfec2abd57a4405c919ed26f1e27ebfabf487f6c516bc7f6c7
11+
ARG prometheus_cadvisor_version=0.38.7
12+
ARG prometheus_cadvisor_sha256sum=fdb86c256df682cfec2abd57a4405c919ed26f1e27ebfabf487f6c516bc7f6c7
13+
ARG prometheus_cadvisor_url=https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor
1314
{% endblock %}
1415

1516
{% if base_arch in ['x86_64'] %}
1617

1718
{% block prometheus_cadvisor_install %}
18-
RUN curl -o /tmp/cadvisor https://github.com/google/cadvisor/releases/download/v${prometheus_cadvisor_version}/cadvisor \
19+
RUN curl -o /tmp/cadvisor ${prometheus_cadvisor_url} \
1920
&& echo "${prometheus_cadvisor_sha256sum} /tmp/cadvisor" | sha256sum -c \
2021
&& mv /tmp/cadvisor /opt \
2122
&& chmod 0755 /opt/cadvisor

0 commit comments

Comments
 (0)