diff --git a/docker/trove/trove-api/Dockerfile.j2 b/docker/trove/trove-api/Dockerfile.j2 new file mode 100644 index 0000000000..10a46c5bf8 --- /dev/null +++ b/docker/trove/trove-api/Dockerfile.j2 @@ -0,0 +1,18 @@ +FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-trove-api \ + && yum clean all + + {% endif %} +{% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start +RUN chmod 755 /usr/local/bin/kolla_extend_start + +{{ include_footer }} + +USER trove diff --git a/docker/trove/trove-api/extend_start.sh b/docker/trove/trove-api/extend_start.sh new file mode 100644 index 0000000000..76839e2d4c --- /dev/null +++ b/docker/trove/trove-api/extend_start.sh @@ -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 + trove-manage db_sync + exit 0 +fi diff --git a/docker/trove/trove-base/Dockerfile.j2 b/docker/trove/trove-base/Dockerfile.j2 new file mode 100644 index 0000000000..e1590911b0 --- /dev/null +++ b/docker/trove/trove-base/Dockerfile.j2 @@ -0,0 +1,25 @@ +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-trove-common \ + && yum clean all + + {% endif %} + +{% elif install_type == 'source' %} + +ADD trove-base-archive /trove-base-source +RUN ln -s trove-base-source/* trove \ + && useradd --user-group trove \ + && /var/lib/kolla/venv/bin/pip --no-cache-dir install -c requirements/upper-constraints.txt /trove \ + && mkdir -p /etc/trove /var/log/trove /home/trove \ + && cp -r /trove/etc/* /etc/trove/ \ + && chown -R trove: /etc/trove /var/log/trove /home/trove + +{% endif %} + +RUN usermod -a -G kolla trove diff --git a/docker/trove/trove-conductor/Dockerfile.j2 b/docker/trove/trove-conductor/Dockerfile.j2 new file mode 100644 index 0000000000..a41fdfc0b3 --- /dev/null +++ b/docker/trove/trove-conductor/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-trove-conductor \ + && yum clean all + + {% endif %} +{% endif %} + +{{ include_footer }} + +USER trove diff --git a/docker/trove/trove-guestagent/Dockerfile.j2 b/docker/trove/trove-guestagent/Dockerfile.j2 new file mode 100644 index 0000000000..22666b9895 --- /dev/null +++ b/docker/trove/trove-guestagent/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-trove-guestagent \ + && yum clean all + + {% endif %} +{% endif %} + +{{ include_footer }} + +USER trove diff --git a/docker/trove/trove-taskmanager/Dockerfile.j2 b/docker/trove/trove-taskmanager/Dockerfile.j2 new file mode 100644 index 0000000000..cc3647f97b --- /dev/null +++ b/docker/trove/trove-taskmanager/Dockerfile.j2 @@ -0,0 +1,15 @@ +FROM {{ namespace }}/{{ image_prefix }}trove-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} + +RUN yum install -y openstack-trove-taskmanager \ + && yum clean all + + {% endif %} +{% endif %} + +{{ include_footer }} + +USER trove diff --git a/etc/kolla/kolla-build.conf b/etc/kolla/kolla-build.conf index 3cc160b3b6..ec0abab7ab 100644 --- a/etc/kolla/kolla-build.conf +++ b/etc/kolla/kolla-build.conf @@ -161,6 +161,10 @@ location = http://tarballs.openstack.org/swift/swift-master.tar.gz type = url location = http://tarballs.openstack.org/tempest/tempest-master.tar.gz +[trove-base] +type = url +location = http://tarballs.openstack.org/trove/trove-master.tar.gz + [zaqar] type = url location = http://tarballs.openstack.org/zaqar/zaqar-master.tar.gz