Merge "Add Senlin Docker container"
This commit is contained in:
commit
02eec8a20c
16
docker/senlin/senlin-api/Dockerfile.j2
Normal file
16
docker/senlin/senlin-api/Dockerfile.j2
Normal 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
|
8
docker/senlin/senlin-api/extend_start.sh
Normal file
8
docker/senlin/senlin-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
|
||||||
|
senlin-manage --config-file /etc/senlin/senlin.conf db_sync
|
||||||
|
exit 0
|
||||||
|
fi
|
25
docker/senlin/senlin-base/Dockerfile.j2
Normal file
25
docker/senlin/senlin-base/Dockerfile.j2
Normal 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
|
10
docker/senlin/senlin-base/extend_start.sh
Normal file
10
docker/senlin/senlin-base/extend_start.sh
Normal 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
|
13
docker/senlin/senlin-engine/Dockerfile.j2
Normal file
13
docker/senlin/senlin-engine/Dockerfile.j2
Normal 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
|
@ -254,6 +254,10 @@ SOURCES = {
|
|||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('http://tarballs.openstack.org/sahara/'
|
'location': ('http://tarballs.openstack.org/sahara/'
|
||||||
'sahara-master.tar.gz')},
|
'sahara-master.tar.gz')},
|
||||||
|
'senlin-base': {
|
||||||
|
'type': 'url',
|
||||||
|
'location': ('http://tarballs.openstack.org/senlin/'
|
||||||
|
'senlin-master.tar.gz')},
|
||||||
'swift-base': {
|
'swift-base': {
|
||||||
'type': 'url',
|
'type': 'url',
|
||||||
'location': ('http://tarballs.openstack.org/swift/'
|
'location': ('http://tarballs.openstack.org/swift/'
|
||||||
|
@ -67,7 +67,8 @@ class BuildTest(object):
|
|||||||
|
|
||||||
|
|
||||||
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
|
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
|
||||||
excluded_images = ["kuryr"]
|
excluded_images = ["kuryr",
|
||||||
|
"senlin-base"]
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(BuildTestCentosBinary, self).setUp()
|
super(BuildTestCentosBinary, self).setUp()
|
||||||
@ -104,7 +105,8 @@ class BuildTestUbuntuSource(BuildTest, base.BaseTestCase):
|
|||||||
|
|
||||||
|
|
||||||
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
|
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
|
||||||
excluded_images = ["kuryr"]
|
excluded_images = ["kuryr",
|
||||||
|
"senlin-base"]
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(BuildTestOracleLinuxBinary, self).setUp()
|
super(BuildTestOracleLinuxBinary, self).setUp()
|
||||||
|
Loading…
Reference in New Issue
Block a user