Vagrant ã§éçºç°å¢æ§ç¯ãèªååããã
ä¸éã§ã¯ãããã»ã©æ³¨ç®ããã¦ããªãããã ããVagrant ã¨ããã¨ã¦ããã°ããããã¼ã«ããããã¨ãç¥ã£ããå®ã¯åæ§ã®ãã¼ã«ãèªä½ãããã¨ãã¦ãããããã®ãã¼ã«ã«ãã¹ã¦æ©è½ãããã£ã¦ããã
Vagrant ã¨ã¯
Vagrant ã¯ãRuby ã§çµã¾ããã¹ã¯ãªããã§ãä»®æ³ãã·ã³ä¸ã®éçºç°å¢ã®æ§ç¯ã»é å¸ã®èªååãæ¯æ´ããããã®ãã¼ã«ãä»®æ³ãã·ã³ç°å¢(VirtualBox) ã¨æ§æ管çãã¼ã«(Chef, Puppet)ãå©ç¨ãããã¨ã§å®ç¾ãã¦ãããããã使ãã°ãã³ãã³ãä¸ã¤ã§ãéçºã«å¿ è¦ãªç°å¢ãç¨æã§ããããã«ãªãã
Vagrant: http://www.vagrantup.com/
æ¥æ¬èªã®è¨äº: http://docs.komagata.org/4673
ç©çãã·ã³ä¸ã§ã®éçºã®æ©ã¿
å®éã«ãéçºç°å¢ãç¨æããã¨ãªãã¨çµæ§ãªæéãããã£ã¦ãã¾ããããããéçºè ãè¤æ°ããå ´åã¯ãåèªã«åãä½æ¥ããã£ã¦ããããã¨ã«ãªããéçºè å ¨å¡ããã·ã¹ãã ã®ç´°ããè¨å®ã¾ã§ç²¾éãã¦ãã訳ã§ã¯ãªãã®ã§ãå®éåãããããã«ãªãã¾ã§çµæ§æéãããããã¨ãæ©ã¿ã
ã¾ããè¤æ°ã·ã¹ãã ã®éçºç°å¢ãã²ã¨ã¤ã®ç©çãã·ã³ã«åå± ãããã¨ãªãã¨ãè²ã ã³ããå¿ è¦ã§ãããã¨ãæ©ã¿ã®ç¨®ã§ãã£ãã
ä»®æ³ãã·ã³ç°å¢ (VirtualBox)
ä»®æ³ãã·ã³ã®ãã©ãããã©ã¼ã ã¨ã㦠Oracle VirtualBox ãåæã¨ãã¦ãããVirtualBox ã¯ãã¨ã¦ãå¤æ©è½ã§ããããããªã¼ãªä»®æ³ãã·ã³ç°å¢ãã²ã¨ã¤ã®ã·ã¹ãã ãè¤æ°äººã§éçºããéã«ãä»®æ³ãã·ã³ã®ãã£ã¹ã¯ã¤ã¡ã¼ã¸ãéçºè ã«é å¸ãã¦å©ç¨ãã¦ãããèãæ¹ããä¸è¬åãããã¨ã¨æãã
éçºã«ããã VirtualBox ã®ä¾¿å©ãªæ©è½ã¨ãã¦ã¯ããå ±æãã©ã«ããã¨ãããã®ããããå ±æãã©ã«ããè¨å®ããã°ãç©çãã·ã³ã®ãã©ã«ããä»®æ³ãã·ã³ã®ãã£ã¬ã¯ããªã¨ãã¦ãã¦ã³ãã§ããããã«ãªãããã¨ãã°ãä»®æ³ãã·ã³ã® Apache ã®ããã¥ã¡ã³ãã«ã¼ããå ±æãã©ã«ãã¨ãã¦ããã°ãç©çãã·ã³ä¸ã§HTMLã®ç·¨éã®å 容ãããã®ã¾ã¾ä»®æ³ãã·ã³ã«åæ ããããã¨ã«ãªããç·¨éç¨ã®ãã¼ã«ã®ä¸ã«ã¯ãã¨ã¦ããããªããã©ä»®æ³ãã·ã³ã§ã¯åä½ãç¡çãªãã®ããã(Adobe製åã¨ã)ã®ã§ããã®æ©è½ã¯ãã¨ã¦ã便å©ã ã¨æãã
ããä¸ã¤ã¯ããããã¯ã¼ã¯æ©è½ã NAT æ¥ç¶ã®å ´åããã¼ããã©ã¯ã¼ããè¨å®ãããã¨ã§ãä»®æ³ãã·ã³ã®ãµã¼ãã¹ãç©çãã·ã³ããå©ç¨ã§ããããã«ãªããä¾ãã°ãä»®æ³ãã·ã³ã® 22çªãã¼ããç©çãã·ã³ã® 2222çªãã¼ãã«ãã¼ããã©ã¯ã¼ãããã¨ãç©çãã·ã³ã® ssh ã¯ã©ã¤ã¢ã³ãã§ä»®æ³ãã·ã³ã¸ãã°ã¤ã³ãããã¨ãã§ãããã¾ãã80çªãã¼ãã 8080çªãã¼ãã«ãã©ã¯ã¼ãã£ã³ã°ãã¦ããã°ãä»®æ³ãã·ã³ã« GUI ç°å¢ãç¨æããªãã¦ããç©çãã·ã³ä¸ã®ãã©ã¦ã¶ã§ãåä½ã確èªã§ãããç©çãã·ã³ä¸å¿ã«ããéçºãè¡ããã¨ãããã¡ãªããã
æ§æ管çãã¼ã« (Chef, Puppet)
ãã ããããã ãã§ã¯åé¡ãæ®ããä»®æ³ãã·ã³ã®ãã£ã¹ã¯ã¤ã¡ã¼ã¸ã¯ããµã¤ãºã大ãããè¤æ°ã·ã¹ãã ã®ã¤ã¡ã¼ã¸ãç¨æããã¨ãªãã¨ãä¿åç¨ã«ãã£ã¹ã¯å®¹éãå¿ è¦ã«ãªããä»®æ³ãã·ã³ãæ§æãã¦ããã½ããã¦ã§ã¢ã¯å ±éãã¦ããé¨åãå¤ããç¡é§ã«ãã£ã¹ã¯ãæ¶è²»ãã¦ãããã¨ã«ãªããã¾ãããµã¤ãºã大ãããããå©ç¨ããããã®é å¸å ããã®ãã¦ã³ãã¼ãã®æéã馬鹿ã«ãªããªããé å¸å ãæ´æ°ããããã³ã«ãå©ç¨å´ãæ¯åãã¦ã³ãã¼ãããã¨ãªãã¨ãã¯ãæéã«ãªãã
ã§ããã°ãä»®æ³ãã·ã³ã®ãã£ã¹ã¯ã¤ã¡ã¼ã¸ã¯ã²ãªå½¢ã¨ãªãç°å¢ã®ã¿ç¨æãã¦ãåã·ã¹ãã å¥ã«å·®ç°ãããé¨åã¯ãå¥ã®æ¹æ³ã§ãªãã¨ãæ§ç¯ãããããã¡ããèªååãããã
ããã§ã Chef ã Puppet ãªã©ã®æ§æ管çãã¼ã«ãå©ç¨ãããã¨ã«ãªããæ§æ管çãã¼ã«ãä»®æ³ãã·ã³ã«ã¤ã³ã¹ãã¼ã«ãã¦ããã°ãéçºç°å¢ã«å¿ è¦ãªã½ããã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«ãè¨å®ãèªååãã¦ãããã
Chef: http://www.opscode.com/chef/
Puppet: http://www.puppetlabs.com/
çµè«
ä»®æ³ãã·ã³ç°å¢ãæ§æ管çãã¼ã«ã¯åä½ã§ãåå便å©ãªã®ã ããããããé£æºãã¦ãããæ´ç·´ãããéçºç°å¢ãä½ããã¨ãããã®ã Vagrantãã·ã¹ãã æ§æã®èªååã¨ããåéã¯å¥¥ãæ·±ããVagrant ã¯ãã¾ã æ¤è¨¼ãå§ããã°ããã ããä»å¾ããã¿ããã¾ãã°ãè¨äºã«ãã¦ããããã