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

AWSで秋のデプロイ祭! CodeDeploy JAWS-UG KOBE

A47976008466e012dc67e7cdd0e1316f?s=47 NExT-Season
October 19, 2016

AWSで秋のデプロイ祭! CodeDeploy JAWS-UG KOBE

GitHubからAWS CodeDeployへデプロイ設定の概要&簡単なハンズオンまとめです。
IAM周りは的時細かく設定してください。

A47976008466e012dc67e7cdd0e1316f?s=128

NExT-Season

October 19, 2016
Tweet

Transcript

  1. 10/19Wed at "84ͰळͷσϓϩΠࡇ Γ ʂ

  2. Who am I

  3. Atsushi Ando
 ͋ΜͲ͏͋ͭ͠ DTP/web Design Engineer ArtDirector twitter : @Next_Season

    github : @AtsushiA web : next-season.net I love 
  4. Community
 &etc…
 .0%9ͷ೔
 8PSE#FODI,PCF
 +"846(,PCF DPODSFUFΤόϯδΣϦετ

  5. 1SFWJPVTPDDVQBUJPO Guitar Craft Man

  6. Rent Works Keynote MODX Concrete5 WordPress AWS Photography PhotoShop Illustrator

    Not a programmer
  7. $PEF%FQMPZ

  8. (JU)VCʹϓογϡͨ͠Β
 &$ΠϯελϯεʹσϓϩΠ
 Ͱ͖ͨศརͪΌ͏ʂʁ
 ͬͯࣄͰϋϚͬͨ࿩

  9. None
  10. https://deploybot.com/

  11. ͔ͤͬ͘"84ͩ͠ɾɾɾ

  12. ൓өͤ͞ΔιʔεʹΑͬͯ͸
 8FCαʔόͱ͔࠶ىಈ͍ͨ͠ ࣌΋͋Δ͔΋ʂʁ

  13. $PEF%FQMPZ

  14. 0VUMJOF

  15. ඞཁͳ΋ͷ w &$ʹ"HFOUͷΠϯετʔϧ3PMFઃఆ w "QQMJDBUJPO4QFDJpDBUJPO'JMF "QQ4QFDpMF 
 :".-ϑΥʔϚοτͷϑΝΠϧ w લॲཧɾޙॲཧͳͲͷγΣϧεΫϦϓτ

    w $PEF%FQMPZͷઃఆ w (JU)VC͔ΒͷΞΫηε༻*".Ϣʔβ࡞੒ w (JU)VCʹXFCϑοΫͷ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FSWJDFIIWNTUBSU TVEPTCJOTFSWJDFOHJOYTUBSU TVEPTCJOTFSWJDFNPOJUTUBSU

  26. FY'JMFT ᵓᴷᴷBQQTQFDZNM ᵋᴷᴷTDSJQUT ᵓᴷᴷ"QQMJDBUJPO4UBSUTI ᵋᴷᴷ"QQMJDBUJPO4UPQTI ᵋᴷᴷ"QQT appspec.yml͸ϧʔτσΟϨΫτϦʹઃஔɹ

  27. FYQFSNJTTJPOT FYDFQU
 আ֎͢ΔϑΝΠϧɺϑΥϧμͷύλʔϯΛࢦఆ PXOFSɿ
 ϑΝΠϧɾσΟϨΫτϦͷॴ༗ऀΛࢦఆ HSPVQɿ
 ϑΝΠϧɾσΟϨΫτϦͷॴ༗άϧʔϓΛࢦఆ NPEFɿ ϑΝΠϧɾσΟϨΫτϦͷύʔϛογϣϯͷϞʔυΛ੔਺஋Ͱࢦఆ http://docs.aws.amazon.com/codedeploy/latest/userguide/app-spec-ref-structure.html

  28. ඞཁͳ΋ͷ w &$ʹ"HFOUͷΠϯετʔϧ3PMFઃఆ w "QQMJDBUJPO4QFDJpDBUJPO'JMF "QQ4QFDpMF 
 :".-ϑΥʔϚοτͷϑΝΠϧ w લॲཧɾޙॲཧͳͲͷγΣϧεΫϦϓτ

    w $PEF%FQMPZͷઃఆ w (JU)VC͔ΒͷΞΫηε༻*".Ϣʔβ࡞੒ w (JU)VCʹXFCϑοΫͷઃఆ
  29. $PEF%FQMPZઃఆ

  30. $PEF%FQMPZઃఆ

  31. $PEF%FQMPZઃఆ "QQMJDBUJPOT

  32. $PEF%FQMPZઃఆ "QQMJDBUJPOT

  33. $PEF%FQMPZઃఆ "QQMJDBUJPOT ΞϓϦέʔγϣϯͷσϓϩΠ଎౓ͱɺσϓϩΠͷ੒ޭ৚݅·ͨ͸ࣦഊ৚݅Λࢦఆ $PEF%FQMPZ%FGBVMU0OF"U5JNF ճʹݸͷΠϯελϯεʹσϓϩΠ͠·͢ɻΠϯελϯε͕͢΂ͯ੒ޭͨ͠৔߹͕੒ޭͰ͢ɻ
 ࠷ॳʹࣦഊͨ࣌͠఺ͰࣦഊͰ͢ɻσϓϩΠશମͰ͸ࣦഊͨ͠৔߹Ͱ΋ɺҰ෦ͷΠϯελϯεͷσϓϩ Π͸੒ޭ͠·͢ɻ $PEF%FQMPZ%FGBVMU"MM"U0ODF ճʹ࠷େͰ͢΂ͯͷΠϯελϯεʹσϓϩΠ͠·͢ɻগͳ͘ͱ΋ݸͷΠϯελϯε͕੒ޭͨ͠৔߹ ͕੒ޭͰ͢ɻ


    ͢΂ͯͷΠϯελϯε͕ࣦഊͨ͠ΒࣦഊͰ͢ɻ
 $PEF%FQMPZ%FGBVMU"MM"U0ODF ճʹ࠷େͰ൒෼ͷΠϯελϯεʹσϓϩΠ͠·͢ɻগͳ͘ͱ΋൒෼ͷΠϯελϯε͕੒ޭͨ͠৔߹͕ ੒ޭͰ͢ɻ
  34. $PEF%FQMPZઃఆ %FQMPZNFOUT

  35. $PEF%FQMPZઃఆ %FQMPZNFOUT

  36. $PEF%FQMPZઃఆ %FQMPZNFOUT

  37. ඞཁͳ΋ͷ w &$ʹ"HFOUͷΠϯετʔϧ3PMFઃఆ w "QQMJDBUJPO4QFDJpDBUJPO'JMF "QQ4QFDpMF 
 :".-ϑΥʔϚοτͷϑΝΠϧ w લॲཧɾޙॲཧͳͲͷγΣϧεΫϦϓτ

    w $PEF%FQMPZͷઃఆ w (JU)VC͔ΒͷΞΫηε༻*".Ϣʔβ࡞੒ w (JU)VCʹXFCϑοΫͷઃఆ
  38. (JU)VC͔ΒͷΞΫηε༻*".Ϣʔβ࡞੒ \ 7FSTJPO  4UBUFNFOU< \ &⒎FDU"MMPX  "DUJPODPEFEFQMPZ(FU%FQMPZNFOU$POpH 

    3FTPVSDFBSOBXTDPEFEFQMPZVTFBTU"$$06/5*%EFQMPZNFOUDPOpH  ^  \ &⒎FDU"MMPX  "DUJPODPEFEFQMPZ3FHJTUFS"QQMJDBUJPO3FWJTJPO  3FTPVSDFBSOBXTDPEFEFQMPZVTFBTU"$$06/5*%BQQMJDBUJPO%FNP"QQMJDBUJPO ^  \ &⒎FDU"MMPX  "DUJPODPEFEFQMPZ(FU"QQMJDBUJPO3FWJTJPO  3FTPVSDFBSOBXTDPEFEFQMPZVTFBTU"$$06/5*%BQQMJDBUJPO%FNP"QQMJDBUJPO ^  \ &⒎FDU"MMPX  "DUJPODPEFEFQMPZ$SFBUF%FQMPZNFOU  3FTPVSDFBSOBXTDPEFEFQMPZVTFBTU"$$06/5*%EFQMPZNFOUHSPVQ%FNP"QQMJDBUJPO%FNP'MFFU ^ > ^ https://aws.amazon.com/jp/blogs/devops/automatically-deploy-from-github-using-aws-codedeploy/
  39. ඞཁͳ΋ͷ w &$ʹ"HFOUͷΠϯετʔϧ3PMFઃఆ w "QQMJDBUJPO4QFDJpDBUJPO'JMF "QQ4QFDpMF 
 :".-ϑΥʔϚοτͷϑΝΠϧ w લॲཧɾޙॲཧͳͲͷγΣϧεΫϦϓτ

    w $PEF%FQMPZͷઃఆ w (JU)VC͔ΒͷΞΫηε༻*".Ϣʔβ࡞੒ w (JU)VCʹXFCϑοΫͷઃఆ
  40. (JU)VCʹXFCϑοΫͷઃఆ https://aws.amazon.com/jp/blogs/devops/automatically-deploy-from-github-using-aws-codedeploy/

  41. (JU)VCʹXFCϑοΫͷઃఆ

  42. (JU)VCʹXFCϑοΫͷઃఆ

  43. (JU)VC1FSTPOBMBDDFTTUPLFOT

  44. (JU)VC1FSTPOBMBDDFTTUPLFOT

  45. (JU)VC1FSTPOBMBDDFTTUPLFOT Ͱ͖ͨτʔΫϯΛίϐʔ͓ͯ͘͠

  46. (JU)VCʹXFCϑοΫͷઃఆ

  47. (JU)VCʹXFCϑοΫͷઃఆ

  48. (JU)VCʹXFCϑοΫͷઃఆ

  49. ϋϚͬͨͱ͜Ζ σϓϩΠεΫϦϓτΛมߋͯ͠
 (JUDPNNJU1VTIͯ͠΋
 ৽͍͠εΫϦϓτ͕ಈ͔ͳ͍ 55

  50. )PPLT "QQMJDBUJPO4UPQ

  51. લճͷ࢒֚ΛΫϦΞ CJOCBTI SN3GPQUDPEFEFQMPZBHFOUEFQMPZNFOUSPPU  SN3GUNQDPEFEFQMPZ ཚ๫ͳײ͡ͳͷͰϔϧϓҒ͍ਓʂ

  52. Thank youɹ: )