Add build from source and templating for Zaqar

Co-Authored-By: Steven Dake <stdake@cisco.com>

Change-Id: Ibe8b6ea7941ab3f2fd7dcfcd2ed18fd6111bb270
Partially-implements: blueprint install-from-source
Partially-implements: blueprint dockerfile-template
This commit is contained in:
Swapnil Kulkarni 2015-07-16 08:48:15 +00:00 committed by Steven Dake
parent a760549e78
commit 19136fd4c4
8 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,10 @@
# Build info specific to this image. All values can be overridden in .buildconf
COMPONENT=zaqar
SOURCE_INSTALL_AVAILABLE=1
# Used for git install method
: ${CLONE_FROM:=https://github.com/openstack/zaqar}
# Used for curl install method
: ${TARBALL_URI:=http://tarballs.openstack.org/zaqar/zaqar-master.tar.gz}

View File

@ -0,0 +1,20 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
ADD ./zaqar.tar /
RUN ln -s /zaqar-* /zaqar
RUN cd /zaqar \
&& useradd --user-group zaqar \
&& pip install -r requirements.txt \
&& pip install /zaqar \
&& mkdir /etc/zaqar /var/log/zaqar \
&& cp -r /zaqar/etc/* /etc/zaqar/ \
&& rm -rf /root/.cache
COPY ./start.sh /start.sh
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -0,0 +1 @@
../../../../tools/build-docker-image

View File

@ -0,0 +1 @@
../../../common/zaqar/config-external.sh

View File

@ -0,0 +1 @@
../../../common/zaqar/start.sh

View File

@ -0,0 +1,33 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
RUN yum -y install openstack-zaqar && yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD ./zaqar.tar /
RUN ln -s /zaqar-* /zaqar
RUN cd /zaqar \
&& useradd --user-group zaqar \
&& pip install -r requirements.txt \
&& pip install /zaqar \
&& mkdir /etc/zaqar /var/log/zaqar \
&& cp -r /zaqar/etc/* /etc/zaqar/ \
&& rm -rf /root/.cache
{% endif %}
COPY ./start.sh /start.sh
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -0,0 +1 @@
../../docker/common/zaqar/config-external.sh

View File

@ -0,0 +1 @@
../../docker/common/zaqar/start.sh