diff --git a/docker/venus/venus-api/Dockerfile.j2 b/docker/venus/venus-api/Dockerfile.j2 new file mode 100644 index 0000000000..a10e55535e --- /dev/null +++ b/docker/venus/venus-api/Dockerfile.j2 @@ -0,0 +1,11 @@ +FROM {{ namespace }}/{{ image_prefix }}venus-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +{% endblock %} + +{% block venus_api_header %}{% endblock %} + +{% block venus_api_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER venus diff --git a/docker/venus/venus-base/Dockerfile.j2 b/docker/venus/venus-base/Dockerfile.j2 new file mode 100644 index 0000000000..9f95a49638 --- /dev/null +++ b/docker/venus/venus-base/Dockerfile.j2 @@ -0,0 +1,29 @@ +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +{% endblock %} + +{% block venus_base_header %}{% endblock %} + +{% import "macros.j2" as macros with context %} + +{{ macros.configure_user(name='venus') }} + +ADD venus-base-archive /venus-base-source + +{% set venus_base_pip_packages = [ + '/venus' +] %} + +RUN ln -s venus-base-source/* venus \ + && {{ macros.install_pip(venus_base_pip_packages | customizable("pip_packages")) }} \ + && mkdir -p /etc/venus \ + && cp -r /venus/etc/venus/* /etc/venus/ \ + && chown -R venus: /etc/venus + +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN touch /usr/local/bin/kolla_venus_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_venus_extend_start + +{% block venus_base_footer %}{% endblock %} diff --git a/docker/venus/venus-base/extend_start.sh b/docker/venus/venus-base/extend_start.sh new file mode 100644 index 0000000000..fa7bbe54b0 --- /dev/null +++ b/docker/venus/venus-base/extend_start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/venus" ]]; then + mkdir -p /var/log/kolla/venus +fi +if [[ $(stat -c %a /var/log/kolla/venus) != "755" ]]; then + chmod 755 /var/log/kolla/venus +fi + +. /usr/local/bin/kolla_venus_extend_start diff --git a/docker/venus/venus-manager/Dockerfile.j2 b/docker/venus/venus-manager/Dockerfile.j2 new file mode 100644 index 0000000000..a15b6c92bf --- /dev/null +++ b/docker/venus/venus-manager/Dockerfile.j2 @@ -0,0 +1,13 @@ +FROM {{ namespace }}/{{ image_prefix }}venus-base:{{ tag }} +{% block labels %} +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" +{% endblock %} + +{% block venus_manager_header %}{% endblock %} + +RUN chmod 755 /usr/local/bin/kolla_venus_extend_start + +{% block venus_manager_footer %}{% endblock %} +{% block footer %}{% endblock %} + +USER venus diff --git a/kolla/common/config.py b/kolla/common/config.py index 25e5821329..42eef7aaa9 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -621,6 +621,10 @@ SOURCES = { 'type': 'url', 'location': ('$tarballs_base/openstack/trove/' 'trove-${openstack_branch}.tar.gz')}, + 'venus-base': { + 'type': 'url', + 'location': ('$tarballs_base/openstack/venus/' + 'venus-${openstack_branch}.tar.gz')}, 'vitrage-base': { 'type': 'url', 'location': ('$tarballs_base/openstack/vitrage/' @@ -951,6 +955,10 @@ USERS = { 'letsencrypt-user': { 'uid': 42488, 'gid': 42488, + }, + 'venus-user': { + 'uid': 42489, + 'gid': 42489, } } diff --git a/kolla/image/build.py b/kolla/image/build.py index b137059fa6..c9c2a60bd2 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -95,6 +95,7 @@ UNBUILDABLE_IMAGES = { "monasca-base", "monasca-thresh", "solum-base", + "venus-base", "zun-base", }, diff --git a/releasenotes/notes/add-venus-e2a9824f5ef5cf30.yaml b/releasenotes/notes/add-venus-e2a9824f5ef5cf30.yaml new file mode 100644 index 0000000000..241bdad9a3 --- /dev/null +++ b/releasenotes/notes/add-venus-e2a9824f5ef5cf30.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add Venus images. Venus is an OpenStack project to provide "one-stop solution to log collection, + cleaning, indexing, analysis, alarm, visualization service". This project aims to provide + a platform to quickly solve service exception problems. diff --git a/roles/kolla-build-config/defaults/main.yml b/roles/kolla-build-config/defaults/main.yml index 0b855330a1..5f8cdb0611 100644 --- a/roles/kolla-build-config/defaults/main.yml +++ b/roles/kolla-build-config/defaults/main.yml @@ -65,6 +65,7 @@ kolla_build_sources: - tacker-base - mistral-base-plugin-tacker openstack/trove: trove-base + openstack/venus: venus-base openstack/vitrage: vitrage-base openstack/watcher: watcher-base openstack/zun: zun-base