第3å Windows 㧠Capistrano
2008/03/26
ååãSSH å
¬ééµã®è¨ç½®ãã§ã¯ãLinux ã Mac OS X ã§ãCapistrano ã使ãããã®æºåä½æ¥ã«ã¤ãã¦æ¸ããã
ä»åã¯ããã® Windows ç·¨ã ã
Capistrano ã¯ãRuby ã® Net::SSH ã¢ã¸ã¥ã¼ã«ã使ã£ã¦ãªã¢ã¼ããµã¼ãã«ãã°ã¤ã³ããããããã£ã¦ãåºæ¬çã«ã¯ãssh ã¯ã©ã¤ã¢ã³ãããã°ã©ã ã¯å¿ è¦ãªãã
ããªãã®ãã½ã³ã³ã®é©å½ãªãã©ã«ãã«ã次ã®ãããªå 容ã®ãã¡ã¤ã« Capfile ãä½ãã
task :stamp, :hosts => "alpha.oiax.jp" do run "touch /home/kuroda/touched" end
ããã¦ãstamp ã¿ã¹ã¯ãå®è¡ããã
% cap stamp * executing `stamp' * executing "touch /home/kuroda/touched" Password: servers: ["alpha.oiax.jp"] [alpha.oiax.jp] executing command command finished
éä¸ã§ãã¹ã¯ã¼ããå°ããããç¹ãé¤ãã°ãååã®è¨äºã¨åãã§ããã
Windows ã§ãå
¬ééµã«ãã SSH ãã°ã¤ã³ãå®ç¾ããã«ã¯ãPuTTY ã¨ããããªã¼ã½ããã¦ã§ã¢ãå©ç¨ããã
PuTTY Download Page ãã putty-x.xx-installer.exe ããã¦ã³ãã¼ããã¦ãã¤ã³ã¹ãã¼ã«ããã
ã¾ããputtygen ããã°ã©ã ãèµ·åãã¦ãSSH éµãä½ããç§å¯éµãä¿åããå ¬ééµããªã¢ã¼ããµã¼ãã® authorized_keys ãã¡ã¤ã«ã«è¿½å ããã詳ããã¯ãPuTTYgen ã®å©ç¨ ãåç §ã®ãã¨ããã ãã/home/app/.ssh/authorized_keys ãã¡ã¤ã«ã«ãå ¬ééµã追å ãããã¨ãå¿ããªãããã«ã
次㫠pageant ããã°ã©ã ãèµ·åããããã®ããã°ã©ã ã¯å¸¸é§åã§ãããèµ·åããã¨ã¿ã¹ã¯ãã¬ã¤ã«å¸½åããã¶ã£ããã½ã³ã³ã®ã¢ã¤ã³ã³ãç¾ããããã®ã¢ã¤ã³ã³ãããã«ã¯ãªãã¯ããã¨ããPageant Key Listãã¨ããã¦ã£ã³ãã¦ãéãã®ã§ã[Add Key] ãã¿ã³ãã¯ãªãã¯ãã¦ãå ã»ã©ä¿åããç§å¯éµã®ãã¡ã¤ã«ãé¸ãã§ãéµã pageant ã«ç»é²ããã
ãã®æé ã Windows èµ·åå¾ã«ä¸åº¦ã ããã£ã¦ããã¨ãCapistrano å®è¡æã«ãã¹ã¯ã¼ããå ¥åããªãã¦ãæ¸ãããã«ãªãã
% cap stamp * executing `stamp' * executing "touch /home/kuroda/touched" servers: ["alpha.oiax.jp"] [alpha.oiax.jp] executing command command finished
ãã®æç« ãå·çããå½æã® Capistrano 2.3.0 ã§ã¯åé¡ãåºãªãã£ããã2010å¹´3æ30æ¥ç¾å¨ã®ææ°ç Capistrano 2.5.18 㯠pageant ã¨ç¸æ§ãæªããcan't convert Net::SSH::Authentication::Pageant::Socket into IO (TypeError) ã¨ããã¨ã©ã¼ã¡ãã»ã¼ã¸ã表示ãã¦æ¢ã¾ã£ã¦ãã¾ãããã®ãã°ã¯å°ãªãã¨ã2008å¹´12æã«ã¯èªèããã¦ãããã対å¿ãããæ°é ã¯ãªããWindows ã¦ã¼ã¶ã¼ã¯ pageant ã使ããªãããå¤ã Capistrano 2.3.0 ã使ç¨ããããã©ã¡ãããé¸ã¶ãã対å¦æ¹æ³ã¯ãªãããã ã
2010å¹´8æ10æ¥ãæ¹ã㦠Windows ãã pageant 㨠Capistrano 2.5.19 ãå©ç¨ãã¦ã¿ãã¨ãããç¥äººã®ç°å¢ã§ã¯ãã¾ãè¡ããï¼ä¸è¨ã®æ³¨ã¨åãçç¶ï¼ãç§ã®ç°å¢ã§ã¯åé¡ãçºçããªãã£ããã©ã¡ãã Windows XP ã§ãPuTTY ã®ãã¼ã¸ã§ã³ãåã 0.60ãéãã¯ããåãããªããnet-ssh ã® lighthouse ã« Ticket #13 ã¨ãã¦ç»é²ããã¦ãããã°ãé¢ä¿ãã¦ããããã ãnet-ssh ã® founder ã§ãã Delano Mandelbaum ã¯ã俺ã¯ç©æ¥µçã« Windows ããµãã¼ãã¯ããªãããï¼ãã¹ãä»ãã®ï¼ããããªãåãã§åãå ¥ãããã¨è¨ã£ã¦ããã®ã§ã誰ã Windows ã«è©³ããã¦å æ°ã®ãã Ruby ããã°ã©ãã¼ãç´ãã¦ãããªãã ãããã
[æ¹è¨] 2008/05/17 ã¦ã¼ã¶ã¼ app ã§ãªã¢ã¼ããã¹ãã«ãã°ã¤ã³ããæ¹å¼ã«åããã¦è¨è¿°ãä¿®æ£ã
[æ¹è¨] 2010/03/30 pageant ã¨ã®ç¸æ§ã«é¢ãã注ã追å ã
[æ¹è¨] 2010/08/10 pageant ã¨ã®ç¸æ§ã«é¢ãã注ãæ´ã«è¿½å ã