Merge "Implement blazar Docker images"
This commit is contained in:
commit
6f74c6c484
@ -78,6 +78,7 @@ Kolla provides images to deploy the following OpenStack projects:
|
||||
- `Aodh <https://docs.openstack.org/developer/aodh/>`__
|
||||
- `Barbican <https://docs.openstack.org/developer/barbican/>`__
|
||||
- `Bifrost <https://docs.openstack.org/developer/bifrost/>`__
|
||||
- `Blazar <https://blazar.readthedocs.io/en/latest/>`__
|
||||
- `Ceilometer <https://docs.openstack.org/developer/ceilometer/>`__
|
||||
- `Cinder <https://docs.openstack.org/developer/cinder/>`__
|
||||
- `CloudKitty <https://docs.openstack.org/developer/cloudkitty/>`__
|
||||
|
19
docker/blazar/blazar-api/Dockerfile.j2
Normal file
19
docker/blazar/blazar-api/Dockerfile.j2
Normal file
@ -0,0 +1,19 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}blazar-base:{{ tag }}
|
||||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
||||
|
||||
{% block blazar_api_header %}{% endblock %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_blazar_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_blazar_extend_start
|
||||
|
||||
{% block blazar_api_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
USER blazar
|
8
docker/blazar/blazar-api/extend_start.sh
Normal file
8
docker/blazar/blazar-api/extend_start.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/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
|
||||
blazar-db-manage --config-file /etc/blazar/blazar.conf upgrade head
|
||||
exit 0
|
||||
fi
|
37
docker/blazar/blazar-base/Dockerfile.j2
Normal file
37
docker/blazar/blazar-base/Dockerfile.j2
Normal file
@ -0,0 +1,37 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
||||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
||||
|
||||
{% block blazar_base_header %}{% endblock %}
|
||||
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{{ macros.configure_user(name='blazar') }}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
ADD blazar-base-archive /blazar-base-source
|
||||
|
||||
{% set blazar_base_pip_packages = [
|
||||
'/blazar'
|
||||
] %}
|
||||
|
||||
RUN ln -s blazar-base-source/* blazar \
|
||||
&& {{ macros.install_pip(blazar_base_pip_packages | customizable("pip_packages")) }} \
|
||||
&& mkdir -p /etc/blazar \
|
||||
&& cp -r /blazar/etc/blazar/* /etc/blazar \
|
||||
&& cp /blazar/etc/policy.json /etc/blazar \
|
||||
&& chown -R blazar: /etc/blazar
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN touch /usr/local/bin/kolla_blazar_extend_start \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_blazar_extend_start
|
||||
|
||||
{% block blazar_base_footer %}{% endblock %}
|
10
docker/blazar/blazar-base/extend_start.sh
Normal file
10
docker/blazar/blazar-base/extend_start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/blazar" ]]; then
|
||||
mkdir -p /var/log/kolla/blazar
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/blazar) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/blazar
|
||||
fi
|
||||
|
||||
. /usr/local/bin/kolla_blazar_extend_start
|
16
docker/blazar/blazar-manager/Dockerfile.j2
Normal file
16
docker/blazar/blazar-manager/Dockerfile.j2
Normal file
@ -0,0 +1,16 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}blazar-base:{{ tag }}
|
||||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
||||
|
||||
{% block blazar_manager_header %}{% endblock %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block blazar_manager_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
USER blazar
|
@ -94,6 +94,7 @@ _PROFILE_OPTS = [
|
||||
cfg.ListOpt('aux',
|
||||
default=[
|
||||
'aodh',
|
||||
'blazar',
|
||||
'cloudkitty',
|
||||
'congress',
|
||||
'designate',
|
||||
@ -286,6 +287,10 @@ SOURCES = {
|
||||
'type': 'url',
|
||||
'location': ('$tarballs_base/bifrost/'
|
||||
'bifrost-master.tar.gz')},
|
||||
'blazar-base': {
|
||||
'type': 'url',
|
||||
'location': ('$tarballs_base/blazar/'
|
||||
'blazar-master.tar.gz')},
|
||||
'ceilometer-base': {
|
||||
'type': 'url',
|
||||
'location': ('$tarballs_base/ceilometer/'
|
||||
@ -911,6 +916,10 @@ USERS = {
|
||||
'novajoin-user': {
|
||||
'uid': 42470,
|
||||
'gid': 42470,
|
||||
},
|
||||
'blazar-user': {
|
||||
'uid': 42471,
|
||||
'gid': 42471,
|
||||
}
|
||||
}
|
||||
|
||||
|
3
releasenotes/notes/blazar-images-c54435b3bd5b0425.yaml
Normal file
3
releasenotes/notes/blazar-images-c54435b3bd5b0425.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Blazar Docker images are available in Kolla
|
@ -74,6 +74,7 @@ class BuildTest(object):
|
||||
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = [
|
||||
"bifrost-base",
|
||||
"blazar-base",
|
||||
"dragonflow-base",
|
||||
"freezer-base",
|
||||
"kafka",
|
||||
@ -114,6 +115,7 @@ class BuildTestCentosSource(BuildTest, base.BaseTestCase):
|
||||
class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = [
|
||||
"bifrost-base",
|
||||
"blazar-base",
|
||||
"cloudkitty-base",
|
||||
"congress-base",
|
||||
"dragonflow-base",
|
||||
@ -158,6 +160,7 @@ class BuildTestUbuntuSource(BuildTest, base.BaseTestCase):
|
||||
class BuildTestDebianBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = [
|
||||
"bifrost-base",
|
||||
"blazar-base",
|
||||
"cloudkitty-base",
|
||||
"congress-base",
|
||||
"dragonflow-base",
|
||||
@ -204,6 +207,7 @@ class BuildTestDebianSource(BuildTest, base.BaseTestCase):
|
||||
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = [
|
||||
"bifrost-base",
|
||||
"blazar-base",
|
||||
"dragonflow-base",
|
||||
"freezer-base",
|
||||
"kafka",
|
||||
|
Loading…
Reference in New Issue
Block a user