elasticsearch vesion 업그레이드 하던 절차를 정리해봤다.
1) elastic 업그레이드할 version 설치
2) elasticsearch.yml 기존과 동일하게 설정
사용하던 사전, plugin 세팅하기, jvm.options 등
여기까지 업그레이드할 준비를 한다.
3) shard alocation primary 설정
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "primaries"
}
}
4) 업그레이드할 노드 stop
5) 업그레이드할 노드에 기존 data 폴더 mv 하기(또는 심볼링링크 교체)
6) 노드 start
7) curl -XGET "http://localhost:9201/_cat/nodes" 노드가 클러스터에 들어왔는지 확인
8) shard allocation 풀어 샤드가 다시 움직일 수 있게
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": null
}
}
9) GET _cat/health?v=true 샤드 진행 확인 green 되면 다음 노드 업그레이드
또는 Kibana 모니터링으로 클러스터 상태 확인한다.