Merge "Add sahara containers"

This commit is contained in:
Jenkins 2016-06-01 05:16:17 +00:00 committed by Gerrit Code Review
commit 40cd7550dd
6 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,25 @@
FROM {{ namespace }}/{{ image_prefix }}sahara-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-sahara-api \
&& yum clean all
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
sahara-api \
&& apt-get clean
{% endif %}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{{ include_footer }}
USER sahara

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
sahara-manage db_sync
exit 0
fi

View File

@ -0,0 +1,31 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-sahara-common \
&& yum clean all
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
sahara-common \
&& apt-get clean
{% endif %}
{% elif install_type == 'source' %}
ADD sahara-base-archive /sahara-base-source
RUN ln -s sahara-base-source/* sahara \
&& useradd --user-group sahara \
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /sahara \
&& mkdir -p /etc/sahara /var/log/sahara /home/sahara \
&& cp -r /sahara/etc/* /etc/sahara/ \
&& chown -R sahara: /etc/sahara /var/log/sahara /home/sahara
{% endif %}
RUN usermod -a -G kolla sahara

View File

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

View File

@ -0,0 +1,22 @@
FROM {{ namespace }}/{{ image_prefix }}sahara-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-sahara-engine \
&& yum clean all
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
sahara-engine \
&& apt-get clean
{% endif %}
{% endif %}
{{ include_footer }}
USER sahara

View File

@ -240,6 +240,10 @@ SOURCES = {
'type': 'url',
'location': ('http://github.com/kanaka/noVNC/tarball/'
'v0.5.1')},
'sahara-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/sahara/'
'sahara-master.tar.gz')},
'swift-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/swift/'