Merge "Support Searchlight Docker container"
This commit is contained in:
commit
65b8b17e8d
20
docker/searchlight/searchlight-api/Dockerfile.j2
Normal file
20
docker/searchlight/searchlight-api/Dockerfile.j2
Normal file
@ -0,0 +1,20 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}searchlight-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% block searchlight_api_header %}{% endblock %}
|
||||
|
||||
{% 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_searchlight_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_searchlight_extend_start
|
||||
|
||||
{% block searchlight_api_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER searchlight
|
8
docker/searchlight/searchlight-api/extend_start.sh
Normal file
8
docker/searchlight/searchlight-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
|
||||
searchlight-manage index sync --force
|
||||
exit 0
|
||||
fi
|
30
docker/searchlight/searchlight-base/Dockerfile.j2
Normal file
30
docker/searchlight/searchlight-base/Dockerfile.j2
Normal file
@ -0,0 +1,30 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% block searchlight_base_header %}{% endblock %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
ADD searchlight-base-archive /searchlight-base-source
|
||||
RUN ln -s searchlight-base-source/* searchlight \
|
||||
&& useradd --user-group searchlight \
|
||||
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /searchlight \
|
||||
&& mkdir -p /etc/searchlight \
|
||||
&& cp -r /searchlight/etc/* /etc/searchlight \
|
||||
&& chown -R searchlight: /etc/searchlight
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN usermod -a -G kolla searchlight \
|
||||
&& touch /usr/local/bin/kolla_searchlight_extend_start \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_searchlight_extend_start
|
||||
|
||||
{% block searchlight_base_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
10
docker/searchlight/searchlight-base/extend_start.sh
Normal file
10
docker/searchlight/searchlight-base/extend_start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/searchlight" ]]; then
|
||||
mkdir -p /var/log/kolla/searchlight
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/searchlight) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/searchlight
|
||||
fi
|
||||
|
||||
. /usr/local/bin/kolla_searchlight_extend_start
|
17
docker/searchlight/searchlight-listener/Dockerfile.j2
Normal file
17
docker/searchlight/searchlight-listener/Dockerfile.j2
Normal file
@ -0,0 +1,17 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}searchlight-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% block searchlight_listener_header %}{% endblock %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block searchlight_listener_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER searchlight
|
@ -48,7 +48,8 @@ _PROFILE_OPTS = [
|
||||
default=['aodh', 'cloudkitty', 'congress', 'designate',
|
||||
'gnocchi', 'influxdb', 'ironic', 'kuryr', 'magnum',
|
||||
'manila', 'mistral', 'murano', 'rally', 'sahara',
|
||||
'senlin', 'telegraf', 'trove', 'zaqar'],
|
||||
'searchlight', 'senlin', 'telegraf', 'trove',
|
||||
'zaqar'],
|
||||
help='Aux Images'),
|
||||
cfg.ListOpt('default',
|
||||
default=['cron', 'kolla-toolbox', 'glance', 'haproxy',
|
||||
@ -281,6 +282,10 @@ SOURCES = {
|
||||
'type': 'url',
|
||||
'location': ('http://tarballs.openstack.org/sahara/'
|
||||
'sahara-5.0.0.tar.gz')},
|
||||
'searchlight-base': {
|
||||
'type': 'url',
|
||||
'location': ('http://tarballs.openstack.org/searchlight/'
|
||||
'searchlight-1.0.0.tar.gz')},
|
||||
'senlin-base': {
|
||||
'type': 'url',
|
||||
'location': ('http://tarballs.openstack.org/senlin/'
|
||||
|
@ -67,6 +67,7 @@ class BuildTest(object):
|
||||
class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = ["kuryr-base",
|
||||
"neutron-sfc-agent",
|
||||
"searchlight-base",
|
||||
"senlin-base",
|
||||
"vmtp",
|
||||
"watcher-base",
|
||||
@ -92,6 +93,7 @@ class BuildTestCentosSource(BuildTest, base.BaseTestCase):
|
||||
class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = ["kuryr-base",
|
||||
"neutron-sfc-agent",
|
||||
"searchlight-base",
|
||||
"senlin-base",
|
||||
"vmtp",
|
||||
"zaqar",
|
||||
@ -118,6 +120,7 @@ class BuildTestUbuntuSource(BuildTest, base.BaseTestCase):
|
||||
class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = ["kuryr-base",
|
||||
"neutron-sfc-agent",
|
||||
"searchlight-base",
|
||||
"senlin-base",
|
||||
"vmtp",
|
||||
"watcher-base",
|
||||
|
Loading…
Reference in New Issue
Block a user