Add solum container

Change-Id: If2a959a037c1c67f48a6f9e56e49c435050b0aab
Partially-implements: bp solum-support
This commit is contained in:
caowei 2016-09-03 00:40:00 +08:00
parent 32e2121b4f
commit f270f0c589
10 changed files with 129 additions and 1 deletions

View File

@ -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

View 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
solum-db-manage --config-file /etc/solum/solum.conf upgrade head
exit 0
fi

View File

@ -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 %}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -48,7 +48,7 @@ _PROFILE_OPTS = [
default=['aodh', 'cloudkitty', 'congress', 'designate', default=['aodh', 'cloudkitty', 'congress', 'designate',
'gnocchi', 'influxdb', 'ironic', 'kuryr', 'magnum', 'gnocchi', 'influxdb', 'ironic', 'kuryr', 'magnum',
'manila', 'mistral', 'murano', 'rally', 'sahara', 'manila', 'mistral', 'murano', 'rally', 'sahara',
'searchlight', 'senlin', 'telegraf', 'trove', 'searchlight', 'senlin', 'solum', 'telegraf', 'trove',
'zaqar'], 'zaqar'],
help='Aux Images'), help='Aux Images'),
cfg.ListOpt('default', cfg.ListOpt('default',
@ -290,6 +290,10 @@ SOURCES = {
'type': 'url', 'type': 'url',
'location': ('http://tarballs.openstack.org/senlin/' 'location': ('http://tarballs.openstack.org/senlin/'
'senlin-master.tar.gz')}, 'senlin-master.tar.gz')},
'solum-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/solum/'
'solum-master.tar.gz')},
'swift-base': { 'swift-base': {
'type': 'url', 'type': 'url',
'location': ('http://tarballs.openstack.org/swift/' 'location': ('http://tarballs.openstack.org/swift/'

View File

@ -0,0 +1,3 @@
---
features:
- Add solum Dockerfile

View File

@ -69,6 +69,7 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
"neutron-sfc-agent", "neutron-sfc-agent",
"searchlight-base", "searchlight-base",
"senlin-base", "senlin-base",
"solum-base",
"vmtp", "vmtp",
"manila-data", "manila-data",
"watcher-base", "watcher-base",
@ -96,6 +97,7 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
"neutron-sfc-agent", "neutron-sfc-agent",
"searchlight-base", "searchlight-base",
"senlin-base", "senlin-base",
"solum-base",
"vmtp", "vmtp",
"zaqar", "zaqar",
"watcher-base", "watcher-base",
@ -123,6 +125,7 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
"neutron-sfc-agent", "neutron-sfc-agent",
"searchlight-base", "searchlight-base",
"senlin-base", "senlin-base",
"solum-base",
"vmtp", "vmtp",
"manila-data", "manila-data",
"watcher-base", "watcher-base",