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

2019-04-25 CI/CD環境のデザインパターン/20190425-cicd-env-d...

opelab
April 25, 2019

2019-04-25 CI/CD環境のデザインパターン/20190425-cicd-env-design-pattern

JAWS-UGアーキテクチャ専門支部での議論資料です。

(運用設計ラボ合同会社 波田野裕一)

opelab

April 25, 2019
Tweet

More Decks by opelab

Other Decks in Technology

Transcript

  1. Operation Lab ӡ༻ઃܭϥϘ "84$*$%ؔ࿈αʔϏεͷਖ਼͍͠શମ૾ 7 CodePipeline CodeCommit ιʔείʔυ CodeBuild Ϗϧυςετ

    CodeDeploy σϓϩΠ ࣗ෼ୡͷ$*$%ύΠϓϥΠϯʹπʔϧΛ૊ΈࠐΉ ໨త खஈ ࣗ෼ͨͪͷύΠϓϥΠϯ
  2. Operation Lab ӡ༻ઃܭϥϘ $PEF$PNNJUͷ֓ཁ 13 CodeCommit ιʔείʔυ • (JU)VC૬౰ͷαʔϏε •

    *".ϢʔβຖʹΞΫηε੍ޚͰ͖Δɻ • JTTVF؅ཧ͸ແ͍ɻ "84ͷ$*$%ܥαʔϏεͰҰ൪͓खܰ
  3. Operation Lab ӡ༻ઃܭϥϘ $PEF#VJMEͷ֓ཁ 16 CodeBuild ιʔείʔυ Ϗϧυςετ ΞʔςΟϑΝΫτ ੒Ռ෺

    • ιʔείʔυʹಉࠝ͞ΕͨCVJMETQFDZNMʹैͬͯ Ϗϧυ΍ςετΛ࣮ߦ͢Δɻ • Ϗϧυͨ͠੒Ռ෺ ΞʔςΟϑΝΫτ ͕ग़ྗ͞ΕΔɻ ׂͱԿͰ΋Ͱ͖Δɻ ൿ఻ͷλϨԽ΋
  4. Operation Lab ӡ༻ઃܭϥϘ $PEF#VJMEͱ࿈ܞͰ͖ΔαʔϏε 17 CodeBuild ςετϏϧυ ΞʔςΟϑΝΫτ ੒Ռ෺ ιʔείʔυ

    • $PEF1JQFMJOF • 4 • $PEF$PNNJU • (JU)VC • #JU#VDLFU • (JU)VC&OUFSQSJTF • /0@4063$& • $PEF1JQFMJOF • 4 • /0@4063$& • CVJMETQFDZNMʹهड़ͨ͠৔ॴ • ྫ &$3 https://docs.aws.amazon.com/ja_jp/codebuild/latest/userguide/create-project.html ࣌఺
  5. Operation Lab ӡ༻ઃܭϥϘ $PEF%FQMPZͷ֓ཁ 19 CodeDeploy σϓϩΠ • ιʔείʔυʹಉࠝ͞ΕͨBQQTQFDZNMʹैͬͯσϓϩΠ͢Δɻ •

    4FSWFSEFQMPZΤʔδΣϯτͷೖ͍ͬͯΔ&$΍ΦϯϓϨʹσϓϩΠɻ • -BNCEBͱ&$4΁ͷσϓϩΠʹ΋ରԠɻ • #MVF(SFFOσϓϩΠʹରԠ ΦϯϓϨΛআ͘ ΞʔςΟϑΝΫτ ੒Ռ෺ • Server • Lambda • ECS ͦΕͧΕΞϓϦέʔγϣϯλΠϓ͕ҟͳΔͷͰɺޙ͔ΒมߋͰ͖ͳ͍ɻ
  6. Operation Lab ӡ༻ઃܭϥϘ $PEF%FQMPZͱ࿈ܞͰ͖ΔαʔϏε 20 CodeDeploy σϓϩΠ ΞʔςΟϑΝΫτ ੒Ռ෺ •

    Server • Lambda • ECS • 4 • 4FSWFS &$  • 4FSWFS ΦϯϓϨ  • -BNCEB • &$4 https://docs.aws.amazon.com/ja_jp/codedeploy/latest/userguide/applications-create.html ࣌఺ ΦϯϓϨҎ֎͸#MVF(SFFOՄೳ
  7. Operation Lab ӡ༻ઃܭϥϘ • खಈ • S3 • CodeDeploy •

    ECS • CloudFormation • ElasticBeanstalk • OpsWorks • ServiceCatalog • Alexa skiils kit • ֤छSaaS $PEF1JQFMJOFͱ࿈ܞͰ͖ΔαʔϏε 23 • CodeCommit • S3 • ECR • GitHub IUUQTEPDTBXTBNB[PODPNKB@KQDPEFQJQFMJOFMBUFTUVTFSHVJEFJOUFHSBUJPOTBDUJPOUZQFIUNMJOUFHSBUJPOTUFTU • CodeBuild • DeviceFirm • Jenkins • ֤छSaaS • CodeBuild • Jenkins • ֤छSaaS ঝೝ ιʔε Ϗϧυ ςετ ࣮ߦ CodePipeline σϓϩΠ • Lambda ࣌఺
  8. Operation Lab ӡ༻ઃܭϥϘ $*$%ͷσβΠϯϚοϓͰେࣄͳࣄ 26 ιʔείʔυ Ϗϧυςετ σϓϩΠ ࣗ෼ͨͪͷύΠϓϥΠϯͷߦઌ͸Ϣʔβ σϓϩΠઌ

    ੒Ռ෺ ੒Ռ෺ ੒Ռ෺ ੒Ռ෺ ఏڙऀ Ϣʔβ ΞʔςΟϑΝΫτ ;JQ தؒ੒Ռ෺ • $PEF$PNNJU • 4 • &$3 • (JU)VC • #JU#VDLFU • (JU)VC&OUFSQSJTF • /0@4063$& • $PEF%FQMPZ • TDQͳͲ • $BQJTUSBOPͳͲ • 4 • &$ • ΦϯϓϨ • &$4 #MVF(SFFO  • 'BSHBUF • -BNCEB • &MBTUJD#FBOTUBML • 0QT8PSLT • $MPVE'PSNBUJPO • 4FSWJDF$BUBMPH • "MFYBTLJJMTLJU • $PEF#VJME • +FOLJOT • ֤छ4BB4 πʔϧ͸ԿͰ΋ྑ͍͠ɺ࣌୅ͰมΘΔ
  9. Operation Lab ӡ༻ઃܭϥϘ $*$%ͷσβΠϯϚοϓͷ࿦఺ 28 ιʔείʔυ ςετ σϓϩΠ σϓϩΠઌ •

    ιʔείʔυ؅ཧ • ϦϦʔεઌ؀ڥ • EFWTUH • ϦϦʔεํ๏ • ΠϯϓϨʔε • #MVF(SFFO Ϗϧυ • ঝೝͷ༗ແ • ΞʔςΟϑΝ Ϋτͷܗࣜ • ;*1 • ίϯςφΠ ϝʔδ • ".* • ഑෍ܗଶ • ϓϧ • ϓογϡ • ՝୊؅ཧ • ΞΫηε੍ޚ • ϦϦʔεઌEFWTUH • ϒϥϯν • $* • ϦϦʔεઌQSE • Ϛελϒϥϯ ν • $% • &$ɻΦϯϓϨ • 4ɻ&$4 • 'BSHBUFɻ-BNCEB • $MPVE'PSNBUJPO • ϦϦʔεઌ؀ڥ • QSE
  10. Operation Lab ӡ༻ઃܭϥϘ $*$%ͷσβΠϯϚοϓͷ࿦఺ େاۀ 29 ιʔείʔυ ςετ σϓϩΠ σϓϩΠઌ

    • ιʔείʔυ؅ཧ • ϦϦʔεઌ؀ڥ • EFWTUH • ϦϦʔεํ๏ • ΠϯϓϨʔε • #MVF(SFFO Ϗϧυ • ঝೝͷ༗ແ • ΞʔςΟϑΝ Ϋτͷܗࣜ • ;*1 • ίϯςφΠ ϝʔδ • ".* • ഑෍ܗଶ • ϓϧ • ϓογϡ • ՝୊؅ཧ • ΞΫηε੍ޚ • ϦϦʔεઌEFWTUH • ϒϥϯν • $* • ϦϦʔεઌQSE • Ϛελϒϥϯ ν • $% • &$ɻΦϯϓϨ • 4ɻ&$4 • 'BSHBUFɻ-BNCEB • $MPVE'PSNBUJPO • ϦϦʔεઌ؀ڥ • QSE ӡ༻ ։ൃ
  11. Operation Lab ӡ༻ઃܭϥϘ $PEF$PNNJU $PEF1JQFMJOF 4 31 ιʔείʔυ ςετϏϧυ σϓϩΠ

    σϓϩΠઌ ੒Ռ෺ ੒Ռ෺ ఏڙऀ Ϣʔβ ΞʔςΟϑΝΫτ ;JQ தؒ੒Ռ෺ 4 4 Tutorial: Create a Pipeline That Uses Amazon S3 as a Deployment Provider IUUQTEPDTBXTBNB[PODPNKB@KQDPEFQJQFMJOFMBUFTUVTFSHVJEFUVUPSJBMTTEFQMPZIUNM ୯७ͳ্ॻ͖ͳͷͰɺҠಈ΍࡟আʹ͸௥ਵͰ͖ͳ͍ɻ WebSite Hosting 4 CodePipeline
  12. Operation Lab ӡ༻ઃܭϥϘ $PEF$PNNJU $PEF1JQFMJOF 4 32 ιʔείʔυ ςετ σϓϩΠ

    σϓϩΠઌ • ϦϦʔεઌ؀ڥ • EFWTUHQSE • ϦϦʔεํ๏ • ΠϯϓϨʔε • #MVF(SFFO Ϗϧυ • Ϧιʔε؅ཧ • ࣗલ • Ϛωʔδυ ௿  • Ϛωʔδυ த • ঝೝͷ༗ແ • ΞʔςΟϑΝ Ϋτͷܗࣜ • ;*1 • ίϯςφΠ ϝʔδ • ".* • ഑෍ܗଶ • ϓϧ • ϓογϡ • ιʔείʔυ؅ཧ • ՝୊؅ཧ • ΞΫηε੍ޚ 4 4 4 CodePipeline ੒Ռ෺ ੒Ռ෺ தؒ੒Ռ෺
  13. Operation Lab ӡ༻ઃܭϥϘ Πϯελϯεܕͷ$*$% $PEF%FQMPZ 34 ιʔείʔυ؅ཧ • ϦϦʔεઌ؀ڥ •

    EFWTUH • ϦϦʔεํ๏ • ΠϯϓϨʔε • #MVF(SFFO • εςʔτϑϧ 4PSSZϝϯςܕ • ঝೝͷ༗ແ • ΞʔςΟϑΝ Ϋτͷܗࣜ • ;*1 • ίϯςφΠ ϝʔδ • ".* • ഑෍ܗଶ • ϓϧ • ϓογϡ • ՝୊؅ཧ • ΞΫηε੍ޚ • ϦϦʔεઌEFWTUH • ϒϥϯν • $* • ϦϦʔεઌQSE • Ϛελϒϥϯ ν • $% • &$ɻΦϯϓϨ • 4ɻ&$4 • 'BSHBUFɻ-BNCEB • $MPVE'PSNBUJPO • ϦϦʔεઌ؀ڥ • QSE