AWSで楽をするサービスメッシュ入門/appmesh-trial

 AWSで楽をするサービスメッシュ入門/appmesh-trial

JAWS-UG 会津 @ 2019.08.24 でのスライドです

1e5a15f4dc65c207a04a1e82a3f92e92?s=128

ryo nakamaru

August 24, 2019
Tweet

Transcript

  1. AWS ͰָΛ͢ΔαʔϏεϝογϡೖ໳ JAWS-UG Aizu @ Aug 24th / Ryo Nakamaru,

    SUPINF Inc.
  2. தؙ ྑ @pottava - SUPINF ͱ͍͏डୗ։ൃ / ӡ༻ձࣾͷΤϯδχΞ - ձ௡ͱ౦ژ൒ʑͷੜ׆

    - JAWS-UG ίϯςφࢧ෦ / AI ࢧ෦ ͷӡӦ Profile
  3. SUPINF Inc 3 https://jawsug-container.connpass.com/event/143245/

  4. SUPINF Inc ͸͡Ίʹ 4 ࣌ؒͷ౎߹্ɺ΋ͷ͘͢͝୯७Խͯ͠࿩͠·͢ɻ ࣮ࡍʹ AWS ΍֤αʔϏεΛ͓࢖͍ʹͳΔࡍ͸ ΑΓਖ਼֬ͳදݱͷղઆΛ͓ಡΈ͍ͩ͘͞

  5. SUPINF Inc τϐοΫ 5 • αʔϏεϝογϡʁ • AWS App Mesh

    ɻ • ࣮ࡍͷߏ੒ྫ / Tips
  6. SUPINF Inc 6 αʔϏεϝογϡʁ

  7. SUPINF Inc 7 αʔϏεϝογϡ = ௨৴͢Δ࢓૊Έͷͻͱͭ

  8. SUPINF Inc ಛ௃̍: ૬ख͸ॅॴͰͳ͘ɺ໊લͰࢦఆ 8 Uber Eats ͞ʔΜʂ ਖ਼௚ɺ഑ୡһͷ ډ৔ॴ͸஌Βͳ͍

  9. SUPINF Inc ಛ௃̎: ͔͠΋ͦΕ͸ɺِ໊ 9 Uber Eats ͞ʔΜʂ Θͨ͠ͷ ຊ໊͸ൿີͰ͢

  10. SUPINF Inc 10 ͜͏͢Δ͜ͱͰ ɾ࣮ࡍʹಈ͘ͻͱΛࣗ༝ʹม͑ΒΕΔ ɾ౎౓ “ಈ͚Δͻͱ” Λ୳͠ɺ഑ஔͰ͖Δ

  11. SUPINF Inc 11 ݁Ռͱͯ͠ ɾಈ͚Δͻͱʹಈ͍ͯ΋Β͑ΔʢՄ༻ੑʣ ɾಈ͚ΔͻͱΛແݶʹ૿΍ͤΔʢ֦ுੑʣ

  12. SUPINF Inc ಛ௃̏: “಺޲͖௨৴” ͷ੍ޚ͸΋ͪΖΜͰ͖Δ͠ 12 ܾࡁαʔϏε͞ʔΜʂ ❌ ஌Βͳ͍ਓ͔Βͷ ͓ئ͍͸ฉ͚ͳ͍Μͩ

  13. SUPINF Inc ಛ௃̏: “֎޲͖௨৴” ͷ੍ޚ΋͔ΜͨΜ 13 ❌ ͋Εɺ୭ʹ΋ ࿩͔͚͠ΒΕͳ͍.. ʁ

  14. SUPINF Inc ಛ௃̐: ෛՙΛ෼ࢄͯ͘͠ΕͨΓ 14 ΈΜͳͰରԠ͢ΔΑ

  15. SUPINF Inc ಛ௃̑: ա౓ͳΞΫηε͔Βकͬͯ͘ΕͨΓ 15 ❌ ͝ΊΜͦΖͦΖແཧ ..

  16. SUPINF Inc ಛ௃̒: ௨৴ΛϦτϥΠͯ͘͠ΕͨΓ 16 ❌ ❌ ̎ඵޙ ̐ඵޙ

  17. SUPINF Inc ಛ௃̓: ௨৴Λ҉߸Խͯ͘͠ΕͨΓ΋͢Δ 17 ͚ͩ͜͜ͷ࿩ .. ͑ʔͬͱɺ ղಡ͢Δ伴͸ ..

  18. SUPINF Inc 18 ศརͦ͏Ͱ͢ΑͶ

  19. SUPINF Inc 19 Ͳ͏΍࣮ͬͯݱ͍ͯ͠Δͷʁ

  20. SUPINF Inc ̍. αʔϏεʹ໊લΛ͚ͭ·͢ 20 ࢲʢͨͪʣ͸ࠓޙ ܾࡁαʔϏεͱ໊৐Γ·͢

  21. SUPINF Inc ̎. ϓϩΩγʔΛཱͯ·͢ 21 ܾࡁαʔϏε͞Μ ͜Μʹͪ͸ ୅ཧͷ΋ͷͰ͢ ͜Μʹͪ͸ ͪ͜Β΋

    ୅ཧͰ͓Ԡ͑͠·͢
  22. SUPINF Inc ̏. શମΛݟͯ͘ΕΔϚωʔδϟʔΛཱͯ·͢ 22 ܾࡁαʔϏε͸ ͋ͬͪʹ͍ΔΑ ੺ؙ͔Βͷ ґཔ͏͚ͯ OK

  23. SUPINF Inc ̐. αʔϏεͷਖ਼ৗੑΛఆظతʹ֬ೝ͠·͢ 23 ܾࡁαʔϏε͞Μ ಈ͚Δͻͱ͍Δʁ

  24. SUPINF Inc 24 ͭ·Γ

  25. SUPINF Inc 25 αʔϏεϝογϡ = ྘ؙͷྗΛआΓͯ௨৴͢Δ࢓૊Έ

  26. SUPINF Inc 26 ͨͩͪΐͬͱ଴ͬͯɺ

  27. SUPINF Inc ͋ͳͨͷγεςϜʹɺ΄Μͱʹඞཁʁ 27

  28. SUPINF Inc 28 ͍Γ·ͤΜ ʢ׬ʣ

  29. SUPINF Inc 29

  30. SUPINF Inc 30 ඞཁͩͱ͠·͠ΐ͏ɻ

  31. SUPINF Inc 31 ɹɹAWS App Mesh

  32. SUPINF Inc 32 Ծ૝αʔϏεɺԾ૝ϧʔτɺԾ૝ϊʔυ

  33. SUPINF Inc Ծ૝αʔϏε: ௨৴Λड͚Δ΋ͷ 33 ࢲ΁ͷґཔ͸ Ծ૝αʔϏε ʮܾࡁ.svc.localʯ ܦ༝ͰͶ

  34. SUPINF Inc Ծ૝ϊʔυ: ௨৴্ɺೝ͍ࣝͨ͠୯Ґ 34 ૹ৴ݩͰ͢ ड͚ೖΕ͍ͯͩ͘͞ ૹ৴ઌͰ͢ ௨৴ه࿥࢒ͯ͠Ͷ

  35. SUPINF Inc Ծ૝ϧʔτ: αʔϏε͔Βϊʔυ΁ͷసૹϧʔϧ 35 ܾࡁ.svc.local ͞Μʂ 70% 30%

  36. SUPINF Inc 36 ͜ΕΒ͕ڠௐಈ࡞͢Δͱɾɾ

  37. SUPINF Inc ઃఆ৘ใͱਖ਼ৗੑ৘ใ͔ΒసૹϧʔϧΛ഑৴ 37 ܾࡁ.svc.local Ͱ ͍·઀ଓͰ͖Δͷ͸..

  38. SUPINF Inc Ծ૝αʔϏε໊ͰΞΫηεͰ͖Δ 38 Ծ૝αʔϏε͔Β Ծ૝ϧʔτʹج͖ͮ ࢓ࣄΛ೚͞Εͨ Ծ૝ϊʔυͰ͢ Ծ૝ϊʔυͰ͢ ܾࡁ.svc.local

    ͞ʔΜ
  39. SUPINF Inc 39 Ծ૝ϊʔυ Ͳ͏΍ͬͯݟ͚ͭΔ͔໰୊

  40. SUPINF Inc 40 αʔϏεσΟεΧόϦʔΛ࢖͍·͠ΐ͏

  41. SUPINF Inc 41 Ծ૝ϊʔυͷൃݟʹ͸ͲͪΒ͔͕࢖͑·͢ ɾDNS ɾAWS Cloud Map AWS ͷϚωʔδυ

    αʔϏεσΟεΧόϦʔ
  42. SUPINF Inc αʔϏεσΟεΧόϦʔྫ 42 ECS αʔϏε ࠷ऴతʹ͸ ݩؾͳίϯςφʹ ܨ͍Ͱ΄͍͠

  43. SUPINF Inc Cloud Map Ͱ ECS αʔϏεʹผ໊Λ͚ͭΔ 43 ECS αʔϏε

    Cloud Map ܾࡁ.svc.local ͜ͷ໊લͰ ECS αʔϏε தͷݩؾͳίϯςφ͕ฦΔ
  44. SUPINF Inc Ծ૝ϊʔυͷൃݟํ๏ʹ Cloud Map Λࢦఆ 44 ECS αʔϏε Cloud

    Map App Mesh ܾࡁ.svc.local Ծ૝ϊʔυ node-ܾࡁ
  45. SUPINF Inc Ծ૝αʔϏε͔Βϊʔυ΁ͷϧʔτΛ࡞Δ 45 ECS αʔϏε Cloud Map App Mesh

    ܾࡁ.svc.local Ծ૝αʔϏε node-ܾࡁ ܾࡁ.svc.local Ծ૝ϊʔυ
  46. SUPINF Inc ͋ͱ͸ App Mesh ʹ೚ͤΕ͹ .. 46 ͸ʔ͍ɻܾࡁ୲౰ ͷ͏ͪɺग़ۈதͷ

    ࢲ͕͓ड͚͠·͢ ܾࡁ.svc.local ͞ʔΜ
  47. SUPINF Inc 47 ࣮ࡍͷߏ੒ྫ / Tips

  48. SUPINF Inc 48 ALB Public subnets Private subnets Fargate ֎෦࿈ܞ

    API ೝূ API ۀ຿ϩδοΫ API CloudFront X-Ray CW Logs App Mesh Cloud Map ֎෦͔ΒͷΞΫηε
  49. SUPINF Inc 49 ALB Public subnets Private subnets Fargate ֎෦࿈ܞ

    API ೝূ API ۀ຿ϩδοΫ API CloudFront X-Ray CW Logs App Mesh Cloud Map సૹϧʔϧͷ൓ө
  50. SUPINF Inc 50 ALB Public subnets Private subnets Fargate ֎෦࿈ܞ

    API ೝূ API ۀ຿ϩδοΫ API CloudFront X-Ray CW Logs App Mesh Cloud Map ಺෦௨৴
  51. SUPINF Inc 51 ALB Public subnets Private subnets Fargate ֎෦࿈ܞ

    API ೝূ API ۀ຿ϩδοΫ API CloudFront X-Ray CW Logs App Mesh Cloud Map τϨʔε৘ใू໿
  52. SUPINF Inc 52 ΍ͬͯΈ·͠ΐ͏

  53. SUPINF Inc ΰʔϧ: App Mesh ׬શʹཧղʢHello Worldʣ 53 https://github.com/pottava/appmesh-trial HTTP

    ϦΫΤετΛ dump ͢Δ API Λ࢖͍ App Mesh Λܦ༝͢Δ / ͠ͳ͍ Ͱ஋͕Ͳ͏มΘΔ͔ΛΈͯΈΑ͏ ʢCFn ςϯϓϨʔτΛಡΜͰ AWS Ϧιʔεͷ ؔ܎ੑΛ೺Ѳ͠Α͏ʣ
  54. SUPINF Inc ࠓճͷߏ੒ 54

  55. SUPINF Inc ࠓճͷߏ੒ 55 80 ൪ϙʔτ → ALB ͔Β௚઀ API

    ίϯςφ΁
  56. SUPINF Inc ࠓճͷߏ੒ 56 8080 ൪ϙʔτ → App Mesh ܦ༝Ͱ

    API ίϯςφ΁
  57. SUPINF Inc Tips 57 • Ծ૝αʔϏε໊͸·ͣɺͲ͔͜ͷ envoy ϗετ IP ʹղܾ͕ඞਢ

    • App Mesh Ծ૝αʔϏε໊ = Cloud Map αʔϏε໊ • ·ͣ IP ΞυϨεʹղܾ͞Εͳ͍ͱ Hostname not found .. • Mesh ͷ EgressFilterɺσϑΥϧτ͸ DROP_ALL • ࣗ༝ʹ֎෦௨৴͍ͨ͠ͷͳΒ ALLOW_ALL ʹ͠·͠ΐ͏ • MySQL ܨ͕Βͳ͍ɾɾʁ • EgressIgnoredPorts Λ࢖͍·͠ΐ͏ https://github.com/aws/aws-app-mesh-roadmap/issues/62
  58. SUPINF Inc 58 ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ :) ࢀߟɿ • AWS App MeshʢϚΠΫϩαʔϏεΛϞχλϦϯά͓Αͼίϯτ

    ϩʔϧ͢Δʣ| AWS https://aws.amazon.com/jp/app-mesh/ • AWS App Mesh Roadmapɻhttps://github.com/aws/aws-app-mesh- roadmap • App Mesh τϥΠΞϧ https://github.com/pottava/appmesh-trial • JAWS-UG ίϯςφࢧ෦ #15 https://jawsug- container.connpass.com/event/143245/
  59. SUPINF

  60. ౦ژ౎ौ୩۠ौ୩2-11-5 03-6427-6517 https://www.facebook.com/supinf/ @supinf_pr CONTACT US And thank you for

    your time