diff --git a/README.rst b/README.rst
index 3cd2341de5..714424a15c 100644
--- a/README.rst
+++ b/README.rst
@@ -78,6 +78,7 @@ Kolla provides images to deploy the following OpenStack projects:
- `Aodh `__
- `Barbican `__
- `Bifrost `__
+- `Blazar `__
- `Ceilometer `__
- `Cinder `__
- `CloudKitty `__
diff --git a/docker/blazar/blazar-api/Dockerfile.j2 b/docker/blazar/blazar-api/Dockerfile.j2
new file mode 100644
index 0000000000..9ad121407e
--- /dev/null
+++ b/docker/blazar/blazar-api/Dockerfile.j2
@@ -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
diff --git a/docker/blazar/blazar-api/extend_start.sh b/docker/blazar/blazar-api/extend_start.sh
new file mode 100644
index 0000000000..ff4f2b8010
--- /dev/null
+++ b/docker/blazar/blazar-api/extend_start.sh
@@ -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
diff --git a/docker/blazar/blazar-base/Dockerfile.j2 b/docker/blazar/blazar-base/Dockerfile.j2
new file mode 100644
index 0000000000..0a31243b56
--- /dev/null
+++ b/docker/blazar/blazar-base/Dockerfile.j2
@@ -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 %}
diff --git a/docker/blazar/blazar-base/extend_start.sh b/docker/blazar/blazar-base/extend_start.sh
new file mode 100644
index 0000000000..a96a4c113f
--- /dev/null
+++ b/docker/blazar/blazar-base/extend_start.sh
@@ -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
diff --git a/docker/blazar/blazar-manager/Dockerfile.j2 b/docker/blazar/blazar-manager/Dockerfile.j2
new file mode 100644
index 0000000000..01aca3d822
--- /dev/null
+++ b/docker/blazar/blazar-manager/Dockerfile.j2
@@ -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
diff --git a/kolla/common/config.py b/kolla/common/config.py
index 5fe4be008a..01393e8d7a 100755
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -94,6 +94,7 @@ _PROFILE_OPTS = [
cfg.ListOpt('aux',
default=[
'aodh',
+ 'blazar',
'cloudkitty',
'congress',
'designate',
@@ -284,6 +285,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/'
@@ -905,6 +910,10 @@ USERS = {
'novajoin-user': {
'uid': 42470,
'gid': 42470,
+ },
+ 'blazar-user': {
+ 'uid': 42471,
+ 'gid': 42471,
}
}
diff --git a/releasenotes/notes/blazar-images-c54435b3bd5b0425.yaml b/releasenotes/notes/blazar-images-c54435b3bd5b0425.yaml
new file mode 100644
index 0000000000..36627c6d82
--- /dev/null
+++ b/releasenotes/notes/blazar-images-c54435b3bd5b0425.yaml
@@ -0,0 +1,3 @@
+---
+features:
+ - Blazar Docker images are available in Kolla
diff --git a/tests/test_build.py b/tests/test_build.py
index bea562799f..49e074da72 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -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",