Elasticsearch upgrade notes
Overview
This page provides some details on Elasticsearch upgrades
To elasticsearch 1.7.x
Elasticsearch 1.7 requires Infinit.e 1.2+ to be installed.
From elasticsearch 0.19
The upgrade from 0.19 to 1.7 does not appear to work.
It is necessary to first upgrade to 1.0 following the "To elasticsearch 1.0.x" instructions below, and then to upgrade to 1.7.
From any other earlier elasticsearch
The following file should be added/replaced in "/etc/yum.repos.d": elasticsearch.repo:
[elasticsearch-1.7] name=Elasticsearch repository for 1.7.x packages baseurl=http://packages.elasticsearch.org/elasticsearch/1.7/centos gpgcheck=0 enabled=1
Then the following steps should be followed (note this involves a brief outage):
- Shutdown the interface and processing engines on all the API nodes
- ("service tomcat6-interface-engine stop; service infinite-px-engine stop; touch /opt/infinite-home/bin/STOP_CUSTOM")
- On one of the API nodes, shutdown the cluster
- ("curl -XPOST 'http://localhost:9200/_shutdown'")
- Shutdown the index engine on all the API and DB nodes - (OTHERWISE the index-engine will be restarted within a minute by the watchdog)
- ("service infinite-index-engine stop" - on both API and DB nodes) (note older clusters may not have elasticsearch running on the DB nodes - disregard DB node-related instructions if so)
- Upgrade to the new elasticsearch version on API and DB nodes
- ("yum upgrade elasticsearch-1.7" or "rpm -U elasticsearch-1.7*.rpm" if it has been manually downloaded)
- Upgrade the index engine, even if it is to the same version - note this will restart the elasticsearch indexes running the correct versions (NOTE: recommend upgrading 1 node at a time, may cause collisions?)
- ("rpm -U --force infinit.e-index-engine*.rpm" on API nodes)
- ("rpm -U --force infinit.e-index-interface*.rpm" on DB nodes)
- Start the interface and processing engines on all the API nodes
- ("service tomcat7-interface-engine start; service infinite-px-engine start; rm -f /opt/infinite-home/bin/STOP_CUSTOM")
While upgrading to 1.4+ (mainly from repos that once housed 0.x indexes) we have intermittently seen the logs claim a number of indexes to be "corrupted", even though they aren't.
A fix is proposed here:
- In "/opt/elasticsearch-infinite/data", find all indexes containing a file "corrupted_*"
- (eg find "/opt/elasticsearch-infinite/data" -name "corrupted_*")
- Delete the corresponding "checksum-*"
- Delete the corresponding "corrupted_*"
In fact in most cases over time we have ended up using the "infinite_indexer" utility to replace the indexes in question due to persistent intermittent corruptions occurring.
(for "new format" ikanow* RPMs:
- replace "infinit.e" for "ikanow" everywhere
- the tomcat service is tomcat-interface-engine)
To elasticsearch 1.4.x
Elasticsearch 1.3 requires Java7+ to be installed. Instructions on upgrading Java are here.
From elasticsearch 0.19
The upgrade from 0.19 to 1.4 does not appear to work.
It is necessary to first upgrade to 1.0 following the "To elasticsearch 1.0.x" instructions below, and then to upgrade to 1.4.
From any other earlier elasticsearch
As described for elasticsearch 1.7.x (see above), except:
- The following file should be added/replaced in "/etc/yum.repos.d": elasticsearch.repo
[elasticsearch-1.4] name=Elasticsearch repository for 1.4.x packages baseurl=http://packages.elasticsearch.org/elasticsearch/1.7/centos gpgcheck=0 enabled=1
- The install of the new elasticsearch RPM should be
- "yum upgrade elasticsearch-1.4" or "rpm -U elasticsearch-1.4*.rpm" if it has been manually downloaded
To elasticsearch 1.3.x
Elasticsearch 1.3 requires Java7+ to be installed. Instructions on upgrading Java are here.
From elasticsearch 0.19
The upgrade from 0.19 to 1.3 does not appear to work.
It is necessary to first upgrade to 1.0 following the "To elasticsearch 1.0.x" instructions below, and then to upgrade to 1.3.
From any other earlier elasticsearch
As described for elasticsearch 1.4.x (see above), except:
- The following file should be added/replaced in "/etc/yum.repos.d": elasticsearch.repo
[elasticsearch-1.3] name=Elasticsearch repository for 1.3.x packages baseurl=http://packages.elasticsearch.org/elasticsearch/1.3/centos gpgcheck=0 enabled=1
- The install of the new elasticsearch RPM should be
- "yum upgrade elasticsearch-1.3" or "rpm -U elasticsearch-1.3*.rpm" if it has been manually downloaded
To elasticsearch 1.0.x
From elasticsearch 0.19
As described for elasticsearch 1.4.x (see above), except:
- With 1.0, we now use the official elasticsearch RPM (previously we had been maintaining one internally). Therefore the following file should be added to "/etc/yum.repos.d": elasticsearch.repo:
[elasticsearch-1.0] name=Elasticsearch repository for 1.0.x packages baseurl=http://packages.elasticsearch.org/elasticsearch/1.0/centos gpgcheck=0 enabled=1
- The install of the new elasticsearch RPM should be
- "yum upgrade elasticsearch-1.0" or "rpm -U elasticsearch-1.0*.rpm" if it has been manually downloaded
Copyright © 2012 IKANOW, All Rights Reserved | Licensed under Creative Commons