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

Elasticsearch導入チェックリスト?

Jun Ohtani
February 16, 2015

 Elasticsearch導入チェックリスト?

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

Jun Ohtani

February 16, 2015
Tweet

More Decks by Jun Ohtani

Other Decks in Programming

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 μ΢ϯϩʔυͱىಈ $ 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
  5. 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" }
  6. 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ʹόά͋Γ
  7. 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] ...
  8. 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 } }…
  9. 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Ͱ
  10. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

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

    is strictly prohibited cluster.name • σϑΥϧτ஋ɿelasticsearch • ઃఆํ๏ 1. elasticsearch.ymlʹઃఆ 2. ىಈ࣌ʹࢦఆ
  12. 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
  13. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited node.name • σϑΥϧτɿMarvelͷώʔϩʔͷ໊લ • ىಈ࣌ʹϥϯμϜʹܾఆ 1. elasticsearch.ymlʹઃఆ 2. ىಈ࣌ʹࢦఆ
  14. 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
  15. 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छྨΛಉ࣌ʹઃఆ͢Δ؆୯ͳઃఆ
  16. 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"]
  17. 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
  18. 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
  19. Copyright Elasticsearch 2014. Copying, publishing and/or distributing without written permission

    is strictly prohibited ͦͷଞύε • path.logɹϩάσΟϨΫτϦ • path.dataɹΠϯσοΫεσʔλอଘσΟϨΫτϦ • path.pluginsɹϓϥάΠϯΠϯετʔϧઌ • ͜ΕΒ͸elasticsearch.ymlʹઃఆ
  20. 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
  21. 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/