specinfraã¯æ±ç¨ã³ãã³ãå®è¡ãã¬ã¼ã ã¯ã¼ã¯ãRubyGemsã¨ãã¦ã§é å¸ããã¦ãã¾ãã 追è¨ï¼ããã¯ï¼ã®é ã®è©±ãªã®ã§å ¨ä½çã«å¤ãã§ãã ãã®æ¸ç±ãä¸çªè©³ããã => O'Reilly Japan - Serverspec ã½ã¼ã¹ã¯ãã¡ã https://github.com/serverspec/specinfra specinfraãç®æãæã¯ãæ å ±å¦çå¦ä¼ç ç©¶å ±åã® serverspec: 宣è¨çè¨è¿°ã§ãµã¼ãã®ç¶æ ããã¹ãå¯è½ãª æ±ç¨æ§ã®é«ããã¹ããã¬ã¼ã ã¯ã¼ã¯ ã¨ããè«æãè¦ãã¨è¯ãã§ãããã è«æãã½ã¼ã¹ã³ã¼ãã¨åæ§ã«Githubã«å ¬éããã¦ãã¾ãã https://github.com/mizzy/serverspec-thesis æ¦è¦ åãã¡ã½ããã§ä»»æã®OSç¨ã®ã³ãã³ãå®è¡æååãåå¾ãããå®è¡ãã¦çµæãã¨ã£ãããã¾ãã ããã£ãæããããªæå ããã¯ã¨ã³ãã®å½¢å¼ã
serverspecã使ã£ã¦ã¿ããã¨æããã¹ãçã«ã¤ã³ã¹ãã¼ã«ã rubyã¨ãã¯ä¸åå ¥ã£ã¦ããªãã¾ã£ããã®ãµã¼ãã§ãã¹ãã åæï¼ -root以å¤ã®ã¦ã¼ã¶ã§å®è¡ -ãªã¢ã¼ãã®ãµã¼ãã«serverspecãå®è¡ãã -ãã®ã¦ã¼ã¶ã§ããªã¢ã¼ããµã¼ãã¼ã«ä»¥ä¸ã®ãã¨ãã§ããç¶æ -ãã¹ã¯ã¼ãå ¥åãªãã§ãã°ã¤ã³ã§ãã -sudoãã§ãã yumã§å¿ è¦ãããªãã®ãå ¥ãã $ sudo yum install -y openssl zlib-devel ruby rubygems $ ruby -v ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] $ gem -v 1.3.7 gemã§å¿ è¦ãããªãã®ãå ¥ãã $ gem install rake serverspec $ gem list *** LOCAL GEMS *** dif
æ§ç¯æ¸ã¿ãµã¼ãã RSpec ã§ãã¹ããã serverspec ã¨ãã gem ãã¤ãã£ã ã§ããRed Hat ç³» Linux åæã®ã¤ããã«ãªã£ã¦ãã¾ã£ã¦ããã®ã§ãä»ã®ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã OS ã§å©ç¨ããããã¨ããæ¹ã¯ããã²ãã«ãªã¯ã¨ã¹ããã ãããã¨æ¸ãã¦ããããæ©é Debian ç³» OS 対å¿ã®ãã«ãªã¯ã¨ã¹ã ãããã ãã¾ããããããã¨ããããã¾ãï¼ åã« Debian ç³» OS ã«å¯¾å¿ããã ãã§ã¯ãªããä»ã® OS ã«ã対å¿ã§ããããæ¡å¼µããããå½¢ã«æ¸ãæãã¦ããã ããããserverspec èªä½ã® spec ã追å ãã¦ããã ãããã¨ãè³ããå°½ãããã§æè¬æè¬ã§ãã c.include(Serverspec::DebianHelper, :os => :debian) ã¿ãããªæ¸ãæ¹ãç¥ããªãã£ãã®ã§ã大å¤åèã«ãªãã¾ããã README ã«ãæ¸ãã¦ããã¾ããããããªæã
æè¤ã§ããããã«ã¡ã¯ã ä»æ¥ã¯ãserverspecã®ãªã½ã¼ã¹ã¿ã¤ãã«PHPã®è¨å®ãã¹ããæ¸ãå ããæã®äºãã話ããã¾ããããã£ãããããã¡ã¤ã«æ§æãããã¦ãè¨è¿°æã®æ³¨æç¹ãã®3ç¹ãä¸å¿ã«è¨è¿°ãã¾ãããã®å¾ããã¹ãã³ã¼ããã©ã®ããã«æ¸ãå¤ãããã示ãã¾ãã ãã£ãã PHPã¯ãæ§ã ãªLightweight Language(以ä¸ãLL)ã®ä¸ã§ããå®è¡ããã¢ããªã±ã¼ã·ã§ã³ã«å¿ããè¨å®ãå¿ è¦ãªè¨èªã®ä¸ã¤ã§ããè¨å®å¤ã®ä»£è¡¨ã¨ã㦠"mb_string", "upload_max_filesize" ãã㦠"memory_limit" ã§é ãæ©ã¾ããæ¹ãããã£ããããã¨æãã¾ããããã§ãserverspecã§è¨å®å¤ãè©ä¾¡ã§ããä»çµã¿ãæ´åããæ£ããè¨å®ããã¦ãããã確èªã§ããããã«ãããã¨èãã¾ããã ããã¾ã§ãserverspecã§PHPã®è¨å®ã®è©ä¾¡ãè¡ãã«ã¯ãcommandãªã½ã¼ã¹ãç¨ãã¦"
ä¼è¤ç´ä¹ãã, å®®ä¸åè¼ãããã²ã¹ãã«è¿ãã¦ãDocker, chef, serverspec, Travis CI, Vagrant, ãµã¼ããããã¸ã§ãã³ã°ããã¹ã ãªã©ã«ã¤ãã¦è©±ãã¾ããã 0:00 miyagawa: ä»æ¥ãã²ã¹ããäºäººãã¾ãã¦ãä¸äººç®ã¯ããªãã¿ã®ãç´ä¹ããã§ãã naoya: ããã«ã¡ã¯ãè¥å¹²é£å·æ°å³ã ã¨æããã§ããâ¦â¦ã miyagawa: ããï¼ç¬ï¼ããããªãã¨ãªãã¨æãã¾ãã naoya: ãã4åç®ã§ããã£ãã miyagawa: ããã§ãããããä¸äººã¯æ¨æ¥Twitterã§å£°ãããã¦ããããã³ã°ããã£ã¦ãããã©ã¯ãªæ代ã«ãªã£ãæããªãã§ããã©ãserverspecã¨ãã®ä½è ã§ãããmizzyãããã¨å®®ä¸åè¼ããã§ãã mizzy: ããã«ã¡ã¯ããããããé¡ããã¾ãã miyagawa: åææ¥ã«ããã¾ããã mizzy: ããããã miyagawa: æ
Jenkins ããããã¨æ¯ãããã¨åæ¥ããã¾ããã£ãã®ã§åå¿é²ãæ®ãã¦ããã ããããã£ãã®ã¯ Chef ã§æ§ç¯ãããµã¼ãã¼ã Jenkins 㧠CI ãããã¨ãããã®ããã®ã¨ããµã¼ãã¼ã¯ãã¹ããçµãã度ã«ç ´æ£ãã¦ããã¹ãéå§æã«å度çã£æ°ãªç¶æ ããç«ã¡ä¸ãããã(ãããããµã¼ãã¼ãå£ãã¦ä½ã£ã¦ã¨ãããã¹ãã¯ãªãã¨ããååã§å¼ã°ããã®ã ãã?) ä»®æ³ãµã¼ãã¼ãç ´æ£/ä½æãããã°ã©ããã«ã«ããã®ã¯ãã¡ãã Vagrant ãããã¸ã§ãã³ã°ã¯ Chef Chef ã®ç°å¢ãæ´ããã®ã« knife-solo 0.3.0.pre3 ãã¹ã㯠serverspec ã³ã¼ã㯠Github ã«ä¸ãã (https://github.com/naoya/jenkins-vagrant-test) CI 㯠Jenkins ã¨ããæ§æã«ãªã£ã¦ãããã²ã¨ã¾ã Jenkins ã Vagrant ã¯ãã¼ã«ã«
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}