確ãã«ããã¹ãŠã®éèŠãªããŒã¿ã®åé·æ§ãšèªåfeyloverãåãããç°ãªãããŒã¿ã»ã³ã¿ãŒã®è€æ°ã®ãµãŒããŒã®ãã§ã€ã«ã»ãŒãã¯ã©ã¹ã¿ãŒãæ¢ã«æ§æããŠããå Žåã§ããå®çšŒåãµã€ãã®ãããã°ãããäœæ¥ãæ·±å»ã«äžæãããå¯èœæ§ããããŸãã ããã®ä»£ããã«ã©ããããã®é »åºŠã§èŠãŸãããïŒ
ããã«ãããŸãïŒ
ãããŠããã®æçš¿ã«ã€ããŠ-éçºã®å®å šæ§ãšå®å®æ§ãããã³ããããæäŸã§ããã·ã¹ãã ãšååã«ã€ããŠã ãŸãã¯ãæµè¡èªã䜿çšããã«ã¯-DevOpsãšCI / CDã«ã€ããŠã
ãªãã§ïŒ
åºæ¬ã¹ããŒã ã§ã¯ããµã€ãèªäœããã®ããŒã¹ãããã³ãã£ãã·ã³ã°ãæ€çŽ¢ãªã©ã®ä»ã®ãã¹ãŠã®é¢é£ãµãŒãã¹ãã¹ãã³ããŠãããµãŒããŒã1ã€ãããªãå Žåãã»ãšãã©ãã¹ãŠãæåã§å®è¡ã§ããŸã-ãªããžããªããã³ãŒãã®æŽæ°ãååŸãããµãŒãã¹ãåèµ·åããŸããæ€çŽ¢ããŒã¹ãšãã®ä»ãã¹ãŠã®ã€ã³ããã¯ã¹ãåäœæããŸãã
ãããããããžã§ã¯ãã倧ãããªã£ããã©ãããŸããïŒ çžŠãšæšªã®äž¡æ¹ã Webãåãã10å°ã®ãµãŒããŒãããŒã¹ãåãã3å°ã®ãµãŒããŒãããã³æ€çŽ¢çšã®è€æ°ã®ãµãŒããŒãæ¢ã«ããå Žåã ãŸãã顧客ãã©ã®ããã«ãµãŒãã¹ã䜿çšããŠããããæ£ç¢ºã«ææ¡ããããŒã¿ããŒã¹ãããã³ããšã³ããããã³å®æçãªã¿ã¹ã¯ã§åå¥ã®åæãååŸããããšã決å®ããŸããã ãããŠä»ãç§ãã¡ã¯1ã€ã®ãµãŒããŒã§ã¯ãªããäŸãã°30ãæã£ãŠããŸãã æã§ãã¹ãŠã®ããããªããšããç¶ããŸããïŒ ç®¡çè ã®ã¹ã¿ãããå¢ããå¿ èŠããããŸãããªããªã ãã§ã«ç©ççã«ãµããŒããããŠãããã¹ãŠã®ã·ã¹ãã ã«ååãªæéãšæ³šæããããŸããã
ãŸãã¯ã管çè ã¯ã©ããã¯ãŒã¯ã·ã§ããã§ããããšããããŠãçç£ãã§ãŒã³ã®æ§ç¯ãéå§ããããšãã§ããŸãã 次ã®æœè±¡åã¬ãã«ã«é²ã¿ãåã ã®ãµãŒãã¹ãããã°ã©ã ã§ã¯ãªãããµãŒããŒå šäœãã·ã¹ãã å šäœã®æå°åäœãšããŠç®¡çããŸãã
DevOpsãšCI / CDã®æ¹æ³è«ãçºæãããã®ã¯ãã®ããã§ãã CI / CDã¯ãéçºçšã®å¥åã®ãã©ãããã©ãŒã ãå¥åã®ã¹ããŒãžã³ã°ãããã³å¥åã®è²©å£²ã®ååšãæå³ããŸãã
ãŸããåãªãªãŒã¹ã¯æåãŸãã¯èªåãã¹ãã§ãããã©ããã«ããããããç¹å®ã®ã©ã€ãã¹ããŒãžãçµãªããã°ãªããªãããšãæå³ããŸãã ããã«ãããå±éèªäœã§äœããããŸããããªãå¯èœæ§ãæé€ãããŸããééã£ããã©ã³ããééã£ãã«ããééã£ããµãŒããŒãªã©ãåŒãåºããŸããããã¹ãŠãäºåã«äºæž¬ããã³æ§é åããã人çèŠå ã®åœ±é¿ã¯æå°éã§ãã ã³ãŒãèªäœã®å質ãšãããžã§ã¯ãã®å éšããžãã¯ã®åäœãç£èŠããã ãã§ãã
ããã«ããã管çè ã¯éçºããã³èšç®ããã»ã¹ã«äžåå¹²æžãããå°æ¥ã®ã¢ãŒããã¯ãã£ã®æ¡åŒµæ¹æ³ã«ã€ããŠç£èŠããã³æèããåœé¢ã®è²¬ä»»ãåŒãåããããšãã§ããŸãã
éåžžããã®ãããªããšã¯çè«çã«ã¯ãã£ãšèšãããŸãã ããã§ã圌ãã¯èšããDockerã®ãããªãã®ãããã ããã§ã¯ãã³ã³ãããå®äŸ¡ã«äœæã§ããŸãã äžèŠãªã¬ã€ã€ãŒããµãŒãã¹ãèªã¿èŸŒãŸãã«ã芪ã·ã¹ãã ã®éèŠãªéšåã«è§Šããããšãªãããã¹ãŠãç°¡åã«äœæãæŽæ°ãããŒã«ããã¯ã§ããŸãã ãããŠãå¥ã®èšäºã§-ãããKubernetesããããŸãã 圌ã¯ãæåã§ä»å ¥ããããšãªããèªåã§ãããžã§ã¯ãã«ããã«ãŒããªãã¯ãæ¿å ¥ããã³åŒãåºããæ§æã®ä»çµã¿ã説æããã ãã§ãã å ¬åŒããã¥ã¡ã³ãã®3è¡ã§ãã ãããŠããã®ã¹ã¿ã€ã«ã§ã¯ãã»ãŒãã¹ãŠã®ææã ã¡ã«ããã¯ã«å®å šã§å®å®ããéçºãæäŸãããšããæ¬åœã®ã¿ã¹ã¯ããå§ããŠããããå®éã®ç掻ã®äžã§ã©ã®ããã«èµ·ãããã«ã€ããŠã話ããããšæããŸãã
誰ã«ã€ããŠïŒ
Facebook Messengerã®ãããã䜿çšããŠè±èªãåŠç¿ããã®ã«åœ¹ç«ã€EdwinãµãŒãã¹ã®äŸã«ã€ããŠèª¬æããŸãã @EnglishWithEdwinãããã¯ãè±èªã®ã¬ãã«ã決å®ããåçåŸã®é²æ©ãšé床ã«åºã¥ããŠã«ãªãã¥ã©ã ãããŒãœãã©ã€ãºããŸãã
ãã®ç¬éãŸã§ã«ãå瀟ã¯æ°ãæééçºãç¶ããŠããŸããããæ¥éã«éçºãããŠããå®çšçãªè£œåããããæåã®å ¬éãªãªãŒã¹ã®æºåãããŠããŸããã éçºãµã€ãã§ã¯ãDockerã³ã³ããã®ãµãŒãã¹ãæ¢ã«éå§ãããŠãããAWSã®ããŒã¿ããŒã¹ãäœæãããããããã¹ãŠãæ©èœããŠããŸããã
Edwinã®éçºãããŒãžã£ãŒã§ããSergey Vasilievã¯ãåžå Žã«ããæ¢åã®ãªãã¡ãŒãæ éã«åæãã補åã®ã¢ãŒããã¯ãã£ãšéçšäžã®ä¿¡é Œæ§ã®èŠä»¶ã«ã€ããŠèª¬æããŸããã 24æéäœå¶ã®ãµãŒãã¹ãµããŒãã«å ããŠãã¹ããŒãžã³ã°ãµã€ããšéçšãµã€ãã詳现ã«èª¿æ»ããå¿«é©ãªæŽæ°ãšäžè¬çãªã€ã³ãã©ã¹ãã©ã¯ãã£ç®¡çãå¯èœã«ããå¿ èŠããããŸããã
åœæã®å®çšŒåç°å¢ã§ã®ã³ã³ããã®äœ¿çšã¯å€§èŠæš¡ã§ã¯ãªãããã£ãããããã®éçºãå§ãŸã£ãã°ããã§ããã ãããã£ãŠãç§ãã¡ã«ãšã£ãŠã¯ãæ¬ç©ã®èå³æ·±ã補åãäŸã«çŸä»£ã®ããŒã«ãå®è·µãã絶奜ã®æ©äŒã§ããã
ãããžã§ã¯ãæ§é
Edwinã¯ã©ã®ããã«å éšæ§é åãããŠããŸããïŒ ããŒã¯ãŒã-PythonãPostgreSQLãNeo4jãRabbitMQã åŸæ¥ãã¢ãŒããã¯ãã£ã¯ããã©ã³ã¹ããŒããè«çãåæã®3ã€ã®å€§ããªãããã¯ã«åå²ã§ããŸãã
æåã®ãããã¯-pythonã§èšè¿°ããããããã³ã°ãããã¡ãŒãªã³ã°ãªã¹ãã¢ããªã±ãŒã·ã§ã³ã¯ãFacebook Gatewayãä»ããŠãœãŒã·ã£ã«ãããã¯ãŒã¯ããã¡ãã»ãŒãžãåä¿¡ããããŒã¿ããŒã¹ã«ä¿åããŠãRabbitMQãã¥ãŒã«ã€ãã³ããè¿œå ããŸãã
2çªç®ã®ãããã¯ã«ã¯ããããèªäœã®ã³ã³ãããããããã¥ãŒãã3çªç®ã®ãããã¯ã§ãã¥ãŒããããŒã¿ãèªã¿åãã3çªç®ã®ãããã¯ã§åæçšã®ããŒã¿ãåéããŸãããŸããã¹ã±ãžã¥ãŒã©-ããã·ã¥éç¥ãã»ãã·ã§ã³ã®æå¹æéã
3çªç®ã®ãããã¯-åæçšã®ããŒã¿ãå«ãããŒã¿ããŒã¹ãšããããããããŒã¿ãéçŽããGoogleã¢ããªãã£ã¯ã¹ãä»ã®å Žæã«ã¢ããããŒããããµãŒãã¹ãåããããã€ãã®ã³ã³ããã
ããããããã¯æ³å®ãããæ§é ã«ãããŸããããªããªãã Edwinã¯ç§ãã¡ã®ãšããã«æ¥ãŠããŸã ãããžã§ã¯ãã®ãªãªãŒã¹ããŒãžã§ã³ãæã£ãŠããªãã®ã§ã圌ã¯æ¬çªã§èŒããŠããŸããã§ããã ã¹ããŒãž/補åç°å¢ã®ã»ããã¢ãããå¿ èŠã§ããã
äžè¬çã«ãããã¯1ã€ã§ã¯ãªããŠãããã»ã©é£ããã¯ãããŸããã§ãã-å°å ¥ã®è©³çŽ°ã¯ãã¹ãŠè°è«ãããŸããããæéã¯å®¹èµŠãªãè¿ã¥ããŠããããã¹ãŠã®é¡ããå®çŸããã®ã«1é±éããæ®ã£ãŠããŸããã§ããã
CI / CDã»ããã¢ãã
æåã«å¿ã«çããŠããã¹ãããšã¯ããã¹ãŠãé ãããèŠããã»ã©è€éã§ã¯ãªããšããããšã§ãã äž»ãªããšã¯ãããªããããŠããããšãšãã®çç±ãç解ããããšã§ãã æ¬åœã«éèŠãªããŒãºã«ã®ã¿ããŒã«ãéžæããå®éã®ããŒãºãšæ©äŒãé©åã«è©äŸ¡ããŸãã
ã·ã¹ãã å šäœã®åºç€ã¯ããµãŒãã¹ãšããžãã¹ããžãã¯ãåããããã«ãŒã³ã³ããã§ãã ã€ã³ãã©ã¹ãã©ã¯ãã£ç®¡çã®æ±çšæ§ãšã¢ããªãã£ãé«ããããã«éžæãããã³ã³ããã çŸåšãDockerã³ã³ããããžã£ã°ãªã³ã°ããããã®æã人æ°ã®ããããŒã«ã¯ãGoogleã®Kubernetesã§ãïŒå°ãªããšãæãåºãç¥ãããŠããŸãïŒã ããããç§ãã¡ã«ã¯ããŸãã«ãæ··ä¹±ããæ§é çã«è€éã§ããããã«æããããããäœæ¥èœåãç¶æããããã«ããŸãã«ãå€ãã®äœã®åããå¿ èŠã«ãªããŸããïŒãããŠæåã®ç解ã«ã¯æéãããããããŸããïŒã ãããŠä»¥æ¥ CI / CDã·ã¹ãã å šäœã®éçšæéãæå°éã«æãããããããã·ã³ãã«ã§è»œéãªãœãªã¥ãŒã·ã§ã³ãæ¢ãããšã«ããŸããã
ã³ã³ãããã³ãã¬ãŒããä¿åããããã«ãAmazon EC2 Container RegistryãååŸããããšã決å®ãããŸããïŒå®éããããååŸããã®ã§ã¯ãªããéçºè ãéžæããŠããã ãã§ãïŒã äžè¬ã«ãããŒã«ã«ãã¹ãã§å人çã«äœæãããã¬ãžã¹ããªãšå€§å·®ã¯ãããŸããã åºæ¬çã«ãããŒã«ã«ãã¹ãã§å人çã«æã¡äžããå¿ èŠããªããšããäºå®ã
ãã®ãããã³ã³ãããã³ãã¬ãŒããå«ããªããžããªããããŸãã å±éãããã³ã³ãããåžžã«çžäºã«èªèãããããã¯ãŒã¯æ§æãå€æŽãããå Žåã§ãçžäºã«éä¿¡ã§ããããã«ããã«ã¯ã©ãããã°ããã§ããïŒ åæã«ãã³ã³ããèªäœãšãã®æ§æã®å éšã«çµ¶ããå¹²æžããããšãªãïŒ
ããã«ã¯ããµãŒãã¹çºèŠãªã©ã®çš®é¡ã®ãœãããŠã§ã¢ããããŸã-ãããããç解ã容æã«ããããã«ããããžãã¹ããžãã¯ã«ãŒã¿ãŒããšåŒã¶ããšãã§ããŸãããæè¡çã«ã¯ããã¯å®å šã«æ£ããå®çŸ©ã§ã¯ãããŸããã åäžã®èŠæ±é ä¿¡ã»ã³ã¿ãŒã確ç«ããããã¹ãŠã®ãµãŒãã¹ãè¿é£ã®å Žæã®ããŒã¿ã«é©çšãããŸãããã®ã»ã³ã¿ãŒã®ãšãŒãžã§ã³ãã¯æåã«ã³ã³ããå ã«é 眮ãããŸãã ãããŠãèµ·åæã®ãã¹ãŠã®ãµãŒãã¹ã¯ãå Žæãšç¶æ ãã«ãŒã¿ãŒã«éç¥ããŸãã
ã³ã³ããçšã®æ°ãããã·ã³ããã°ããæºåããæ¹æ³ã¯ïŒ çµå±ã®ãšããããã¹ãããããã¯ãŒã¯è² è·ãªã©ã®ããã«æ£ããæ§æããå¿ èŠããããŸããããã©ã«ãã®ã«ãŒãã«ãã©ã¡ãŒã¿ããå®çšŒåç°å¢ã§èŠãããã®ããããªãé¢ããŠããããšããããããŸãã ãã®ããã«ãæ°ãããµã€ãã®æºåã«ãããæéãå€§å¹ ã«ççž®ããããã€ãã®Ansibleã¬ã·ããäœæãããŸããã
ãµãŒããŒãã³ã³ããçšã«æ§æãããšãå¿ èŠãªãã¹ãŠã®ãµãŒãã¹ããããã³ã°ãããŸããå®éã«ã¯ã30åããšã«500åã®ãã¿ã³ãæŒããã«ãç¶ç¶ççµ±åããæŽçããæ¹æ³ãç解ããã ãã§ãã ãã®çµæãGoCDãå°ããªã¹ã¯ãªãããã€ã³ãã£ã³ã°ãªã©ã®ã·ã¹ãã ã«èœã¡çããŸããã ãªãGoCDãªã®ããJenkinsã§ã¯ãªãç§ã«å°ããã®ã§ããïŒ ä»¥åãä»ã®ãããžã§ã¯ãã§ã¯ãäžæ¹ãšä»æ¹ã«å¯ŸåŠããå¿ èŠããããçžäºäœçšã®åèšã¯ãJenkinsãããGoCDã®æ¹ãç°¡åã«æ§æã§ãããã§ããã ã¿ã¹ã¯ãšãã€ãã©ã€ã³ã®ãã³ãã¬ãŒããäœæããããã«åºã¥ããŠãããŸããŸãªç°å¢ã«åãããŠããŸããŸãªæ¬çªãã§ãŒã³ãçæã§ããŸãã
éçºããã»ã¹
2æ6æ¥æææ¥
äžè¬çã«ãæåã®æ¥ã¯ç©ããã§ããã ãã£ãšç§ãã¡ããããªããã°ãªããªãããšã®TKãæã«å ¥ããŸããã
ããã§ã¯ããã¡ãããã¡ããã©1é±éã¯ãŸã å°ãã®ããªãã¯ã§ãããšããäºçŽããã䟡å€ããããŸãã çµå±ã®ãšãããç§ãã¡ãååšããã®ã¯ç空ã§ã¯ãããŸããïŒ ç®¡çè ã¯ãã©ã®ãããªçš®é¡ã®ãããžã§ã¯ãããµããŒããããããã«ãªãã®ããããããäžè¬çã«ã©ã®ã¿ã¹ã¯ãã¿ã¹ã¯ã«ãªãã®ããäºåã«èªèããŠããŸããã ãã®ãããããŒã«ãéžæããå¯èœæ§ã«ã€ããŠå°ãæŽçããæéããããŸããã
ãã®çµæããã®æç¹ã§ãããžã§ã¯ããéçºãããŠããæ¢åã®ãµãŒããŒãéãã«æž¬å®ããŸããã ç£èŠãéèŠããäœãå®è¡ãããŠããããã©ã®ããã«åäœããããææ¡ããŸãã
åä¿¡ããæ å ±ã«åºã¥ããŠãAnsibleã¬ã·ããäœæããæ¬çªçšã«ãµãŒããŒã®ã€ã³ã¹ããŒã«ãéå§ããŸããéçºäžã®äžæ³šæãªã¢ã¯ã·ã§ã³ãåé¿ããããã«ãæ¢åã®éçºç°å¢ãšäº€å·®ããªãAmazonã«å¥ã®VPCãã»ããã¢ããããŸãã å¿ èŠãªãã¹ãŠã®ãµãŒãã¹ïŒPostgreSQLãNeo4jããããžã§ã¯ãã³ãŒãïŒãå«ãã³ã³ããããããã€ããŸãã
ãšããã§ãååã¯éçºäžã«Amazon RDSã®åœ¢ã§PostgreSQLã䜿çšããŠããŸããããæ¬çªç°å¢ã§ã¯ãå ±ååæã«ãããPostgreSQLã䜿çšããŠéåžžã®ã€ã³ã¹ã¿ã³ã¹ã«åãæ¿ããããšã決å®ããŸãã-ããã«ãããã·ã¹ãã ã®ãã¹ãŠã®èŠçŽ ã®åäœãå¯èœãªéã管çã§ãã管çè ã«ãšã£ãŠç¶æ³ãããéæã«ãªããŸããè² è·ã®ãã®åŸã®æé·ã®æéã
å®éãã»ãšãã©åŽåããããã«ãããžã§ã¯ããè¡ã£ãŠãããå°ä»»ã®ç®¡çæéããªãå Žåã¯ãRDSã䜿çšã§ããŸããRDSã¯éåžžã«é©ããŠããŸããåæã«ãããç·æ¥ã®ã¿ã¹ã¯ã®ããã«ãªãœãŒã¹ã解æŸã§ããŸãã
2æ7æ¥ç«ææ¥
å¥ã®ãµãŒããŒã«ãåºæ¬ããŒãžã§ã³ã®GoCDãããã€ã¡ã³ãããã«ãšConsulãµãŒãã¹æ€åºãã€ã³ã¹ããŒã«ããŸãã
åè¿°ããããã«ããšããŠã£ã³ã¯éçºã®ããã®ããçšåºŠã®æºåãæŽã£ãã€ã³ãã©ã¹ãã©ã¯ãã£ãæã«å ¥ããŸããã ã³ã³ããããžã£ã°ãªã³ã°ããããã«ã圌ãã¯Amazon ECSãå¥åEC2 Container Serviceã䜿çšããŸããã Kubernetes-as-a-Serviceã®ãããªãã®ã ãããžã§ã¯ãã®å°æ¥ã®æ§é ã«ã€ããŠéçºè ã®åžæã話ãåããèšç®ãè¡ã£ãåŸãECSãæŸæ£ããããšã決å®ãããŸããã å€ãã®ã¯ã©ãŠãã®ããã«ãå éšã§äœãèµ·ãã£ãŠããããå¶åŸ¡ããã®ã«ååã«éæã§ã¯ãªãããšãå€æããŸãããåãã³ã³ããã«èšå®ãããç°å¢ãã©ã¡ãŒã¿ãŒãªã©ãçŸåšã®ç¶æ³ã§ã¯éåžžã«æçšãªãã®ã¯ãããŸããã§ãã ããªãã¡ ç°ãªããã€ãã©ã€ã³ã§åãã³ã³ããã䜿çšããæ¹æ³ã¯ãªããåã«ç°å¢ãåå®çŸ©ããã ãã§ãã Amazonãã©ãã€ã ã§ã¯ãç°å¢ããšã«åå¥ã®ã³ã³ãããŒãäœæããå¿ èŠããããŸãã
ãŸããäœããã®çç±ã§ãç°ãªããã§ãŒã³ã§åãã¿ã¹ã¯ã䜿çšããããšã¯äžå¯èœã§ãã äžè¬çã«ãGoCDã¯ã¯ããã«æè»æ§ããããŸããã
æ®ãã®æéã¯ãGoCDã®è²©å£²ç°å¢ã®ãã€ãã©ã€ã³ãäœæããã³èšå®ããŸããã³ãŒãã®æ§ç¯ãã³ã³ãããŒã®åäœæãæ°ããã³ã³ãããŒã®è£œåãžã®å±éãæŽæ°ããããµãŒãã¹ã®é äºãžã®ç»é²ã
2æ8æ¥æ°Žææ¥
æšæ¥ã®èšå®ãå確èªãããã¹ãèšç®ãå®è¡ããã·ã¹ãã æ¥ç¶ã確èªããŸããã³ãŒãããªããžããªããæ£ããååŸãããããšãåãã³ãŒããã³ã³ããã«æ£ããåéãããããšãã³ã³ãããæ£ãããµãŒããŒã§èµ·åãããããšããããŠé äºã«ãã®ã¹ããŒã¿ã¹ãéç¥ããŸãã
äžè¬çã«ãçŸæç¹ã§ã¯ã確ç«ãããåºæ¬ã€ã³ãã©ã¹ãã©ã¯ãã£ããã§ã«æºåããŠããããã®äžã§æ¢ã«æ°ãããã©ãã€ã ã«åãçµãããšãã§ããŸãã GoCDå±éããã«ããããæ¬çªç°å¢ã§ãããžã§ã¯ããçµã¿ç«ãŠãŠã¬ã€ã¢ãŠãããããã®ã¡ã«ããºã ããããŸããConsulã䜿çšãããšãæ¢åã®ã€ã³ãã©ã¹ãã©ã¯ãã£ã«æ°ãããµãŒããŒããµãŒãã¹ãè¿œå æéãšäººä»¶è²»ãè¿œå ããããšãªãææ©çã«ã§ããŸãã
ãã¹ãŠãæ£åžžã«æ©èœããããšã確èªããåŸãé£æ¥ããã¢ãã€ã©ããªãã£ãŒãŸãŒã³ã®ããŒã¿ããŒã¹ã®ããã¯ã¢ããã¬ããªã±ãŒã·ã§ã³ãéçºè ãšãšãã«èšå®ããäœæ¥ããŒã¿ãæ¬çªããŒã¿ããŒã¹ã«ã¢ããããŒãããŸãã
2æ9æ¥æšææ¥
å ã»ã©èšã£ãããã«ããã®æç¹ã§ãäžè¬ã«ãCI / CDã·ã¹ãã ã®å¿ èŠæå°éã®èŠçŽ ã¯ãã¹ãŠã€ã³ã¹ããŒã«ãããæ§æãããŠããŸãã çµæã®ã·ã¹ãã ã®æ§é ã«é¢ãããã¹ãŠã®ããŒã¿ãéçºè ã«æž¡ããŸã;圌ãã®éšåã§ã¯ããããžã§ã¯ãã®ãã¹ãŠã®ã¢ã»ã³ããªããã³èšç®ã¡ã«ããºã ã®ãã¹ããéå§ããŸãã
ãšããã§ãToRãã³ã³ãã€ã«ãããšãã«ããã¹ãŠã®ã³ã³ãããšãµãŒãã¹ããã®ãã¹ãŠã®ã·ã¹ãã ãã°ã®éäžåéãªã©ã®éèŠãªãã€ã³ããå¿ããŠããããšãããããŸãã ããã¯ããããžã§ã¯ãã®å šäœçãªç¶æ³ã®ããã¯ã°ã©ãŠã³ãåæããæœåšçãªããã«ããã¯ãå·®ãè¿«ã£ãåé¡ã®è¿œè·¡ã«åœ¹ç«ã¡ãŸãã
ãã°ã¯ãããããçš®é¡ã®åæã«éåžžã«äŸ¿å©ãªã€ã³ã¿ãŒãã§ã€ã¹ã§ããKibanaã§åéããããšã«ããŸããã ãµãŒãããŒãã£ã®ãããžã§ã¯ãã§ç¹°ãè¿ãééãã瀟å ãããžã§ã¯ãã§äœ¿çšããŸããã
æ°æéã§KibanaãäžãããµãŒãã¹ããã®ãã°ã®åéãæ§æãã補åäžã®ãã¹ãŠã®éèŠãªãµãŒãã¹ã®ç£èŠãæ§æããŸãã
2æ10æ¥éææ¥
ã»ãšãã©ã®å Žåããã¹ãŠãçµç¹åŽããéææ¥ã«æºåãã§ããŠããŸããã åœç¶ãªãããããŸããŸãªå°ããªãã°ãã°ãªããã«ééããŸããããç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ã®ã·ã¹ãã ãšã¯é¢ä¿ããããŸããã§ããã
çµæ
ãã®çµæãäœãåŸãããŸãããïŒ 3ã€ã®ã¹ããŒãžãšç°å¢ïŒdevãstageãprodïŒã§æ§æãããã¢ãžã¥ãŒã«åŒãããžã§ã¯ãéçºã·ã¹ãã ã ãããžã§ã¯ãå šäœãåå¥ã®ãã€ã¯ããµãŒãã¹ã«åå²ãããããããã«ç¬èªã®ãã€ãã©ã€ã³ããããŸãã
éçºè ãæ°ããããŒãžã§ã³ããªãªãŒã¹ãããšãGoCDããã«ã«ç§»åãã察å¿ãããã€ãã©ã€ã³ãèµ·åããã ãã§ãã ããšãã°ããã¹ããŒãžã§æ°ãããã¬ãŒãããŒã«ãããããã§ãã¹ããããã¹ãŠãæ£åžžã«æ©èœããããšã確èªããŠããã補åã«ããŒã«ãªãŒããŒããŸãã çªç¶äœãããããããªã£ãå Žåã¯ãèªåã§ããã«ãä»ããŠãç®çã®ãµãŒãã¹ãç®çã®ããŒãžã§ã³ã«ããŒã«ããã¯ããŸãã
devãstageãprodã®3ã€ã®ç°å¢ã¯ãã¹ãŠãç°ãªãVPCã§åé¢ãããŠããŸãã Consulã¯ç°å¢ããšã«åå¥ã®ããŒã¿ã»ã³ã¿ãŒãæã£ãŠããããããµãŒãã¹ã誀ã£ãŠç°ãªãç°å¢éã移åããããšãããããŸããã ãããŠããã®ãããªç¶æ³ã§å€§ããªæ¬²æ±ããã£ããšããŠããåŠå¥³ãç Žããªã©ãä¹å¥³ã«å¯Ÿãããããªãè¡åã«ãã£ãŠãéåžžã«å°é£ã§ãã
ãŸãããããžã§ã¯ãã®å®¹éãç°¡åã«å¢ããããšãã§ããŸãã æ°ããã³ã³ãã¥ãŒãã£ã³ã°ãã¯ãŒãå¿ èŠãªå ŽåãçŽ10åã§æ°ããã€ã³ã¹ã¿ã³ã¹ãèµ·åããŠäœæ¥ã®æºåãããããšãã§ããŸãã
ééããåé¡
å šäœãšããŠã掻åã®åéèªäœã¯å€ãã®äººã«ãšã£ãŠããªãè€éã«èŠãããããããªããšããäºå®ã«ãããããããå€ãã®åé¡ãç§ãã¡ãåŸ ã£ãŠããŠãã»ãšãã©ãã¹ãŠãããã«ããŸããããŸããã äžè¬çã«ãããã¯ç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ãšã¯é¢ä¿ãããŸããã
åé¡ã¯ããã®ãããžã§ã¯ãããã¹ããããŠããAmazon Web Servicesã«ãã£ãŠã¹ããŒãããŸããã
Consulãã»ããã¢ãããããšãã«ã圌ãã¯èå³æ·±ããã©ã°ã«åºäŒããŸããã ãšãŒãžã§ã³ããšããããžã®ã¢ã¯ã»ã¹ã¯ãã·ã¹ãã ãªãŸã«ããŒãä»ããŠã³ã³ããã«ç»é²ãããŸãã ãã ããAmazonãããã©ã«ãã§äœ¿çšããAMI Linuxã¯ããã©ã«ãã®CentOSãšã¯å€å°ç°ãªãããªãŸã«ããŒãšã®é£æºã¯Virtual Private CloudïŒVPCïŒãããã¯ãŒã¯ã®èšå®ã§è¡ãããŸãã ãµãŒããŒãåèµ·åãããšãAmazonã¯ãªãŸã«ããŒã匷å¶ããŸãã æ®å¿µãªããããããŸã§å€±æããå·æ¿å®ã®è§£å床èšå®ãå£ããªãããã«åœŒã«åŒ·å¶ããŸããã ããããchatrtr + iã¯å šå¡ãæã£ãã®ã§ãä»ã¯çããŠããŸãã
äžè¬ã«ãVPCãšãã®ãããã¯ãŒã¯ã®æ§é ã¯éåžžã«èå³æ·±ããã®ã§ãããéåžžã«äºæããªãå Žæã§ã®å¶éã«ã€ãŸããå¯èœæ§ããããŸãã ããšãã°ãã¢ããªã±ãŒã·ã§ã³ãã©ã³ãµãŒã¯ã¢ã¯ã»ã·ããªãã£ãã«ããŸãŒã³ã§ã®ã¿äœæã§ããŸããã€ãŸããããã¯ãšã³ãã¯äžåºŠã«è€æ°ã®ç°ãªãå¯çšæ§ãŸãŒã³ã«é 眮ããå¿ èŠããããŸãã ãã®ããããã©ã€ããŒã/ãããªãã¯ããã³1ã€ã®ãŸãŒã³ãšå¥ã®ãŸãŒã³ã«ã¢ãã¬ã¹ãããããã«ãVPCãããã¯ãŒã¯ã«ãã¬ãŒã¯ããŠã³ãå¿ èŠã§ãã ãŸããäœææã«ã®ã¿VPCãããã¯ãŒã¯ã®å èš³ãå€æŽã§ããŸãã ãŸããã€ã³ã¹ã¿ã³ã¹ã§VPCãå€æŽããããšããäœææã«ã®ã¿å¯èœã§ãã
ãããŠãåãã¢ã¯ã»ã·ããªãã£ãŸãŒã³å ã«æ¬çªãµãŒããŒãåããæ¢è£œã®ã€ã³ãã©ã¹ãã©ã¯ãã£ãæ¢ã«ããå Žåãå¥ã®ãŸãŒã³ã«ãµãŒããŒãè¿œå ããŠãã©ã³ãµãŒãåã«åããã ãã§ãããå€æŽããæ¹æ³ã¯ãããŸããã æ®å¿µãªãããæ§é å šäœãæåããå®å šã«ããçŽãå¿ èŠããããŸãã
çµè«ãšèšç»
ãããžã§ã¯ãã®çŸåšã®éçºã¬ãã«ã§ããç¶æ³ã®èŠä»¶ãæºãããªããªã£ãå Žåãéåžžã®ã¯ãŒã¯ãããŒãæ¡å€§ãããå€æŽãããããããšãæããªãã§ãã ããã ãããžã§ã¯ãéçºã®æ¬¡ã®æ®µéãžã®ç§»è¡ã¯ç¢ºãã«ããªãã«ãšã£ãŠè² æ ã倧ããããããšãæããªãã§ãã ããã èªåã®ããŒãºã«é©åã«ã¢ãããŒãããæåã«è³ã«ãã決å®ã«ã€ããŠèããã«ææ¡ããªããã°ããã®éã¯äžäººã§ãç°¡åã«ç¿åŸã§ããŸãã
ãã¡ãããå€ãã®äººãèšãããšãã§ããŸãïŒããããããã§ãã圌ãã¯HabrahabrãOur Raââdioã®ãããªãããžã§ã¯ãã10幎éãµããŒãããŠãããããã§ã¯ã·ã³ãã«ãã«ã€ããŠè©±ããŠããã®ã§ãïŒã ã¯ãã確ãã«ãç§ãã¡ã¯äžçã®ãã¡ã«å€ãã®ç°ãªããã®ãèŠãŠããŸããã ãããŠãããããããã¯ãåçŽãªãã®ãšè€éãªãã®ãåºå¥ããããŸãã«ãå€ãã®çæãèžãŸãªãããã«ããã®ã«åœ¹ç«ã€ã®ã§ãã ããããç¹°ãè¿ãã«ãªããŸãããæåã«ãã¯ãŒã«ãããè¿œæ±ããã«ã¿ã¹ã¯ã«ã¢ãããŒãããŠé©åãªããŒã«ãéžæããããšãåççã§ããã°ã人çãå€§å¹ ã«ç°¡çŽ åã§ããŸãã
äžæ¹ã説æãããŠããã¹ããŒã ïŒããã³ã³ã³ããåã«åºã¥ãä»ã®ã¹ããŒã ïŒã¯ããããžã§ã¯ããæåãããã®ãããªæäœã«å¯Ÿå¿ããå¿ èŠãããããšãæå³ããŠããããšãèŠããŠãã䟡å€ããããŸãã ãããžã§ã¯ãã¯ãã¢ãã€ã«ã§äº€æå¯èœãªããã«ãç¶æ ãç¶æã§ããªãæ¬æ Œçãªãã€ã¯ããµãŒãã¹ã§æ§æããå¿ èŠããããŸãã ã¢ããªã·ãã¯ã·ã¹ãã ã®ãã¬ãŒã ã¯ãŒã¯ã§ã¯ããã®ãããªç¶ç¶çã€ã³ãã°ã¬ãŒã·ã§ã³ã¢ãããŒãã®å°å ¥ã¯ãåŽåéçŽçã§ãããå°æ¥ã®äœ¿çšã§ã®å¿«é©æ§ãäœãããã§ãã
ãããžã§ã¯ãã®ä»åŸã®èšç»ã¯ïŒ
åºæ¬çãªã€ã³ãã©ã¹ãã©ã¯ãã£ã確ç«ãããåŸãJiraããŒã¹ã®ãã°ãã©ãã«ãŒãããã«æ¥ç¶ããŠãGitãªããžããªããprodã®æ°ããããŒãžã§ã³ãå±éãããšãã«ããã°ã®ã¢ããªã±ãŒã·ã§ã³ã«é¢ããæ å ±ãéžæããèªåçã«éããŠãªãªãŒã¹ããŒãã«æžã蟌ãããšãã§ããŸãã
ãŸããã¡ã€ã³ã®äœæ¥ããŒãã§èªåã¹ã±ãŒãªã³ã°ãèšå®ããå¿ èŠããããšããæ¥ãŠããããã§ãã ãã®åèšæ°ã¯åžžã«å¢å ããŠãããããŒã¯æã«ã¢ã¯ãã£ããªãµãŒããŒã®æ°ãç¯çŽããããšã§ã³ã¹ããåæžã§ããŸãã