Elasticsearch Version issue

elasticsearch
circle.yml

#1

Hi there,

I am using CircleCI for one of my Ruby on Rails project. I’ve integrated elasticsearch for the search feature.

basically I am using Elasticsearch version 5 at CI. please check below my circle.yml config.

machine:
  ...
  services
    - elasticsearch

dependencies:
  post:
    - if [[ ! -e elasticsearch-5.3.0 ]]; then wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.0.tar.gz && tar -xvf elasticsearch-5.3.0.tar.gz; fi
    - elasticsearch-5.3.0/bin/elasticsearch: {background: true}
    - sleep 10 && wget --waitretry=5 --retry-connrefused -v http://127.0.0.1:9200/

cache_directories:
    - elasticsearch-5.3.0 # relative to the build directory

so based on the above config, when I try to build it just fails and the cause it gives is as below,

this version of Searchkick requires Elasticsearch 2 or greater

basically I am using Elasticsearch version 5.3.0 as per above config.

then I tried building it using SSH and when I checked Elasticsearch version using SSH then it gave me 1.7.2

How is that possible ? Is it something caching related issue ? I can’t estimate how to resolve it.


#2

Any luck on this issue? I am still running 1.7.2 as well even after following the instructions https://circleci.com/docs/1.0/installing-elasticsearch/.


#3

for me elastic search 1.7.2 was still installing before 2.4.3
so before the install of 2.4.3 i stopped elastic search
this is not idea, but a workaround for now:

dependencies:
post:
- sudo /etc/init.d/elasticsearch stop
- sudo wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.4.3/elasticsearch-2.4.3.tar.gz
- tar -xvf elasticsearch-2.4.3.tar.gz
- elasticsearch-2.4.3/bin/elasticsearch: {background: true}
# Make sure that Elasticsearch is up before running tests:
- sleep 10 && wget --waitretry=5 --retry-connrefused -v http://127.0.0.1:9200/


#4