The Elastic Stack 6.0.0 was recently released as GA, and there are heaps of amazing changes, improvements, and new functionality ready to use! We've put a massive amount of work to make this the best possible release for our users (check the blog posts to dive into the details). So, let's run through a brief overview of how to upgrade the Elastic Stack — Elasticsearch, Logstash, Kibana and Beats — from any release in the 5.X series, so you can take advantage of the 6.0 goodness.
The Upgrade Process
Zero downtime, major version upgrades of Elasticsearch are here!
The first and best recommendation we have is to upgrade to the latest 5.6.X release, which is 5.6.4 as of writing. Once you are on 5.6.X, you can do rolling upgrades to 6.X, which is just as amazing as it sounds
Now you are on 5.6.X, you can use the new and improved Upgrade Assistant, formerly known as the Migration Plugin, in Kibana. This is available as part of X-Pack Basic (all the way through to Platinum) and provides a number of features to help you with the upgrade process:
- Cluster Checkup: runs a series of checks against your cluster and indices and generates a report identifying any issues that you need to resolve, such as indices that may be from older versions of Elasticsearch
- Reindex Helper: graphically guides you through the process of reindexing anything that the Cluster Checkups may identify as needing to be upgraded
- Deprecation Logging: helps identify any functional changes that may impact your use of Elasticsearch and let you catch things before upgrading to 6.0 (can be toggled on and off via the UI)
A Basic license for X-Pack provides ongoing features like Monitoring for your Elasticsearch, Kibana, and Logstash instances, along with the ability to export data to CSV (in 6.X) and 18 zoom levels for maps, all via Kibana!
A basic license is free and you can register for one right here.
Once you have resolved anything outstanding found by the Upgrade Assistant, and you have read the breaking changes documentation for each of the Elastic Stack products you use, you can move onto upgrading.
The next step it to always make sure you have a snapshot of your data, and to test any upgrade process in a non-production/critical environment first. You don’t want to run into problems halfway through an upgrade that has no back-out plan.
Now we can upgrade the Elastic Stack, in the following order:
Beats and Logstash that are running on 5.X are compatible with Elasticsearch 6.0.0, so you can do these in a second phase, which reduces the amount of change you need to do at once.
We have a great page on upgrades in the documentation that goes into more detail on all of the above, and it's definitely required reading.
Alternative Upgrade Path - Blue/Green
If you have the infrastructure to support it, a blue/green upgrade (or deployment) may be the easiest way forward. This essentially involves spinning up a new 6.0 Elasticsearch cluster and running a reindex from remote.
It sounds expensive in time, effort, and resources — but it has some strong benefits:
- Reindexing allows you to leverage improved Lucene data structures, which are beneficial for resource optimisation.
- It allows you to review your mappings (and templates) to update them to changes in data types (e.g.,
keyword), which makes future upgrades smoother.
- Provides an environment to test your applications on, as you can keep production running and test on the new cluster.
- You end up with a near-zero downtime upgrade!
- You have a safe back out option in case something doesn't go to plan!!
While these upgrade instructions should help make things as pain-free as possible, we still recommend taking best practice precautions. You should always make sure you have a snapshot of your data, and to test any upgrade process in a non-production/critical environment first.
The Elastic Stack, like most modern software, is an evolving platform, and it's important to stay up-to-date with releases. This means approaching thing with a mind towards continuous improvement — instead of doing a once-a-year massive upgrade, you can make smaller, less impactful changes more frequently.
Your users, developers, customers, boss, and (maybe most importantly) yourself will thank you for it!
A late addition. Our awesome docs team (@debadair in particular) has built a fantastic page to help guide you to the right area of the docs based on your environment. It's like a choose-your-own-adventure for the Elastic Stack!
You can check it out here - https://www.elastic.co/products/upgrade_guide