From 77296ebdeef833c875dfd57f5d43eb9cefee0cef Mon Sep 17 00:00:00 2001 From: "Dave Walker (Daviey)" Date: Mon, 4 Jul 2016 12:47:07 +0100 Subject: Build docker images for OpenStack Watcher Watcher is part of the OpenStack big-tent and is formally known as "OpenStack Infrastructure Optimization service". Whilst it provides a range of default goals and strategies, the most relevant case is to enable re-balancing of the compute hosts by taking CPU usage (data from Ceilometer) into account and live migrating instances as required. Currently this only builds the Docker images for type source but binary builds are gracefully ignored. The ansible configurations will be part of a later commit. Change-Id: I9bb81ee625d9fcf6513e44e2ed20384e34da2adc Partial-bug: #1598929 Partially-implements: bp watcher Signed-off-by: Dave Walker (Daviey) --- docker/watcher/watcher-base/Dockerfile.j2 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docker/watcher/watcher-base/Dockerfile.j2 (limited to 'docker/watcher/watcher-base/Dockerfile.j2') diff --git a/docker/watcher/watcher-base/Dockerfile.j2 b/docker/watcher/watcher-base/Dockerfile.j2 new file mode 100644 index 000000000..f6f86ddf9 --- /dev/null +++ b/docker/watcher/watcher-base/Dockerfile.j2 @@ -0,0 +1,27 @@ +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} +MAINTAINER {{ maintainer }} + +{% if install_type == 'binary' %} + +RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ + && /bin/false + +{% elif install_type == 'source' %} + +ADD watcher-base-archive /watcher-base-source +RUN ln -s watcher-base-source/* watcher \ + && useradd --user-group watcher \ + && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /watcher \ + && mkdir -p /etc/watcher /home/watcher \ + && cp -r /watcher/etc/watcher/* /etc/watcher/ \ + && chown -R watcher: /etc/watcher /home/watcher + +{% endif %} + +RUN usermod -a -G kolla watcher + +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN usermod -a -G kolla watcher \ + && touch /usr/local/bin/kolla_watcher_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_watcher_extend_start -- cgit v1.2.3