tech.kayac.com Advent Calendar 2014 10æ¥ç®æ å½ã® @fujiwara ã§ãã æè¿æ¸ãã¦ãã stretcher ã¨ãããããã¤ãã¼ã«ã®ç´¹ä»ããããã¨æãã¾ãã é·ãã®ã§3è¡ã§ pushåãããã¤ã¯ãã¹ãå°æ°ãå¢æ¸ããããç°å¢ã«é©ããªã å種åé¡ã解決ããpullåãããã¤ãã¼ã«ãæ¸ãã Consul ã¨é£æºããã ä¸å¤®ãã¹ãé å¸(push)åãããã¤ã®åé¡ç¹ ã«ã¤ãã¯ã®èªç¤¾ãµã¼ãã¹ã§ã¯ä¹ ãã Archer ã¨ãããã¼ã«ãå©ç¨ããä¸å¤®ãã¹ãããåãããã¤å¯¾è±¡ãã¹ãã« rsync ã§ãã¡ã¤ã«ãé å¸ããå½¢ã®ãããã¤ãè¡ã£ã¦ãã¾ãããããã§ã¯ããã push åã¨å¼ã³ã¾ãã pushåã®ãããã¤ã¯ããã¹ãå°æ°ãé »ç¹ã«å¢æ¸ããç°å¢ã§ä»¥ä¸ã®ãããªåé¡ãããã¾ãã æ°ãããã¹ããèµ·åãã¦ããå ´åã«ãä¸å¤®ãã¹ããããããã¤ãè¡ã£ããã¨ã§ãªã㨠(å¤ãç¶æ ã§èµ·åãã¦ã
å°ãåã¾ã§ã¢ããªã±ã¼ã·ã§ã³ã®ãããã¤ã¨è¨ãã° capistrano ãªã©ãã³ãã³ãã©ã¤ã³ããå©ãã¦ãããã¤ãã¿ãããªãã¨ããã£ã¦ããããæè¿ã¯å°ãæ§åãéãã®ã§ãã®ããæ¹ãKAIZEN platform Inc. ã§ã®äºä¾ãç´¹ä»ããã GitHub ã®ã¤ãã³ããå¥æ©ã« CI as a Service ã«ãããã¤ãæ å½ããã GitHub 㧠Pull Request ãéã£ã¦éçºããã®ãåæã«ãªã£ã¦ããã®ã¯ä»¥åã«ãç´¹ä»ããã æè¿ã¯ Travis CI ã CircleCI ãªã©ã«ä»£è¡¨ããã CI (Continuous Integration) as a Service ããã£ã¦ãCI ãèªåãã¡ã§ç°å¢ãæ§ç¯ããªãã¦ãã¯ã©ã¦ãã«ä»»ãããã¨ãã§ãããKAIZEN ã§ã¯ CircleCI ãç©æ¥µçã«ä½¿ã£ã¦ããã ãããã® CI as a Service ã¯åºæ¬çã« GitHub ã¨é£æºããã
GitHub / Bitbucket ã®ãã©ã¤ãã¼ããªãã¸ããªãç¡æ㧠CI ãæ¾é¡ã® wercker ã¨ãããµã¼ãã¹ãããã¾ãã(2013/11/30 ç¾å¨) ãµã¤ãããããã§ç´ æµã§ãããã«ãæåå¾ãCapistrano ã§ãããã¤ãèªåå®è¡ãããæ¹æ³ãæ¸ãã¦ããã¾ãã ã¾ããã¢ããªã®è¨å®ã§ SSH å ¬ééµãä½æãã¾ãã çæãããå ¬ééµã¯ããããã¤å ãµã¼ãã® ~/.ssh/authorized_keys ã Bitbucket ã®ãããã¤éµãªã©ã«è¿½å ãã¦ããã¾ãã 次ã«ãã¢ããªã®è¨å®ãã Deploy targets ã®è¨å®ããã¾ããCustom deploy ãé¸æãã¦ã master ãã©ã³ãã®ãã«ãã«æåããããèªåãããã¤ããããã«ãã¾ãã å ¥åããããDeploy pipeline ã® Add new variable ãã¯ãªãã¯ã SSH Key pair ãé¸æããå ã»ã©
å®ã¯è¨å®ãã¡ã¤ã«ã®ä¸ã§é åã§æå®ã§ããã file_cache_path "/var/chef-solo" cookbook_path ["/var/chef-solo/cookbooks", "/var/chef-solo/site-cookbooks"] cookbooksã®æ¹ã«ã¯æ±ç¨çã«ä½¿ããCookbookãå ¥ãã¦ãsite-cookbooksã®æ¹ã«ã¯ãã®ãµã¤ãåºæã®è¨å®ãå«ãã Cookbookãå ¥ããã ããããå¥ã®ãªãã¸ããªã§ç®¡çããã°åã¾ããããã èªåã®å ´åChefã§ã²ã¨ã¤ã®å¤§è¦æ¨¡ã¤ã³ãã©ã管çãããã¨ããããã¯ä¸å°è¦æ¨¡ã®ã¤ã³ãã©ãããããä½ãã¨ãã使ãæ¹ããã¦ããã®ã§ãåã¤ã³ãã©ãã¨ã®åºæã®è¨å®ãã©ã管çãããã¨ããã®ã¯ã¡ãã£ã¨èª²é¡ã ã£ãã®ã ãã©ãããã§ãã£ããã§ãããã ã æ±ç¨çã«ä½¿ããããã«ãªã£ã¦ããCookbookã«ãµã¤ããã¨ã®åºæã®è¨å®ãå«ããã¨ãæ°æã¡æªãããã
éçºã¡ã¢ãã®5ã§ãã表é¡ã©ãã EC2 ã¤ã³ã¹ã¿ã³ã¹ã® Amazon Linux 㧠knife-solo ã使ã話ã éçºã¡ã¢#4 : EC2ã¹ãããã·ã§ããã¨ã®å·®å㯠chef-solo ã§è§£æ±º - naoyaã®ã¯ã¦ãªãã¤ã¢ãªã¼ ã§ãchef-solo ã使ã£ã¦ EC2 ã®ç°å¢ç®¡çããã¦ããã¨æ¸ãã¾ããããã¡ chef-solo ã®å®è¡ã¯ capistrano like 㪠perl ã®ãããã¤ãã¼ã« Cinnamon ã«ä»»ãã¦ãããã¨ããæ¨ãè¿°ã¹ã¾ããã ãã件ã®ãããã¤ãã¼ã«ä»»ãã 㨠chef-solo å®è¡ã®åº¦ã«ã¬ãã¸ããªçµç±ã§ã¬ã·ãããµã¼ãã¼å´ã«è»¢éããå¿ è¦ããããèªå㯠github ã使ã£ã¦ããã®ã§ github ã« push ãã¦ãµã¼ãã¼å´ã§ fetchc ãããããããã¤ãã¼ã«ããã®è¾ºããã£ã¦ãããã¨ã¯è¨ããã¬ã·ãã®åä½ç¢ºèªã®ããã«ã¡ããã¨åããã¨ãä¿è¨¼ããã¦ããªãã¬ã·
éçºã¡ã¢#1 : Cinnamon ã«ããããã㤠- naoyaã®ã¯ã¦ãªãã¤ã¢ãªã¼ ã«å¼ãç¶ãããã®2ã§ãã æè¿ã¯å人ã§ä½ããããªå°è¦æ¨¡ãªãã®ã§ã AWS ãå©ç¨ãã¦ãã¹ããã¦ãã¾ãããã¨ãå人ã§ä½ã£ããã®ã¨ã¯ãããå©ç¨ããã¦ã¼ã¶ã¼ããã以ä¸ã¯ããããã¨è½ã¨ããã¨ãã§ããªãããã¨ãã£ã¦éç¨ã«ãã¾ãæéããããããªãããã®è¾ºããAWS ã§è§£æ±ºã§ããç¹ãå¤ãã AWS ã®è¯ãã¨ããã¯ã¤ã³ãã©ãåçãªã®ã§ãå¾ããã©ãã¨ã§ããªããã¨ããã ã¤ã³ã¹ã¿ã³ã¹ã®æ§è½ã足ããªãã®ã§ããã°ã¹ã±ã¼ã«ã¢ããããã§ãããããåé·æ§ã欲ãããªã£ãããã®ã¿ã¤ãã³ã°ã§ ELB (ãã¼ããã©ã³ãµ) ãç¨æããã°è¯ãããã®æãä»®æ³åããã¦ããªããã¼ãã¦ã§ã¢ã使ã£ã¦ããã¨ç§»è¡ã®ããã«ãµã¼ãã¼ãåã»ããã¢ãããããã¢ããªã±ã¼ã·ã§ã³ããããã¤ãç´ãããã¨æéããããã¨ãããAWS ã§ã¯ãã®è¾ºãã®æéãã»ã¨ãã©ããããªã・・・ã¨
ãã®ãã¡ã¤ã³ã¯ ãåå.com ããåå¾ããã¾ããã ãåå.com 㯠GMOã¤ã³ã¿ã¼ãããã°ã«ã¼ã(æ ª) ãéå¶ããå½å ã·ã§ã¢No.1ã®ãã¡ã¤ã³ç»é²ãµã¼ãã¹ã§ãã â»è¡¨ç¤ºä¾¡æ ¼ã¯ãå ¨ã¦ç¨è¾¼ã§ãã â»ãµã¼ãã¹å質ç¶æã®ãããä¸æçã«å¯¾è±¡ã¨ãªãæéã¸ä¸å®å²åã®ããµã¼ãã¹ç¶æ調æ´è²»ããå ç®ããã¦ããã ãã¾ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}