major version (2.x -> 5.x) 변경시 cluster 전체를 내리고 upgrade 수행


1) Disable shard allocation

전체 노드를 내리기전 아래 명령어를 수행후 복제를 방지


curl -XPUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d'

{

  "persistent": {

    "cluster.routing.allocation.enable": "none"

  }

}

'


2) Perform a synced flush

빠른 복구를 위해 index에 대해 disk로 flush 수행


3) Shutdown and upgrade all nodes

모든 서비스를 내리고 upgrade 수행 (rolling upgrade 참조)


4) Upgrade any plugins

elasticsearch-plugin script 수행


5) Start the cluster


모든 노드를 시작후 상태 체크

curl -XGET 'localhost:9200/_cat/health?pretty'

curl -XGET 'localhost:9200/_cat/nodes?pretty'



6) Wait for yellow


cluster health 상태가 red에서 yellow로 변경될때까지 대기


7) Reenable allocation

데이터 복제 진행될수 있도록 아래 명령어를 수행후 cluster health상태가

green으로 변경될때까지 모니터링


curl -XPUT 'localhost:9200/_cluster/settings?pretty' -H 'Content-Type: application/json' -d'

{

  "persistent": {

    "cluster.routing.allocation.enable": "all"

  }

}

'

'NoSQL > Elasticsearch' 카테고리의 다른 글

x-pack install  (0) 2017.03.22
x-pack 란  (0) 2017.03.22
[설치] elk 5.2.2 rolling upgrades  (0) 2017.03.20
[설치] elk 5.2.2 config 설정  (0) 2017.03.20
[설치] elk 5.2.2 설치 상태 확인  (0) 2017.03.20

+ Recent posts