Cluster restart upgrade

The steps on this page are most applicable if you installed Open Distro for Elasticsearch using the RPM or Debian packages. If you used a Docker image, see Docker upgrade.

  1. Disable shard allocation to prevent Elasticsearch from replicating shards as you shut down each node:

    PUT _cluster/settings
    {
      "persistent": {
        "cluster.routing.allocation.enable": "primaries"
      }
    }
    
  2. Stop Elasticsearch on each node:

    sudo systemctl stop elasticsearch.service
    
  3. Upgrade packages on each node using yum or apt:

    sudo yum install opendistroforelasticsearch
    sudo apt install opendistroforelasticsearch
    

    Alternately, yum lets you upgrade to a specific version of Open Distro for Elasticsearch:

    sudo yum install opendistro-for-elasticsearch-1.2.0
    

    Unfortunately, apt upgrades dependencies to their latest versions and thus only supports upgrades to the newest version of Open Distro for Elasticsearch.

  4. (Optional) Upgrade any additional plugins that you installed on the cluster. The package manager automatically upgrades Open Distro for Elasticsearch plugins.

  5. Start Elasticsearch on each node:

    sudo systemctl start elasticsearch.service
    
  6. Wait for the cluster to start, and verify that your cluster returns the new version:

    curl -XGET https://localhost:9200 -u admin:admin -k
    
  7. Verify cluster health and the expected number of nodes:

    curl -XGET https://localhost:9200/_cat/health?v -u admin:admin -k
    
  8. Enable shard allocation:

    PUT _cluster/settings
    {
      "persistent": {
        "cluster.routing.allocation.enable": "all"
      }
    }
    
  9. Open Kibana, and verify that your data is present.