Fix vitrage images
Vitrage start api service under apache or uwsgi. We have not created a migration to uwsgi. This change adds apache packages needed for api also add rdo binaries to rpm distros. Adds missing collector image. Change-Id: Iecb32e321b46f9b567af25fa6acafbe9a292bbca Closes-Bug: #1681613
This commit is contained in:
parent
2ef0bd51a9
commit
02ce804a44
@ -3,14 +3,36 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% block vitrage_api_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set vitrage_api_packages = [
|
||||
'httpd',
|
||||
'mod_wsgi',
|
||||
'mod_ssl',
|
||||
'python-ldappool',
|
||||
'openstack-vitrage-api'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_api_packages | customizable("packages")) }}
|
||||
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
|
||||
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_vitrage_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_vitrage_extend_start
|
||||
|
||||
{% block vitrage_api_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
USER vitrage
|
||||
|
11
docker/vitrage/vitrage-api/extend_start.sh
Normal file
11
docker/vitrage/vitrage-api/extend_start.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# NOTE(pbourke): httpd will not clean up after itself in some cases which
|
||||
# results in the container not being able to restart. (bug #1489676, 1557036)
|
||||
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
|
||||
# Loading Apache2 ENV variables
|
||||
. /etc/apache2/envvars
|
||||
rm -rf /var/run/apache2/*
|
||||
else
|
||||
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
|
||||
fi
|
@ -9,11 +9,48 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set vitrage_base_packages = [
|
||||
'openstack-vitrage-common'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_base_packages | customizable("packages")) }}
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set vitrage_base_packages = [
|
||||
'httpd',
|
||||
'mod_wsgi',
|
||||
'mod_ssl',
|
||||
'python-ldappool'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_base_packages | customizable("packages")) }}
|
||||
RUN sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
|
||||
&& sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
{% set vitrage_base_packages = [
|
||||
'apache2',
|
||||
'libapache2-mod-wsgi',
|
||||
'python-ldappool'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_base_packages | customizable("packages")) }}
|
||||
RUN echo > /etc/apache2/ports.conf
|
||||
{% endif %}
|
||||
|
||||
{% set vitrage_base_pip_packages = [
|
||||
'/vitrage'
|
||||
] %}
|
||||
@ -21,14 +58,15 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
ADD vitrage-base-archive /vitrage-base-source
|
||||
RUN ln -s vitrage-base-source/* vitrage \
|
||||
&& {{ macros.install_pip(vitrage_base_pip_packages | customizable("pip_packages")) }} \
|
||||
&& mkdir -p /etc/vitrage \
|
||||
&& mkdir -p /etc/vitrage /var/www/cgi-bin/vitrage \
|
||||
&& cp -r /vitrage/etc/vitrage/* /etc/vitrage/ \
|
||||
&& chown -R vitrage: /etc/vitrage
|
||||
&& cp /vitrage/vitrage/api/app.wsgi /var/www/cgi-bin/vitrage \
|
||||
&& chown -R vitrage: /etc/vitrage /var/www/cgi-bin/vitrage
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||
RUN touch /usr/local/bin/kolla_vitrage_extend_start \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_vitrage_extend_start
|
||||
|
||||
{% block vitrage_base_footer %}{% endblock %}
|
||||
|
@ -10,3 +10,5 @@ fi
|
||||
if [[ $(stat -c %a ${VITRAGE_LOG_DIR}) != "755" ]]; then
|
||||
chmod 755 ${VITRAGE_LOG_DIR}
|
||||
fi
|
||||
|
||||
. /usr/local/bin/kolla_vitrage_extend_start
|
||||
|
30
docker/vitrage/vitrage-collector/Dockerfile.j2
Normal file
30
docker/vitrage/vitrage-collector/Dockerfile.j2
Normal file
@ -0,0 +1,30 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}vitrage-base:{{ tag }}
|
||||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
||||
|
||||
{% block vitrage_collector_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set vitrage_collector_packages = [
|
||||
'openstack-vitrage-collector'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_collector_packages | customizable("packages")) }}
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block vitrage_collector_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
USER vitrage
|
@ -3,11 +3,25 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% block vitrage_graph_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set vitrage_graph_packages = [
|
||||
'openstack-vitrage-graph'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_graph_packages | customizable("packages")) }}
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block vitrage_graph_footer %}{% endblock %}
|
||||
|
@ -3,11 +3,25 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% block vitrage_ml_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set vitrage_ml_packages = [
|
||||
'openstack-vitrage-ml'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_ml_packages | customizable("packages")) }}
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block vitrage_ml_footer %}{% endblock %}
|
||||
|
@ -3,11 +3,25 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% block vitrage_notifier_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
{% set vitrage_notifier_packages = [
|
||||
'openstack-vitrage-notifier'
|
||||
] %}
|
||||
|
||||
{{ macros.install_packages(vitrage_notifier_packages | customizable("packages")) }}
|
||||
|
||||
{% elif base_distro in ['debian', 'ubuntu'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block vitrage_notifier_footer %}{% endblock %}
|
||||
|
@ -109,7 +109,6 @@ SKIPPED_IMAGES = {
|
||||
"searchlight-base",
|
||||
"senlin-base",
|
||||
"solum-base",
|
||||
"vitrage-base",
|
||||
"vmtp",
|
||||
"zun-base",
|
||||
],
|
||||
@ -188,7 +187,6 @@ SKIPPED_IMAGES = {
|
||||
"searchlight-base",
|
||||
"senlin-base",
|
||||
"solum-base",
|
||||
"vitrage-base",
|
||||
"vmtp",
|
||||
"zun-base"
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user