skyline: Add new dashboard

Skyline is a new dashboard for openstack. It contains
skyline-apiserver and skyline-console.
We will build both skyline-apiserver and skyline-console
images for skyline.

Implements: blueprint skyline
Change-Id: I68a562f15bf4fdda82b86c446e14fc8b5594413a
This commit is contained in:
yangshaoxue 2021-09-24 10:03:16 +08:00 committed by Michal Arbet
parent 8f0d9226a8
commit 9d4736820f
12 changed files with 124 additions and 0 deletions

View File

@ -95,6 +95,7 @@ Kolla provides images to deploy the following OpenStack projects:
- `Octavia <https://docs.openstack.org/octavia/latest/>`__
- `Sahara <https://docs.openstack.org/sahara/latest/>`__
- `Senlin <https://docs.openstack.org/senlin/latest/>`__
- Skyline (`APIServer <https://docs.openstack.org/skyline-apiserver/latest/>`__ and `Console <https://docs.openstack.org/skyline-console/latest/>`__)
- `Solum <https://docs.openstack.org/solum/latest/>`__
- `Swift <https://docs.openstack.org/swift/latest/>`__
- `Tacker <https://docs.openstack.org/tacker/latest/>`__

View File

@ -51,6 +51,7 @@ rabbitmq,C,C,C
redis,C,C,C
sahara,C,C,C
senlin,C,C,C
skyline,C,C,C
solum,C,C,C
swift,C,C,C
tacker,C,C,C

1 Image Rocky Linux Ubuntu Debian
51 redis C C C
52 sahara C C C
53 senlin C C C
54 skyline C C C
55 solum C C C
56 swift C C C
57 tacker C C C

View File

@ -52,6 +52,7 @@ rabbitmq,T,T,T
redis,T,C,C
sahara,C,C,C
senlin,C,C,C
skyline,C,C,C
solum,C,C,C
swift,T,T,C
tacker,T,C,C

1 Image Rocky Linux Ubuntu Debian
52 redis T C C
53 sahara C C C
54 senlin C C C
55 skyline C C C
56 solum C C C
57 swift T T C
58 tacker T C C

View File

@ -0,0 +1,25 @@
FROM {{ namespace }}/{{ image_prefix }}skyline-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block skyline_apiserver_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
ADD skyline-apiserver-archive /skyline-apiserver-source
{% set skyline_apiserver_pip_packages = [
'/skyline-apiserver'
] %}
COPY extend_start.sh /usr/local/bin/kolla_skyline_extend_start
RUN ln -s skyline-apiserver-source/* skyline-apiserver \
&& {{ macros.install_pip(skyline_apiserver_pip_packages | customizable("pip_packages")) }} \
&& chmod 644 /usr/local/bin/kolla_skyline_extend_start
{% block skyline_apiserver_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER skyline

View File

@ -0,0 +1,11 @@
#!/bin/bash
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
SITE_PACKAGES="/var/lib/kolla/venv/lib/python${KOLLA_DISTRO_PYTHON_VERSION}/site-packages"
pushd ${SITE_PACKAGES}/skyline_apiserver/db/alembic
alembic upgrade head
popd
exit 0
fi

View File

@ -0,0 +1,17 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block skyline_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='skyline') }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN touch /usr/local/bin/kolla_skyline_extend_start \
&& chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_skyline_extend_start
{% block skyline_base_footer %}{% endblock %}

View File

@ -0,0 +1,23 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/skyline" ]]; then
mkdir -p /var/log/kolla/skyline
fi
if [[ $(stat -c %U:%G /var/log/kolla/skyline) != "skyline:kolla" ]]; then
chown skyline:kolla /var/log/kolla/skyline
fi
if [[ $(stat -c %a /var/log/kolla/skyline) != "755" ]]; then
chmod 755 /var/log/kolla/skyline
fi
if [[ ! -d "/var/lib/skyline" ]]; then
mkdir -p /var/lib/skyline
fi
if [[ $(stat -c %U:%G /var/lib/skyline) != "skyline:kolla" ]]; then
chown skyline:kolla /var/lib/skyline
fi
if [[ $(stat -c %a /var/lib/skyline) != "755" ]]; then
chmod 755 /var/lib/skyline
fi
. /usr/local/bin/kolla_skyline_extend_start

View File

@ -0,0 +1,28 @@
FROM {{ namespace }}/{{ image_prefix }}skyline-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block skyline_console_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% set skyline_console_packages = [
'nginx'
] %}
{{ macros.install_packages(skyline_console_packages | customizable("packages")) }}
ADD skyline-console-archive /skyline-console-source
{% set skyline_console_pip_packages = [
'/skyline-console'
] %}
RUN ln -s skyline-console-source/* skyline-console \
&& {{ macros.install_pip(skyline_console_pip_packages | customizable("pip_packages")) }}
{% block skyline_console_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER root

View File

@ -296,6 +296,14 @@ SOURCES = {
'type': 'url',
'location': ('$tarballs_base/openstack/senlin/'
'senlin-${openstack_branch}.tar.gz')},
'skyline-apiserver': {
'type': 'url',
'location': ('$tarballs_base/openstack/skyline-apiserver/'
'skyline-apiserver-${openstack_branch}.tar.gz')},
'skyline-console': {
'type': 'url',
'location': ('$tarballs_base/openstack/skyline-console/'
'skyline-console-${openstack_branch}.tar.gz')},
'solum-base': {
'type': 'url',
'location': ('$tarballs_base/openstack/solum/'

View File

@ -333,5 +333,9 @@ USERS = {
'opensearch-user': {
'uid': 42490,
'gid': 42490,
},
'skyline-user': {
'uid': 42491,
'gid': 42491,
}
}

View File

@ -0,0 +1,4 @@
---
features:
- Add skyline(base, apiserver and console) Dockerfile.
Skyline is an OpenStack dashboard optimized by UI and UX.

View File

@ -59,6 +59,7 @@ kolla_build_sources:
openstack/octavia: octavia-base
openstack/sahara: sahara-base
openstack/senlin: senlin-base
openstack/skyline: skyline-base
openstack/solum: solum-base
swift-base: openstack/swift
openstack/tacker: