Add vitrage images

Co-Authored-By: zhubingbing <zhubingbing10@gmail.com>

Change-Id: I8cac1be47edad8590d9bd1222d45a127953d50a6
blueprint vitrage-containers
This commit is contained in:
chenxing 2017-01-07 08:53:18 +00:00 committed by zhubingbing
parent fa09b3e077
commit dfe72847f4
8 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}vitrage-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block vitrage_api_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block vitrage_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER vitrage

View File

@ -0,0 +1,30 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block vitrage_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='vitrage') }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD vitrage-base-archive /vitrage-base-source
RUN ln -s vitrage-base-source/* vitrage \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /vitrage \
&& mkdir -p /etc/vitrage \
&& cp -r /vitrage/etc/vitrage/* /etc/vitrage/ \
&& chown -R vitrage: /etc/vitrage
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block vitrage_base_footer %}{% endblock %}

View File

@ -0,0 +1,12 @@
#!/bin/bash
VITRAGE_LOG_DIR="/var/log/kolla/vitrage"
if [[ ! -d "${VITRAGE_LOG_DIR}" ]]; then
mkdir -p ${VITRAGE_LOG_DIR}
fi
if [[ $(stat -c %U:%G ${VITRAGE_LOG_DIR}) != "vitrage:kolla" ]]; then
chown vitrage:kolla ${VITRAGE_LOG_DIR}
fi
if [[ $(stat -c %a ${VITRAGE_LOG_DIR}) != "755" ]]; then
chmod 755 ${VITRAGE_LOG_DIR}
fi

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}vitrage-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block vitrage_graph_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block vitrage_graph_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER vitrage

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}vitrage-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block vitrage_notifier_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block vitrage_notifier_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER vitrage

View File

@ -96,6 +96,7 @@ _PROFILE_OPTS = [
'tacker',
'telegraf',
'trove',
'vitrage',
'zaqar',
'zookeeper',
'zun',
@ -485,6 +486,10 @@ SOURCES = {
'type': 'url',
'location': ('$tarballs_base/trove/'
'trove-master.tar.gz')},
'vitrage-base': {
'type': 'url',
'location': ('$tarballs_base/vitrage/'
'vitrage-master.tar.gz')},
'watcher-base': {
'type': 'url',
'location': ('$tarballs_base/watcher/'
@ -731,6 +736,10 @@ USERS = {
'uid': 42458,
'gid': 42458,
},
'vitrage-user': {
'uid': 42459,
'gid': 42459,
},
}

View File

@ -0,0 +1,6 @@
---
features:
- Add Vitrage Dockerfile, Vitrage is the OpenStack RCA (Root Cause Analysis) service for
organizing, analyzing and expanding OpenStack alarms & events, yielding insights
regarding the root cause of problems and deducing their existence before they are
directly detected. Also, it is in the big-tent.

View File

@ -79,6 +79,7 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
"senlin-base",
"solum-base",
"tacker",
"vitrage-base",
"vmtp",
"zun-base",
]
@ -117,6 +118,7 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
"senlin-base",
"solum-base",
"tacker",
"vitrage-base",
"vmtp",
"zaqar",
"zun-base",
@ -152,6 +154,7 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
"senlin-base",
"solum-base",
"tacker",
"vitrage-base",
"vmtp",
"zun-base",
]