Merge "Add Senlin Docker container"

This commit is contained in:
Jenkins 2016-07-08 09:59:12 +00:00 committed by Gerrit Code Review
commit 02eec8a20c
7 changed files with 80 additions and 2 deletions

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}senlin-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% 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_senlin_extend_start
RUN chmod 755 /usr/local/bin/kolla_senlin_extend_start
{{ include_footer }}
USER senlin

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
senlin-manage --config-file /etc/senlin/senlin.conf db_sync
exit 0
fi

View File

@ -0,0 +1,25 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD senlin-base-archive /senlin-base-source
RUN ln -s senlin-base-source/* senlin \
&& useradd --user-group senlin \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /senlin \
&& mkdir -p /etc/senlin \
&& cp -r /senlin/etc/senlin/* /etc/senlin \
&& chown -R senlin: /etc/senlin
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN usermod -a -G kolla senlin \
&& touch /usr/local/bin/kolla_senlin_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_senlin_extend_start

View File

@ -0,0 +1,10 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/senlin" ]]; then
mkdir -p /var/log/kolla/senlin
fi
if [[ $(stat -c %a /var/log/kolla/senlin) != "755" ]]; then
chmod 755 /var/log/kolla/senlin
fi
source /usr/local/bin/kolla_senlin_extend_start

View File

@ -0,0 +1,13 @@
FROM {{ namespace }}/{{ image_prefix }}senlin-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{{ include_footer }}
USER senlin

View File

@ -254,6 +254,10 @@ SOURCES = {
'type': 'url',
'location': ('http://tarballs.openstack.org/sahara/'
'sahara-master.tar.gz')},
'senlin-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/senlin/'
'senlin-master.tar.gz')},
'swift-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/swift/'

View File

@ -67,7 +67,8 @@ class BuildTest(object):
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
excluded_images = ["kuryr"]
excluded_images = ["kuryr",
"senlin-base"]
def setUp(self):
super(BuildTestCentosBinary, self).setUp()
@ -104,7 +105,8 @@ class BuildTestUbuntuSource(BuildTest, base.BaseTestCase):
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
excluded_images = ["kuryr"]
excluded_images = ["kuryr",
"senlin-base"]
def setUp(self):
super(BuildTestOracleLinuxBinary, self).setUp()