1. GMO Pepabo, Inc. æè¡åºç¤ãã¼ã Advanced Senior è¿è¤ãã¡ã 2015/03/13 CIãã¼ã«åå¼·ä¼@ç¦å²¡ Drone.ioã®ãç´¹ä»
ã¯ããã¾ãã¦ï¼ä»å¹´ï¼æããã¸ã§ã¤ã³ãã¾ããtjinjinã§ããfeedforceã§ã¯ã¢ãã¡ã¤ã³ãã©ãæ å½ãã¦ãã¾ããã¡ãªã¿ã«ä»å£ãªã¹ã¹ã¡ã¢ãã¡ã¯SHIROBAKOã§ãã ä»åãµã¼ãCIã«Dockerãå°å ¥ãã¾ããã®ã§ãå®éã®è¨å®ã工夫ããç¹ãªã©æ稿ãããã¨æãã¾ãã feedforceã®ãµã¼ãCI å¼ç¤¾ã§ã¯ããã¾ã§CircleCIã¾ãã¯Jenkinsã¨AWSãçµã¿åããã¦ãµã¼ãã®CIãè¡ã£ã¦åãã¾ããã åè: Jenkinsã§ãµã¼ãã®CIãå§ãã¾ãã ããããCircleCIãå©ç¨ããããã¸ã§ã¯ããå¢ããã«ã¤ããCircleCIã«å®è¡å¾ ã¡ãçºçããããã«ãªãã¾ãããCircleCIã®å®è¡ãã°ã確èªããã¨ãããAWSã®ã»ããã¢ããã«æéãããã£ã¦ãããã¨ãããã£ãã®ã§ãç°å¢ã®ã»ããã¢ããæéãç縮ã§ãããã®ã®ã¯ãªããã¨æ¢ãã¦ãã¾ããããããªæãDockerãããã®ã§ã¯ã¨ãã話ãè³ã«ãã¾ãã
追è¨ï¼2017å¹´7æï¼ ãã¡ãã®ã¹ãã«è¦ä»¶ã§ããã2017å¹´çãæ°ãã«æ¸ãã¾ããã®ã§æ¯éãã¡ããã覧ãã ããã ããã¼ã¿ãµã¤ã¨ã³ãã£ã¹ãã¨ããããã¼ã¿åæè·ã«å°±ãããã®ã¹ãã«è¦ä»¶ãã¨ãã話é¡ãææã§ãã£ããã§ãããåã«ã¨ã£ã¦é¦´æã¿ã®ããTokyoRçéã§å®éã«ä¼æ¥ã®ãã¼ã¿åæè·ã§æ´»èºãã¦ãã人ãã¡ã®ã¹ãã«ãçºãã¦ã¿ãã«ã ã¿ã©ãã¼ãç¨åº¦ã®çµ±è¨å¦ã®ç¥è ã¯ããã¿ç¨åº¦ã®æ©æ¢°å¦ç¿ã®ç¥è RãPythonã§ã³ã¼ããçµãã SQLãæ¸ãã ã¨ããã®ãå ¨å¡ã®æå¤§å ¬ç´æ°ï¼ä¸éã©ã¤ã³ããªãã¨ããããªããã§ãã¡ããã£ã¨è²ã ä¸å¤ªè©±ãæ¸ãã¦ã¿ã¾ãããªãåã®å¨ãã®åå¾5mã«éã£ãçå®ããããã¾ããã®ã§ãçããèªèº«ãã©ããã®ãã¼ã¿ãµã¤ã¨ã³ãã£ã¹ãï¼ï¼åéã«å¿åãã¦è¹´ãããã¨ãã¦ãä½ã®ä¿è¨¼ããããããã¾ãã®ã§æªããããã çµ±è¨å¦ã®ç¥èã¯ãã¿ã©ãã¼ã以ä¸ã ãã¼ã¿è§£æã®ããã®çµ±è¨ã¢ããªã³ã°å ¥éââä¸è¬åç·å½¢ã¢ãã«ã»é層
AWS ã¯ãå¾é課éãªã®ã§ãä»è ããã®ä¸æ£å©ç¨ï¼æ¬æ¥ç¡ããã¨ã§ããï¼ãæ³å®å¤ã®å©ç¨ã§ãç¿æã®è«æ±ãæ¥ã¦ãããã¯ãªã¨ãããã¨ãããã¾ãã ç§èªèº«ãé¢ãã£ã¦ããããã¸ã§ã¯ãã§ãããæã«å¹³æã®æ°åã®è«æ±ãæ¥ã¦ãåå 調æ»ãè¡ã£ãã¨ããçµé¨ãããã¾ããã 転ã°ã¬å ã®æã¨ãããã¨ã§ãå ã«ãã£ã¦ããã¹ããã¨ã«ã¤ãã¦ã¾ã¨ãã¦ããã¾ãã 1. AWSã¢ã«ã¦ã³ãã®ä¸æ£å©ç¨ãé²ã ã¾ããèããããã®ããã¢ã«ã¦ã³ããä¹ã£åããã¦ã®ä¸æ£å©ç¨ã§ãããã¡ãããä¸æ£å©ç¨ã¯ãè«æ±ã ãã§ãªããã·ã¹ãã ããªã½ã¼ã¹ãå®ãã¨ããç¹ã§ãé²ãã¹ããã¨ã§ãã ããã§ãAWS ã¢ã«ã¦ã³ãã¯ã2è¦ç´ èªè¨¼ï¼2段éèªè¨¼ / 2 Factor authentication / 2FA)ãè¨å®ãã¦ããã¾ãã æé ã¯ãä¸è¨ã®ã¨ã³ããªãã¾ã¨ã¾ã£ã¦ãã¾ãã AWSã¢ã«ã¦ã³ãä½ã£ããããã ãã¯ãã£ã¨ãï¼IAMã¦ã¼ã¶ã¼ã¨Authyã使ã£ãMFAã§2段éèªè¨¼
ã¯ããã« AWSãã¼ã ã®ãããã§ãã AWSã®ã·ã¹ãã å´ã«èµ·å ããEC2é害ãçºçããå ´åã ã¤ã³ã¹ã¿ã³ã¹ã®STOPãSTARTã«ããåèµ·åæä½ãå¿ è¦ã¨ãªãäºãããã¾ãã ãã®åèµ·åãèªååãããAuto Recoveryãæ©è½ãæ±äº¬ãªã¼ã¸ã§ã³ã§ãå©ç¨å¯è½ã¨ãªãã¾ããã®ã§ç´¹ä»ããã¦ããã ãã¾ãã Auto Recoveryè¨å® Auto RecoveryãAWSã³ã³ã½ã¼ã«ã®CloudWatchç»é¢ã§è¨å®ãã¾ãã 詳細ãªè¨å®æé ã¯ãAuto Recoveryãå è¡æä¾ããã¦ããç±³å½ãªã¼ã¸ã§ã³ã¨åãã§ããä¸è¨è¨äºãã覧ãã ããã ãæ°æ©è½ãEC2 Cloudwatchã®æ°æ©è½ãAuto Recoveryãã使ã£ã¦ã¿ã ã¾ã¨ã AWSã®EC2ç°å¢ã稼åãã¦ããä»®æ³ãã¹ãããããã¯ã¼ã¯ãªã©ã«ç©ççãªé害ãçãã EC2ã¤ã³ã¹ã¿ã³ã¹é害ã«è³ãå¯è½æ§ãé »ç¹ã«çºçãããã®ã§ã¯ããã¾ãããã0ã§ã¯ããã¾ã
ããã¾ãã¦ããã§ã¨ããããã¾ããæ¬æ¥ããä»äºå§ãã®æ»ãçæ§ãå¤ãã¨æãã¾ãã å¬ä¼ã¿ãå©ç¨ã㦠Ansible 㨠Git 㨠Jenkins ãçµã¿åãããç¶ç¶çããªããªã®ããã®ç°å¢ãèªå® ç°å¢ã«ä½ã£ã¦ã¿ã¾ããã®ã§ããã¡ãã«æ®ãã¦ããããã¨æãã¾ããæ¸ãã¦ã¿ããé·ããªã£ã¦ãã¾ãã¾ããã®ã§ãæ°åã«åãã¦ãã¾ãã ååã¯ãç°å¢æ¦è¦ã®ç´¹ä»ãããããããã®ã·ã¹ãã ã§ã®ã»ããã¢ãããSSHã§ã®æ¥ç¶ç¢ºèªã¾ã§ã§ãã ç°å¢æ¦è¦ 以ä¸ã®è¡¨ã¯ä»åã®ã·ã¹ãã æ¦è¦ã§ããèªå® ã®LANå ã«ããESXiä¸ã§å®çµããæ§æã«ãã¦ãã¾ãã ç¨é å°æ° ãã¹ãå IP Address è£è¶³ ãã¹ã対象ãµã¼ã 5 stage01 stage02 stage03 stage04 stage05 192.168.0.101 192.168.0.102 192.168.0.103 192.168.0.104 192.168.0.105
ç¶ç¶çããªããªç°å¢ãä½ã£ã¦ã¿ãã·ãªã¼ãºã®ç¶ãã§ããååã¯ç°å¢æ¦è¦ã®ç´¹ä»ã¨ããããã®ã·ã¹ãã ã§ã®ã»ããã¢ããã¾ã§ãç´¹ä»ãã¾ãããä»åã¯ãµã³ãã«ã§ç¨æããAnsibleã®playbookã使ããå®éã«Jenkinsããåä½ãããã¨ããã¾ã§æ¸ãã¦ããããã¨æãã¾ãã ããã¸ã§ã¯ãã®ä½æï¼ãã¼ã«ã«ãªãã¸ããªã®ä½æï¼ GitHubã«ãµã³ãã«ãç½®ãã¦ã¾ãã®ã§ãããã使ã£ã¦ãã¼ã«ã«ãªãã¸ããªãä½æãããã¨ã«ãã¾ãã ä»å㯠âansible-jenkins-sampleâ ã¨ããããã¸ã§ã¯ãåã§ä½æãã¾ããã ãã¼ã«ã«ãªãã¸ããªç½®ãå ´ã¨ãªããã©ã«ããä½æãã¾ãã ãµã³ãã«ã®ãªãã¸ããªã®ãã¼ã«ã«ãªãã¸ããªã«ã¯ãã¼ã³ãã¾ãã SourceTreeã§ãæ°è¦ / ã¯ãã¼ã³ãä½æããããå·¦ã¯ãªãã¯ãããªãã¸ããªãã¯ãã¼ã³ããè¨å®ãè¡ãã¾ããããã«ããªã¢ã¼ããªãã¸ããªã®åé¤ããã¦ãã¾ãã¾ããèªåçã«ã¯ãã¼ã³å ã®Gi
ååãplaybook ã®ãµã³ãã«ããã¼ã«ã«ãªãã¸ããªã¨ãªã¢ã¼ããªãã¸ããªã«ç»é²ããJenkins çµç±ã§å®è¡ããã¨ããã¾ã§è©¦ããã¨ãã§ãã¾ãããä»åã¯ãç¹å®ãã©ã³ãç¨ã®ã¸ã§ããä½æãããã«ãã»ããªã¬ãè¨å®ãã¦å®è¡ããã¾ã§è©¦ãããã¨æãã¾ãã ç¹å®ãã©ã³ãç¨ã®ã¸ã§ããä½æãããã«ãã»ããªã¬ãè¨å®ãã¦å®è¡ãã ä»ã¾ã§ã® Jenkins ã¸ã§ãã§ã¯*/masterãã©ã³ãã«å¯¾ããæåå®è¡ã§ããããç¹å®ã®ãã©ã³ãç¨ã®ã¸ã§ããæ°ãã«ä½æããã³ããããããã³ã«ãã«ããèµ°ãããã«ãããã¨æãã¾ãã ç¹å®ãã©ã³ãç¨ã®ã¸ã§ããä½æãã CIãµã¼ãã® Jenkins Web UI ã«ã¢ã¯ã»ã¹ãããæ°è¦ã¸ã§ãä½æãã§ä»ã¾ã§å©ç¨ãã¦ããã¸ã§ããã³ãã¼ãã¾ããä»å㯠âmaintâ ãã©ã³ããä½æããåæã§ã以ä¸ã®ãããªè¨å®ããã¦ãã¾ãããã¸ã§ãåã ã âansible-jenkins-sample.maint
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}