Save 37% off PRO during our Black Friday Sale! »

FusicTechLive1.5 AWSを活かした基幹システムインフラ構成の紹介

FusicTechLive1.5 AWSを活かした基幹システムインフラ構成の紹介

Bc265a7c553dd2bf7194f8143616e91b?s=128

Junkins

July 08, 2021
Tweet

Transcript

  1. AWSΛ׆͔ͨ͠جװγεςϜΠϯϑϥߏ੒ͷ঺հ Fusic Tech Live Vol.1.5 2021.07.08 ҏ౻ ५थ 1

  2. ࣗݾ঺հ ҏ౻ ५थ Ito Junki ID - GithubɿJunkin s -

    Twitterɿ@Junkins_110 Work at גࣜձࣾ Fusic ʢϑϡʔδοΫʣ ઌਐٕज़෦໳ IoTνʔϜ IoTΫϥ΢υΤϯδχΞ Skill PHPʗLaravelʗCakePHPʗRubyʗRoRʗAWSʗAzure ܦྺ - PHPͷΞϓϦέʔγϣϯΤϯδχΞ - AWS SA(ιϦϡʔγϣϯΞʔΩςΫτ ) - ࠷ۙ͸ɺIoTγεςϜ։ൃ - ޷͖ͳAWSͷαʔϏε͸VPCΤϯυϙΠϯτ 2
  3. ɹ໨࣍ 1. ൃදͷ໨త 2. ؍఺ 3. αϯϓϧҊ݅ 4. ઃܭϙΠϯτ 5.

    ·ͱΊ 3
  4. 01 ൃදͷ໨త

  5. ൃදͷ໨త 5 1. جװγεςϜͷઃܭͷ؍఺ɾΞΠσΟΞͷڞ༗ ࠓ·Ͱͷܦݧ ɹɾVDI ؀ڥ ɹɾωοτόϯΩϯά࿈ܞͷجװۀ຿γεςϜ ɹɾΤϯλʔϓϥΠζͷαʔϏε։ൃࢧԉ 2.

    AWSͷαʔϏεΛ׆༻ͨ͠جװγεςϜͷιϦϡʔγϣϯઃܭ ɹɾΫϥ΢υΛར༻͢Δͱগͳ͍࿑ྗͰ඼࣭ͷߴ͍Πϯϑϥ؀ڥͷߏங͕Մೳ ɹɾۙ೥ɺΤϯλʔϓϥΠζ(جװγεςϜ)޲͚αʔϏεɺػೳ͕ॆ࣮ 3. ιϦϡʔγϣϯઃܭɺαʔϏεબ୒͕είʔϓ ɹɾߏஙϑΣʔζͷ࿩ʹ͸৮Ε·ͤΜɻ
  6. جװγεςϜͱ͸ʁ 6 اۀͷجװͱͳΔۀ຿γεςϜ தখاۀɺݚڀॴ ηΩϡϦςΟɺγεςϜؒ࿈ܞɺ৴པੑɺ؂ࠪ

  7. 02 ؍఺

  8. AWS Well-Architected 8 AWS Well-Architected ɾΦϖϨʔγϣϯΤΫηϨϯτ ɾηΩϡϦςΟ ɾ৴པੑ ɾύϑΥʔϚϯεޮ཰ ɾίετ࠷దԽ

    AWS Cloud Adoption Framework τϨʔυΦϑʂ
  9. 03 αϯϓϧҊ݅

  10. Ҋ݅֓ཁ 10 8೥લ 2೥લ কདྷత 1 2 3 4 ᶃɿෳ਺ͷۀ຿γεςϜ(ΫϥΠΞϯτΞϓϦ)

    ᶄɿ࠷΋େ͖͍γεςϜΛWebԽ + AWSͰӡ༻ ᶅɿ࣍ͷγεςϜΛWebԽ + γεςϜؒ࿈ܞ(ҏ౻͕୲౰ͨ͠ϑΣʔζ) ᶆɿશͯͷۀ຿γεςϜΛWebԽ + ૬ޓ࿈ܞ(কདྷͷల๬)
  11. AWSߏ੒ਤ 11 Before

  12. AWSߏ੒ਤ 12 After

  13. 04 ઃܭͷϙΠϯτ

  14. ɹઃܭͷϙΠϯτ 1. σʔλϕʔεαʔό 2. ΞϓϦέʔγϣϯαʔό 3. ηΩϡϦςΟ 4. ϩά 5.

    BIπʔϧ 14
  15. 4-1 σʔλϕʔεαʔό

  16. 4-1.σʔλϕʔεαʔό 16 PostgreSQL on EC2 RDS PostgreSQL Instance ΦϖϨʔγϣϯΤΫηϨϯτ όοΫΞοϓɾϦετΞ

    อकൣғ ˚(IaaS) ̋(PaaS) ˚(AMI) ̋(εφοϓγϣοτ) ৴པੑ Մ༻ੑ ̋(MultiAZ) × ෛՙ෼ࢄ ̋(ϦʔυϨϓϦΧ) × ίετ࠷దԽ ̋ ˚ ύϑΥʔϚϯεޮ཰ ֦ுੑ ˚ ̋
  17. 4-1.σʔλϕʔεαʔό 17 PostgreSQL on EC2 RDS PostgreSQL Instance όοΫΞοϓɾϦετΞ อकൣғ

    ˚(IaaS) ̋(PaaS) ˚(AMI) ̋(εφοϓγϣοτ) ৴པੑ Մ༻ੑ ̋(MultiAZ) × ෛՙ෼ࢄ ̋(ϦʔυϨϓϦΧ) × ̋ ˚ ֦ுੑ ˚ ̋ Point!! ΦϖϨʔγϣϯΤΫηϨϯτ ύϑΥʔϚϯεޮ཰ ίετ࠷దԽ
  18. 4-1.σʔλϕʔεαʔό 18 PostgreSQL on EC2 RDS PostgreSQL Instance όοΫΞοϓɾϦετΞ อकൣғ

    ˚(IaaS) ̋(PaaS) ˚(AMI) ̋(εφοϓγϣοτ) ৴པੑ Մ༻ੑ ̋(MultiAZ) × ෛՙ෼ࢄ ̋(ϦʔυϨϓϦΧ) × ̋ ˚ ֦ுੑ ˚ ̋ ύϑΥʔϚϯεޮ཰ ΦϖϨʔγϣϯΤΫηϨϯτ ίετ࠷దԽ อकͷ༰қੑΛॏࢹͯ͠ɺRDSΛબ୒
  19. 4-1.σʔλϕʔεαʔό 19 PostgreSQL on EC2 RDS PostgreSQL Instance όοΫΞοϓɾϦετΞ อकൣғ

    ˚(IaaS) ̋(PaaS) ˚(AMI) ̋(εφοϓγϣοτ) ৴པੑ Մ༻ੑ ̋(MultiAZ) × ෛՙ෼ࢄ ̋(ϦʔυϨϓϦΧ) × ̋ ˚ ֦ுੑ ˚ ̋ ύϑΥʔϚϯεޮ཰ ΦϖϨʔγϣϯΤΫηϨϯτ ίετ࠷దԽ AWSͷϖʔεͰPostgreSQLͷόʔδϣϯΞοϓ͕ඞཁʂʂ
  20. 4-2 ΞϓϦέʔγϣϯαʔό

  21. 4-2. ΞϓϦέʔγϣϯαʔό 21 EC2 ECS EKS ΦϖϨʔγϣϯΤΫηϨϯτ ֤छ؀ڥͷߏங CI/CD ίετ࠷దԽ

    ̋ ̋ × ˚ ̋ ̋ ̋ ˚ ˚ ˚ ˚ ̋ ϝϯςφϯεੑ
  22. 4-2. ΞϓϦέʔγϣϯαʔό 22 EC2 ECS EKS ֤छ؀ڥͷߏங ϝϯςφϯεੑ CI/CD ̋

    ̋ × ̋ ̋ ̋ ˚ Point!! ΦϖϨʔγϣϯΤΫηϨϯτ ˚ ˚ ˚ ˚ ̋ ίετ࠷దԽ
  23. 4-2. ΞϓϦέʔγϣϯαʔό 23 EC2 ECS EKS ֤छ؀ڥͷߏங ϝϯςφϯεੑ CI/CD ̋

    ̋ × ̋ ̋ ̋ ˚ ΦϖϨʔγϣϯΤΫηϨϯτ ίετ࠷దԽ ˚ ˚ ˚ ˚ ̋ ෳ਺γεςϜͷ؀ڥߏஙͷ༰қ͞
  24. 4-2. ΞϓϦέʔγϣϯαʔό 24 EC2 ECS EKS ֤छ؀ڥͷߏங ϝϯςφϯεੑ CI/CD ̋

    ̋ × ̋ ̋ ̋ ˚ ΦϖϨʔγϣϯΤΫηϨϯτ ίετ࠷దԽ ˚ ˚ ˚ ˚ ̋ AWS Fargate (ίετ͕ڐ͢ͳΒ)
  25. 4-3 ηΩϡϦςΟ

  26. 4-3.ηΩϡϦςΟ 26 [ηΩϡϦςΟཁ݅] ɹސ٬ͷࣾ಺ωοτϫʔΫʹͭͳ͕͍ͬͯΔέʔε͕ଟ͍ [ҙ͍ࣝͯ͠ΔϙΠϯτ] ɾ௚઀IPΞυϨεΛ࿐ग़͠ͳ͍ ( NAT GatewayΛܦ༝ )

    ɾඞཁҎ্ʹΠϯλʔωοτʹ௨৴Λग़͞ͳ͍ ( VPCΤϯυϙΠϯτ ) ɹ→ API Gateway ɹ→ S3 ɾIPΞυϨεΛ࿐ग़ͤͣʹSSH௨৴ ( AWS System Manager ) ɹ→ Session Manager
  27. 4-3.ηΩϡϦςΟ 27 Cognito ೝূ ɾར༻ՄෆՄ ɾݖݶ ೝՄ ɾར༻ՄෆՄ ɾݖݶ ɾࣾһ؅ཧɾೝূ͸CognitoͰҰׅରԠ

    ɹ→ ݸผγεςϜͰೝূΛߦ͏ͱରԠͷ࿙ΕͷϦεΫ͕͋Δ ɹ→ ࠷ѱɺCognitoͰୀ৬ॲཧΛߦ͑͹ΞΫηε͞ΕΔ͜ͱ͸ͳ͍ ɹ→ ਓҝతͳΦϖϨʔγϣϯϛε΋ηΩϡϦςΟϦεΫ ɾγεςϜར༻ՄෆՄ/ݖݶ৘ใ͸γεςϜͰݸผ؅ཧ (ೝՄ)
  28. 4-4 ϩά

  29. 4-4.ϩά( ετϨʔδ + ෼ੳج൫ ) 29 S3 DynamoDB RDS ίετ࠷దԽ

    ̋ ˚ × ̋ ̋ ˚ ύϑΥʔϚϯεޮ཰ × ৴པੑ ˕ ̋ ˕ ̋ ̋ Athena ΦϖϨʔγϣϯΤΫηϨϯτ ετϨʔδ + ෼ੳج൫ݕ౼
  30. 4-4.ϩά( ετϨʔδ + ෼ੳج൫ ) 30 S3 DynamoDB RDS ̋

    ˚ × ̋ ̋ ˚ × ৴པੑ ˕ ̋ ˕ ̋ ̋ Athena ΦϖϨʔγϣϯΤΫηϨϯτ ύϑΥʔϚϯεޮ཰ ετϨʔδ + ෼ੳج൫ݕ౼ ίετ࠷దԽ
  31. 4-4.ϩά( ετϨʔδ + ෼ੳج൫ ) 31 ετϨʔδ + ෼ੳج൫ݕ౼ DynamoDB

    RDS ̋ ˚ × ̋ ̋ ˚ × ৴པੑ ˕ ̋ ˕ ̋ ̋ S3 Athena ΦϖϨʔγϣϯΤΫηϨϯτ ύϑΥʔϚϯεޮ཰ ίετ࠷దԽ ΞΫηεස౓Λߟྀͯ͠ίετΛॏࢹ
  32. 4-5 BIπʔϧ

  33. 4-5. BIπʔϧ 33 σʔλιʔεɿෳ਺ͷσʔλϕʔεɺAthena σʔλιʔε΁ͷෛՙɿϦʔυϨϓϦΧ͕ͳͯ͘΋ (SPICE) ෼ੳɿࢼߦࡨޡ͕ඞཁɿγεςϜͰ࡞ΓࠐΉ΂͖Ͱ͸ͳ͍ ։ൃ଎౓ɿૣ͍ QuickSite

  34. 05 ·ͱΊ

  35. 4. ·ͱΊ 35 [શମͱͯ͠] ɾ඼࣭ͷτϨʔυΦϑΛҙࣝ͢Δ(Ͳͷ඼࣭Λॏࢹ͢Δ͔Λ໌֬ʹ) [ϊ΢ϋ΢] ɾϓϥΠϕʔτωοτϫʔΫͱܨ͕͍ͬͯΔγεςϜͷηΩϡϦςΟ஫ҙ ɹɾύϒϦοΫαʔϏεΛར༻͢Δ৔߹͸ಛʹ஫ҙΛʂ ɾڞ௨ج൫ʹͳΓͦ͏ͳػೳ͸֎ͩ͠΋ΞϦ͔΋ [AWSαʔϏεͷϥΠϯφοϓͷ๛෋͞]

    ɾϥΠϯφοϓ͕๛෋ͳͨΊɺ༷ʑͳબ୒ࢶ͕ଘࡏ͢Δ ɾ࠷దͳαʔϏεɺιϦϡʔγϣϯΛબ୒͠Α͏
  36. ͝ਗ਼ௌ͍͖ͨͩ͋Γ͕ͱ͏͍͟͝·ͨ͠ Thank You We are Hiring ! https://recruit.fusic.co.jp/

  37. ເதͳϠπʂ͍͍ϠπʂϠό͍Ϡπʂ ืू͍ͯ͠·͢ʂ Thank You We are Hiring ! https://recruit.fusic.co.jp/

  38. Fusic Tech Blog We are Hiring ! https://recruit.fusic.co.jp/ AWSɺػցֶशɺAzur e

    PHPɺRuby