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

Mackerel for DevOps

Mackerel for DevOps

AWSコンサルティングパートナーのためのISV活用セミナー

Hiromichi Sugiyama

September 12, 2017
Tweet

More Decks by Hiromichi Sugiyama

Other Decks in Programming

Transcript

  1. Hiromichi Sugiyama / ਿࢁ ޿௨ גࣜձࣾ͸ͯͳ αʔϏεɾγεςϜ։ൃຊ෦ .BDLFSFMνʔϜ ϓϩσϡʔαʔ .BDLFSFM1SPEVDU.BOBHFS

    ܦྺ  େن໛؀ڥͰͷΠϯϑϥΤϯδχΞ  ΦʔϓϯιʔεͷϞχλϦϯάπʔϧ  4BB4γεςϜ  *5*-ϕʔεͷαʔϏεϚωδϝϯτ  ͸ͯͳͰ.BDLFSFMࣄۀ΁ܞΘΔ TVHJZBNB!IBUFOBOFKQ
  2. ΞδΣϯμ • ࣌୅ͷைྲྀͱސ٬ͷ՝୊ײ • Mackerelͷ֓ཁಛ௃ػೳʢ5બʣ • Mackerel for DevOpsʢ͸ͯͳͰͷ࣮ફྫʣ •

    Infrastructure as Codeʢ͸ͯͳͰͷ࣮ફྫʣ • Product Roadmapύʔτφʔ༷޲͚ϓϥϯ • MackerelͷϏδϣϯ
  3. 3. AWS Integration • "84$MPVE8BUDI"1*͔Β༷ʑͳϝτϦοΫ΍ΠϕϯτΛऔಘ͠ՄࢹԽ • ୆ͷϗετͱͯ͠؅ཧ • &$ "-#

    $-# 3%4 &MBTUJ$BDIF 3FE4IJGU -BNCEB ʜ ֦େத API Amazon CloudWatch Amazon RDS Amazon ELB
  4. 4.େن໛؀ڥͱͷ਌࿨ੑ • ೚ҙͷݖݶͰϢʔβʔΛΦʔΨχθʔγϣϯʢ؅ཧൣғʣ΁Ϛοϐϯά • ̎ஈ֊ೝূɺ*1ΞυϨε੍ݶɺೝূํ੍ࣜݶ ͳͲ • খن໛ʙେن໛؀ڥ·Ͱద༻͠΍͍͢ߏ଄ User A

    User B User C User D Service A Service B Role 1 Role 2 Role 3 Host 1 Host 2 Host 3 Host 4 Read Write Read Only Owner IP Address Authentication A.A.A.A Service A Service B Role 1 Role 2 Role 3 Host 1 Host 2 Host 3 Host 4 Read Write Read Only Owner IP Address Authentication A.A.A.A Service A Service B Role 1 Role 2 Role 3 Host 1 Host 2 Host 3 Host 4 Read Write Read Only Owner IP Address Authentication A.A.A.A ΦʔΨχθʔγϣϯ 9 ΦʔΨχθʔγϣϯ : ΦʔΨχθʔγϣϯ ;
  5. Service Role Host ͸ͯͳ Bookmark app proxy DB DB1 DB2

    app3 app2 app1 proxy1 proxy2 ద༻ྫɿ͸ͯͳBookmark
  6. DevOps Lifecycle • ։ൃͱӡ༻͕ӬଓతͳαΠΫ ϧΛ੒͢ • ଟछଟ༷ͳޮ཰Խπʔϧ΍ αʔϏε͕ଘࡏ • దࡐదॴ

    • ޷Έ Mystery of DevOps Devops Lifecycle http://www.edureka.co/blog/mystery-of-devops/
  7. logo (2) ͸ͯͳͰͷ׆༻ • MackerelΛ࣠ͱͨ͠ಈత؅ཧΛ࣮ݱ droot Monitoring & Dynamic Configuration

    Registry Server Configuration Deploy Infrastructure Test SSH-Operation Infrastructure DNS Registry tinydns
  8. ϝλσʔλػೳ • ೚ҙͷKey-Value஋ΛJSONσʔλͱͯ͠ Mackerel΁ొ࿥ • ༷ʑͳ༻్Ͱ࠶ར༻Մೳ API,CLI,Plugin... CREATE READ UPDATE

    DELETE { "type": 12345, "region": "jp", "env": "staging", "instance_type": "c4.xlarge" } { "type": 12345, "region": "jp", "env": "staging", "instance_type": "c4.xlarge" } Host / Administrator
  9. Ϣʔεέʔε • ಈతͳߋ৽Ͱৗʹ࠷৽ͷঢ়ଶΛ೺Ѳͯ͠࠶ར༻ • ϗετ؀ڥͷछผʢ%FWFMPQNFOU 5FTUJOH 4UBHJOH 1SPEVDUJPOʣΛఆٛͯ͠ɺ 1SPEVDUJPO؀ڥͷΈΛநग़ͯ͠ΦϖϨʔγϣϯ •

    Πϯετʔϧύοέʔδʢύοέʔδ໊ɿόʔδϣϯ൪߸ʣͰɺ੬ऑੑ͕ൃ֮ͨ͠΋ͷ͕ ಋೖ͞Ε͍ͯΔϗετͷΈΛநग़ͯ͠ߏ੒؅ཧπʔϧͰҰׅߋ৽ • Ӭଓతͳ5$1ίωΫγϣϯͷϦετΛάϥϑσʔλͱͯ͠࠶ར༻ ˠ ίʔυ؅ཧ͕*OGSBTUSVDUVSFBT$PEFͷଅਐʹߩݙ
  10. Dev Ops Service A Service B Service C ͸ͯͳͷ։ൃͱӡ༻ͷମ੍ •

    Ops͸Ұͭͷ૊৫͕ͩɺαʔϏε͝ͱʹ୲౰ΛΞαΠϯ͍ͯ͠Δ
  11. Dev Ops Service A Service B Service C ։ൃͱӡ༻ͷମ੍ •

    Ops͸Ұͭͷ૊৫͕ͩɺαʔϏε͝ͱʹ୲౰ΛΞαΠϯ͍ͯ͠Δ Webアプリケーション エンジニア
  12. Dev Ops Service A Service B Service C ։ൃͱӡ༻ͷମ੍ •

    Ops͸Ұͭͷ૊৫͕ͩɺαʔϏε͝ͱʹ୲౰ΛΞαΠϯ͍ͯ͠Δ Webアプリケーション エンジニア Webオペレーション エンジニア
  13. ίʔυ؅ཧ͢Δར఺ʢҰྫʣ • ίʔυϨϕϧͰՄࢹԽ͞Ε͍ͯΔͷͰɺ؆୯ʹӽڥͰ͖Δ ΞϓϦέʔγϣϯ ϛυϧ΢ΣΞ OS ϓϥοτϑΥʔϜ Dev Ops DBʹਫ਼௨͍ͯ͠ΔOpsΤϯδχΞ͕SQL

    ͷϨϏϡʔΛͨ͠Γ DevΤϯδχΞ͕ϛυϧ΢ΣΞΛࢼͨ͢ ΊͷChefϨγϐΛॻ͍ͨΓ ϛυϧ΢ΣΞͷΦϓγϣϯߏ੒Λཧղ ͠ͳ͕ΒίʔυΛॻ͍ͨΓ ↓ϙΠϯτ
  14. ҟৗݕ஌ • ͍ͭ΋ͱҧ͏σʔλύλʔϯΛࣝผ • ػցֶशͷΞϧΰϦζϜΛ׆༻ Anatomy of an anomaly detection

    model https://techblog.expedia.com/2016/07/28/applying-data-science-to-monitoring/
  15. ίϯϙʔωϯτؒͷؔ܎Λදݱ LB DB Proxy Proxy Proxy App App App App

    App • ෳࡶͳߏ੒΋෼͔Γ΍͘͢؅ཧՄೳ • ߏ੒೺Ѳͷ༰қԽ • Өڹൣғ΍ݪҼͷಛఆ
  16. ࣌୅͸Ϋϥ΢υԽͷྲྀΕ • ։ൃπʔϧ͸Ϋϥ΢υ΁ • TWOHJU ˠ (JU)VC (JU)VC&OUFSQSJTF • +FOLJOTˠ

    5SBWJT$* $JSDMF$* • ࣮ߦ؀ڥ΋Ϋϥ΢υ΁ • ΦϯϓϨ ˠ "84 ($1 "[VSF #MVFNJY
  17. Mackerel΁ͷྲྀΕ • ӡ༻πʔϧ΋Ϋϥ΢υ΁ • ;BCCJY /BHJPT 4FOTV 1SPNFUIFVT ˠ .BDLFSFM

     • ܧଓతͳػೳ֦ॆɺݎ࿚ͳϓϥοτϑΥʔϜӡӦ͸ɺ ͓೚ͤ௖͖ɺΑΓຊ࣭తͳϏδωε΁஫ྗ͍͚ͨͩ ·͢