Merge "Build docker images for OpenStack Watcher"

This commit is contained in:
Jenkins 2016-07-08 12:06:57 +00:00 committed by Gerrit Code Review
commit 56178a58dc
9 changed files with 101 additions and 2 deletions

View File

@ -0,0 +1,16 @@
FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_watcher_extend_start
RUN chmod 755 /usr/local/bin/kolla_watcher_extend_start
{{ include_footer }}
USER watcher

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
watcher-db-manage --config-file /etc/watcher/watcher.conf create_schema
exit 0
fi

View File

@ -0,0 +1,13 @@
FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{{ include_footer }}
USER watcher

View File

@ -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

View File

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

View File

@ -0,0 +1,13 @@
FROM {{ namespace }}/{{ image_prefix }}watcher-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
{{ include_footer }}
USER watcher

View File

@ -270,6 +270,10 @@ SOURCES = {
'type': 'url',
'location': ('http://tarballs.openstack.org/trove/'
'trove-master.tar.gz')},
'watcher-base': {
'type': 'url',
'location': ('http://tarballs.openstack.org/watcher/'
'watcher-master.tar.gz')},
'zaqar': {
'type': 'url',
'location': ('http://tarballs.openstack.org/zaqar/'

View File

@ -0,0 +1,6 @@
---
features:
- Introduce OpenStack Infrastructure Optimization
service, also known as Watcher. This project makes
use of Ceilometer data to rebalance the cloud to
meet declared goals and strategies.

View File

@ -68,7 +68,8 @@ class BuildTest(object):
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
excluded_images = ["kuryr",
"senlin-base"]
"senlin-base",
"watcher-base"]
def setUp(self):
super(BuildTestCentosBinary, self).setUp()
@ -106,7 +107,8 @@ class BuildTestUbuntuSource(BuildTest, base.BaseTestCase):
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
excluded_images = ["kuryr",
"senlin-base"]
"senlin-base",
"watcher-base"]
def setUp(self):
super(BuildTestOracleLinuxBinary, self).setUp()