Elasticsearch導入チェックリスト?

657aeeff3fc467567dacebf8a1ea0b23?s=47 Jun Ohtani
February 16, 2015

 Elasticsearch導入チェックリスト?

第8回Elasticsearch勉強会で発表したときのスライドです。

657aeeff3fc467567dacebf8a1ea0b23?s=128

Jun Ohtani

February 16, 2015
Tweet

Transcript

  1. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited Jun Ohtani @johtani 2015/02/13 ElasticsearchಋೖνΣοΫϦετʁ
  2. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited about • Me, Jun Ohtani / Technical Adovocate lucene-gosenίϛολʔ ElasticSearch Server೔ຊޠ൛ͷ຋༁ elasticsearch-extended-analysisͷ։ൃ http://blog.johtani.info • Elasticsearch, founded in 2012 Products: Elasticsearch, Logstash, Kibana, Marvel
 Professional services: Support & development subscriptions Trainings
  3. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited Agenda • OSؔ࿈ • Configuration • JVM Heap • ɻɻɻ
  4. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited Πϯετʔϧ͔Βىಈ·Ͱ
  5. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited μ΢ϯϩʔυͱىಈ $ wget https://download.elasticsearch.org/... $ tar -xf elasticsearch-1.4.3.tar.gz $ ./elasticsearch-1.4.3/bin/elasticsearch ... [2015-02-13 13:43:41,167][INFO ][node] [Araña] started ... Also puppet modules and RPM/DEB
  6. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ىಈͷ֬ೝ » curl localhost:9200 { "status" : 200, "name" : "Fin Fang Foom", "cluster_name" : "jupiter.local", "version" : { "number" : "1.4.3", "build_hash" : "36a29a7144cfde87a960ba039091d40856fcb9af", "build_timestamp" : "2015-02-11T14:23:15Z", "build_snapshot" : false, "lucene_version" : "4.10.3" }, "tagline" : "You Know, for Search" }
  7. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ͦͷલʹɻɻɻ
  8. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ͦͷલʹ • ͳʹ͸ͱ΋͋ΕɺΞοϓάϨʔυ • Elasticsearchɿ1.4.3 • Java 1.8.0_20Ҏ߱ • Java 1.7.0_55Ҏ߱ Java 1.7.0_25Ҏ߱Ͱ55Ҏલ͸SDKʹόά͋Γ
  9. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited Configuration
  10. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited OSؔ࿈
  11. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ϑΝΠϧσεΫϦϓλ
  12. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ϑΝΠϧσεΫϦϓλ • ਪ঑ɿ32,000΋͘͠͸64,000 • ֬ೝํ๏ͦͷ1ʢϩάग़ྗʣ $ ./bin/elasticsearch -Des.max-open-files=true [2015-02-13 14:02:13,527][INFO ][bootstrap ] max_open_files [10240] ...
  13. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ϑΝΠϧσεΫϦϓλ • ֬ೝํ๏ͦͷ2ʢelasticsearchʹͯʣ » curl localhost:9200/_nodes/process?pretty { "cluster_name" : "jupiter.local", "nodes" : { "ydEmZ2aSSImgjkoJYs7WGQ" : { "name" : "Starhawk", … "http_address" : "inet[/192.168.1.10:9200]", "process" : { "refresh_interval_in_millis" : 1000, "id" : 7630, "max_file_descriptors" : 10240, "mlockall" : false } }…
  14. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ϝϞϦؔ࿈
  15. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ϝϞϦؔ࿈ʢώʔϓʣ • ώʔϓαΠζ ෺ཧϝϞϦͷ൒෼ҎԼ 32GҎ্ MAXͱMINΛಉ͡஋ʹʹES_HEAP_SIZEͰࢦఆ • ࢦఆํ๏ bin/elasticsearch.in.sh΋͘͠͸bin/elasticsearch.in.batͰ
  16. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ϝϞϦؔ࿈ʢεϫοϓʣ • εϫοϓ • 1. swapΦϑ • 2. swappiness • 3. mlockall
  17. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited Elasticsearchͷઃఆ
  18. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited nameؔ࿈
  19. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited cluster.name
  20. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited cluster.name • σϑΥϧτ஋ɿelasticsearch • ઃఆํ๏ 1. elasticsearch.ymlʹઃఆ 2. ىಈ࣌ʹࢦఆ
  21. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited cluster.name • elasticsearch.yml • ىಈ࣌ʹࢦఆ cluster.name: elasticsearch_production $ ./bin/elasticsearch -Des.cluster.name=hogehoge ·ͨ͸ $ ./bin/elasticsearch --cluster.name=hogehoge
  22. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited node.name
  23. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited node.name • σϑΥϧτɿMarvelͷώʔϩʔͷ໊લ • ىಈ࣌ʹϥϯμϜʹܾఆ 1. elasticsearch.ymlʹઃఆ 2. ىಈ࣌ʹࢦఆ
  24. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited node.name • elasticsearch.yml • ىಈ࣌ʹࢦఆ node.name: elasticsearch_production $ ./bin/elasticsearch -Des.node.name=hogehoge ·ͨ͸ $ ./bin/elasticsearch --node.name=hogehoge
  25. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ωοτϫʔΫؔ࿈
  26. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited network.host • ωοτϫʔΫΞυϨεͷࢦఆ • छྨ • network.publish_hostɿ֎෦઀ଓ༻host • network.bind_hostɿbind͢Δhost • network.hostɿ্ه2छྨΛಉ࣌ʹઃఆ͢Δ؆୯ͳઃఆ
  27. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited discovery.zenؔ࿈
  28. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited discovery.zen.ping • Unicastʹ͠·͠ΐ͏ σϑΥϧτ͸multicast • ઃఆ discovery.zen.ping.multicast.enabled:  false     discovery.zen.ping.unicast.hosts:  ["host1",  "host2:port"]
  29. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited minimum_master_nodes • ΫϥελͷεϓϦοτϒϨΠϯ๷ࢭ • ( n / 2 ) + 1 discovery.zen.minimum_master_nodes:  2
  30. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited σΟϨΫτϦؔ࿈
  31. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited path.conf • ઃఆϑΝΠϧͷσΟϨΫτϦύε $ ./bin/elasticsearch -Des.path.conf=./hoge ·ͨ͸ $ ./bin/elasticsearch --path.conf=./hoge
  32. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ͦͷଞύε • path.logɹϩάσΟϨΫτϦ • path.dataɹΠϯσοΫεσʔλอଘσΟϨΫτϦ • path.pluginsɹϓϥάΠϯΠϯετʔϧઌ • ͜ΕΒ͸elasticsearch.ymlʹઃఆ
  33. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ࢀߟࢿྉ • ެࣜΨΠυͷsetup http://www.elasticsearch.org/guide/en/elasticsearch/reference/ current/setup.html • The Definitive Guideͷadministration, monitoring http://www.elasticsearch.org/guide/en/elasticsearch/guide/ current/administration.html
  34. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ࢀߟ • Github https://github.com/elasticsearch • ΨΠυ http://www.elasticsearch.org/guide/ • αϙʔτ http://www.elasticsearch.com/support/