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

スペックを上げてクラウドで殴るCI / pixiv TECH SALON #pixivTECHSALON

2b680c5f22146e764e2998dd4595ec93?s=47 sue445
March 05, 2019

スペックを上げてクラウドで殴るCI / pixiv TECH SALON #pixivTECHSALON

pixiv TECH SALON ( https://techsalon.pixiv.co.jp/ )の発表資料です。

2b680c5f22146e764e2998dd4595ec93?s=128

sue445

March 05, 2019
Tweet

Transcript

  1. εϖοΫΛ্͛ͯ Ϋϥ΢υͰԥΔCI  pixiv.inc sue445

  2. • HN: sue445 • ށ੶ωʔϜ: Go Sueyoshi • 2018೥7݄ɹϐΫγϒೖࣾ ‣

    ࠓճͷొஃऀͷதͰ͸ൺֱత৽ࢀऀ • Πϯϑϥ෦ • ϑϧελοΫΩϡΞΤϯδχΞ ‣ ϓϦΩϡΞͷΧόϨοδ100%ܧଓத go versionʢࣗݾ঺հʣ
  3. • SUE ≒ SRE • SREʹࣅͯΔ࢓ࣄΛ΍ͬͯΔ go versionʢࣗݾ঺հʣ

  4. https://rubykaigi.org/2019/speakers ʲએ఻ʳRubyKaigi 2019ొஃ༧ఆ

  5. ๻ͷϐΫγϒͰͷϛογϣϯ

  6. ʮશͯͷख࡞ۀΛࣗಈԽ͢Δʯ ๻ͷϐΫγϒͰͷϛογϣϯ

  7. • ػցʹ೚ͤΒΕΔ͜ͱ͸ػցʹશ෦೚ͤͯɺਓ͔ؒ͠Ͱ͖ͳ͍͜ͱΛਓ͕ؒ ΍Δ΂͖ • ݱঢ়͸·ͩ΄Ͳԕ͍ͷͰ·ͣ͸CIͰձࣾΛϋοΫ͍ͯ͠Δ • ʮಇ͔ͳ͍ͨΊʹશྗͰಇ͍͍ͯΔʯʢʁʣ ʮશͯͷख࡞ۀΛࣗಈԽ͢Δʯ

  8. • ϐΫγϒͷCIࣄ৘ͱݱঢ়ͷCIͷ໰୊఺ • Ͳ͏΍ͬͯվળ͔ͨ͠ • ϐΫγϒͳΒͰ͸ͷ޻෉఺΍ۤ࿑఺ ࠓ೔࿩͢͜ͱ

  9. • CI͸ϨϕϧʢεϖοΫʣΛ্͛ͯ෺ཧʢΫϥ΢υʣͰԥΔͷ͕େਖ਼ٛ • SaaS΋͍͍͚ͲࣗલͰ΍Δͷ΋ӡ༻ܦݧ஋͕ஷ·ΔͷͰ͓͢͢Ί ‣ ͨͩ͠ສਓʹ͓͢͢Ί͸͠ͳ͍ ࠷ॳʹ·ͱΊ

  10. • େલఏ ‣ ྺ࢙తܦҢʹΑΓGitHub.comͱGitLabʢΦϯϓϨʣ͕྆ํ࢖ΘΕ͍ͯΔ ϐΫγϒͷCIࣄ৘

  11. • GitHub.com ‣ Railsܥ͸GitHubΛ࢖͍ͬͯΔ܏޲ ‣ ྫʣBOOTH, pixivFACTORY, pixiv PAY, pixivίϛοΫ

    ‣ CI: ͍͍ͩͨશ෦CircleCIΛ࢖ͬͯΔ ϐΫγϒͷCIࣄ৘
  12. • GitLabʢΦϯϓϨʣ ‣ pixivຊମʢ͍ΘΏΔΈΜͳ͕Α͘஌ͬͯΔpixivʣɺpixivຊମͱີ݁߹͍ͯ͠Δपลαʔ ϏεɺVRoid Studio ‣ CI: GitLab CI,

    Jenkins ‣ ࠓ೔͸GitLab CIͷ࿩͕ϝΠϯͰ͢ ϐΫγϒͷCIࣄ৘
  13. • ͦͷଞʢϦϙδτϦඇґଘʣ ‣ iOS/AndroidΞϓϦͷCIʹBitriseΛར༻ ‣ ৄ͍͜͠ͱɿϞόΠϧΞϓϦͷCIΛBitriseʹͯ͠1೥͕ܦͪ·ͨ͠ - pixiv inside -

    https://inside.pixiv.blog/kwzr/6190ɹ ϐΫγϒͷCIࣄ৘
  14. • VRoid StudioʢUnityʣͰϏϧυͷ͕͔͔͍࣌ؒͬͯͨ ‣ Ϗϧυ1ճ100෼ʢʂʣ ‣ ϋΠεϖοΫͳGitLab Runner͕΄͍͠ͱ͍͏ཁ๬ ‣ ͔ͤͬ͘ͳͷͰVRoid

    Studioઐ༻Ͱͳ͘ɺࣾ಺GitLabͷશମͰ࢖͑ΔRunnerʹͨ͠ ‣ CIͷվળ݁ՌɺΈΜͳͷੜ࢈ੑ͸όΫ্͕Γʹͳͬͯ޾ͤʹͳͬͯ·͢ CIͷ໰୊఺
  15. • Before ‣ MacMini ‣ ௚ྻͰ100෼ ܶతϏϑΥʔΞϑλʔ

  16. • Before ‣ MacMini ‣ ௚ྻͰ100෼ • After ‣ EC2

    c5.2xlargeΠϯελϯεʢvCPU 8, ϝϞϦ16GiBʣ ‣ 3ฒྻͰ25෼ ܶతϏϑΥʔΞϑλʔ
  17. • લ൒Ͱ5෼ɺޙ൒Ͱ֤20෼લޙ • 100෼ -> 25෼ͳͷͰ4ഒͷੜ࢈ੑ ܶతϏϑΥʔΞϑλʔ

  18. Ͱ΋͓ߴ͍ΜͰ͠ΐ͏ʁ

  19. AWSඅ༻͸݄300υϧ͘Β͍ Ͱ΋͓ߴ͍ΜͰ͠ΐ͏ʁ

  20. ࢀߟɿ1݄෼ͷඅ༻

  21. ࢀߟɿ1݄෼ͷඅ༻

  22. • https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/ ‣ AWSͷεϙοτΠϯελϯεͱdocker machineΛར༻ͨ͠ΦʔτεέʔϧRunnerΛߏங͢ ΔͨΊͷެࣜυΩϡϝϯτ • https://www.m3tech.blog/entry/advent-calendar-2018-2 ‣ M3͞ΜͷςοΫϒϩάɻ೔ຊޠͷઆ໌͕ΉͬͪΌৄ͍͠

    ‣ ʮGitLab Runner AWS spot instanceʯͰάάΕ͹͍͘ΒͰ΋ࢿྉ͸ग़ͯ͘Δ ৄ͍͜͠ͱ
  23. • άάΕ͹෼͔Δ͜ͱʹ͍ͭͯ࿩ͯ͠΋͠ΐ͏͕ͳ͍ͷͰɺϐΫγϒͳΒͰ͸ ͷ޻෉఺ɺۤ࿑఺ɺӡ༻஌ݟͳͲΛόόʔϯͱ঺հ͠·͢ʂ ϐΫγϒGitLabͱAWS Runner

  24. • ͜Εݟͯ΋෼͔Βͳ͍ͱࢥ͏ͷͰ͔͍ͭ·ΜͰઆ໌ AWSͷGitLab Runnerͷશମ૾

  25. • εϙοτΠϯελϯε • Docker Machine • Ansible • Terraform •

    Packer • Serverless Framework ओͳొ৔ਓ෺
  26. • ҆͘࢖͑ΔEC2ͷ༨৒Πϯελϯε ‣ ੑೳ͸ΦϯσϚϯυΠϯελϯεʢεϙοτΠϯελϯε͡Όͳ͍ී௨ͷ΍ͭʣͱશ͘ ಉ͡ͰɺՁ֨͸࠷େ9ׂҾ ‣ ྫʣc5.2xlargeͩͱΦϯσϚϯυ͕0.428USD/࣌ؒɺεϙοτ͕0.0779USD/࣌ؒલޙ • εϙοτΠϯελϯεͷՁ֨͸มಈ͢ΔͷͰɺࣄલʹઃఆͨ͠ೖࡳՁ֨Λ௒ ͑Δͱ࡞Εͳ͍

    ‣ ଟগՁ্͕͕֨ͬͯ΋ೖࡳΤϥʔʹͳΒͳ͍Α͏ͳֹۚͰೖࡳ͢Δͷ͕͓͢͢Ί εϙοτΠϯελϯε
  27. • ΞΧ΢ϯτ͝ͱʹ࡞੒Ͱ͖ΔεϙοτΠϯελϯεͷ্ݶ͕ܾ·ͬͯΔʢσϑΥϧ τ20ʣ • εϙοτΠϯελϯεΛ࡟আͨ͠Β·ͨ࡞੒Ͱ͖Δ͸ͣͳͷ͕ͩɺͨ·ʹ࡟আࡁͷ Πϯελϯε͕࡞੒্ݶΛѹഭ͢Δ͜ͱ͕͋Δ ‣ ๻͸Α͘ʮεϙοτΠϯελϯεͷΰϛʯͱݴͬͯΔ • ϝΠϯͰ࢖͏ΠϯελϯελΠϓ͸Ұ౓ʹཱͯΔΠϯελϯε਺ΑΓ΋ଟΊʹ্ݶ

    ؇࿨ਃ੥Λͨ͠ํ͕͍͍ɻʢϐΫγϒͩͱ10ฒྻʹରͯ͠100ݸͰ্ݶ؇࿨ʣ εϙοτΠϯελϯεʢ஫ҙ఺ʣ
  28. • ϦϞʔταʔό্ʹdockerίϯςφΛߏங͢Δ࢓૊Έ • DockerίϚϯυͷ࣮ߦݩͱίϯςφͷ࡞੒ઌ͕ผ • http://docs.docker.jp/machine/overview.html Docker Machine

  29. • ௨ৗDockerͱ͍͏ͱͬͪ͜Λࢦ͢৔߹͕ଟ͍ʢDockerίϚϯυͷ࣮ߦݩͱί ϯςφͷ࡞੒ઌ͕ಉ͡ʣ ‣ http://docs.docker.jp/machine/overview.html ൺֱ༻ɿDocker Engine

  30. GitLab Runner + Docker Machine GitLab Runner Docker Machine ΦϯϓϨ؀ڥ

    ec2 ec2 ec2
  31. • ͜ͷߏ੒ͷϝϦοτ ‣ Docker EngineʢαʔόͷϩʔΧϧʹίϯςφΛཱͯΔʣͱҧͬͯɺॏ͍δϣϒ͕1ͭ͋ͬ ͨ࣌ʹଞͷδϣϒʹӨڹ͕ແ͍ ‣ ϋΠεϖοΫͳϚγϯΛδϣϒ1ͭͰઐ༗Ͱ͖Δ ‣ Runner͕Α͠ͳʹΦʔτεέʔϧͯ͘͠ΕΔͷͰɺδϣϒ͕ੵ·Εͳ͚Ε͹EC2͸উखʹ

    ফ͍͑ͯ͘ GitLab Runner + Docker Machine
  32. • αʔόͷϓϩϏδϣχϯάπʔϧ • طଘͷRunnerʢDocker Engineར༻ʣͷplaybook͕͋ͬͨͷͰɺ৽͘͠Φʔτ εέʔϧRunner༻ͷઃఆΛ࡞ͬͨ Ansible

  33. • AWSͳͲͷΫϥ΢υͷߏ੒؅ཧπʔϧ • VPC, S3, IAMͳͲͷϓϩϏδϣχϯάͰར༻ • GitLabͷMergeRequestͰterraform planʢdry runʣΛ͠ɺmasterʹϚʔδ͞Ε

    ͨΒapplyʢຊ࣮ߦʣ͢Δͱ͍͏ΠϯϑϥCIͰར༻͍ͯ͠Δ Terraform
  34. • αʔόͷΠϝʔδʢAWSͳΒAMIʣΛ࡞ΔͨΊͷπʔϧ • ༧ΊϐΫγϒGitLab༻ͷઃఆΛೖΕͯAMIΛ࡞੒͠ʢޙड़ʣɺͦΕΛRunner Ͱ࢖͍ͬͯΔ Packer

  35. • ϩʔΧϧ։ൃ༻ʹVagrantಋೖ • Vagrant΍Packer಺ͰͷϓϩϏδϣχϯάʹ͸ mitamaeΛ࢖͍ɺϓϩϏδϣχϯάͨ͠಺༰Λ ServerspecͰςετΛ͍ͯ͠Δ • ΋ͪΖΜGitLab CIͰCI/CD͍ͯ͠Δ •

    ৄ͍͜͠ͱ͸શ෦ https://sue445.booth.pm/items/ 1033989 ʹॻ͍ͯΔʢεςϚʣ ‣ CircleCIΛGitLab CIʹม͑ͨҎ֎͸αϯϓϧϦϙδτϦ Λ΄΅ؙύΫϦͰ͖ͯΉͬͪΌศརͩͬͨ Packer + Vagrant + mitamae + Serverspec
  36. • ʢAWS͚ͩʹݶͬͯݴ͑͹ʣLambdaͱͦͷपลϦιʔεΛ͍͍ײ͡ʹ؅ཧ ͯ͠σϓϩΠ͢ΔͨΊͷπʔϧ • TerraformͰLambdaΛ؅ཧ͢Δͷ͸৭ʑͱେมͳͷͰɺͦ͜Λϥοϓͯ͘͠ Ε͍ͯΔͷ͕خ͍͠ • ࠓճɺAWSͷϞχλϦϯάΛLambda + RubyͰ࡞ͬͯɺServerless

    Framework Ͱ؅ཧͯ͠Δ Serverless Framework
  37. • ىಈͯ͠ΔΠϯελϯε਺ͱGitLab CIͷδϣϒ਺ΛLambdaͰूܭͯ͠ CloudWatchͰ͍͍ײ͡ʹՄࢹԽͯ͠ ͍Δ • ͦͷ͏ͪιʔεΛެ։͍͕ͨ͠ RubyKaigiͷ४උ͕͕͕͕͕ Lambda +

    Ruby + Serverless FrameworkͰ࡞ͬͨ؂ࢹπʔϧ
  38. • AWS͔ΒGitLabʹ௚઀ΞΫηεͰ͖ΔΑ͏ʹͨ͠ • CIͷδϣϒؒͰେ༰ྔϑΝΠϧΛड͚౉ͤΔΑ͏ʹͨ͠ • Runnerͷىಈ࣌ؒνϡʔχϯά • εϙοτΠϯελϯεރׇରࡦ ϐΫγϒͳΒͰ͸ͷ޻෉఺ͳͲ

  39. • લఏ ‣ ϐΫγϒGitLab͸ssh༻ͷURL͸ࣾ಺DNSͰ͔͠ղܾͰ͖ͳ͍ͷͰɺAWS͔ΒͩͱΞΫηε Ͱ͖ͳ͍ - Ծʹ໊લղܾͰ͖ͯ΋ࣾ֎͔ΒͷΞΫηεΛड͚ΔGatewayαʔόʹผͷೝূ͕ڬ·ͬͯΔͷͰ ΞΫηεͰ͖ͳ͍ ‣ httpͷURL΋ࣾ֎͔ΒͩͱGoogleͷOAuthೝূ͕ڬ·ΔͷͰAWS͔ΒGitLabͷAPI͕ୟ͚ͳ

    ͍ AWS͔ΒGitLabʹ௚઀઀ଓͰ͖ΔΑ͏ʹͨ͠
  40. • RunnerͰ࢖͏AMIʹ༧Ί /etc/hosts Λম͍͓͖ͯɺࣾ಺DNSͷ໊લղܾ͕Ͱ ͖ΔΑ͏ʹͨ͠ • ͜͜ͰPackerΛར༻ ղܾࡦ1: ໊લղܾࡁͷ /etc/hostsΛম͘

  41. • GatewayαʔόͷiptablesͰAWS͔Βͷ௨৴ΛڐՄ͢ΔΑ͏ʹͨ͠ • ͦͷ··΍ΔͱEC2Πϯελϯεͷ࡞Γ௚͠ͷ౓ʹૹ৴ݩͷIPΞυϨε͕ม ΘͬͯGatewayαʔόͰڐՄ͠Α͏͕ͳ͍ͷͰɺNAT GatewayΛ࢖ͬͯAWSͷ VPC͔ΒGatewayαʔό΁ग़Δ࣌ʹૹ৴ݩͷIPΞυϨεΛݻఆԽͨ͠ • NAT Gatewayʹ෇༩ͨ͠Elastic

    IPΛGatewayαʔόͰڐՄ͍ͯ͠Δ ղܾࡦ2: ΦϯϓϨͷຯํNAT Gateway
  42. • ಛఆͷIPΞυϨε(ࠓճͷ৔߹Gateway)΁ͷ௨৴Λશ෦NAT GatewayΛ௨͢͜ ͱʹΑΓɺૹ৴ݩͷIPΞυϨεΛݻఆԽ͍ͯ͠Δ "[ NAT GatewayͷΠϝʔδ Subnet GitLab ΦϯϓϨ؀ڥ

    AmazonVPC ec2
  43. • ಛఆͷIPΞυϨε(ࠓճͷ৔߹Gateway)΁ͷ௨৴Λશ෦NAT GatewayΛ௨͢͜ ͱʹΑΓɺૹ৴ݩͷIPΞυϨεΛݻఆԽ͍ͯ͠Δ "[ NAT GatewayͷΠϝʔδ Subnet Subnet NAT

    Gateway GitLab ΦϯϓϨ؀ڥ Gateway ec2 *1ΞυϨεΛݻఆ AmazonVPC
  44. • NAT GatewayͷElastic IPΛGatewayͷnginxͰڐՄͯ͠΍Δ͜ͱʹΑΓɺ GoogleͷOAuthೝূΛճආ͢ΔΑ͏ʹͨ͠ ղܾࡦ3: httpܦ༝ͷΞΫηε΋NAT GatewayΛ௨͢

  45. CIͷδϣϒؒͰେ༰ྔϑΝΠϧΛड͚౉ͤΔΑ͏ʹͨ͠ • ܦҢ ‣ VRoid StudioνʔϜͷਓʮδϣϒ͕ऴΘͬͯGitLabʹArtifactsΛΞοϓϩʔυ͠Α͏ͱ͢ΔͱΤ ϥʔʹͳΔʯ ‣ sue445ʮGitLabͷϩάݟͨΒ413Τϥʔ(Request Entity

    Too Large)ग़ͯ·͢ͶɻnginxͷΞοϓ ϩʔυ੍ݶʹҾ͔͔ͬͬͯΔΑ͏ͳͷͰGitLabଆͷΞοϓϩʔυαΠζ؇Ί·͕͢zipʹݻΊ ͨ࣌ͷϑΝΠϧαΠζͲΕ͘Β͍͋Γ·͢ʁʯ
  46. CIͷδϣϒؒͰେ༰ྔϑΝΠϧΛड͚౉ͤΔΑ͏ʹͨ͠ VRoid StudioνʔϜͷਓ ʮ4GB΄͍͠Ͱ͢ʯʢݪจϚϚʣ sue445ʮʯ

  47. • ͖ͬ͞ͷGatewayαʔό͸ࣾ಺։ൃશൠͰ࢖͍ͬͯΔͷͰɺGatewayͷଳҬ ͕٧·Δͱࣾ಺ͷ։ൃ͕શ෦ࢮ͵ • RailsΞϓϦͰ4GBͷϑΝΠϧͷΞοϓϩʔυͱ͔͢Δͱunicorn͕ṫࢮʹͳΔ ະདྷ͔͠ݟ͑ͳ͍ ‣ ஫ʣGitLab͸RailsΞϓϦ • AWS͔Β֎ʢΦϯϓϨͷGitLabʣʹग़͍ͯ࣌͘ͷ௨৴අ͕͔͔Δ

    ཁ໿͢Δͱී௨ͷWebΞϓϦʹڊେϑΝΠϧΛup͢Δͷ͸ਏ͍
  48. • ΞϓϦ͔ΒಛผͳઃఆΛͤͣʹS3ʹΞΫηεͰ͖ΔΑ͏ʹͨ͠ • ΍Γํ ‣ ಛఆͷS3όέοτͷΈʹΞΫηεͰ͖ΔIAMϩʔϧΛ࡞੒ ‣ Docker Machine͕EC2ΠϯελϯεΛىಈ͢Δ࣌ͷΠϯελϯεϓϩϑΝΠϧʹ͜ͷIAM ϩʔϧΛઃఆ

    ‣ ͜͏͢Δ͜ͱͰRunnerଆ͸awscli͚ͩ༻ҙ͍ͯ͠Ε͹όέοτʹಡΈॻ͖Ͱ͖ΔɻʢΞϓ ϦଆͰΞΫηεΩʔͳͲͷઃఆෆཁʣ • ಉҰϦʔδϣϯ಺ͩͱEC2ͱS3ͰϑΝΠϧ΍ΓऔΓ͢Δ࣌ͷ௨৴අ͕͔͔Βͳ͍ͷ ΋خ͍͠ ղܾࡦ: S3ʹΞοϓϩʔυ͢ΔʢԦಓʣ
  49. • લఏ ‣ GitLab Runnerʹ͸OffPeakͱ͍͏ઃఆ͕͋ͬͯɺʮۀ຿࣌ؒ಺͸ৗʹEC2ΠϯελϯεΛ1 ୆଴ػ͢Δ͕ɺۀ຿࣌ؒ֎΍౔೔͸଴ػͤ͞ͳ͍͜ͱͰίετΛԼ͛Δʯͱ͍͏͜ͱ͕ Մೳ ‣ https://docs.gitlab.com/runner/configuration/autoscale.html ‣

    https://docs.gitlab.com/runner/configuration/advanced-configuration.html Runnerͷىಈ࣌ؒνϡʔχϯά
  50. • લఏ ‣ ϐΫγϒGitLabͷ৔߹ԼهͷΑ͏ͳઃఆ ‣ ฏ೔10:00ʙ18:59͸εϙοτΠϯελϯεΛ࠷௿1୆଴ػͯ͠ɺδϣϒ͕ੵ·ΕͨΒଈϏ ϧυ։࢝Ͱ͖ΔΑ͏ʹͯ͠Δ ‣ ۀ຿࣌ؒ֎΍౔೔ɾਖ਼݄ɾGW͸εϙοτΠϯελϯεΛ଴ػͤͣ͞ɺδϣϒ͕ੵ·Εͨ ࣌఺ͰΠϯελϯεΛىಈ

    Runnerͷىಈ࣌ؒνϡʔχϯά
  51. • ໰୊఺ ‣ δϣϒ͕ੵ·Ε͔ͯΒ࣮ࡍʹϏϧυ͕࢝·Δ·Ͱ࠷େ4෼൒͘Β͍͔͔ͬͯͨͷͰؤுͬ ͯνϡʔχϯά͔ͨͬͨ͠ ‣ ۀ຿࣌ؒ಺ͩͱEC2͕1୆Ҏ্଴ػͯ͠ΔͷͰؾʹͳΒͳ͍͚Ͳఆ࣌ա͗ͯpushͨ࣌͠ʹ Runnerͷ࣮ߦ·Ͱ͕͔͔࣌ؒΔ ‣ ىಈ͕஗͍ΑΓ଎͍ํ͕͍͍

    ‣ ଎͞͸ਖ਼ٛɺ࣌͸ۚͳΓ Runnerͷىಈ࣌ؒνϡʔχϯά
  52. • Docker Machine͸ϦϞʔτʹdocker͕Πϯετʔϧ͞Ε͍ͯͳ͍࣌ͷΈ dockerΠϯετʔϧͯͨ͠ͷͰɺdocker͕ΠϯετʔϧࡁͳΒ͜ͷॲཧΛε ΩοϓͰ͖Δͱ౿Μͩ ‣ https://github.com/docker/machine/blob/v0.16.0/libmachine/provision/utils.go#L30 ‣ Docker MachineͰىಈ͢ΔAMIʹdockerΛΠϯετʔϧ͓͚ͯͩ͘͠Ͱ4෼൒͔Β4෼ʹ୹

    ॖͰ͖ͨ ղܾࡦ: AMIʹ༧ΊdockerΛೖΕ͓ͯ͘
  53. • ݸਓతʹ͸΋͏ͪΐͬͱ୹ॖ͔͕ͨͬͨ͠ɺ͜ΕҎ্΍Ζ͏ͱ͢Δͱ Docker MachineຊମΛ͍͡Δඞཁ͕͋ͬͨͷͰஅ೦ • Machine࡞੒࣌ͷϩάΛશ෦ಡΜ͚ͩͲͲΕ͔1ͭͷॲཧ͕஗͍ͱ͍͏ΑΓ ΋ɺࡉ͔͍ॲཧ͕ͨ͘͞Μ͋ͬͯνϦπϞͰ4෼͔͔ͬͯΔͱ͍͏ҹ৅ͩͬ ͨ ղܾࡦ: AMIʹ༧ΊdockerΛೖΕ͓ͯ͘

  54. • લఏ ‣ εϙοτΠϯελϯε͸AWS্ͷ༨৒ΠϯελϯεΛ҆͘࢖͑Δ࢓૊ΈͳͷͰɺAWSશମ ͷεϙοτΠϯελϯεͷࡏݿ͕ͳ͚Ε͹ىಈͰ͖ͳ͍ ‣ ͔͠͠εϙοτΠϯελϯε͕ރׇͨ࣌͠ʹࣾ಺ͷ։ൃ͕׬શʹࢭ·Δͷ͸͖͍ͭ εϙοτΠϯελϯεރׇରࡦ

  55. • εϙοτΠϯελϯε͕ރׇͨ࣌͠ʹผͷΠϯελϯελΠϓ΍AZͰࢼ͢ ͳͲͷεϙοτΠϯελϯεΨνϟΛ΍ΔΑΓ͸ɺͬ͞͞ͱΦϯσϚϯυʹ શৼΓͨ͠ํ͕ૣ͘෮چͰ͖Δͱ͍͏൑அ • ࠓ·Ͱͷܦݧ্ɺͲ͔ͬ1ϲॴͰεϙοτΠϯελϯε͕ރׇͯ͠Δͱͦͷ पล΋͍͍ͩͨރׇͯ͠Δҹ৅ ղܾࡦ: ΦϯσϚϯυΠϯελϯεΛ࢖͏RunnerΛ࡞ͬͨ

  56. • ΦϯσϚϯυΠϯελϯεΛ࢖͏Runner͸ϗοτελϯόΠʢRunnerͱͯ͠ ͸ಈ͍ͯΔ͕؅ཧը໘্Ͱ͸ແޮͳͷͰδϣϒׂ͕ΓৼΒΕͳ͍ʣͰ༻ҙ͠ ͓͍ͯͯɺGitLabͷ؅ཧը໘্Ͱ༗ޮԽͨ࣌͠ͷΈ࢖ΘΕΔΑ͏ʹͯ͠Δ ղܾࡦ: ΦϯσϚϯυΠϯελϯεΛ࢖͏RunnerΛ࡞ͬͨ

  57. • εϙοτΠϯελϯεΛ׆༻͢Δ͜ͱͰϋΠεϖοΫͳCI؀ڥΛ௿Ձ֨Ͱӡ ༻Մೳ • CIʹݶΒͣ͜Ε͔Β΋શྗͰࣗಈԽ΍͍͖ͬͯ·͢ ·ͱΊ