2æ28æ¥ã3æ1æ¥ã®ä¸¡æ¥ã«éå¬ããããªã¼ãã³ã½ã¼ã¹ã«ã³ãã¡ã¬ã³ã¹2014 Tokyo/Spring ã«ã¦Chefã®è¬æ¼ãè¡ãã¾ããã Chefã«çµã£ãéã¾ããªã©ã§ã¯ãªãè¬æ¼ã¨ããäºããããChefãããç¥ã£ã¦ãã人ã¨ããã§ãªã人ã®éã®ç¥èã¨é¢å¿ã®å·®ãåãããããªå 容ãå¿ããã¾ããã ä»åã¯ãDevOpsãå®ç¾ããçºã®Chefæ´»ç¨ãã¯ããã¯ãã¨é¡ãã¦ã次ã®ãããªæ¹ã«åãã¦æ å ±ãåãã¾ã¨ãã¦ãã¾ãã Chefã¨DevOpsãæµè¡ã£ã¦ããããããããã®èæ¯ãããããããªã Chefã®æ å ±ã¯æ²¢å±±ããããã©ããã£ã¦å©ç¨ãããããããªã Chefã使ãå§ããããèªåã®ä½¿ãæ¹ãæ£ããã®ãã©ããããããããªã ç¹ã«éè¦ãããªãã¤ã³ããããã¤ãæ¸ãåºãã¦ããã¾ããã詳細ã¯è³æã¨åç»ãã覧ãã ããã DevOpsã¨Chef Infrastracture as Codeã¯DevOpsã«ä½¿ããããã¼ã«ã®1ã¤ã®ã¸
è¿å¹´æ³¨ç®ããã¦ãããµã¼ãã¼ç®¡çãã¼ã«ãChefï¼ã·ã§ãï¼ãã¯ããã¡ã¤ã«ã«è¨è¿°ããè¨å®å 容ã«å¿ãã¦èªåçã«ã¦ã¼ã¶ã¼ã®ä½æãããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ãè¨å®ãã¡ã¤ã«ã®ç·¨éãªã©ãè¡ããã¼ã«ã ãä»åã¯ãã®Chefã«ã¤ãã¦ãåºæ¬çãªç°å¢æ§ç¯æ¹æ³ã¨ä½¿ãæ¹ãç´¹ä»ããã ååã¯ãµã¼ãã¼ã®è¨å®ç®¡çãã¼ã«ã¨ãã¦ãPuppetããç´¹ä»ããããä»åç´¹ä»ããChefã¯ããã®Puppetã¨äººæ°ãäºåãããµã¼ãã¼è¨å®ç®¡çãã¼ã«ã ã Chefã¯ç±³Opscodeãéçºãã¦ãããªã¼ãã³ã½ã¼ã¹ã½ããã¦ã§ã¢ã§ãRubyãªã©ã®ãªã¼ãã³ã½ã¼ã¹ãªæè¡ã使ã£ã¦å®è£ ããã¦ãããã©ã¤ã»ã³ã¹ã¯Apache License 2.0ã ãå社ã¯Chefã«ããã¤ãã®æ©è½ã追å ããæåçã®ãPrivate Chefããã¯ã©ã¦ãåã®ãHosted Chefãã¨ãã£ããµã¼ãã¹ãæä¾ãã¦ããããæ¬è¨äºã§ã¯ãªã¼ãã³ã½ã¼ã¹çã®Chefã«ã¤ãã¦ç´¹ä»ããã Chefã¨
ã©ãã§ããã¤ã³ãã©æ± ç°ï¼@mikedaï¼ã§ãã ä»æ¥ã¯ãNaviPlusã§ã¯ã©ããããµãã«ãµã¼ãæ§ç¯ä½æ¥ããã¦ããã®ããã«ã¤ãã¦è©±ãã¾ãã â»ç·¨éé·æ³¨ï¼ä»¥ä¸ã¯è¨äºå·çæç¹ã®ãã®ã§ããå°æ¥çã«å¼ç¤¾ããã®æé ã使ç¨ãããã¨ãä¿è¨¼ãããã®ã§ã¯ããã¾ããã ã¾ãNaviPlusã§ã¯ä»ã®ã¨ããã¯ã©ã¦ãã¯å©ç¨ãã¦ããªãã®ã§ã ãµã¼ãæ§ç¯ã¯åºæ¬çã«ä»¥ä¸ã®ã©ã£ã¡ãã«ãªãã¾ãã ç©çãµã¼ã KVMã®ã²ã¹ã OSã¯CentOSã®6ç³»ã§ãã ä½æ¥ã¯ä»¥ä¸ã®æè¡ã使ã£ã¦èªååãã¦ãã¾ãã PXE Boot + kickstart chef-solo ããã§ã¯ãã£ãããã¶ãã¯ãªã¨ããå®éã®æ§ç¯æé ããã æ§ç¯æé ç©çãµã¼ãã¨VMã«åãã¦èª¬æãã¾ãã äºåã«ãã¼ã«ã«DNSã®ç»é²ã¨ãchefã®nodeå®ç¾©ã®ä½æã ããã£ã¦ããã¾ãã ç©çãµã¼ã ã¾ãã¯ç©çãµã¼ãã®æ§ç¯æé ã§ãã 以ä¸ã®ä½æ¥ã¯ä¸¦åå®è¡å¯è½ã ã¾ãiLO/i
vargrant+chefã§ã¤ããPHP5.5+MySQL5.6+CakePHP3ç°å¢ å··ã§è©±é¡ã®vagrantãchefã試ãã¦ã¿ã¾ããã æè§ãªã®ã§ããããææ°ãã¼ã¸ã§ã³ãç©æ¥µçã«å ¥ãã¦ã¿ããã¨ã«ãã¾ãããï¼çµæ§è¦å´ãã¾ããâ¦ï¼ ã¨ããããæã£åãæ©ãç°å¢ãä½ãæé ãæ¸ãã¦è¡ãã¾ãã åæç°å¢ ãã¹ããã·ã³ç°å¢ MacOS 10.9 VirtualBox 4.3.6 Vagrant 1.4.1 Chef 11.8.2 vagrant-omnibus 1.2.1 ruby 2.0.0p247 gem 2.0.3 ä»®æ³ãã·ã³ç°å¢ CentOS 6.5 64bit Apache2.2 (yumã¬ãã¸ããª) PHP5.5 (remiã¬ãã¸ããª) MySQL5.5 (å ¬å¼rpm) å種ã½ããã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã« VirtualBox ä»®æ³ãã·ã³ã½ããã§ãã以ä¸URLãããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼
chefã§ãµã¼ãã¼ã®æ§ç¯ãããã°ã©ããã«ã«ããã£ã¦ããã®ã¯ããã ãã¶æããå®çªã«ãªã£ã¦ãã¦ãã¾ãã ä»åã¯ç¹ã«MySQL 5.6ã®ã¤ã³ã¹ãã¼ã«ãchefã§è¡ãå ´åã®ã±ã¼ã¹ã«ã¤ãã¦æ¸ãã¦ããã¾ãã MySQL5.6ã¯ã¤ã³ã¹ãã¼ã«ããªããªãããã©ããããchefã使ããªãã¦ãçµæ§å¤§å¤ã§ãã ã ããããã度éãªã試è¡é¯èª¤ã®æ«ãã¤ãã«MySQL5.6ãchefã§ã¤ã³ã¹ãã¼ã«ãã決å®çãåºæ¥ããããå ¬éãããã¨æãã¾ã! ãã ããä»åã¯EC2 + RDSçãwebãµã¼ãã¼ã¨DBãµã¼ãã¼ãåãã¦ããã¤EC2(webãµã¼ãã¼)ã®ã¿ã«MySQL5.6ãã¤ã³ã¹ãã¼ã«ããå ´åã®ãã¨ãæ¸ãã¦ããã¾ãã ã¡ãªã¿ã«serverã¯CentOSãæ³å®ãã¦ãã¾ãã®ã§ubuntuã®æ¹ã¯ãã¿ã¾ãã ããããchefã¨ã¯ MySQL5.6ãåç´ã«ã¤ã³ã¹ãã¼ã«ããå ´å MySQL5.6ãchefã§ã¤ã³ã¹ãã¼ã«ãã ã¾ã¨ã ããã
ããã«ã¡ã¯ï¼ å æãã¯ã³ã´ã¯æèä¼åº§ã«å¼ã£è¶ãã¾ãããã "é座"ã«çã¦ãæããªãã¦æ¯æ¥å°ã£ã¦ãæ°å®¶ã¨ç³ãã¾ãã ã¤ã³ãã©ã¨ã³ã¸ãã¢ã¨ãã¦ã¯æ°åè ã«ãªãã®ã§ããããããããé¡ããããã¾ãã ãã¯ã³ã´ã®ä¸ã§ã¯niconicoç³»ã®äºæ¥ãæ å½ãã¦ããã®ã§ããã 2006å¹´ã«ãã³ãã³åç»ãã¹ã¿ã¼ããã¦ããå°ãã§7å¹´ã«ãªããã¨ãã¦ãã¾ãã æããããã·ã¹ãã ã¯ãµã¼ãã¼æ§ç¯æé ã確ç«ããã¦ãã®ã§ããã æ°ããã®ããã¸ã§ã¯ãã§ã¯Chefãå°å ¥ãã¦ãµã¼ãã¼æ§ç¯ããããã¨ãã¦ãã¾ãã å æ¥ã®åé¢é¸ã§ããã³åã¢ã³ã±ã¼ãã97.52%ã®çä¸çã¨ãããã¥ã¼ã¹ãã覧ã«ãªããã æ¹ããããã¨æãã¾ããããã®ã¢ã³ã±ã¼ãã·ã¹ãã ãChef Soloã使ã£ã¦æ§ç¯ãã¾ããã 大è¦æ¨¡ãªã·ã¹ãã ã¯Chef Serverã§æ§ç¯ãã¦ãã¨ãããããã®ã§ããã ä»åç§ã解説ããã®ã¯ãæ¯è¼çå°è¦æ¨¡ãªæ§ç¯ã«åãã¦ããChef Soloã®è©±ã«
ãµã¼ãã¼ç®¡çãã¼ã«ãChefï¼ã·ã§ãï¼ãã¯ããã¡ã¤ã«ã«è¨è¿°ããè¨å®å 容ã«å¿ãã¦èªåçã«ã¦ã¼ã¶ã¼ã®ä½æãããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ãè¨å®ãã¡ã¤ã«ã®ç·¨éãªã©ãè¡ããã¼ã«ã ãä»åã¯Chefã®å¿ç¨ç·¨ã¨ãã¦ãChefãµã¼ãã¼ãªãã«è¤æ°å°ã®ãµã¼ãã¼ç®¡çãè¡ããknife-soloãã¨ãããã¼ã«ã¨ãè¨å®ã®ããã®ãã¼ã¿ãªã©ãä¸å 管çã§ãããData Bagãã¨ããä»çµã¿ãç´¹ä»ããã knife-soloã使ã£ãè¤æ°å°ãµã¼ãã¼ç®¡ç Chefã¯ãCookbookï¼ã¯ãã¯ããã¯ï¼ãããRecipeï¼ã¬ã·ãï¼ãã¨å¼ã°ããè¨å®ãã¡ã¤ã«ã«å¾ã£ã¦ãã¦ã¼ã¶ã¼ã®ä½æãã½ããã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«ããããã¯ã¼ã¯ããã¡ã¤ã¢ã¦ã©ã¼ã«ããã¼ã¿ãã¼ã¹ãªã©ã®è¨å®ãªã©ããã¾ãã¾ãªè¨å®ä½æ¥ãèªåã§å®è¡ãããã¼ã«ã ãå©ç¨ããã¡ãªããã¨ãã¦ãµã¼ãã¼ã®è¨å®ãä¸å çã«ç®¡çã§ãããå®è¡ããè¨å®å 容ããã§ãã¯ãããããã¹ãé²ãããããªã©ããããè¿å¹´æ³¨ç®ã
ã¯ããã« è¿å¹´æ³¨ç®ããã¦ãããµã¼ãã¼ç®¡çãã¼ã«ãChefï¼ã·ã§ãï¼ãã¯ããã¡ã¤ã«ã«è¨è¿°ããè¨å®å 容ã«å¿ãã¦èªåçã«ã¦ã¼ã¶ã¼ã®ä½æãããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«ãè¨å®ãã¡ã¤ã«ã®ç·¨éãªã©ãè¡ããã¼ã«ã ãä»åã¯ãã®Chefã«ã¤ãã¦ãåºæ¬çãªç°å¢æ§ç¯æ¹æ³ã¨ä½¿ãæ¹ãç´¹ä»ããã ååã¯ãµã¼ãã¼ã®è¨å®ç®¡çãã¼ã«ã¨ãã¦ãPuppetããç´¹ä»ããããä»åç´¹ä»ããChefã¯ããã®Puppetã¨äººæ°ãäºåãããµã¼ãã¼è¨å®ç®¡çãã¼ã«ã ã Chefã¯ç±³Opscodeãéçºãã¦ãããªã¼ãã³ã½ã¼ã¹ã½ããã¦ã§ã¢ã§ãRubyãªã©ã®ãªã¼ãã³ã½ã¼ã¹ãªæè¡ã使ã£ã¦å®è£ ããã¦ãããã©ã¤ã»ã³ã¹ã¯Apache License 2.0ã ãå社ã¯Chefã«ããã¤ãã®æ©è½ã追å ããæåçã®ãPrivate Chefããã¯ã©ã¦ãåã®ãHosted Chefãã¨ãã£ããµã¼ãã¹ãæä¾ãã¦ããããæ¬è¨äºã§ã¯ãªã¼ãã³ã½ã¼ã¹çã®Chefã«ã¤ãã¦ç´¹ä»ããã
Vagrantã¨ã¯ VitualBoxã®ããã³ãã¨ã³ãã«ç¸å½ãããã¼ã«ã vagrantã³ãã³ããªã©ã使ã£ã¦ã³ãã³ãã©ã¤ã³ããç°¡åã«æ°ããVMãä½ããã ä¸è¨ã®æ稿ãè¦ã¦ã便å©ã«æããã®ã§Windows8ã«ã¤ã³ã¹ãã¼ã«ãã¦ã¿ãã naoyaã®ã¯ã¦ãªãã¤ã¢ãªã¼ Vagrantâ 試ãç°å¢ã¯Windows8 64bitã Rubyãã¤ã³ã¹ãã¼ã«ãã ä¸è¨ããææ°çã®Rubyããã¦ã³ãã¼ãããã rubyinstaller.org ããã§ã¯ã1.9.3-p385ããã¦ã³ãã¼ãããã¤ã³ã¹ãã¼ã«ããã 念ã®ãããDEVELOPMENT KITãåããã¦ã¤ã³ã¹ãã¼ã«ãã¦ãããã(ä»»æ) ãã¦ã³ãã¼ãããexeãå®è¡ããã¨ãä¸èº«ã解åãããã ã¤ã³ã¹ãã¼ã«ããRubyã®Rubyã³ãã³ãããã³ãããèµ·åããä¸è¨ãå®è¡ããã
ãåå¼·ããããç°å¢ãæ´ãã¦ããããã®ã§ãvagrant + chefãå°å ¥ãã¦ã¿ããã¨æãã 家ã§ä½¿ã£ã¦ããwindows7 64bitã§knife soloã¨ããåãããããã«ãã¦ã¿ãã æ£ç¢ºã«ã¯cmdããknife soloã使ããããã«ãªãã¾ã§ã®è¨å®ã¡ã¢ã ã¨ããããã§macã®äººã«ã¯ãããªãå 容ã ã¨æãã ããããã¤ã³ã¹ãã¼ã« ã¾ãå¿ è¦ãªãã®ãããããã virtual boxã®ã¤ã³ã¹ãã¼ã« oracleå ¬å¼virtual boxãã¦ã³ãã¼ããã¼ã¸ããèªåã®OSã«ãã£ãvirtual boxã®ã¤ã³ã¹ãã¼ã©ãè½ã¨ãã¦ããã å¥ã«ä»ã¯vmwareã§ãvagrantãåãã®ã§vmwareã®æ¹ã好ããªäººã¯ãã£ã¡ãè½ã¨ãã°ããã ã¤ã³ã¹ãã¼ã©ã®æ示ã«ç´ ç´ã«å¾ãã°å ¥ãã®ã§è©³ç´°ã¯å²æã vagrantã®ã¤ã³ã¹ãã¼ã« vagrantå ¬å¼ãã¦ã³ãã¼ããã¼ã¸ããèªåã®OSã«ãã£ãvagrantã®ã¤ã³ã¹ã
ããã°ã©ãã¼ã¨ãã¦ä»äºãããããã«ãªã£ã¦å¸¸ã æãã¦ãã課é¡ã®ä¸ã¤ã¨ãã¦æ¬çªç°å¢(linux)ã¨éçºç°å¢ã®éããããã¾ã éçºãã·ã³ãwindowsããmacã«å¤ããã®ãç°å¢ã®éãããªãã¹ããªããããã§ãã ã¾ãè¤æ°äººã§éçºãè¡ãå ´åãåã ã®éçºç°å¢ã®éãã¯æ¬å½ã«æ©ã¿ã®ç¨®ã§ãã ããã¾ã§ã«vmwereãªã©ãå°å ¥ãã¦ãã¡ã¤ã«ãé ã£ãããæ§ç¯æé æ¸ãä½ã£ã¦é ã£ãããã¦ãã¾ããããã¯ããã¹ããªæ¹æ³ã§ã¯ããã¾ããã§ãã vmã使ã£ãå ´åçµå±scp/ftpãªã©ã§ç·¨éãããã¡ã¤ã«ã®ã¢ãããã¼ããè¡ãå¿ è¦ããã£ãããéçºãµã¼ãã®æ§æ管çãåºæ¥ã¾ããã§ãã ãã®åé¡ã解決ãã¦ãããæ¹æ³ãä»åã®ä¸ã§ãã¬ã¤ã¯ãã¦ããvirtualbox + vagrant + chef + gitã§æ§ç¯ããéçºç°å¢æ§ç¯ã§ã ä»åã¯cakephpã§ããã¸ã§ã¯ããé²ããå ´åã®ç°å¢æ§ç¯ãã¦ã¿ã¾ã virtualbox + vagra
ã¿ãªããããã«ã¡ã¯ã@ryuzeeã§ãã ååã¾ã§ã¯Vagrantã使ã£ã¦VirtualBoxã®ä»®æ³ã¤ã³ã¹ã¿ã³ã¹ãç°¡åã®æ§ç¯ããã¨ããã¾ã§èª¬æããã ãã ããã ãã ã£ããäºãä½æãã¦ãããã¤ã¡ã¼ã¸ãã³ãã¼ããã®ã¨ãããã¦å¤ããããªãã®ã§ããã¾ãæé£å³ãæããªããããããªããããããããæ¬çªã ã Vagrantã®ç¹å¾´ã¨ãã¦ãPuppetãChefãChef Soloã¨çµã¿åããã¦ã¤ã³ãã©é¨åã®è¨å®ãä»®æ³ã¤ã³ã¹ã¿ã³ã¹ã®çææã«è¡ããã¨ãã§ããã æµãã¨ãã¦ã¯ä»¥ä¸ã®ããã«ãªãã ãã®åçä¸ãä»®æ³ã¤ã³ã¹ã¿ã³ã¹å´ã«VirtualBoxã®ãã¼ã¸ã§ã³ã¨é©åããVirtualBox Additionsãã¤ã³ã¹ãã¼ã«ããã¦ããå¿ è¦ãããã(ãããä¸ããè½ã¨ããboxã®å ´åã«ã¯ãããå¤ãå¯è½æ§ããã) å®éã«ãããã¦ã¿ããä»åã¯CentOS5ãå©ç¨ãã¦DNSãè¨å®ããã¨ãããèªååããã äºåæºåVagran
çæ§ãã¯ããã¾ãã¦ã2010å¹´9æã«å ¥ç¤¾ãã並河ã§ãã ã¤ã³ãã©å¨ãã®è©±é¡ãã»ã»ã»ã¨ãããã¨ã§ãä»åã¯ãµã¼ãã®æ§ç¯ãã·ã¹ãã 管çä½æ¥ã楽ã«ãã¦ããããã¼ã«ã§ãããChefãã«ã¤ãã¦ç´¹ä»ãã¾ãã â Chefã¨ã¯ãChefãã¯ããµã¼ãOSã§ã®ã¤ã³ã¹ãã¼ã«ã»è¨å®ã»åãµã¼ãã¹ã®ç¶æ 管ççã諸ã ã®ã·ã¹ãã æ§ç¯ãéç¨ä½æ¥ãèªååãã¦ãããRuby製ã®ã·ã¹ãã 管çãã¼ã«ã§ããªã¼ãã³ã½ã¼ã¹ã¨ãã¦å ¬éããã¦ãããæ¢ã«ã37signalsãEngine YardãRightScaleãªã©ã§ã使ããã¦ãããå©ç¨å®ç¸¾ãåºå§ãã¦ãã¾ãã Ruby製ã®ã·ã¹ãã 管çãã¼ã«ã¨ããã°ãPuppetããæãæµ®ãã¹ãæ¹ãå¤ãã®ã§ã¯ãªãã§ãããããChefã¯Puppetã®ç«¶åã½ããã¦ã§ã¢ã¨ãªãä½ç½®ä»ãã§ãåºæ¥ããã¨ã ãã§ããã¨ãç¹å¥å¤§ããªå·®ã¯ãªãã¨æãã¦ãã¾ãããPuppetã¯å¤é¨DSLã¨ãã¦è¨å®ãè¨è¼ããã®ã«å¯¾ããChefã¯
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}