Install Elasticsearch for searchlight

Functional tests on searchlight don't run on
zuul due to missing elasticsearch binary.

This will install elasticsearch as a prereq
before the functional tests are run.

Elasticsearch is used as backend dependency for
searchlight "only". Not an attempt to have test
 results in logstash.openstack.org

Closes-Bug: #1552767

Change-Id: I8aebce8653f795f380a627d4c9874a3c7a21aac5
This commit is contained in:
Lakshmi N Sampath 2016-03-17 11:26:19 -07:00
parent e3634a739b
commit 1ac8e52e2b
5 changed files with 83 additions and 4 deletions

View File

@ -807,6 +807,25 @@
sudo service ssh restart
fi
# Install specific elasticsearch version as needed for searchlight.
- builder:
name: elasticsearch-install
builders:
- shell: |
#!/bin/bash -xe
sudo apt-get update
sudo apt-get install -y openjdk-7-jre
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.5.deb
sudo dpkg -i elasticsearch-1.7.5.deb
#Switch to tar extract if service start doesn't work.
#wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.5.tar.gz
#tar -zxvf elasticsearch-1.7.5.tar.gz
#Make 'elasticsearch' binary callable from within functional tests
sudo ln -s /usr/share/elasticsearch/bin/elasticsearch /usr/local/bin/elasticsearch
# ======================================================================
- wrapper:

View File

@ -6861,7 +6861,7 @@
doc-publisher-site: docs.openstack.org
jobs:
- python-jobs
- python-jobs-searchlight
- openstack-publish-jobs
- pypi-jobs
@ -7459,7 +7459,7 @@
tarball-site: tarballs.openstack.org
doc-publisher-site: docs.openstack.org
jobs:
- python-jobs
- python-jobs-searchlight
- openstack-publish-jobs
- openstack-releasenotes-jobs
- pypi-jobs

View File

@ -540,3 +540,20 @@
# pylint isn't standard
# gate-{name}-tox-{envlist} also isn't standard, but is reserved for
# projects that want to run specific jobs via tox
- job-group:
name: python-jobs-searchlight
jobs:
- '{name}-coverage'
- 'gate-{name}-pep8'
- 'gate-{name}-python27-searchlight'
- 'gate-{name}-python34'
- 'gate-{name}-pypy'
- 'gate-{name}-docs'
- 'gate-{name}-requirements'
- '{name}-tarball'
- '{name}-branch-tarball'
- '{name}-announce-release'
# pylint isn't standard
# gate-{name}-tox-{envlist} also isn't standard, but is reserved for
# projects that want to run specific jobs via tox

View File

@ -0,0 +1,24 @@
- job-template:
name: 'gate-{name}-python27-searchlight'
wrappers:
- build-timeout:
timeout: 50
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints
- elasticsearch-install
- install-distro-packages
- revoke-sudo
- python27
- assert-no-extra-files
publishers:
- test-results
- console-log
- zuul-swift-test-results-with-console
node: ubuntu-trusty

View File

@ -308,6 +308,25 @@ project-templates:
post:
- '{name}-branch-tarball'
# Invokes the same targets as python-jobs with one change:
# python27-searchlight is used instead of python27. The job
# python27-searchlight installs extra packages
- name: python-jobs-searchlight
check:
- 'gate-{name}-docs'
- 'gate-{name}-pep8'
# TODO(jaegerandi): Enable once experimental job works.
# - 'gate-{name}-python27-searchlight'
gate:
- 'gate-{name}-docs'
- 'gate-{name}-pep8'
# TODO(jaegerandi): Enable once experimental job works.
# - 'gate-{name}-python27-searchlight'
experimental:
- 'gate-{name}-python27-searchlight'
post:
- '{name}-branch-tarball'
- name: python-charm-jobs
check:
- 'gate-{name}-pep8'
@ -9784,7 +9803,7 @@ projects:
- name: openstack/python-searchlightclient
template:
- name: merge-check
- name: python-jobs
- name: python-jobs-searchlight
- name: python3-jobs
- name: openstack-client-publish-jobs
- name: check-requirements
@ -10323,7 +10342,7 @@ projects:
- name: openstack/searchlight
template:
- name: merge-check
- name: python-jobs
- name: python-jobs-searchlight
- name: python3-jobs
- name: openstack-server-publish-jobs
- name: openstack-server-release-jobs