Merge "Add zun container"

This commit is contained in:
Jenkins 2016-12-30 05:49:42 +00:00 committed by Gerrit Code Review
commit b18653d98f
7 changed files with 91 additions and 1 deletions

View File

@ -0,0 +1,19 @@
FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block zun_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_zun_extend_start
RUN chmod 755 /usr/local/bin/kolla_zun_extend_start
{% block zun_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER zun

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
zun-db-manage upgrade
exit 0
fi

View File

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

View File

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

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block zun_compute_header %}{% endblock %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{% block zun_compute_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER zun

View File

@ -96,6 +96,7 @@ _PROFILE_OPTS = [
'trove',
'zaqar',
'zookeeper',
'zun',
],
help='Aux Images'),
cfg.ListOpt('default',
@ -490,7 +491,11 @@ SOURCES = {
'zaqar': {
'type': 'url',
'location': ('http://tarballs.openstack.org/zaqar/'
'zaqar-master.tar.gz')}
'zaqar-master.tar.gz')},
'zun-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/zun/'
'zun-master.tar.gz')}
}

View File

@ -83,6 +83,7 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
"vmtp",
"watcher-base",
"zookeeper",
"zun-base",
]
def setUp(self):
@ -123,6 +124,7 @@ class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
"vmtp",
"watcher-base",
"zaqar",
"zun-base",
]
def setUp(self):
@ -159,6 +161,7 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
"vmtp",
"watcher-base",
"zookeeper",
"zun-base",
]
def setUp(self):