diff --git a/docker/solum/solum-api/Dockerfile.j2 b/docker/solum/solum-api/Dockerfile.j2 new file mode 100644 index 0000000000..2a5de0e666 --- /dev/null +++ b/docker/solum/solum-api/Dockerfile.j2 @@ -0,0 +1,20 @@ +FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block solum_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_solum_extend_start +RUN chmod 755 /usr/local/bin/kolla_solum_extend_start + +{% block solum_api_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER solum diff --git a/docker/solum/solum-api/extend_start.sh b/docker/solum/solum-api/extend_start.sh new file mode 100644 index 0000000000..fd9625c837 --- /dev/null +++ b/docker/solum/solum-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 + solum-db-manage --config-file /etc/solum/solum.conf upgrade head + exit 0 +fi diff --git a/docker/solum/solum-base/Dockerfile.j2 b/docker/solum/solum-base/Dockerfile.j2 new file mode 100644 index 0000000000..2fae22e9d3 --- /dev/null +++ b/docker/solum/solum-base/Dockerfile.j2 @@ -0,0 +1,29 @@ +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block solum_base_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% elif install_type == 'source' %} + +ADD solum-base-archive /solum-base-source +RUN ln -s solum-base-source/* solum \ + && useradd --user-group solum \ + && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /solum \ + && mkdir -p /etc/solum /home/solum \ + && cp -r /solum/etc/solum/* /etc/solum/ \ + && chown -R solum: /etc/solum /home/solum + +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN usermod -a -G kolla solum \ + && touch /usr/local/bin/kolla_solum_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_solum_extend_start + +{% block solum_base_footer %}{% endblock %} diff --git a/docker/solum/solum-base/extend_start.sh b/docker/solum/solum-base/extend_start.sh new file mode 100644 index 0000000000..b80d4bfe01 --- /dev/null +++ b/docker/solum/solum-base/extend_start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [[ ! -d "/var/log/kolla/solum" ]]; then + mkdir -p /var/log/kolla/solum +fi +if [[ $(stat -c %a /var/log/kolla/solum) != "755" ]]; then + chmod 755 /var/log/kolla/solum +fi + +. /usr/local/bin/kolla_solum_extend_start diff --git a/docker/solum/solum-conductor/Dockerfile.j2 b/docker/solum/solum-conductor/Dockerfile.j2 new file mode 100644 index 0000000000..a2c69ea0f1 --- /dev/null +++ b/docker/solum/solum-conductor/Dockerfile.j2 @@ -0,0 +1,17 @@ +FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block solum_conductor_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +{% block solum_conductor_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER solum diff --git a/docker/solum/solum-deployer/Dockerfile.j2 b/docker/solum/solum-deployer/Dockerfile.j2 new file mode 100644 index 0000000000..44cb8ada47 --- /dev/null +++ b/docker/solum/solum-deployer/Dockerfile.j2 @@ -0,0 +1,17 @@ +FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block solum_deployer_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +{% block solum_deployer_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER solum diff --git a/docker/solum/solum-worker/Dockerfile.j2 b/docker/solum/solum-worker/Dockerfile.j2 new file mode 100644 index 0000000000..509c030584 --- /dev/null +++ b/docker/solum/solum-worker/Dockerfile.j2 @@ -0,0 +1,17 @@ +FROM {{ namespace }}/{{ image_prefix }}solum-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% block solum_worker_header %}{% endblock %} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% endif %} + +{% block solum_worker_footer %}{% endblock %} +{% block footer %}{% endblock %} +{{ include_footer }} + +USER solum diff --git a/kolla/common/config.py b/kolla/common/config.py index 2a990f5123..03d2660f4c 100644 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -48,7 +48,7 @@ _PROFILE_OPTS = [ default=['aodh', 'cloudkitty', 'congress', 'designate', 'gnocchi', 'influxdb', 'ironic', 'kuryr', 'magnum', 'manila', 'mistral', 'murano', 'rally', 'sahara', - 'searchlight', 'senlin', 'telegraf', 'trove', + 'searchlight', 'senlin', 'solum', 'telegraf', 'trove', 'zaqar'], help='Aux Images'), cfg.ListOpt('default', @@ -290,6 +290,10 @@ SOURCES = { 'type': 'url', 'location': ('http://tarballs.openstack.org/senlin/' 'senlin-master.tar.gz')}, + 'solum-base': { + 'type': 'url', + 'location': ('http://tarballs.openstack.org/solum/' + 'solum-master.tar.gz')}, 'swift-base': { 'type': 'url', 'location': ('http://tarballs.openstack.org/swift/' diff --git a/releasenotes/notes/add-solum-aa448921b2b58989.yaml b/releasenotes/notes/add-solum-aa448921b2b58989.yaml new file mode 100644 index 0000000000..3970cc6373 --- /dev/null +++ b/releasenotes/notes/add-solum-aa448921b2b58989.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add solum Dockerfile diff --git a/tests/test_build.py b/tests/test_build.py index db2cf3713d..1fd37b3d2b 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -69,6 +69,7 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase): "neutron-sfc-agent", "searchlight-base", "senlin-base", + "solum-base", "vmtp", "manila-data", "watcher-base", @@ -96,6 +97,7 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase): "neutron-sfc-agent", "searchlight-base", "senlin-base", + "solum-base", "vmtp", "zaqar", "watcher-base", @@ -123,6 +125,7 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase): "neutron-sfc-agent", "searchlight-base", "senlin-base", + "solum-base", "vmtp", "manila-data", "watcher-base",