Add sahara containers
Added sahara container for centos,ubuntu binary,source partially-implements blueprint sahara-container Change-Id: Id6dad447cd6ec07286e7a6cab0b13a6d4d89c1a7
This commit is contained in:
parent
ca1a0551bc
commit
353d077e14
25
docker/sahara/sahara-api/Dockerfile.j2
Normal file
25
docker/sahara/sahara-api/Dockerfile.j2
Normal 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
|
8
docker/sahara/sahara-api/extend_start.sh
Normal file
8
docker/sahara/sahara-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
|
||||
sahara-manage db_sync
|
||||
exit 0
|
||||
fi
|
31
docker/sahara/sahara-base/Dockerfile.j2
Normal file
31
docker/sahara/sahara-base/Dockerfile.j2
Normal 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
|
10
docker/sahara/sahara-base/extend_start.sh
Normal file
10
docker/sahara/sahara-base/extend_start.sh
Normal 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
|
22
docker/sahara/sahara-engine/Dockerfile.j2
Normal file
22
docker/sahara/sahara-engine/Dockerfile.j2
Normal 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
|
@ -229,6 +229,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/'
|
||||
|
Loading…
Reference in New Issue
Block a user