CodeZineèªè ã®çæ§ãããã«ã¡ã¯ãæ¬ç¨¿ã¯ãITè³æ ¼ã§ã¹ãã«ã¢ããï¼ãã£ãªã¢ã¢ãããç®æãã¨ã³ã¸ãã¢ã®ããã®Webã¡ãã£ã¢ãè³æ ¼Zineãã§å ¬éä¸ã®è¨äºã®è©¦ãèªã¿ãã¼ã¸ã§ããç¶ãã¯è³æ ¼Zineã®ãã¼ã¸ã§ãèªã¿ããã ãã¾ãã
Chefã¯ã©ã使ããã¦ãããããªãã使ãã®ãããã£ãã解説
ãè¿å¹´ããªã³ãã¬ãã¹ãä»®æ³åãµã¼ãã¼ããã¯ã©ã¦ãã¸ã®ã·ã¹ãã 移è¡ãé²ãã§ãããã¯ã©ã¦ãã¯ãããªãã¯ã¯ã©ã¦ãã«ãã©ã¤ãã¼ãã¯ã©ã¦ããããã¦ãã®ãã¤ããªããã¾ã§ç»å ´ãé¢é£ããã½ããã¦ã§ã¢ãåç¨è£½åãããªã¼ãã³ã½ã¼ã¹ã¾ã§å¤ç¨®å¤æ§ã«ãªã£ã¦ããããã®ãããã¤ã³ãã©ã¨ã³ã¸ãã¢[1]ãç¿å¾ãã¹ãæ°æè¡ã¯å¢ããã°ããã ã大å¤ã§ã¯ããããã®åããã¡æ©ãç¿å¾ããã¨ã³ã¸ãã¢ãå¾ãã¢ããã³ãã¼ã¸ã大ããã
ãITã«ã¤ãã¦å¹ åºãç ä¿®ããã¬ã¼ãã³ã°ãå±éããå¯å£«éã©ã¼ãã³ã°ã¡ãã£ã¢ã§ã¯ãã¯ã©ã¦ãæ代ã®ã¤ã³ãã©ã¨ã³ã¸ãã¢åãç ä¿®ã³ã¼ã¹ãå¤æ°éè¬ãã¦ããï¼DockerãOpenStackãªã©ï¼ããããç·¨éé·ãã¨å¸å¤ç·¨éé·ãä»åä½é¨åè¬ãããªã¼ãã³ã½ã¼ã¹ã®ãµã¼ãã¼æ§æ管çãã¼ã«ãChefãã®ç ä¿®ã³ã¼ã¹ããã®1ã¤ã§ããã
ãç ä¿®ã³ã¼ã¹åã¯ãChefã§å¦ã¶ã¤ã³ãã©ã³ã¼ãåå ¥éããè¬å¸«ãåãã¦ãã ãã£ãã®ã¯ãå¯å£«éã©ã¼ãã³ã°ã¡ãã£ã¢ ãã¬ãã¸ãµã¼ãã¹äºæ¥æ¬é¨ 第äºã©ã¼ãã³ã°ãµã¼ãã¹é¨ è¬å°æ¨¹æ°ã ã
ããã®ã³ã¼ã¹ã®ä¸»ãªå¯¾è±¡è ã¯ãLinuxãã¹ã¯ãªãããªã©ä¸å®ã®ç¥èãçµé¨ãããã¤ã³ãã©ã¨ã³ã¸ãã¢ãããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ããµã¼ãã¹ã®æå¹åãè¨å®ãã¡ã¤ã«ãæ¸ããªã©ã®çµé¨ãããã¨æã¾ããã¨ãããç ä¿®ã¯1æ¥ã³ã¼ã¹ã§ãChefã®æ¦å¿µè§£èª¬ããç°¡åãªå®ç¿ã¾ã§è¡ãã
ãChefã¯ä¸è¨ã§ããã°ãã¤ã³ãã©ãã³ã¼ãåããããã®ãã¼ã«ããã·ã§ã«ã¹ã¯ãªãããæ¸ããçµé¨ããããªããChefãã·ã§ã«ã¹ã¯ãªããã¨ã©ãç°ãªãã®ããã©ãæç¨ãªã®ãããç解ã§ããã ãããè¬å çã¯ãã¤ã³ãã©ãã³ã¼ãåãããã¨ã§ã¨ã³ã¸ãã¢ã®æ¥åã¯å¤ããã¾ããã©ãå¤ããã®ããå®éã«ä½é¨ãã¦ããã ããã¨è©±ãã
ãã¾ãããã®ã³ã¼ã¹ã®ç¹å¾´ã¯ãããã¹ãã®ç¬¬1ç« ãInfrastructure as Codeãã«æéã使ããChefã®åºæ¬æ¦å¿µãå¿µå ¥ãã«è§£èª¬ããã¨ãããï¼è¬å çï¼ã ã¨ãããChefã«éãããä»ããã©ã使ãããã¨ãã£ããã¦ãã¦ãªãWebæ¤ç´¢ã§ããç¨åº¦æã«å ¥ãããããã大äºãªã®ã¯ããã¾Chefã¯ã©ã使ããã¦ãããããªãChefã使ãã®ããã ãææ°ã®ç¹å¾´ãç解ããç®çãæ£ããè¦å®ããªãã¨ç¥èã ãèãã¦ããã¡ãã¨èº«ã«ã¤ããå¿ãã¦ãã¾ãããã ãããã¦ãã¦ããããã¦ãã¯ã¤ï¼Know Whyï¼ã§ããã¨è¬å çãããããç ä¿®ã³ã¼ã¹ãåããééå³ã ã
ã¤ã³ãã©ãæçãããChefãã¯DevOpsç°å¢ã§å¨åãçºæ®
ãChefã®å ¬éã¯2009å¹´1æããã§ã«ä¸å®ã®è©ä¾¡ã¨å®ç¸¾ããããChefã¨ããååã¯æç人ã表ããã·ã§ãããç±æ¥ã¨ãã¦ãããã¤ã³ãã©ãæçããæè¦ã§æ§ç¯ãã¦ãããå®éã«ã¯ã¤ã³ãã©ã®æ§æãã³ã¼ãã§è¨è¿°ãããããå®è¡ãã¦ã¤ã³ãã©ãèªåæ§ç¯ãããChefã§ã¯ã¤ã³ãã©ã®æ§æãè¨è¿°ããã³ã¼ãããã¬ã·ãããã¬ã·ããéãããã®ããã¯ãã¯ããã¯ãã¨ãããããããç¨èªã調çç¾å ´ã«ã¾ã¤ãããã®ã¨ãªã£ã¦ããã®ã ã
ãChefã¯åºæ¬çã«ã¯ã¯ã©ã¤ã¢ã³ãã»ãµã¼ãã¼åã®ã¢ã¼ããã¯ãã£ã«ãªã£ã¦ãããChefã¯ã©ã¤ã¢ã³ãã¨ãªããã¼ããæ§ææ å ±ããµã¼ãã¼ã«ã¢ãããã¼ãããChefãµã¼ãã¼ã¯ãããã管çãããæ§æå¤æ´ãè¡ãå ´åã¯Chefã¯ã©ã¤ã¢ã³ãã®ãã¼ããChefãµã¼ãã¼ããæ§ææ å ±ãåå¾ããæ§æå¤æ´ãå®è¡ããã1å°ã ãã§å®è¡ããå ´åã«ã¯ãChef Zeroãã¨ãããã¼ã«ã«ã¢ã¼ããããã
ãChefã¯ãã¼ã¿ã»ã³ã¿ã¼ããã¹ãç°å¢ãªã©ãä¼¼ããããªç°å¢ãç¹°ãè¿ãæ§ç¯ããã±ã¼ã¹ã§ç¹ã«æç¨ã ããã®ãããChefã®å°å ¥ã¯ä¸»ã«ãã£ã¶ã¹ã¿ã¼ãªã«ããªï¼ç½å®³å¯¾çï¼ããå§ã¾ã£ãããã ã
ãæè¿ã§ã¯ãã¤ã³ãã©ã®æ§ç¯ä½æ¥ã«ãã£ããã®å¹çåã¨æéç縮ãæ±ãããã¦ãããä»®æ³åç°å¢ã§ã¯è¨å®ã®ãã³ãã¬ã¼ãã使ã£ã¦ããå種è¨å®ãæåã§è¨å®ããã¨ä½æ¥æéã¯ãæ°æ¥ããå¿ è¦ã¨ãã¦ããï¼ãªã³ãã¬ãã¹ã§ã¯ããããããï¼ãã¯ã©ã¦ãã§ã¯å¹çåãé²ãã ãã®ã®ãã¯ã©ã¦ãä¸ã§å©ç¨ããã¢ããªã±ã¼ã·ã§ã³ã®è¨å®ã§ãããªãã«æéããããã
ãããã§Chefã®åºçªã¨ãªããChefã使ãã¨ãã¤ã³ãã©ã®æ§ç¯ã ãã§ãªãããµã¼ãã¼ã«ã¤ã³ã¹ãã¼ã«ããã¢ããªã±ã¼ã·ã§ã³ãèªåçã«è¨å®ã§ãããå¹çåãå¤§å¹ ã«é²ãã¨ããããã ã
DevOpsã¯ãã¹ãé§åã¤ã³ãã©å®ç¾ãã£ã¦ãã
ãã¨ãããæè¿ã§ã¯ãChefã®ä½¿ããæ¹ãããã«é²åãã¦ããã¨ãããâ¦â¦
注
[1]: æ¬ç¨¿ã§ããã¤ã³ãã©ã¨ã¯ãã¢ããªã±ã¼ã·ã§ã³ãå®è¡ããããã®ç°å¢ãæä¾ããã½ããã¦ã§ã¢å ¨è¬ããããä»®æ³ãã·ã³ãOSã¯ãã¡ããããã¼ã¿ãã¼ã¹ãªã©ã®ããã«ã¦ã§ã¢ãå«ã¾ããã