Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elastic{ON} 2018 - Upgrade to 6.0: Leading with...

Elastic{ON} 2018 - Upgrade to 6.0: Leading with Empathy

Elastic Co

March 01, 2018
Tweet

More Decks by Elastic Co

Other Decks in Technology

Transcript

  1. Elasticsearch: Core/Infra, Distributed, Search & Aggs, Lucene, Security Documentation Kibana

    Operations Kibana Platform Monitoring (Kibana & Elasticsearch) Beats Logstash Cloud Support Kibana QA
  2. [2018-01-27T01:06:02,635][INFO ][o.e.d.z.ZenDiscovery ] [chmgl9ap15] failed to send join request to

    master [{chmgl9ap16}{- enENLKCQnaYPJW7IL80YA}{sK8- LS1OQhe9zOCTXJpdFg}{10.212.81.133}{10.212.81.133:9300}{ml.ma x_open_jobs=10, ml.enabled=true}], reason [RemoteTransportException[[chmgl9ap16][10.212.81.133:9300][intern al:discovery/zen/join]]; nested: IllegalStateException[failure when sending a validation request to node]; nested: RemoteTransportException[[chmgl9ap15][10.212.81.53:9300][internal: discovery/zen/join/validate]]; nested: IllegalStateException[Security index is not on the current version [6] - The Upgrade API must be run for 6.x nodes to join the cluster]; ]
  3. [2018-01-27T01:06:02,635][INFO ][o.e.d.z.ZenDiscovery ] [chmgl9ap15] failed to send join request to

    master [{chmgl9ap16}{- enENLKCQnaYPJW7IL80YA}{sK8- LS1OQhe9zOCTXJpdFg}{10.212.81.133}{10.212.81.133:9300}{ml.ma x_open_jobs=10, ml.enabled=true}], reason [RemoteTransportException[[chmgl9ap16][10.212.81.133:9300][intern al:discovery/zen/join]]; nested: IllegalStateException[failure when sending a validation request to node]; nested: RemoteTransportException[[chmgl9ap15][10.212.81.53:9300][internal: discovery/zen/join/validate]]; nested: IllegalStateException[Security index is not on the current version [6] - The Upgrade API must be run for 6.x nodes to join the cluster]; ]
  4. [2018-01-27T03:13:53,725][ERROR][o.e.g.GatewayMetaState ] [chmgl9ap15] failed to read local state, exiting… org.elasticsearch.ElasticsearchException:

    java.io.IOException: failed to read [id:176, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-176.st]
  5. [2018-01-27T03:13:53,725][ERROR][o.e.g.GatewayMetaState ] [chmgl9ap15] failed to read local state, exiting... org.elasticsearch.ElasticsearchException:

    java.io.IOException: failed to read [id:176, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-176.st]
  6. • First, congratulations on using your literacy skills right now.

    People who read instructions are rare. • 30% of users read. 15% both read and understand what they read. • You have no idea how much time went into all this documentation. • I bet you will not click the link to the documentation in the previous bullet point. • Also, those statistics about users are made up. • The next bullet point is really not worth reading, I promise. Just skip over it. • Are you frustrated because you cannot both read this slide and hear what I’m saying? • If I said nonsense right now, would you even notice? How to upgrade without borking your system 38 All the steps you need to follow to do it right! Here are the steps:
  7. innovate   replace legacy features   remove fragility   improve

    user experience   keep our users onboard Development Constitution
  8. { }

  9. Except where otherwise noted, this work is licensed under http://creativecommons.org/licenses/by-nd/4.0/

    Creative Commons and the double C in a circle are registered trademarks of Creative Commons in the United States and other countries. Third party marks and brands are the property of their respective holders. 66 Please attribute Elastic with a link to elastic.co
  10. PUT twitter { "mappings": { "user": { "properties": { "name":

    { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } }
  11. PUT users { "settings": { "index.mapping.single_type": true }, "mappings": {

    "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } } } } PUT twitter { "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } }
  12. PUT tweets { "settings": { "index.mapping.single_type": true }, "mappings": {

    "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } } PUT users { "settings": { "index.mapping.single_type": true }, "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } } } } PUT twitter { "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } }
  13. POST _reindex { "source": { "index": "twitter", "type": "tweet" },

    "dest": { "index": "tweets" } } POST _reindex { "source": { "index": "twitter", "type": "user" }, "dest": { "index": "users" } }
  14. GET users/doc/5 { "_index": "users", "_type": "doc", "_id": "5", "_version":

    1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT
  15. GET users/doc/5 { "_index": "users", "_type": "doc", "_id": "5", "_version":

    1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT
  16. POST users/doc/5 { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]"

    } POST twitter/user/5 { "user_name": "kimchy", "name": "Shay Banon", "email": "[email protected]" } OLD WAY TO POST A DOCUMENT NEW WAY TO POST A DOCUMENT
  17. PUT new_twitter { "settings": { "index.mapping.single_type": true }, "mappings": {

    "doc": { "properties": { "type": { "type": "keyword" }, "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" }, "content": { "type": "text" }, "tweeted_at": { "type": "date" } } } } } PUT twitter { "mappings": { "user": { "properties": { "name": { "type": "text" }, "user_name": { "type": "keyword" }, "email": { "type": "keyword" } } }, "tweet": { "properties": { "content": { "type": "text" }, "user_name": { "type": "keyword" }, "tweeted_at": { "type": "date" } } } } }
  18. POST _reindex { "source": { "index": "twitter", }, "dest": {

    "index": "new_twitter" }, "script": { "source": """ ctx._source.type = ctx._type; ctx._id = ctx._type + '-' + ctx._id; ctx._type = 'doc'; """ } }
  19. GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version":

    1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version": 2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT
  20. GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version":

    2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT
  21. GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version":

    2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT
  22. GET new_twitter/doc/user-5 { "_index": "new_twitter", "_type": "doc", "_id": "user-5", "_version":

    2, "found": true, "_source": { “type”: “user”, "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } GET twitter/user/5 { "_index": "twitter", "_type": "user", "_id": "5", "_version": 1, "found": true, "_source": { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } } OLD WAY TO GET A DOCUMENT NEW WAY TO GET A DOCUMENT
  23. POST new_twitter/doc/user-5 { "type": "user", "user_name": "eldnahevitaerc", "name": "Archana Sriram",

    "email": "[email protected]" } POST twitter/user/5 { "user_name": "eldnahevitaerc", "name": "Archana Sriram", "email": "[email protected]" } OLD WAY TO POST A DOCUMENT NEW WAY TO POST A DOCUMENT
  24. user tweet doc type user_name name email type user_name content

    tweeted_at user_name name email content tweeted_at user tweet