Implement Almanach Docker images

Almanach record the utilization of OpenStack resources for each tenant.

Implements: blueprint containerized-almanach
Change-Id: Iba2e16772864a6f0169ec43d7a87d741882cd51c
This commit is contained in:
Bertrand Lallau 2017-08-29 22:44:14 +02:00 committed by Duong Ha-Quang
parent 9674e2da1c
commit b8f7693d41
8 changed files with 91 additions and 0 deletions

View File

@ -75,6 +75,7 @@ OpenStack services
Kolla provides images to deploy the following OpenStack projects:
- `Almanach <https://almanach.readthedocs.io/>`__
- `Aodh <https://docs.openstack.org/aodh/latest/>`__
- `Barbican <https://docs.openstack.org/barbican/latest/>`__
- `Bifrost <https://docs.openstack.org/bifrost/latest/>`__

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}almanach-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block almanach_api_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block almanach_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER almanach

View File

@ -0,0 +1,34 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block almanach_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='almanach') }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD almanach-base-archive /almanach-base-source
{% set almanach_base_pip_packages = [
'/almanach'
] %}
RUN ln -s almanach-base-source/* almanach \
&& {{ macros.install_pip(almanach_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/almanach \
&& chown -R almanach: /etc/almanach
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block almanach_base_footer %}{% endblock %}

View File

@ -0,0 +1,8 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/almanach" ]]; then
mkdir -p /var/log/kolla/almanach
fi
if [[ $(stat -c %a /var/log/kolla/almanach) != "755" ]]; then
chmod 755 /var/log/kolla/almanach
fi

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}almanach-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block almanach_collector_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block almanach_collector_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER almanach

View File

@ -95,6 +95,7 @@ _PROFILE_OPTS = [
help='Main images'),
cfg.ListOpt('aux',
default=[
'almanach',
'aodh',
'blazar',
'cloudkitty',
@ -278,6 +279,10 @@ SOURCES = {
'type': 'url',
'location': ('$tarballs_base/requirements/'
'requirements-master.tar.gz')},
'almanach-base': {
'type': 'url',
'location': ('$tarballs_base/almanach/'
'almanach-master.tar.gz')},
'aodh-base': {
'type': 'url',
'location': ('$tarballs_base/aodh/'
@ -946,6 +951,10 @@ USERS = {
'fluentd-user': {
'uid': 42474,
'gid': 42474,
},
'almanach-user': {
'uid': 42475,
'gid': 42475,
}
}

View File

@ -96,6 +96,7 @@ STATUS_ERRORS = (STATUS_CONNECTION_ERROR, STATUS_PUSH_ERROR,
SKIPPED_IMAGES = {
'centos+binary': [
"almanach-base",
"bifrost-base",
"blazar-base",
"dragonflow-base",
@ -117,6 +118,7 @@ SKIPPED_IMAGES = {
"ovsdpdk",
],
'ubuntu+binary': [
"almanach-base",
"bifrost-base",
"blazar-base",
"cloudkitty-base",
@ -145,6 +147,7 @@ SKIPPED_IMAGES = {
"tripleo-ui"
],
'debian+binary': [
"almanach-base",
"bifrost-base",
"blazar-base",
"cloudkitty-base",
@ -175,6 +178,7 @@ SKIPPED_IMAGES = {
"tripleo-ui"
],
'oraclelinux+binary': [
"almanach-base",
"bifrost-base",
"blazar-base",
"dragonflow-base",

View File

@ -0,0 +1,3 @@
---
features:
- Almanach Docker images are available in Kolla