{"id":10084,"date":"2013-12-21T13:00:54","date_gmt":"2013-12-21T04:00:54","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=10084"},"modified":"2013-12-21T13:28:37","modified_gmt":"2013-12-21T04:28:37","slug":"%e5%85%a5%e9%96%80-capistrano-3-%e5%85%a8%e3%81%a6%e3%81%ae%e6%89%8b%e4%bd%9c%e6%a5%ad%e3%82%92%e7%94%9f%e3%81%be%e3%82%8c%e3%82%8b%e5%89%8d%e3%81%ab%e6%b6%88%e3%81%97%e5%8e%bb%e3%82%8a%e3%81%9f","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2013\/12\/10084\/","title":{"rendered":"\u5165\u9580 Capistrano 3 ~ \u5168\u3066\u306e\u624b\u4f5c\u696d\u3092\u751f\u307e\u308c\u308b\u524d\u306b\u6d88\u3057\u53bb\u308a\u305f\u3044"},"content":{"rendered":"<h1>\u306f\u3058\u3081\u306b<\/h1>\n<p>\u3053\u306e\u8a18\u4e8b\u306fGREE Advent Calendar 2013\u5e74\u306e21\u65e5\u76ee\u3067\u3059\u3002\u304a\u697d\u3057\u307f\u304f\u3060\u3055\u3044\uff01<\/p>\n<p>\u3053\u3093\u306b\u3061\u306f\u3001<a href=\"http:\/\/labs.gree.jp\/blog\/2013\/12\/10049\/\">\u30a2\u30b4\u3072\u3052\u304c\u30c0\u30f3\u30c7\u30a3\u30fc\u3060\u3068\u8a55\u5224<\/a>\u306e\u4e5d\u5ca1\u3067\u3059\u3002GREE\u3067\u306f\u3001Java\u3084Scala\u3092\u5e03\u6559\u3059\u308b\u305f\u3081\u306e\u571f\u53f0\u3092\u56fa\u3081\u308b\u305f\u3081\u3001\u30c7\u30d7\u30ed\u30a4\u3084\u76e3\u8996\u306e\u4ed5\u7d44\u307f\u3065\u304f\u308a\u306a\u3069\u3092\u6a2a\u65ad\u7684\u306b\u3084\u3063\u3066\u3044\u307e\u3059\u3002\u4eca\u56de\u306f\u305d\u306e\u904e\u7a0b\u3067\u5f97\u3089\u308c\u305f\u77e5\u8b58\u3092\u300cCapistrano 3\u306e\u5165\u9580\u8a18\u4e8b\u300d\u3068\u3044\u3046\u5f62\u3067\u5171\u6709\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<\/p>\n<h1>\u5168\u3066\u306e\u624b\u4f5c\u696d\u3092\u751f\u307e\u308c\u308b\u524d\u306b\u6d88\u3057\u53bb\u308a\u305f\u3044<\/h1>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306fCapistrano 3\u306e\u57fa\u790e\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002Capistrano 3\u306fRuby\u3092\u30d9\u30fc\u30b9\u306b\u3057\u305f\u30b5\u30fc\u30d0\u64cd\u4f5c\u304a\u3088\u3073\u30c7\u30d7\u30ed\u30a4\u306e\u81ea\u52d5\u5316\u30c4\u30fc\u30eb\u3067\u3059\u3002Capistrano 3\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30d7\u30ed\u30a4\u306a\u3069\u306e\u8907\u96d1\u306a\u30b5\u30fc\u30d0\u64cd\u4f5c\u3092\u81ea\u52d5\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u7279\u306b\u30c7\u30d7\u30ed\u30a4\u306b\u7126\u70b9\u3092\u3042\u3066\u306a\u304c\u3089\u3001Capistrano\u3067\u30b5\u30fc\u30d0\u64cd\u4f5c\u3092\u81ea\u52d5\u5316\u3059\u308b\u8003\u3048\u65b9\u3068\u5b9f\u73fe\u65b9\u6cd5\u3092\u3054\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>Capistrano 3\u306e\u7fd2\u5f97\u306b\u306f\u3042\u308b\u7a0b\u5ea6\u306e\u5b66\u7fd2\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u305d\u306e\u5b66\u7fd2\u30b3\u30b9\u30c8\u3092\u8efd\u304f\u3059\u308b\u305f\u3081\u306b\u672c\u8a18\u4e8b\u3092\u66f8\u304d\u307e\u3057\u305f\u3002\u672c\u8a18\u4e8b\u3092\u8aad\u3093\u3067\u3044\u305f\u3060\u304f\u3053\u3068\u3067\u3001\u307f\u306a\u3055\u3093\u3084\u305d\u306e\u307e\u308f\u308a\u3067Capistrano 3\u304c\u666e\u53ca\u3057\u3066\u3001\u4e16\u754c\u304b\u3089\u4e00\u3064\u3067\u3082\u624b\u4f5c\u696d\u304c\u6d88\u3048\u305f\u3089\u3053\u308c\u307b\u3069\u3046\u308c\u3057\u3044\u4e8b\u306f\u3042\u308a\u307e\u305b\u3093\uff01<\/p>\n<h1>\u5bfe\u8c61<\/h1>\n<p>\u3053\u306e\u8a18\u4e8b\u306e\u30bf\u30fc\u30b2\u30c3\u30c8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>Capistrano\u306e\u6982\u8981\u3092\u77e5\u308a\u305f\u3044\u65b9<\/li>\n<li>Capistrano\u306e\u4f7f\u3063\u3066\u307f\u305f\u3044\u65b9<\/li>\n<li>\u624b\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3057\u305f\u3044\u65b9<\/li>\n<li>\u65e2\u306b\u4ed6\u306e\u30c4\u30fc\u30eb\u3067\u624b\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3057\u3066\u3044\u308b<\/li>\n<\/ul>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306a\u65b9\u304cCapistrano 3\u3092\u4f7f\u3044\u59cb\u3081\u308b\u3068\u304d\u3001\u6700\u521d\u306b\u8aad\u3093\u3067\u3044\u305f\u3060\u3051\u308b\u3068\u6357\u308b\u3088\u3046\u306a\u8a18\u4e8b\u3092\u76ee\u6307\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\uff08Capistrano\u30fbAnsible\u30fbFabric\u306a\u3069\u3092\u4f7f\u3063\u3066\u3001\u30b5\u30fc\u30d0\u64cd\u4f5c\u306e\u81ea\u52d5\u5316\u3092\u65e2\u306b\u884c\u3063\u3066\u3044\u308b\u65b9\u306b\u3068\u3063\u3066\u306f\u3001\u76ee\u65b0\u3057\u3044\u3053\u3068\u306f\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff09<\/p>\n<h1>\u30c7\u30d7\u30ed\u30a4\u306f\u306a\u305c\u624b\u9593\u304c\u304b\u304b\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/h1>\n<p>Web\u30b5\u30fc\u30d3\u30b9\u306a\u3069\u30b5\u30fc\u30d0\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5229\u7528\u3057\u305f\u30b5\u30fc\u30d3\u30b9\u3092\u30e6\u30fc\u30b6\u306e\u7686\u3055\u307e\u306b\u304a\u5c4a\u3051\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30b5\u30fc\u30d0\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3059\u308b\u3060\u3051\u3067\u306f\u306a\u304f\u3001\u5b9f\u969b\u306b\u305d\u308c\u3092\u7a3c\u50cd\u3055\u305b\u308b\u30b5\u30fc\u30d0\u3078\u30c7\u30d7\u30ed\u30a4\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3068\u3053\u308d\u304c\u3001\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30d7\u30ed\u30a4\u3068\u3044\u3046\u4f5c\u696d\u306b\u306f\u610f\u5916\u3068\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u305d\u306e\u7406\u7531\u306f\u3001\u305d\u3082\u305d\u3082\u30c7\u30d7\u30ed\u30a4\u306b\u95a2\u3059\u308b\u8981\u4ef6\u304c\u591a\u5c90\u306b\u308f\u305f\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<h1>\u30c7\u30d7\u30ed\u30a4\u306e\u8981\u4ef6\u3068\u306f\u306a\u3093\u3067\u3057\u3087\u3046\u304b\uff1f<\/h1>\n<p>\u30c7\u30d7\u30ed\u30a4\u306e\u8981\u4ef6\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u6210\u8981\u7d20<\/li>\n<li>\u5b9f\u884c\u74b0\u5883\u3084\u898f\u6a21<\/li>\n<li>\u8a31\u5bb9\u6642\u9593<\/li>\n<li>\u7d0d\u671f\u306f\u3044\u3064\u307e\u3067\u304b<\/li>\n<li>\u4e88\u7b97\u306f\u3044\u304f\u3089\u4f7f\u3048\u308b\u304b<\/li>\n<\/ul>\n<h2>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u6210\u8981\u7d20<\/h2>\n<p>\u3069\u3093\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3001\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3001\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u3064\u304b\u3063\u3066\u958b\u767a\u3055\u308c\u305f\u30a2\u30d7\u30ea\u304b\uff1f<\/p>\n<h2>\u5b9f\u884c\u74b0\u5883\u3084\u898f\u6a21<\/h2>\n<p>\u3069\u3093\u306a\u30b5\u30fc\u30d0\u4f55\u53f0\u306b\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u304b\uff1f<\/p>\n<h2>\u8a31\u5bb9\u6642\u9593<\/h2>\n<p>\u30c7\u30d7\u30ed\u30a4\u958b\u59cb\u304b\u3089\u7d42\u4e86\u307e\u3067\u306b\u3069\u308c\u304f\u3089\u3044\u6642\u9593\u3092\u304b\u3051\u3066\u3088\u3044\u304b\uff1f<\/p>\n<h2>\u7d0d\u671f\u306f\u3044\u3064\u307e\u3067\u304b<\/h2>\n<p>\u81ea\u52d5\u5316\u306b\u304b\u3051\u308b\u6642\u9593\u304c\u3042\u308b\u306e\u304b\uff1f<\/p>\n<h2>\u4e88\u7b97\u306f\u3044\u304f\u3089\u4f7f\u3048\u308b\u304b<\/h2>\n<p>\u81ea\u52d5\u5316\u306b\u304b\u3051\u308b\u521d\u671f\u8cbb\u7528\u304c\u3067\u308b\u306e\u304b\uff1f<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u6bce\u56de\u304a\u306a\u3058\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u30fb\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u30fb\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3092\u4f7f\u3063\u3066\u958b\u767a\u3057\u3066\u3001\u6bce\u56de\u540c\u3058\u30b5\u30fc\u30d0\u3078\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u8a71\u306f\u5c11\u3057\u7c21\u5358\u306b\u306a\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u305d\u3046\u3067\u306f\u306a\u3044\u3068\u3053\u308d\u306b\u30c7\u30d7\u30ed\u30a4\u306e\u96e3\u3057\u3055\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h1>\u624b\u4f5c\u696d\u3067\u3044\u3044\u306e\u3067\u306f\uff1f<\/h1>\n<p>\u524d\u8ff0\u306e\u3068\u304a\u308a\u591a\u5c90\u306b\u308f\u305f\u308b\u30c7\u30d7\u30ed\u30a4\u306e\u8981\u4ef6\u306b\u3064\u3044\u3066\u3001\u308f\u305f\u3057\u305f\u3061\u306f\u81ea\u52d5\u5316\u307e\u305f\u306f\u624b\u4f5c\u696d\u3067\u5bfe\u5fdc\u3057\u307e\u3059\u3002<\/p>\n<p>\u624b\u4f5c\u696d\u306f\u521d\u671f\u6295\u8cc7\u304c\u5c11\u306a\u3044\u3068\u3044\u3046\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\u4e00\u65b9\u3001\u624b\u9806\u66f8\u3092\u4f5c\u6210\u3057\u305f\u308a\u4f5c\u696d\u3092\u5b9f\u65bd\u3059\u308b\u305f\u3081\u306e\u4eba\u7684\u30b3\u30b9\u30c8\u304c\u7d99\u7d9a\u7684\u306b\u304b\u304b\u3063\u305f\u308a\u3001\u7e70\u308a\u8fd4\u3057\u4f5c\u696d\u3059\u308b\u4e2d\u3067\u30df\u30b9\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3068\u3044\u3046\u30c7\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u81ea\u52d5\u5316\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<h1>\u81ea\u52d5\u5316\u3059\u308c\u3070\u3044\u3044\u306e\u3067\u306f\uff1f<\/h1>\n<p>\u30fb\u30fb\u30fb\u3068\u601d\u3046\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u81ea\u52d5\u5316\u3059\u308b\u305f\u3081\u306b\u3082\u8d85\u3048\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3089\u306a\u3044\u58c1\u304c\u3042\u308a\u307e\u3059\u3002\u751f\u7523\u6027\u3068\u4fdd\u5b88\u6027\u306b\u3064\u3044\u3066\u306e\u58c1\u3067\u3059\u3002<\/p>\n<h2>\u751f\u7523\u6027\u306e\u58c1<\/h2>\n<p>\u301c\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8? Ant? Ansible? Fabric? Capistrano?\u301c<\/p>\n<p>\u65b0\u898f\u958b\u767a\u3059\u308b\u5834\u5408\u306f\u3001\u72ec\u81ea\u306b\u30c7\u30d7\u30ed\u30a4\u306e\u67a0\u7d44\u307f\u3092\u8003\u3048\u308b\u304b\u3001OSS\u306a\u3069\u65e2\u5b58\u306e\u3082\u306e\u3092\u5229\u7528\u3059\u308b\u304b\u3068\u3044\u3046\u9078\u629e\u80a2\u304c\u3042\u308a\u307e\u3059\u3002\u72ec\u81ea\u306b\u3064\u304f\u3063\u305f\u90e8\u5206\u306f\u5b9f\u88c5\u3084\u30c6\u30b9\u30c8\u306e\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308a\u307e\u3059\u3057\u3001\u304b\u3068\u3044\u3063\u3066\u65e2\u5b58\u306e\u3082\u306e\u3092\u6d41\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u5b66\u7fd2\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u3059\u3053\u3057\u3067\u3082\u697d\u306b\u65e9\u304f\u5b9f\u88c5\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<h2>\u4fdd\u5b88\u6027\u306e\u58c1<\/h2>\n<p>\u301c\u5f15\u304d\u7d99\u304e\u306f\uff1f\u80b2\u6210\u306f\uff1f\u301c<\/p>\n<p>\u72ec\u81ea\u306b\u958b\u767a\u3059\u308b\u3068\u3001\u5f15\u304d\u7d99\u304e\u304c\u3080\u305a\u304b\u3057\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u8a2d\u8a08\u3084\u5b9f\u88c5\u306e\u30dd\u30a4\u30f3\u30c8\u3001\u4f55\u304b\u8a2d\u5b9a\u3067\u304d\u3066\u4f55\u304c\u8a2d\u5b9a\u3067\u304d\u306a\u3044\u306e\u304b\u30fb\u30fb\u30fb\u3002\u5341\u5206\u306a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u81ea\u5206\u3067\u66f8\u3044\u3066\u6b8b\u3059\u3053\u3068\u304c\u3067\u304d\u308c\u3070\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u6642\u9593\u3084\u4e88\u7b97\u306e\u90fd\u5408\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3060\u3051\u5b9f\u88c5\u3057\u3066\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u306a\u3044\u3001\u3068\u3044\u3046\u3053\u3068\u3082\u3042\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u3059\u3053\u3057\u3067\u3082\u697d\u306b\u5f15\u304d\u7d99\u304e\u3084\u80b2\u6210\u3092\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n<h1>\u81ea\u52d5\u5316\u3057\u305f\u3044<\/h1>\n<p>\u305d\u3093\u306a\u308f\u3051\u3067\u3001\u5b9f\u969b\u306b\u308f\u305f\u3057\u305f\u3061\u304c\u30c7\u30d7\u30ed\u30a4\u3092\u81ea\u52d5\u5316\u3059\u308b\u3068\u304d\u306b\u306f\u3001\u751f\u7523\u6027\u3001\u4fdd\u5b88\u6027\u3001\u305d\u3057\u3066\u305d\u3082\u305d\u3082\u306e\u30c7\u30d7\u30ed\u30a4\u306e\u8981\u4ef6\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3092\u8003\u3048\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u96e3\u3057\u3044\u5224\u65ad\u3067\u3059\u3002\u4eee\u306b\u300c\u4eca\u56de\u306f\u6642\u9593\u304c\u306a\u3044\u304b\u3089\u624b\u4f5c\u696d\u3067\u30ab\u30d0\u30fc\u300d\u3084\u300c\u3068\u308a\u3042\u3048\u305a\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u81ea\u52d5\u5316\u3057\u3088\u3046\u3002\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u5fc5\u8981\u306b\u306a\u3063\u3066\u304b\u3089\u300d\u3068\u3044\u3063\u305f\u5bfe\u5fdc\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u305d\u308c\u306f\u4ed5\u65b9\u306e\u306a\u3044\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u7406\u60f3\u3092\u3044\u3048\u3070\u3001\u751f\u7523\u6027\u3068\u4fdd\u5b88\u6027\u306e\u58c1\u3092\u3053\u3048\u3066\u30b5\u30af\u30c3\u3068\u81ea\u52d5\u5316\u3057\u305f\u3044\u3067\u3059\u3088\u306d\u3002<\/p>\n<h1>Capistrano 3\u3067\u306f\u3058\u3081\u308b\u81ea\u52d5\u5316<\/h1>\n<p>\u524d\u8ff0\u306e\u751f\u7523\u6027\u3068\u4fdd\u5b88\u6027\u306e\u58c1\u3092\u3053\u3048\u308b\u4e00\u3064\u306e\u65b9\u6cd5\u306f\u3001\u5b66\u7fd2\u3068\u5f15\u304d\u7d99\u304e\u306e\u30b3\u30b9\u30c8\u3092\u4e0b\u3052\u308b\u3053\u3068\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u3053\u306e\u8a18\u4e8b\u3092\u304a\u9001\u308a\u3057\u307e\u3059\u3002<\/p>\n<h1>\u671f\u5f85\u3055\u308c\u308b\u7d50\u679c<\/h1>\n<h2>Capistrano\u63a1\u7528\u306b\u3088\u308b\u5909\u5316<\/h2>\n<p>Capistrano\u3092\u63a1\u7528\u3059\u308b\u3068\u3001\u3044\u308d\u3044\u308d\u306a\u30b5\u30fc\u30d3\u30b9\u306e\u30c7\u30d7\u30ed\u30a4\u306a\u3069\u306e\u624b\u9806\u304c\u300cCapistrano\u306e\u8a2d\u5b9a\u300d\u3068\u3044\u3046\u5f62\u306b\u7d71\u4e00\u3055\u308c\u307e\u3059\u3002<br \/>\n\u305d\u308c\u3067\u306f\u3053\u306e\u3088\u3046\u306a\u5909\u5316\u306b\u3088\u3063\u3066\u3001\u3069\u3093\u306a\u30e1\u30ea\u30c3\u30c8\u30fb\u30c7\u30e1\u30ea\u30c3\u30c8\u304c\u767a\u751f\u3059\u308b\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<h2>\u30e1\u30ea\u30c3\u30c8<\/h2>\n<h3>\u4fdd\u5b88\u6027\u304c\u9ad8\u3044 ~maintainable~<\/h3>\n<p>\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u7b49\u3060\u3068\u66f8\u3044\u305f\u4eba\u306b\u3088\u3063\u3066\u8a2d\u8a08\u601d\u60f3\u304c\u7570\u306a\u308b\u306e\u3067\u3001\u8a2d\u8a08\u601d\u60f3\u3092\u8aad\u307f\u53d6\u308b\u3068\u3053\u308d\u304b\u3089\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002Capistrano\u3092\u77e5\u3063\u3066\u3044\u308b\u4eba\u540c\u58eb\u3067\u3042\u308c\u3070\u3001\u4ed6\u4eba\u306e\u66f8\u3044\u305f\u30c7\u30d7\u30ed\u30a4\u8a2d\u5b9a\u3082\u8aad\u307f\u3084\u3059\u304f\u3001\u7d50\u679c\u7684\u306b\u4fdd\u5b88\u3084\u5f15\u304d\u7d99\u304e\u304c\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u751f\u7523\u6027\u304c\u9ad8\u3044 ~productive~<\/h3>\n<p>\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3060\u3068\u3001\u4f7f\u3046\u30c4\u30fc\u30eb\u3092\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u306a\u3069\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u4f9d\u5b58\u30b9\u30af\u30ea\u30d7\u30c8\u306fgit\u3067\u53d6\u5f97\u3001\u3068\u304b\u8272\u3005\u306a\u914d\u5e03\u5f62\u614b\u304c\u4eba\u3084\u7d44\u7e54\u306b\u3088\u308a\u307e\u3059\u3002\u66f8\u304f\u3053\u3068\u306f\u3067\u304d\u3066\u3082\u3001\u518d\u5229\u7528\u3057\u3065\u3089\u3044\u3068\u304b\u3001\u65b0\u3057\u3044\u958b\u767a\u8005\u304c\u6765\u305f\u6642\u306b\u30c7\u30d7\u30ed\u30a4\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u958b\u767a\u74b0\u5883\u6574\u3048\u308b\u306e\u304c\u5927\u5909\u306a\u3069\u306e\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Ruby\u30e9\u30a4\u30d6\u30e9\u30ea\u3084Capistrano\u62e1\u5f35\u3068\u3044\u3046\u518d\u914d\u5e03\u306e\u5f62\u5f0f\u3068\u3001gem\u3084bundler\u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u306e\u5b58\u5728\u306b\u3088\u308a\u3001\u30c7\u30d7\u30ed\u30a4\u306b\u3088\u304f\u4f7f\u3046\u30ed\u30b8\u30c3\u30af\u306e\u518d\u5229\u7528\u304c\u3057\u3084\u3059\u3044\u3067\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306fbundle install\u3059\u308c\u3070Capistrano\u672c\u4f53\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u30fb\u62e1\u5f35\u3075\u304f\u3081\u3066\u63c3\u3044\u307e\u3059\u3002<\/p>\n<h3>\u67d4\u8edf\u6027\u304c\u9ad8\u3044 ~flexible~<\/h3>\n<p>\u65e2\u306b\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u624b\u9806\u3092\u66f8\u3044\u305f\u624b\u9806\u66f8\u3084\u3001\u81ea\u52d5\u5316\u306e\u305f\u3081\u306e\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u304a\u6301\u3061\u3067\u3057\u3087\u3046\u304b\uff1fCapistrano\u30bf\u30b9\u30af\u81ea\u4f53\u306f\u300c\u30b3\u30de\u30f3\u30c9\u3092\u9806\u756a\u306b\u5b9f\u884c\u3059\u308b\u300d\u3060\u3051\u306a\u306e\u3067\u3001\u30c7\u30d7\u30ed\u30a4\u306e\u305f\u3081\u306b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3084\u3063\u3066\u3044\u305f\u3088\u3046\u306a\u3053\u3068\u306f\u3072\u3068\u901a\u308a\u3067\u304d\u307e\u3059\u3002nohup\u3067\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u30d7\u30ed\u30bb\u30b9\u5316\u30fbupstart\/monit\/daemontools\/god\u306a\u3069\u3067\u30c7\u30fc\u30e2\u30f3\u5316\u30fb\u30d7\u30ed\u30bb\u30b9\u76e3\u8996\u30fb\u30d7\u30ed\u30bb\u30b9ID\u306e\u7ba1\u7406\u306a\u3069\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3084Ruby\u30b3\u30fc\u30c9\u3067\u8868\u73fe\u3067\u304d\u308b\u3053\u3068\u3067\u3042\u308c\u3070\u3067\u304d\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u30c7\u30d7\u30ed\u30a4\u306b\u95a2\u3057\u3066\u3044\u3048\u3070\u3001Capistrano\u306b\u30ed\u30c3\u30af\u30a4\u30f3\u3055\u308c\u308b\u3053\u3068\u306b\u3088\u308a\u6a5f\u80fd\u3084\u8981\u4ef6\u304c\u5236\u9650\u3055\u308c\u308b\u3053\u3068\u306f\u5c11\u306a\u3044\u306f\u305a\u3067\u3059\u3002<\/p>\n<h3>\u8aad\u307f\u3084\u3059\u304f\u3001\u66f8\u304d\u3084\u3059\u3044<\/h3>\n<p>\u307e\u308b\u3067\u82f1\u8a9e\u306e\u3088\u3046\u306a\u6d17\u7df4\u3055\u308c\u305fDSL\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u3068\u30b5\u30fc\u30d0\u3078\u306e\u64cd\u4f5c\u304cDSL\u306e\u6587\u6cd5\u4e0a\u3001\u660e\u78ba\u306b\u533a\u5225\u3055\u308c\u307e\u3059\u3002\u307e\u305a\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u3067\u4f55\u3092\u3057\u3066\u3001\u305d\u308c\u304b\u3089\u30b5\u30fc\u30d0\u3067\u4f55\u3092\u3057\u3066\u30fb\u30fb\u30fb\u3068\u3044\u3046\u5927\u5c40\u3092\u3064\u304b\u307f\u3084\u3059\u3044\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u81ea\u7136\u3068\u66f8\u3051\u308b\u3088\u3046\u306b\u5f37\u5236\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u30c7\u30e1\u30ea\u30c3\u30c8<\/h2>\n<h3>\u7fd2\u5f97\u306b\u6642\u9593\u304c\u304b\u304b\u308b<\/h3>\n<p>\u78ba\u304b\u306b\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u7279\u306bCapistrano 3\u306f2013\u5e748\u6708\u306b\u516c\u958b\u3055\u308c\u305f\u3070\u304b\u308a\u3067\u3059\u3002\u307e\u3060\u60c5\u5831\u304c\u5c11\u306a\u3044\u3046\u3048\u3001\u65e5\u672c\u8a9e\u306e\u60c5\u5831\u3068\u306a\u308b\u3068\u3055\u3089\u306b\u9650\u3089\u308c\u307e\u3059\u3002\u65b0\u3057\u3044\u3082\u306e\u3092\u899a\u3048\u308b\u3060\u3051\u3067\u3082\u6642\u9593\u304c\u304b\u304b\u308b\u306e\u306b\u3001\u60c5\u5831\u3082\u5c11\u306a\u3044\u306e\u3067\u306f\u56f0\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u307f\u306a\u3055\u3093\u306e\u305f\u3081\u306b\u3001\u3053\u306e\u8a18\u4e8b\u3092\u66f8\u304d\u307e\u3057\u305f\uff01\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3093\u3067\u3044\u305f\u3060\u304f\u3053\u3068\u3067\u3001\u9ad8\u901f\u306bCapistrano\u3092\u7fd2\u5f97\u3067\u304d\u308c\u3070\u3046\u308c\u3057\u3044\u3067\u3059\u3002<\/p>\n<h1>\u307e\u305a\u899a\u3048\u308b\u3053\u3068<\/h1>\n<p>\u5927\u304d\u304f\u5206\u3051\u30663\u3064\u3092\u899a\u3048\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<ul>\n<li>Capistrano\u306e\u30e2\u30c7\u30eb<\/li>\n<li>Capistrano\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/li>\n<li>Capistrano\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u66f8\u304d\u65b9<\/li>\n<\/ul>\n<h2>Capistrano\u306e\u30e2\u30c7\u30eb<\/h2>\n<p>\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u3084\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u77e5\u308b\u524d\u306b\u3001\u305d\u3082\u305d\u3082\u3069\u3046\u3044\u3046\u67a0\u7d44\u307f\u306e\u4e2d\u3067\u4f55\u3092\u3059\u308b\u306e\u304b\u3068\u3044\u3046\u5168\u4f53\u50cf\u3092\u77e5\u3063\u3066\u304a\u304f\u3068\u7406\u89e3\u304c\u9032\u307f\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u308c\u304c\u3059\u306a\u308f\u3061Capistrano\u306e\u30e2\u30c7\u30eb\u3067\u3059\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u8a2d\u8a08\u66f8\u304b\u3089\u3001\u6587\u7ae0\u306f\u76ee\u6b21\u304b\u3089\u8aad\u307f\u59cb\u3081\u308b\u3068\u5168\u4f53\u50cf\u304c\u982d\u306b\u306f\u3044\u3063\u3066\u7406\u89e3\u3057\u3084\u3059\u304b\u3063\u305f\u308a\u3057\u307e\u3059\u3088\u306d\uff01\u540c\u3058\u3088\u3046\u306b\u30c4\u30fc\u30eb\u306f\u30e2\u30c7\u30eb\u304b\u3089\u5165\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>Capistrano\u306e\u30e2\u30c7\u30eb\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u6700\u5c0f\u9650\u5fc5\u8981\u306a\u5358\u8a9e\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li> Capistrano<\/li>\n<li> \u30e9\u30a4\u30d6\u30e9\u30ea<\/li>\n<li> \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/li>\n<li> \u30db\u30b9\u30c8<\/li>\n<\/ul>\n<h3>Capistrano<\/h3>\n<p>Capistrano\u306f\u304a\u304a\u307e\u304b\u306b\u4ee5\u4e0b\u306e3\u8981\u7d20\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>cap\u30b3\u30de\u30f3\u30c9<\/li>\n<li>Capistrano\u306e\u30e9\u30a4\u30d6\u30e9\u30ea<\/li>\n<li>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30d7\u30ed\u30a4\u30bf\u30b9\u30af<\/li>\n<\/ul>\n<p>\u308f\u305f\u3057\u305f\u3061\u306fCapistrano\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3084\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30bf\u30b9\u30af\u3092\u5229\u7528\u3057\u3066\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8a18\u8ff0\u3057\u3066\u3001\u305d\u308c\u3092cap\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002\u3059\u308b\u3068\u3001Capistrano\u304c\u3082\u308d\u3082\u308d\u306e\u64cd\u4f5c\u3092\u81ea\u52d5\u7684\u306b\u884c\u306a\u3063\u3066\u304f\u308c\u307e\u3059\u3002Capistrano\u304c\u30aa\u30fc\u30c8\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u30c4\u30fc\u30eb\u3067\u3042\u308b\u3068\u8a00\u308f\u308c\u308b\u306e\u306f\u3053\u306e\u305f\u3081\u3067\u3059\u3002<\/p>\n<h3>\u30e9\u30a4\u30d6\u30e9\u30ea<\/h3>\n<p>Capistrano\u306f\u5358\u306a\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306a\u306e\u3067\u3001\u307f\u306a\u3055\u3093\u304c\u958b\u767a\u30fb\u5229\u7528\u3057\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u56fa\u6709\u306e\u30c7\u30d7\u30ed\u30a4\u65b9\u6cd5\u3084\u3001\u30b5\u30fc\u30d0\u306e\u60c5\u5831\u306a\u3069\u306f\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u7686\u3055\u3093\u306e\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3059\u308b\u305f\u3081\u306b\u306f\u3001Capistrano\u3092\u7686\u3055\u3093\u597d\u307f\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u4e00\u5ea6\u3060\u3051\u4f7f\u3046\u3082\u306e\u3068\u518d\u5229\u7528\u3059\u308b\u3082\u306e\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u518d\u5229\u7528\u6027\u304c\u9ad8\u3044\u3082\u306e\u306f\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u547c\u3073\u307e\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u4ee5\u4e0b\u306e2\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>Ruby\u30e9\u30a4\u30d6\u30e9\u30ea<\/li>\n<li>Capistrano\u62e1\u5f35<\/li>\n<\/ul>\n<h3>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/h3>\n<p>Capistrano\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306e\u969b\u3001\u4e00\u5ea6\u3060\u3051\u4f7f\u3046\u8a2d\u5b9a(\u4f8b\u3048\u3070\u3042\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30b5\u30fc\u30d0\u60c5\u5831\u3001\u3042\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u56fa\u6709\u306e\u30bf\u30b9\u30af)\u306f\u524d\u8ff0\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u306f\u306a\u304f\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u4ee5\u4e0b\u306e2\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>config\/deploy.rb<\/li>\n<li>config\/deploy\/\u4efb\u610f\u306e\u30b9\u30c6\u30fc\u30b8\u540d.rb<\/li>\n<\/ul>\n<p>\u300cdeploy.rb\u300d\u306f\u30c7\u30d7\u30ed\u30a4\u7b49\u306e\u5171\u901a\u7684\u306a\u8a2d\u5b9a\u3084\u624b\u9806\u3092\u66f8\u304d\u307e\u3059\u3002\u300c\u4efb\u610f\u306e\u30b9\u30c6\u30fc\u30b8\u540d.rb\u300d\u306f\u672c\u756a\u74b0\u5883\u30fb\u30c6\u30b9\u30c8\u74b0\u5883\u30fb\u958b\u767a\u74b0\u5883\u306a\u3069\u306e\u74b0\u5883\u3054\u3068\u306b\u7570\u306a\u308b\u8a2d\u5b9a\u3084\u30bf\u30b9\u30af\u3092\u66f8\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30db\u30b9\u30c8<\/h3>\n<p>\u30c7\u30d7\u30ed\u30a4\u306b\u3042\u305f\u3063\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u5bfe\u8c61\u30de\u30b7\u30f3\u306f\u5927\u304d\u304f\u5206\u3051\u3066\u3001\u300c\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u300d\u3068\u300c\u30b5\u30fc\u30d0\u300d\u306e2\u3064\u304c\u3042\u308a\u307e\u3059\u3002\u3069\u3053\u3067\u3069\u306e\u3088\u3046\u306a\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u304b\u6c7a\u307e\u3063\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4f8b\u3048\u3070\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30d3\u30eb\u30c9\u3057\u3066\u3001\u30b5\u30fc\u30d0\u3078\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3001\u3068\u3044\u3046\u3088\u3046\u306a\u4f7f\u3044\u5206\u3051\u3092\u30a4\u30e1\u30fc\u30b8\u3057\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u308f\u304b\u308a\u3084\u3059\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u3001Capistrano\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u30fb\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u30fb\u30db\u30b9\u30c8\u306e4\u3064\u3067\u3059\u3002\u3053\u306e4\u3064\u306f\u305d\u3089\u3067\u3082\u8aac\u660e\u3067\u304d\u308b\u3088\u3046\u306b\u899a\u3048\u3066\u304f\u3060\u3055\u3044\u306d\uff01\u305d\u306e\u3042\u3068\u306e\u8a73\u7d30\u306a\u3068\u3053\u308d\u306e\u7406\u89e3\u304c\u683c\u6bb5\u306b\u9032\u3080\u306f\u305a\u3067\u3059\u3002<\/p>\n<h2>Capistrano\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/h2>\n<p>Capistrano\u3092\u4f7f\u3046\u305f\u3081\u306b\u306f\u3001\u3044\u3064\u3001\u4f55\u306e\u305f\u3081\u306b\u3001\u3069\u3093\u306a\u64cd\u4f5c\u3092\u3057\u3066\u3069\u3093\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u3051\u3070\u3088\u3044\u3067\u3057\u3087\u3046\u304b\uff1f\u305d\u306e\u5168\u4f53\u306e\u6d41\u308c\u3092\u304a\u3055\u3089\u3044\u3057\u3066\u304a\u304d\u3001\u305d\u308c\u304b\u3089\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u3068\u64cd\u4f5c\u3092\u899a\u3048\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>Capistrano\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<li>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u3072\u306a\u5f62\u3092\u3064\u304f\u308b<\/li>\n<li>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/li>\n<li>cap\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u306e\u6d41\u308c\u306b\u305d\u3063\u3066\u3001\u5177\u4f53\u7684\u306a\u8aac\u660e\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u3055\u3063\u305d\u304f\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u958b\u3044\u3066\u3001\u307f\u306a\u3055\u3093\u306e\u74b0\u5883\u306b\u7f6e\u304d\u63db\u3048\u306a\u304c\u3089\u3001\u5b9f\u969b\u306bCapistrano\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>Capistrano\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046<\/h1>\n<h2>1. Capistrano\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u301c\u30b3\u30de\u30f3\u30c9\u4e00\u767a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u301c<\/p>\n<p>RubyGems\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3042\u308c\u3070\u3001<code>gem install capistrano<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067Capistrano\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u5b8c\u4e86\u3067\u3059\uff01\u3082\u3057RubyGems\u3092root\u6a29\u9650\u3042\u308a\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u5834\u5408\u306f\u3001sudo\u3092\u304a\u5fd8\u308c\u306a\u304f\u3002<\/p>\n<p>Bundler\u3092\u304a\u4f7f\u3044\u306e\u5834\u5408\u306f\u3001Gemfile\u306b<code>gem 'capistrano', '~&gt; 3.0.1'<\/code>\u306e\u8a18\u8ff0\u3092\u8ffd\u52a0\u3057\u3066<code>bundle install<\/code>\u3092\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002Bundler\u3092\u304a\u4f7f\u3044\u3067\u306a\u3044\u5834\u5408\u306f\u6c17\u306b\u3057\u306a\u304f\u3066OK\u3067\u3059\u3002<\/p>\n<h2>2. \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u3072\u306a\u5f62\u3092\u3064\u304f\u308b<\/h2>\n<p>Capistrano\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001Capistrano\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u914d\u7f6e\u5148\u3068\u306a\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u540d\u524d\u306f\u306a\u3093\u3067\u3082OK\u3067\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066<code>cap install<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u524d\u8ff0\u306e\u300c\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u300d\u306e\u3072\u306a\u5f62\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>\n$ mkdir test-project\n$ cd test-project\n$ cap install\n<\/pre>\n<h2>3. \u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/h2>\n<p><code>cap install<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u3059\u308b\u3068\u524d\u8ff0\u306e\u300c\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u300d\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u3001\u81ea\u52d5\u5316\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002<\/p>\n<h2>4. \u30b5\u30f3\u30d7\u30eb\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8<\/h2>\n<p>\u7406\u89e3\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u3001\u307e\u305a\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8\u3092\u5171\u6709\u3057\u3066\u304a\u304d\u307e\u3059\u3002\u3053\u308c\u304b\u3089\u3001\u7686\u3055\u3093\u3068\u4e00\u7dd2\u306b\u3053\u306e\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8\u306b\u5411\u304b\u3063\u3066\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u66f8\u304d\u65b9\u3092\u3054\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002\u73fe\u6642\u70b9\u3067\u306f\u30a4\u30e1\u30fc\u30b8\u304c\u63b4\u3081\u306a\u304f\u3066\u3082OK\u3067\u3059\u3002<\/p>\n<h3>config\/deploy\/test.rb<\/h3>\n<pre>\n\u4f5c\u696d\u5bfe\u8c61\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\n<\/pre>\n<h3>config\/deploy.rb<\/h3>\n<pre>\nCapistrano\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u306e\u6d88\u53bb\n\n\u30bf\u30b9\u30af\u300c\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u53d6\u5f97\u300d\u306e\u5b9a\u7fa9\n\n\u30bf\u30b9\u30af\u300c\u30d3\u30eb\u30c9\u3068\u30a2\u30fc\u30ab\u30a4\u30d3\u30f3\u30b0\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u300d\u306e\u5b9a\u7fa9\n\n\u30bf\u30b9\u30af\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d3\u30eb\u30c9\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\u3068\u505c\u6b62\u300d\u306e\u5b9a\u7fa9\n<\/pre>\n<h2>5. Capistrano\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u306e\u6d88\u53bb<\/h2>\n<p>\u307e\u305a\u3001Capistrano\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u3092\u5168\u3066\u6d88\u3057\u307e\u3059\uff01<\/p>\n<p>\u524d\u8ff0\u306e\u3068\u304a\u308a\u3001Capistrano\u306b\u306f\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u5247\u3063\u305f\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u306b\u306f\u3001Capistrano\u306e\u63a8\u5968\u3059\u308b\u30c7\u30d7\u30ed\u30a4\u65b9\u6cd5\u306b\u5247\u3063\u305f\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3067\u4ee5\u524d\u306e\u30ea\u30ea\u30fc\u30b9\u7269\u3092\u6b8b\u3057\u3066\u304a\u304f\u306a\u3069\u3067\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f7f\u3046\u304b\u3069\u3046\u304b\u3068\u3044\u3063\u305f\u3053\u3068\u306f\u5b9f\u88c5\u306e\u8a73\u7d30\u3067\u3042\u308a\u3001\u3053\u306e\u8a18\u4e8b\u306e\u7bc4\u56f2\u5916\u3068\u3044\u3046\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u305d\u3046\u3059\u308b\u3053\u3068\u3067\u3001\u308f\u305f\u3057\u3084\u7686\u3055\u3093\u306f\u307e\u305a\u300c\u3053\u308c\u307e\u3067\u624b\u52d5\u3001\u81ea\u52d5\u3067\u304a\u3053\u306a\u3063\u3066\u304d\u305f\u30c7\u30d7\u30ed\u30a4\u3092\u305d\u306e\u307e\u307eCapistrano\u5316\u3059\u308b\u306b\u306f\u3069\u3046\u3057\u305f\u3044\u3044\u304b\u300d\u3068\u3044\u3046\u30bf\u30b9\u30af\u306b\u96c6\u4e2d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Capistrano\u304c\u63a8\u5968\u3059\u308b\u30c7\u30d7\u30ed\u30a4\u306e\u4ed5\u69d8\u3092\u628a\u63e1\u3057\u3001\u65e2\u5b58\u306e\u30c7\u30d7\u30ed\u30a4\u624b\u9806\u3092\u305d\u308c\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u3057\u3066\u304b\u3089Capistrano\u3078\u79fb\u884c\u3059\u308b\u306e\u306f\u624b\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u3002\u305d\u308c\u3088\u308a\u3082\u307e\u305a\u79fb\u884c\u3057\u3066\u3057\u307e\u3063\u3066\u304b\u3089\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066Capistrano\u306e\u63a8\u5968\u30b9\u30bf\u30a4\u30eb\u3078\u5f90\u3005\u306b\u5bc4\u305b\u3066\u3044\u304f\u307b\u3046\u304c\u5bb9\u6613\u306a\u306f\u305a\u3067\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u4e00\u5ea6\u306b\u5909\u3048\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3053\u3068\u304c\u5c11\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u305d\u308c\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u306f\u3001Capistrano\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u3092\u4e00\u5ea6\u6d88\u3057\u3066\u3057\u307e\u3044\u307e\u3059\uff01<\/p>\n<pre>\nframework_tasks = [:starting, :started, :updating, :updated, :publishing, :published, :finishing, :finished]\n\nframework_tasks.each do |t|\n  Rake::Task[\"deploy:#{t}\"].clear\nend\n\nRake::Task[:deploy].clear\n<\/pre>\n<p>Capistrano\u306b\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u300cdeploy\u300d\u3068\u3044\u3046\u30bf\u30b9\u30af\u3068\u3001\u305d\u308c\u304c\u547c\u3073\u51fa\u3059\u8907\u6570\u306e\u300cdeploy:\u30b5\u30d6\u30bf\u30b9\u30af\u300d\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002Capistrano\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u67a0\u7d44\u307f\u306e\u4e2d\u3067\u30c7\u30d7\u30ed\u30a4\u3092\u884c\u3046\u5834\u5408\u306f\u3001\u300cdeploy:\u30b5\u30d6\u30bf\u30b9\u30af\u300d\u3092\u518d\u5b9a\u7fa9\u3059\u308b\u3060\u3051\u3067\u3088\u3044\u306e\u3067\u4fbf\u5229\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u305d\u308c\u3089\u304c\u5fc5\u8981\u306a\u3044\u306e\u3067\u6d88\u53bb\u3057\u307e\u3059\u3002\u6d88\u53bb\u3092\u884c\u3063\u3066\u3044\u308b\u30b3\u30fc\u30c9\u304c<code>Rake::Task[\u6d88\u53bb\u3057\u305f\u3044\u30bf\u30b9\u30af\u540d].clear<\/code>\u3067\u3059\u3002\u5b9f\u306fCapistrano 3\u306fRake\u3068\u3044\u3046\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u3092\u5fdc\u7528\u3057\u3066\u4f5c\u3089\u308c\u3066\u3044\u307e\u3059\u3002<code>task<\/code>\u3067\u30bf\u30b9\u30af\u3092\u5b9a\u7fa9\u3057\u3066\u3001\u305d\u308c\u3092\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306f\u3001Rake\u306e\u6a5f\u80fd\u3067\u3059\u3002\u4eca\u56de\u306f\u305d\u306e\u4e8b\u5b9f\u3092\u5fdc\u7528\u3057\u3066\u3001Rake\u306e\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u3092\u6d88\u53bb\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u306fCapistrano 3\u306e<a href=\"https:\/\/github.com\/capistrano\/capistrano\/blob\/master\/lib\/capistrano\/tasks\/framework.rake\">framework.rake<\/a>\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u8aad\u3093\u3067\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>6. config\/deploy\/\u30b9\u30c6\u30fc\u30b8\u540d.rb\u3092\u66f8\u304f<\/h2>\n<p>\u30b9\u30c6\u30fc\u30b8\u540d.rb(\u4eca\u56de\u306f\u30b9\u30c6\u30fc\u30b8\u540d\u3092<code>test<\/code>\u3068\u3057\u307e\u3059)\u306b\u306f\u3001\u30b9\u30c6\u30fc\u30b8\u6bce\u306b\u7570\u306a\u308b\u8a2d\u5b9a\u3092\u66f8\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u305d\u306e\u30b9\u30c6\u30fc\u30b8\u3067\u4f5c\u696d\u5bfe\u8c61\u30b5\u30fc\u30d0<\/li>\n<li>\u305d\u306e\u30b9\u30c6\u30fc\u30b8\u3060\u3051\u3067\u5b9f\u884c\u3059\u308b\u30bf\u30b9\u30af<\/li>\n<\/ul>\n<p>\u5178\u578b\u7684\u306a\u306e\u306f\u3001\u524d\u8005\u306e\u300c\u4f5c\u696d\u5bfe\u8c61\u30b5\u30fc\u30d0\u300d\u306e\u8a2d\u5b9a\u3067\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30db\u30b9\u30c8\u540d<\/li>\n<li>\u30b5\u30fc\u30d0\u30ed\u30fc\u30eb<\/li>\n<li>\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6<\/li>\n<li>SSH\u8a2d\u5b9a<\/li>\n<li>\u305d\u306e\u4ed6\u3001\u305d\u306e\u30b5\u30fc\u30d0\u306b\u7d10\u3065\u304f\u4efb\u610f\u306e\u8a2d\u5b9a<\/li>\n<\/ul>\n<p>\u3053\u306e\u8a2d\u5b9a\u3092\u884c\u3046\u305f\u3081\u306b\u306f\u3001<code>server<\/code>\u3068\u3044\u3046\u8a9e\u5f59\u3068\u3001<br \/>\n<code>server \u30db\u30b9\u30c8\u540d, user: \u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u540d, roles: %{\u30b5\u30fc\u30d0\u30ed\u30fc\u30eb}, \u305d\u306e\u4ed6\u306e\u8a2d\u5b9a: \u5024, ...<\/code>\u3068\u3044\u3046\u6587\u6cd5\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p><code>server<\/code>\u3092\u4f7f\u3063\u30661\u3064\u306e\u30b5\u30fc\u30d0\u3092\u8a2d\u5b9a\u3059\u308b\u4f8b\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre>\nserver 'localhost', user: 'vagrant', roles: %w{web}\n<\/pre>\n<p>\u3053\u306e\u4e00\u884c\u306b\u306f\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>localhost<\/code>(Capistrano\u3092\u5b9f\u884c\u3057\u305f\u30db\u30b9\u30c8)\u3092\u5bfe\u8c61\u306b\u3059\u308b<\/li>\n<li>\u305d\u306e\u30b5\u30fc\u30d0\u306b\u300cWeb\u30b5\u30fc\u30d0\u300d\u3068\u3044\u3046\u30ed\u30fc\u30eb\u3092\u4e0e\u3048\u308b<\/li>\n<li>\u305d\u306e\u30b5\u30fc\u30d0\u3078\u306fvagrant\u3068\u3044\u3046\u30e6\u30fc\u30b6\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b<\/li>\n<\/ul>\n<h2>7. config\/deploy.rb\u3092\u66f8\u304f<\/h2>\n<p>config\/deploy.rb\u306b\u306f\u30b9\u30c6\u30fc\u30b8\u9593\u3067\u5171\u901a\u306e\u8a2d\u5b9a\u3092\u66f8\u304d\u307e\u3059\u3002\u3088\u304f\u3042\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540d<\/li>\n<li>\u30ec\u30dd\u30b8\u30c8\u30ea\u540d<\/li>\n<li>\u5229\u7528\u3059\u308bSCM<\/li>\n<li>\u30bf\u30b9\u30af<\/li>\n<li>\u305d\u308c\u305e\u308c\u306e\u30bf\u30b9\u30af\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9<\/li>\n<\/ul>\n<p>\u3053\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3092DSL\u3067\u66f8\u304d\u307e\u3059\u3002DSL\u306b\u306f\u4ee5\u4e0b\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u6587\u6cd5\u3068\u8a9e\u5f59\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u8a2d\u5b9a\u5024\u306e\u5909\u66f4\u3068\u53d6\u5f97<\/li>\n<li>\u30bf\u30b9\u30af\u306e\u5b9a\u7fa9<\/li>\n<\/ul>\n<h3>\u8a2d\u5b9a\u5024\u306e\u5909\u66f4\u3068\u53d6\u5f97<\/h3>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540d\u3084\u30ec\u30dd\u30b8\u30c8\u30ea\u540d\u306a\u3069\u306e\u8a2d\u5b9a\u5024\u306f<code>set \u540d\u524d, \u5024<\/code>\u3067\u8a2d\u5b9a\u3057\u3001<code>fetch \u540d\u524d<\/code>\u3067\u53d6\u308a\u51fa\u3057\u307e\u3059\u3002<br \/>\n\u4e00\u5ea6<code>set<\/code>\u3057\u305f\u5024\u306fdeploy.rb\u3084\u30b9\u30c6\u30fc\u30b8.rb\u306e\u5168\u57df\u3067\u53d6\u308a\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\nset :repo_url, 'git@github.com:mumoshu\/finagle_sample_app'\n\nfetch :repo_url\n#=> \"git@github.com:mumoshu\/finagle_sample_app\"\n<\/pre>\n<h3>\u30bf\u30b9\u30af\u306e\u5b9a\u7fa9<\/h3>\n<p>\u500b\u3005\u306e\u30bf\u30b9\u30af\u306f<code>task \u30bf\u30b9\u30af\u540d do; ... end<\/code>\u306e\u30d6\u30ed\u30c3\u30af\u3067\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<code>:uptime<\/code>\u3068\u3044\u3046\u540d\u524d\u306e\u30bf\u30b9\u30af\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre>\ntask :uptime do\n  \u3053\u3053\u306b\u30bf\u30b9\u30af\u306e\u5185\u5bb9\nend\n<\/pre>\n<p><code>task<\/code>\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u306b\u306f<code>run_locally do; ... end<\/code>\u304b\u3001\u3082\u3057\u304f\u306f<code>on \u5bfe\u8c61\u30b5\u30fc\u30d0 do; ... end<\/code>\u30d6\u30ed\u30c3\u30af\u3092\u66f8\u304d\u307e\u3059\uff08\u4ee5\u5f8c\u3001\u305d\u308c\u305e\u308c\u7701\u7565\u3057\u3066<code>run_locally<\/code>\u30d6\u30ed\u30c3\u30af\u30fb<code>on<\/code>\u30d6\u30ed\u30c3\u30af\u3068\u547c\u3073\u307e\u3059\uff09\u3002<br \/>\n\u524d\u8005\u306e<code>run_locally<\/code>\u30d6\u30ed\u30c3\u30af\u5185\u306b\u306f\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066\u66f8\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u5f8c\u8005\u306e<code>on<\/code>\u30d6\u30ed\u30c3\u30af\u5185\u306b\u306f\u30b5\u30fc\u30d0\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306b\u3064\u3044\u3066\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre>\ntask :uptime do\n  run_locally do\n    \u3053\u3053\u306b\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\n  end\n  on \u5bfe\u8c61\u30b5\u30fc\u30d0 do\n    \u3053\u3053\u306b\u30b5\u30fc\u30d0\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\n  end\nend\n<\/pre>\n<p><code>on<\/code>\u30d6\u30ed\u30c3\u30af\u306e\u300c\u5bfe\u8c61\u30b5\u30fc\u30d0\u300d\u306e\u7b87\u6240\u306b\u306f\u3001\u524d\u8ff0\u306e\u300c\u30b9\u30c6\u30fc\u30b8\u540d.rb\u300d\u3067\u8a2d\u5b9a\u3057\u305f\u30b5\u30fc\u30d0\u306e\u6761\u4ef6\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u300cWeb\u30b5\u30fc\u30d0(:web)\u306e\u30ed\u30fc\u30eb\u304c\u4e0e\u3048\u3089\u308c\u3066\u3044\u308b\u30b5\u30fc\u30d0\u300d\u306e\u307f\u3092\u4f5c\u696d\u5bfe\u8c61\u3068\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre>\ntask :uptime do\n  run_locally do\n    \u3053\u3053\u306b\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\n  end\n  on roles(:web) do\n    \u3053\u3053\u306b\u30b5\u30fc\u30d0\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\n  end\nend\n<\/pre>\n<h4>execute\u306b\u3088\u308b\u30b3\u30de\u30f3\u30c9\u5b9f\u884c<\/h4>\n<p>\u6700\u5f8c\u306b\u3001\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092<code>run_locally<\/code>\u3084<code>on<\/code>\u30d6\u30ed\u30c3\u30af\u5185\u306b\u66f8\u304d\u307e\u3059\u3002<br \/>\n\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u306b\u306f<code>execute \u30b3\u30de\u30f3\u30c9<\/code>\u306e\u6587\u6cd5\u3092\u4f7f\u3044\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001\u305d\u308c\u305e\u308c\u306e\u30de\u30b7\u30f3\u4e0a\u3067<code>uptime<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u307e\u3059\u3002<\/p>\n<pre>\ntask :uptime do\n  run_locally do\n    execute \"uptime\"\n  end\n  on roles(:web) do\n    execute \"uptime\"\n  end\nend\n<\/pre>\n<h4>capture\u306b\u3088\u308b\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u7d50\u679c\u306e\u53d6\u5f97<\/h4>\n<p>execute\u3067\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u305f\u5834\u5408\u3001\u305d\u306e\u30b3\u30de\u30f3\u30c9\u306e\u6a19\u6e96\u51fa\u529b\u306f\u6368\u3066\u3089\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u6a19\u6e96\u51fa\u529b\u306e\u5185\u5bb9\u3092\u53c2\u7167\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306f<code>capture \u30b3\u30de\u30f3\u30c9<\/code>\u306e\u6587\u6cd5\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre>\ntask :uptime do\n  run_locally do\n    output = capture \"uptime\"\n  end\n  on roles(:web) do\n    output = capture \"uptime\"\n  end\nend\n<\/pre>\n<p>\u5358\u306bexecute\u3092capture\u306b\u7f6e\u304d\u63db\u3048\u307e\u3057\u305f\u3002capture\u306f\u5f15\u6570\u306b\u6e21\u3057\u305f\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304b\u3089\u3001\u5b9f\u884c\u7d50\u679c\uff08\u6a19\u6e96\u51fa\u529b\uff09\u3092\u6587\u5b57\u901a\u308a\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4e0a\u8a18\u306e\u4f8b\u3067\u306foutput\u306b\u6a19\u6e96\u51fa\u529b\u306e\u5185\u5bb9\u304c\u4ee3\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h4>info\u306b\u3088\u308b\u30ed\u30b0\u51fa\u529b<\/h4>\n<p>\u305f\u3060\u4ee3\u5165\u3057\u305f\u3060\u3051\u3067\u306f\u610f\u5473\u304c\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001Capistrano\u3067\u30ed\u30b0\u51fa\u529b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u30ed\u30b0\u51fa\u529b\u306e\u305f\u3081\u306b\u306f\u3001<code>run_locally<\/code>\u3084<code>on<\/code>\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u3067\u30ed\u30b0\u30ec\u30d9\u30eb\u306b\u5fdc\u3058\u3066<code>debug \u30e1\u30c3\u30bb\u30fc\u30b8<\/code>\u30fb<code>info \u30e1\u30c3\u30bb\u30fc\u30b8<\/code>\u30fb<code>warn \u30e1\u30c3\u30bb\u30fc\u30b8<\/code>\u30fb<code>error \u30e1\u30c3\u30bb\u30fc\u30b8<\/code>\u30fb<code>fatal \u30e1\u30c3\u30bb\u30fc\u30b8<\/code>\u306e\u6587\u6cd5\u3092\u4f7f\u3044\u307e\u3059\u3002<code>info<\/code>\u3092\u4f7f\u3046\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>\ntask :uptime do\n  run_locally do\n    output = capture \"uptime\"\n    info output\n  end\n  on roles(:web) do\n    output = capture \"uptime\"\n    info output\n  end\nend\n<\/pre>\n<h4>\u30bf\u30b9\u30af\u306e\u5b9a\u7fa9\uff1a\u307e\u3068\u3081<\/h4>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<code>run_locally<\/code>\u3084<code>on<\/code>\u30d6\u30ed\u30c3\u30af\u5185\u3067\u306f<code>execute<\/code>\u30fb<code>capture<\/code>\u30fb<code>info<\/code>\u3092\u306f\u3058\u3081\u3001\u3044\u304f\u3064\u304b\u306e\u6587\u6cd5\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5229\u7528\u3067\u304d\u308b\u6587\u6cd5\u306f\u3053\u306e<a href=\"https:\/\/github.com\/capistrano\/sshkit\/blob\/v1.2.0\/lib\/sshkit\/backends\/abstract.rb#L21\">\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/a>\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3054\u7d39\u4ecb\u3057\u3066\u3044\u306a\u3044\u6587\u6cd5\u306e\u3046\u3061\u3088\u304f\u4f7f\u3046\u306e\u306f\u3001<code>upload! \u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u30d1\u30b9, \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5148\u30b5\u30fc\u30d0\u4e0a\u306e\u30d1\u30b9<\/code>\u3067\u3059\u3002\u305d\u306e\u540d\u306e\u901a\u308a\u30d5\u30a1\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306e\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002\u4f7f\u3044\u65b9\u3068\u3057\u3066\u306f\u3001<code>on \u5bfe\u8c61\u30b5\u30fc\u30d0 do; ... end<\/code>\u30d6\u30ed\u30c3\u30af\u5185\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002\u3059\u308b\u3068\u3001Capistrano\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u30db\u30b9\u30c8\u304b\u3089\u5bfe\u8c61\u30b5\u30fc\u30d0\u3078\u30d5\u30a1\u30a4\u30eb\u304cSCP\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code>execute<\/code>\u30fb<code>capture<\/code>\u30fb<code>info<\/code>\u30fb<code>upload!<\/code>\u306b\u3064\u3044\u3066\u306f\u5f8c\u306e\u4f8b\u3067\u4f7f\u3044\u307e\u3059\u306e\u3067\u3001\u899a\u3048\u3066\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<h1>7. \u30bf\u30b9\u30af\u306e\u4f8b<\/h1>\n<p>\u30bf\u30b9\u30af\u306f\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u3067\u884c\u3046\u3082\u306e\u30fb\u30b5\u30fc\u30d0\u4e0a\u3067\u884c\u3046\u3082\u306e\u3092\u5206\u3051\u3066\u7ba1\u7406\u3059\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002\u305d\u308c\u305e\u308c\u3044\u304f\u3064\u304b\u4f8b\u3092\u6319\u3052\u307e\u3059\u3002<\/p>\n<h3>\u30ed\u30fc\u30ab\u30eb\u30db\u30b9\u30c8\u3067\u884c\u3046\u3053\u3068\u306e\u4f8b<\/h3>\n<p>deploy.rb\u3084\u30b9\u30c6\u30fc\u30b8\u540d.rb\u306b\u66f8\u304f\u30bf\u30b9\u30af\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u53d6\u5f97<\/li>\n<li>\u30d3\u30eb\u30c9\u3068\u30a2\u30fc\u30ab\u30a4\u30d3\u30f3\u30b0\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0<\/li>\n<\/ul>\n<h4>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u53d6\u5f97<\/h4>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u524d\u306b\u3001\u3069\u3053\u304b\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001Git\u3092\u63a1\u7528\u3057\u3066\u3044\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308c\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3067\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre>\nset :application, 'finalge_sample_app'\nset :repo_url, 'git@github.com:mumoshu\/finagle_sample_app.git'\n\ntask :update do\n  run_locally do\n    application = fetch :application\n    if test \"[ -d #{application} ]\"\n      execute \"cd #{application}; git pull\"\n      end\n    else\n      execute \"git clone #{fetch :repo_url} #{application}\"\n    end\n  end\nend\n<\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<code>:update<\/code>\u3068\u3044\u3046\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u5f8c\u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u3067\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u306b\u7f6e\u304f\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u3001\u524d\u8ff0\u306e<code>run_locally<\/code>\u30d6\u30ed\u30c3\u30af\u5185\u3067git\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><code>run_locally<\/code>\u30d6\u30ed\u30c3\u30af\u5185\u3067\u306f\u3001\b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u4fdd\u5b58\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6709\u7121\u306b\u3088\u3063\u3066\u3001<code>git clone<\/code>\u3068<code>git pull<\/code>\u3092\u4f7f\u3044\u5206\u3051\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6709\u7121\u306b\u3088\u3063\u3066\u5834\u5408\u308f\u3051\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u3001Ruby\u306eif\u6587\u3068Capistrano\u306e<code>test \u30d5\u30a1\u30a4\u30eb\u30c6\u30b9\u30c8<\/code>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u307e\u3060\u53d6\u5f97\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001<code>git clone<\/code>\u3067<code>repo_url<\/code>\u3067\u8a2d\u5b9a\u3057\u305f\u30ec\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u4fdd\u5b58\u5148\u306f<code>application<\/code>\u306b\u8a2d\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u65e2\u306b\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u3001clone\u6642\u306b\u4f5c\u6210\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u79fb\u52d5\u3057\u3066\u304b\u3089\u3001<code>git pull<\/code>\u3067\u66f4\u65b0\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<h4>\u30d3\u30eb\u30c9\u3068\u30a2\u30fc\u30ab\u30a4\u30d3\u30f3\u30b0\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0<\/h4>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3084\u305d\u306e\u4ed6\u30a2\u30bb\u30c3\u30c8\u306e\u524d\u51e6\u7406\u3092\u884c\u3044\u3001\u7d50\u679c\u3092tarball\u3084zip\u30fbwar\u30fbdebian\u30d1\u30c3\u30b1\u30fc\u30b8\u306a\u3069\u306e\u518d\u914d\u5e03\u53ef\u80fd\u306a\u5f62\u5f0f\u306b\u3057\u307e\u3059\u3002<br \/>\n\u4f8b\u3068\u3057\u3066\u3001\u524d\u8ff0\u306eFinagle\u3092\u4f7f\u3063\u305f\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u3092\u5148\u307b\u3069\u53d6\u5f97\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304b\u3089\u30d3\u30eb\u30c9\u3057\u3001\u30a2\u30fc\u30ab\u30a4\u30d6\u3059\u308b\u4f8b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3053\u3053\u3067\u306f\u3001\u30a2\u30fc\u30ab\u30a4\u30d6\u4f5c\u6210\u306e\u305f\u3081\u306b<code>sbt<\/code>\u3068\u3044\u3046\u30d3\u30eb\u30c9\u30c4\u30fc\u30eb\u3068\u3001<code>sbt-pack<\/code>\u3068\u3044\u3046sbt\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u30892\u3064\u306b\u3064\u3044\u3066\u306f\u3001\u672c\u8a18\u4e8b\u306e\u7bc4\u56f2\u5916\u306a\u306e\u3067\u8aac\u660e\u306f\u7701\u7565\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u3001\u300cscala sbt\u300d\u306a\u3069\u3067\u691c\u7d22\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<pre>\ntask :archive => :update do\n  run_locally do\n    sbt_output = capture \"cd #{fetch :application}; sbt pack-archive\"\n\n    sbt_output_without_escape_sequences = sbt_output.lines.map { |line| line.gsub(\/\\e\\[\\d{1,2}m\/, '') }.join\n\n    archive_relative_path = sbt_output_without_escape_sequences.match(\/\\[info\\] Generating (?<archive_path>.+\\.tar\\.gz)\\s*$\/)[:archive_path]\n    archive_name = archive_relative_path.match(\/(?<archive_name>[^\\\/]+\\.tar\\.gz)$\/)[:archive_name]\n    archive_absolute_path = File.join(capture(\"cd #{fetch(:application)}; pwd\").chomp, archive_relative_path)\n\n    info archive_absolute_path\n    info archive_name\n\n    set :archive_absolute_path, archive_absolute_path\n    set :archive_name, archive_name\n  end\nend\n<\/pre>\n<p>\u9806\u3092\u8ffd\u3063\u3066\u898b\u3066\u884c\u304d\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u3001<code>task :archive =&gt; :update do<\/code>\u306e\u3088\u3046\u306b\u30bf\u30b9\u30af\u540darchive\u306e\u6b21\u306b<code>=&gt; :update<\/code>\u3068\u3044\u3046\u8a18\u8ff0\u304c\u7d9a\u3044\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u30bf\u30b9\u30af\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8868\u3057\u3066\u3001\u300carchive\u3092\u5b9f\u884c\u3059\u308b\u524d\u306bupdate\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002\u5b9f\u969b\u306barchive\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Capistrano\u306f(\u53b3\u5bc6\u306b\u306fCapistrano\u306e\u57fa\u790e\u306b\u306a\u3063\u3066\u3044\u308bRake\u304c)\u3053\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8003\u616e\u3057\u3066\u3001update\u3092\u81ea\u52d5\u7684\u306b\u5b9f\u884c\u3057\u3066\u304b\u3089archive\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u3053\u306e\u6a5f\u80fd\u306b\u3088\u3063\u3066\u3001\u79c1\u305f\u3061\u306f\u30bf\u30b9\u30af\u306e\u4f9d\u5b58\u95a2\u4fc2\u306e\u7ba1\u7406\u3092Capistrano\u306b\u4efb\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b<code>run_locally<\/code>\u30d6\u30ed\u30c3\u30af\u3067\u3059\u3002\u30d6\u30ed\u30c3\u30af\u306e\u5192\u982d\u3067\u306f\u3001<code>sbt<\/code>\u3068<code>sbt-pack<\/code>\u3092\u4f7f\u3063\u3066\u5148\u307b\u3069\u53d6\u5f97\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30d3\u30eb\u30c9\u3057\u3066\u3044\u307e\u3059\u3002sbt\u306f\u30d3\u30eb\u30c9\u304c\u7d42\u308f\u3063\u305f\u5f8c\u3001\u4f5c\u6210\u3057\u305f\u30a2\u30fc\u30ab\u30a4\u30d6\u3078\u306e\u76f8\u5bfe\u30d1\u30b9\u3092\u6a19\u6e96\u51fa\u529b\u3078\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u51fa\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre>\n[info] Generating target\/finagle_sample_app-0.1-SNAPSHOT.tar.gz\n<\/pre>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u5f8c\u3067\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u3044\u306e\u3067\u3001\u6a19\u6e96\u51fa\u529b\u3092\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u3066\u6b63\u898f\u8868\u73fe\u3067\u76f8\u5bfe\u30d1\u30b9\u3092\u629c\u304d\u51fa\u3057\u3001\u7d76\u5bfe\u30d1\u30b9\u3078\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30ad\u30e3\u30d7\u30c1\u30e3\u7d50\u679c\u306e\u3046\u3061<code>\/\\e\\[\\d{1,2}m\/<\/code>\u3068\u3044\u3046\u6b63\u898f\u8868\u73fe\u306b\u30de\u30c3\u30c1\u3057\u305f\u90e8\u5206\u6587\u5b57\u5217\u3092\u6d88\u53bb\u3057\u3066\u3057\u307e\u3046\u30b3\u30fc\u30c9\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u306e\u6d88\u53bb\u3092\u3057\u3066\u3044\u307e\u3059\u3002<code>sbt<\/code>\u306f\u5b9f\u884c\u74b0\u5883\u306b\u3088\u3063\u3066ANSI\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u3092\u5229\u7528\u3057\u3066\u30ed\u30b0\u306b\u8272\u3092\u3064\u3051\u3066\u304f\u308c\u307e\u3059\u3002\u4eca\u56de\u306f\u5f8c\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u306e\u305f\u3081\u306b\u30a2\u30fc\u30ab\u30a4\u30d6\u306e\u30d1\u30b9\u3092\u629c\u304d\u51fa\u305d\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u3082\u30d1\u30b9\u306e\u4e00\u90e8\u3068\u89e3\u91c8\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u3053\u306e\u3088\u3046\u306b\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u3060\u3051\u3092\u6d88\u53bb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u4f8b\u306e\u6700\u5f8c\u3067\u306f\u3001<code>set<\/code>\u3092\u4f7f\u3063\u3066\u5f8c\u7d9a\u306e\u30bf\u30b9\u30af\u304c\u5fc5\u8981\u3068\u3059\u308b\u8a2d\u5b9a\u3092\u4fdd\u6301\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u8a2d\u5b9a\u5024\u306f\u5f8c\u3067<code>fetch<\/code>\u3067\u53d6\u5f97\u3059\u308b\u306e\u3067\u3001\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<h3>\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8\u4e0a\u3067\u884c\u3046\u3053\u3068<\/h3>\n<p>\u30ea\u30e2\u30fc\u30c8\u30db\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u884c\u3046\u30bf\u30b9\u30af\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<li>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\u30fb\u505c\u6b62<\/li>\n<li>Web\u30b5\u30fc\u30d0\u3084\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b5\u306e\u64cd\u4f5c<\/li>\n<li>\u76e3\u8996\u306e\u958b\u59cb\u3001\u505c\u6b62<\/li>\n<\/ul>\n<p>\u4eca\u56de\u306f\u3001\u6700\u4f4e\u9650\u5fc5\u8981\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304a\u3088\u3073\u8d77\u52d5\u30fb\u505c\u6b62\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h4>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8d77\u52d5\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u307e\u305a\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u4f8b\u3068\u3057\u3066\u3001\u524d\u8ff0\u306eFinagle\u3092\u4f7f\u3063\u305f\u30b5\u30f3\u30d7\u30eb\u30a2\u30d7\u30ea\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre>\ntask :deploy => :archive do\n  archive_path = fetch :archive_absolute_path\n  archive_name = fetch :archive_name\n  release_path = File.join(fetch(:deploy_to), fetch(:application))\n\n  on roles(:web) do\n    unless test \"[ -d #{release_path} ]\"\n      execute \"mkdir -p #{release_path}\"\n    end\n\n    upload! archive_path, release_path\n\n    execute \"cd #{release_path}; tar -zxvf #{archive_name}\"\n\n    \u3053\u3053\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\n  end\nend\n<\/pre>\n<h4>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\u30fb\u505c\u6b62<\/h4>\n<p>\u5b9f\u884c\u74b0\u5883\u3084\u63a1\u7528\u3059\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u3088\u3063\u3066\u306f\u3001Web\u30b5\u30fc\u30d0\u3084\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3068\u306f\u72ec\u7acb\u3057\u3066\u30b5\u30fc\u30d0\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u3057\u3066\u52d5\u304f\u3082\u306e\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n<ul>\n<li>java\u30fbnode\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u305d\u306e\u3082\u306e\u3092\u8d77\u52d5\u3059\u308b\u5834\u5408<\/li>\n<li>Play framework\u30fbFinagle\u30fbAkka\u306a\u3069\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306a\u3069\u7d44\u307f\u8fbc\u307f\u306e\u30b5\u30fc\u30d0\u304c\u3042\u308b\u3082\u306e<\/li>\n<\/ul>\n<p>\u4f8b\u3068\u3057\u3066\u3001\u524d\u8ff0\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u3042\u3068\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8d77\u52d5\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a18\u8ff0\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre>\ntask :deploy => :archive do\n  archive_path = fetch :archive_absolute_path\n  archive_name = fetch :archive_name\n  release_path = File.join(fetch(:deploy_to), fetch(:application))\n\n  on roles(:web) do\n    unless test \"[ -d #{release_path} ]\"\n      execute \"mkdir -p #{release_path}\"\n    end\n\n    upload! archive_path, release_path\n\n    execute \"cd #{release_path}; tar -zxvf #{archive_name}\"\n\n    project_dir = File.join(release_path, capture(\"cd #{release_path}; ls -d *\/\").chomp)\n\n    launch = capture(\"cd #{project_dir}; ls bin\/*\").chomp\n\n    execute \"cd #{project_dir}; ( ( nohup #{launch} &>\/dev\/null ) & echo $! > RUNNING_PID)\"\n  end\nend\n<\/pre>\n<p>tar\u30b3\u30de\u30f3\u30c9\u3067\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u5c55\u958b\u3059\u308b\u3068\u3053\u308d\u307e\u3067\u306f\u3001\u524d\u8ff0\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306e\u4f8b\u3068\u540c\u3058\u3067\u3059\u3002<br \/>\n\u305d\u306e\u3042\u3068\u306f\u3001\u300c\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u542b\u307e\u308c\u3066\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\/bin\/\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u540d-\u30d0\u30fc\u30b8\u30e7\u30f3\u300d\u3068\u3044\u3046\u540d\u524d\u306e\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7c21\u5358\u306b\u30d5\u30a1\u30a4\u30eb\u30b0\u30ed\u30d6\u3067\u30de\u30c3\u30c1\u30f3\u30b0\u3055\u305b\u3001\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3067\u306f\u3001<code>project_dir<\/code>\u3068\u3044\u3046\u5909\u6570\u306b\u300c\u30a2\u30fc\u30ab\u30a4\u30d6\u306b\u542b\u307e\u308c\u3066\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3078\u306e\u30d1\u30b9\u300d\u3092\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001<code>launch<\/code>\u3068\u3044\u3046\u5909\u6570\u306b\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3078\u306e\u30d1\u30b9\u3092\u4ee3\u5165\u3057\u3066\u3044\u307e\u3059\u3002\u6700\u5f8c\u306bnohup\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066\u305d\u306e\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\nnohup\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u7d9a\u3051\u308b\u305f\u3081\u3067\u3059\u3002<br \/>\nCapistrano\u306fSSH\u3067\u5bfe\u8c61\u30b5\u30fc\u30d0\u3078\u63a5\u7d9a\u3057\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u304c\u3001\u305d\u306e\u5f8c\u306b\u63a5\u7d9a\u3092\u5207\u308a\u307e\u3059\u3002\u305d\u306e\u969b\u306b\u3001\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306bSIGHUP\u30b7\u30b0\u30ca\u30eb\u304c\u9001\u4fe1\u3055\u308c\u3066\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u7d42\u4e86\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\n\u305d\u308c\u3092\u9632\u3050\u305f\u3081\u306bnohup\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3055\u3066\u3001\u3053\u308c\u3067\u5b8c\u6210\u30fb\u30fb\u30fb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u4f55\u304b\u304a\u5fd8\u308c\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u5b9f\u306f\u3053\u3053\u307e\u3067\u306e\u4f8b\u3067\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u521d\u3081\u3066\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3053\u3068\u3057\u304b\u60f3\u5b9a\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u65e2\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u52d5\u4f5c\u4e2d\u306e\u5834\u5408\u3001\u305d\u308c\u3092\u307e\u305a\u505c\u6b62\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u505c\u6b62\u3059\u308b\u4e00\u3064\u306e\u65b9\u6cd5\u306f\u3001\u30d7\u30ed\u30bb\u30b9\u3092kill\u3057\u3066\u3057\u307e\u3046\u3053\u3068\u3067\u3059\u3002\u30d7\u30ed\u30bb\u30b9\u306f\u30d7\u30ed\u30bb\u30b9ID\u3067\u533a\u5225\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u524d\u56de\u8d77\u52d5\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30bb\u30b9ID\u306f\u3044\u304f\u3064\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u3053\u3093\u306a\u3053\u3068\u3082\u3042\u308d\u3046\u304b\u3068\u3001\u524d\u8ff0\u306e\u4f8b\u3067\u306f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u8d77\u52d5\u6642\u306b\u30d7\u30ed\u30bb\u30b9ID\u3092\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u3002deploy\u30bf\u30b9\u30af\u306eexecute\u306e\u6700\u5f8c\u3067\u3001<code>echo $! &gt; RUNNING_PID<\/code>\u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u306e\u306b\u6c17\u3065\u304d\u307e\u3057\u305f\u304b\uff1f\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e\u30d7\u30ed\u30bb\u30b9ID\u3092RUNNING_PID\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3078\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>RUNNING_PID\u30d5\u30a1\u30a4\u30eb\u3092\u5229\u7528\u3057\u3066\u30012\u56de\u76ee\u4ee5\u964d\u306e\u30c7\u30d7\u30ed\u30a4\u6642\u306b\u306f\u8d77\u52d5\u4e2d\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u505c\u6b62\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\ntask :deploy => :archive do\n  archive_path = fetch :archive_absolute_path\n  archive_name = fetch :archive_name\n  release_path = File.join(fetch(:deploy_to), fetch(:application))\n\n  on roles(:web) do\n    begin\n      old_project_dir = File.join(release_path, capture(\"cd #{release_path}; ls -d *\/\").chomp)\n      if test \"[ -d #{old_project_dir} ]\"\n        running_pid = capture(\"cd #{old_project_dir}; cat RUNNING_PID\")\n        execute \"kill #{running_pid}\"\n      end\n    rescue => e\n      info \"No previous release directory exists\"\n    end\n\n    unless test \"[ -d #{release_path} ]\"\n      execute \"mkdir -p #{release_path}\"\n    end\n\n    upload! archive_path, release_path\n\n    execute \"cd #{release_path}; tar -zxvf #{archive_name}\"\n\n    project_dir = File.join(release_path, capture(\"cd #{release_path}; ls -d *\/\").chomp)\n\n    launch = capture(\"cd #{project_dir}; ls bin\/*\").chomp\n\n    execute \"cd #{project_dir}; ( ( nohup #{launch} &>\/dev\/null ) & echo $! > RUNNING_PID)\"\n  end\nend\n<\/pre>\n<p><code>on_roles<\/code>\u30d6\u30ed\u30c3\u30af\u306e\u5192\u982d\u306b<code>begin; ...; rescue; ... end<\/code>\u30d6\u30ed\u30c3\u30af\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<br \/>\n\u3053\u306e\u30d6\u30ed\u30c3\u30af\u3067\u306f\u3001\u65e2\u306b\u30c7\u30d7\u30ed\u30a4\u6e08\u307f\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea(old_project_dir)\u304c\u3042\u308b\u5834\u5408\u306e\u307f\u3001<br \/>\nRUNNING_PID\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30d7\u30ed\u30bb\u30b9ID\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3001\u305d\u306e\u30d7\u30ed\u30bb\u30b9\u3092kill\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3067\u30012\u5ea6\u76ee\u4ee5\u964d\u3082\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>8. \u30b5\u30f3\u30d7\u30eb\u30ec\u30b7\u30d4\u306e\u307e\u3068\u3081<\/h2>\n<p>\u524d\u8ff0\u306e\u300c\u30b5\u30f3\u30d7\u30eb\u30ec\u30b7\u30d4\u306e\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8\u300d\u3092\u304a\u3055\u3089\u3044\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n\u3053\u3053\u307e\u3067\u3001\u4ee5\u4e0b\u306e\u5b8c\u6210\u30a4\u30e1\u30fc\u30b8\u306b\u5411\u3051\u3066\u8a2d\u5b9a\u3084\u30bf\u30b9\u30af\u306e\u66f8\u304d\u65b9\u3092\u3054\u8aac\u660e\u3057\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n\u30a4\u30e1\u30fc\u30b8\u306f\u3064\u304b\u3081\u3066\u304d\u307e\u3057\u305f\u304b\uff1f<br \/>\n\u3053\u308c\u3092\u8e0f\u307e\u3048\u3066\u3001\u6b21\u306e\u300c\u30b5\u30f3\u30d7\u30eb\u30ec\u30b7\u30d4\u306e\u5b8c\u6210\u5f62\u300d\u3092\u8aad\u3093\u3067\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>config\/deploy\/test.rb<\/h3>\n<pre>\n\u4f5c\u696d\u5bfe\u8c61\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\n<\/pre>\n<h3>config\/deploy.rb<\/h3>\n<pre>\nCapistrano\u30c7\u30d5\u30a9\u30eb\u30c8\u30bf\u30b9\u30af\u306e\u6d88\u53bb\n\n\u30bf\u30b9\u30af\u300c\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u53d6\u5f97\u300d\u306e\u5b9a\u7fa9\n\n\u30bf\u30b9\u30af\u300c\u30d3\u30eb\u30c9\u3068\u30a2\u30fc\u30ab\u30a4\u30d3\u30f3\u30b0\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u300d\u306e\u5b9a\u7fa9\n\n\u30bf\u30b9\u30af\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d3\u30eb\u30c9\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u300d\u300c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5\u3068\u505c\u6b62\u300d\u306e\u5b9a\u7fa9\n<\/pre>\n<h2>9. \u30b5\u30f3\u30d7\u30eb\u30ec\u30b7\u30d4\u306e\u5b8c\u6210\u5f62<\/h2>\n<p>\u3053\u308c\u307e\u3067\u8aac\u660e\u3057\u305fDSL\u3092\u4f7f\u3063\u305f\u30b5\u30f3\u30d7\u30eb\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<br \/>\nFinagle\u3068\u3044\u3046\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u3063\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3001\u8003\u3048\u3089\u308c\u308b\u9650\u308a\u6700\u3082\u7c21\u5358\u306a\u30c7\u30d7\u30ed\u30a4\u8a2d\u5b9a\u3067\u3059\u3002<br \/>\nVagrant\u3067\u4f5c\u6210\u3057\u305f\u4eee\u60f3\u30de\u30b7\u30f3\u3067\u5b9f\u884c\u3057\u3001\u305d\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u81ea\u8eab\u3078\u30ed\u30b0\u30a4\u30f3\u3057\u3066Finagle\u30a2\u30d7\u30ea\u306e\u30bd\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u3066\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30d3\u30eb\u30c9\u30fb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<h3>config\/deploy\/test.rb<\/h3>\n<pre>\nserver 'localhost', user: 'vagrant', roles: %w{web}\n<\/pre>\n<h3>config\/deploy.rb<\/h3>\n<pre>\ntask :update do\n  run_locally do\n    application = fetch :application\n    if test \"[ -d #{application} ]\"\n      execute \"cd #{application}; git pull\"\n    else\n      execute \"git clone #{fetch :repo_url} #{application}\"\n    end\n  end\nend\n\ntask :archive => :update do\n  run_locally do\n    sbt_output = capture \"cd #{fetch :application}; sbt pack-archive\"\n\n    sbt_output_without_escape_sequences = sbt_output.lines.map { |line| line.gsub(\/\\e\\[\\d{1,2}m\/, '') }.join\n\n    archive_relative_path = sbt_output_without_escape_sequences.match(\/\\[info\\] Generating (?<archive_path>.+\\.tar\\.gz)\\s*$\/)[:archive_path]\n    archive_name = archive_relative_path.match(\/(?<archive_name>[^\\\/]+\\.tar\\.gz)$\/)[:archive_name]\n    archive_absolute_path = File.join(capture(\"cd #{fetch(:application)}; pwd\").chomp, archive_relative_path)\n\n    info archive_absolute_path\n    info archive_name\n\n    set :archive_absolute_path, archive_absolute_path\n    set :archive_name, archive_name\n  end\nend\n\ntask :deploy => :archive do\n  archive_path = fetch :archive_absolute_path\n  archive_name = fetch :archive_name\n  release_path = File.join(fetch(:deploy_to), fetch(:application))\n\n  on roles(:web) do\n    begin\n      old_project_dir = File.join(release_path, capture(\"cd #{release_path}; ls -d *\/\").chomp)\n      if test \"[ -d #{old_project_dir} ]\"\n        running_pid = capture(\"cd #{old_project_dir}; cat RUNNING_PID\")\n        execute \"kill #{running_pid}\"\n      end\n    rescue => e\n      info \"No previous release directory exists\"\n    end\n    \n    unless test \"[ -d #{release_path} ]\"\n      execute \"mkdir -p #{release_path}\"\n    end\n\n    upload! archive_path, release_path\n\n    execute \"cd #{release_path}; tar -zxvf #{archive_name}\"\n\n    project_dir = File.join(release_path, capture(\"cd #{release_path}; ls -d *\/\").chomp)\n\n    launch = capture(\"cd #{project_dir}; ls bin\/*\").chomp\n\n    execute \"cd #{project_dir}; ( ( nohup #{launch} &>\/dev\/null ) & echo $! > RUNNING_PID)\"\n  end\nend\n<\/pre>\n<h2>10. cap\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b<\/h2>\n<p>\u3053\u308c\u307e\u3067\u4f5c\u6210\u3057\u3066\u304d\u305f<code>config\/deploy\/\u30b9\u30c6\u30fc\u30b8\u540d.rb<\/code>(\u30b5\u30fc\u30d0\u30921\u3064\u5b9a\u7fa9\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u30b9\u30c6\u30fc\u30b8=test)\u3068<code>config\/deploy.rb<\/code>(\u30bf\u30b9\u30af\u3092\u3044\u304f\u3064\u304b\u5b9a\u7fa9\u3057\u307e\u3057\u305f)\u3092\u4f7f\u3063\u3066\u3001Capistrano\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<br \/>\nCapistrano\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u524d\u8ff0\u306e\u300cCapistrano\u306e\u30e2\u30c7\u30eb\u300d\u3067\u89e6\u308c\u305f<code>cap<\/code>\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<pre>\n$ cap test deploy\n<\/pre>\n<p><code>cap<\/code>\u30b3\u30de\u30f3\u30c9\u306e\u7b2c1\u5f15\u6570\u304c<code>config\/deploy\/test.rb<\/code>\u306e<code>test<\/code>\u306e\u90e8\u5206\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002\u7b2c2\u5f15\u6570\u304c\u30bf\u30b9\u30af\u540d\u3067\u3001<code>task :deploy<\/code>\u306e<code>deploy<\/code>\u306e\u90e8\u5206\u306b\u5bfe\u5fdc\u3057\u307e\u3059\u3002<\/p>\n<p>\u521d\u56de\u306e\u5b9f\u884c\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre>\n$ cap test deploy\n[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.\nDEBUG [41eec63b] Running \/usr\/bin\/env [ -d finagle_sample_app ] on\nDEBUG [41eec63b] Command: [ -d finagle_sample_app ]\nDEBUG [41eec63b] Finished in 0.006 seconds with exit status 256 (failed).\n INFO [752235f8] Running \/usr\/bin\/env git clone git@github.com:mumoshu\/finagle_sample_app finagle_sample_app on\nDEBUG [752235f8] Command: git clone git@github.com:mumoshu\/finagle_sample_app finagle_sample_app\nDEBUG [752235f8]        Cloning into 'finagle_sample_app'...\n INFO [752235f8] Finished in 2.827 seconds with exit status 0 (successful).\nDEBUG [262f8e15] Running \/usr\/bin\/env cd finagle_sample_app; sbt pack-archive on\nDEBUG [262f8e15] Command: cd finagle_sample_app; sbt pack-archive\n(\u7701\u7565\u3002\u9577\u5927\u306a\u30d3\u30eb\u30c9\u30ed\u30b0)\nDEBUG [262f8e15]        [info] Generating target\/finagle_sample_app-0.1-SNAPSHOT.tar.gz\nDEBUG [262f8e15]        [success] Total time: 4 s, completed Dec 20, 2013 3:47:11 PM\nDEBUG [262f8e15] Finished in 21.705 seconds with exit status 0 (successful).\nDEBUG [88b1fbff] Running \/usr\/bin\/env cd finagle_sample_app; pwd on\nDEBUG [88b1fbff] Command: cd finagle_sample_app; pwd\nDEBUG [88b1fbff]        \/home\/vagrant\/cap-test\/finagle_sample_app\nDEBUG [88b1fbff] Finished in 0.005 seconds with exit status 0 (successful).\n INFO \/home\/vagrant\/cap-test\/finagle_sample_app\/target\/finagle_sample_app-0.1-SNAPSHOT.tar.gz\n INFO finagle_sample_app-0.1-SNAPSHOT.tar.gz\nDEBUG [5ea6df07] Running \/usr\/bin\/env [ -d \/opt\/testapps\/finagle_sample_app ] on localhost\nDEBUG [5ea6df07] Command: [ -d \/opt\/testapps\/finagle_sample_app ]\nDEBUG [5ea6df07] Finished in 0.513 seconds with exit status 0 (successful).\nDEBUG Uploading \/home\/vagrant\/cap-test\/finagle_sample_app\/target\/finagle_sample_app-0.1-SNAPSHOT.tar.gz 0.0%\n INFO Uploading \/home\/vagrant\/cap-test\/finagle_sample_app\/target\/finagle_sample_app-0.1-SNAPSHOT.tar.gz 0.12%\n(\u7701\u7565\u3002\u9577\u5927\u306a\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u30ed\u30b0)\n INFO [a7940994] Running \/usr\/bin\/env cd \/opt\/testapps\/finagle_sample_app; tar -zxvf finagle_sample_app-0.1-SNAPSHOT.tar.gz on localhost\nDEBUG [a7940994] Command: cd \/opt\/testapps\/finagle_sample_app; tar -zxvf finagle_sample_app-0.1-SNAPSHOT.tar.gz\n(\u7701\u7565\u3002tar\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u7d50\u679c=\u5c55\u958b\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u89a7)\n INFO [a7940994] Finished in 0.259 seconds with exit status 0 (successful).\nDEBUG [b9d38bed] Running \/usr\/bin\/env cd \/opt\/testapps\/finagle_sample_app; ls -d *\/ on localhost\nDEBUG [b9d38bed] Command: cd \/opt\/testapps\/finagle_sample_app; ls -d *\/\nDEBUG [b9d38bed]        finagle_sample_app-0.1-SNAPSHOT\/\nDEBUG [b9d38bed] Finished in 0.009 seconds with exit status 0 (successful).\nDEBUG [2978d17e] Running \/usr\/bin\/env cd \/opt\/testapps\/finagle_sample_app\/finagle_sample_app-0.1-SNAPSHOT\/; ls bin\/* on localhost\nDEBUG [2978d17e] Command: cd \/opt\/testapps\/finagle_sample_app\/finagle_sample_app-0.1-SNAPSHOT\/; ls bin\/*\nDEBUG [2978d17e]        bin\/hello\nDEBUG [2978d17e] Finished in 0.009 seconds with exit status 0 (successful).\n INFO [74987948] Running \/usr\/bin\/env cd \/opt\/testapps\/finagle_sample_app\/finagle_sample_app-0.1-SNAPSHOT\/; ( ( nohup bin\/hello &>\/dev\/null ) & echo $! > RUNNING_PID) on localhost\nDEBUG [74987948] Command: cd \/opt\/testapps\/finagle_sample_app\/finagle_sample_app-0.1-SNAPSHOT\/; ( ( nohup bin\/hello &>\/dev\/null ) & echo $! > RUNNING_PID)\n INFO [74987948] Finished in 0.008 seconds with exit status 0 (successful).\n<\/pre>\n<h2>11. \u30b5\u30fc\u30d0\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b<\/h2>\n<p>\u5b9f\u969b\u306bCapistrano\u3067\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>\n$ ps aux | grep finagle_sample_app\nvagrant   6908  1.2  0.8 4313964 70760 ?       Sl   15:47   0:05 \/usr\/lib\/jvm\/java-6-openjdk-amd64\/bin\/java -cp \/opt\/testapps\/finagle_sample_app\/finagle_sample_app-0.1-SNAPSHOT\/lib\/* -Dprog.home=\/opt\/testapps\/finagle_sample_app\/finagle_sample_app-0.1-SNAPSHOT -Dprog.version=0.1-SNAPSHOT myprog.Hello\nvagrant   6954  0.0  0.0   8112   948 pts\/0    S+   15:54   0:00 grep --color=auto finagle_sample_app\n<\/pre>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u7121\u4e8b\u306b6908\u756a\u306e\u30d7\u30ed\u30bb\u30b9\u3067\u8d77\u52d5\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u30b5\u30fc\u30d0\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u901a\u4fe1\u3067\u304d\u308b\u304b\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre>\n$ curl http:\/\/localhost:10000\nHello Finagle!\n<\/pre>\n<p>\u7121\u4e8b\u3001\u30b5\u30fc\u30d0\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304b\u3089HTTP\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u8fd4\u3063\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n\u524d\u8ff0\u306eRUNNING_PID\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u3063\u3066\u518d\u30c7\u30d7\u30ed\u30a4\u306b\u3082\u5bfe\u5fdc\u3057\u305f\u306e\u3067\u30012\u56de\u76ee\u4ee5\u964d\u306e\u30c7\u30d7\u30ed\u30a4\u3082\u540c\u69d8\u306b<code>cap test deploy<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<h2>12. \u304a\u3064\u304b\u308c\u3055\u307e\u3067\u3057\u305f\uff01<\/h2>\n<p>\u4eca\u56de\u306fFinagle\u3068\u3044\u3046\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6700\u3082\u7c21\u5358\u306a\u30c7\u30d7\u30ed\u30a4\u3092\u4f8b\u306b\u3054\u8aac\u660e\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u304a\u6c17\u3065\u304d\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u81ea\u4f53\u306f\u300c\u30bf\u30b9\u30af\u3068<code>run_locally<\/code>\u30fb<code>on<\/code>\u30d6\u30ed\u30c3\u30af\u306e\u4e2d\u3067\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u300d\u3067\u3059\u3002\u4efb\u610f\u306e\u30b7\u30a7\u30eb\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u3048\u308b\u306e\u3067\u3001\u5fdc\u7528\u304c\u52b9\u304d\u307e\u3059\u3002\u3053\u306e\u4f8b\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u304a\u597d\u304d\u306a\u30b3\u30de\u30f3\u30c9\u306b\u5909\u66f4\u3057\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u3001\b\u7686\u3055\u3093\u304c\u666e\u6bb5\u5b9f\u884c\u3057\u3066\u3044\u308b\u624b\u9806\u3092Capistrano\u306e\u30bf\u30b9\u30af\u306b\u305d\u306e\u307e\u307e\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u4eca\u56de\u306f\u8aac\u660e\u3092\u7701\u7565\u3057\u307e\u3057\u305f\u304c\u3001Capistrano\u306e\u4e2d\u3067\u306f\u4efb\u610f\u306eRuby\u30b3\u30fc\u30c9\u304c\u66f8\u3051\u307e\u3059\u3002\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3060\u3051\u3067\u5bfe\u5fdc\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u8907\u96d1\u306a\u8981\u4ef6\u306e\u30c7\u30d7\u30ed\u30a4\u306a\u3069\u306b\u3082\u5bfe\u5fdc\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002\u305c\u3072\u3001\u30c8\u30e9\u30a4\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<h1>\u307e\u3068\u3081<\/h1>\n<ul>\n<li>\u30c7\u30d7\u30ed\u30a4\u306a\u3069\u306e\u624b\u4f5c\u696d\u306b\u306f\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308a\u307e\u3059<\/li>\n<li>\u81ea\u52d5\u5316\u306b\u3082\u5b66\u7fd2\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308a\u307e\u3059<\/li>\n<li>\u81ea\u52d5\u5316\u306e\u305f\u3081\u306bCapistrano 3\u304c\u5229\u7528\u3067\u304d\u307e\u3059<\/li>\n<li>Capistrano 3\u306e\u5b66\u7fd2\u30b3\u30b9\u30c8\u3092\u6e1b\u3089\u3059\u305f\u3081\u306b\u3001Capistrano 3\u306e\u57fa\u790e\u3092\u8aac\u660e\u3057\u307e\u3057\u305f<\/li>\n<li>\u4f8b\u3068\u3057\u3066\u3001Finagle\u3068\u3044\u3046\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u4f7f\u3063\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30d7\u30ed\u30a4\u3057\u307e\u3057\u305f<\/li>\n<li>\u3053\u306e\u4f8b\u3092\u5fdc\u7528\u3057\u3066\u3001\u69d8\u3005\u306a\u624b\u9806\u3092\u81ea\u52d5\u5316\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<h1>One more thing<\/h1>\n<p>\u4eca\u56de\u306fCapistrano 3\u81ea\u4f53\u306e\u8aac\u660e\u306b\u6ce8\u529b\u3059\u308b\u305f\u3081\u3001Capistrano\u306e\u4fbf\u5229\u6a5f\u80fd\u3084\u30c7\u30d7\u30ed\u30a4\u306e\u30ce\u30a6\u30cf\u30a6\u306f\u601d\u3044\u5207\u3063\u3066\u30ab\u30c3\u30c8\u3057\u307e\u3057\u305f\u3002<br \/>\n\u4eca\u5f8c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30c8\u30d4\u30c3\u30af\u3067\u3001\u3088\u308a\u5177\u4f53\u7684\u306a\u30ec\u30b7\u30d4\u3092\u3054\u7d39\u4ecb\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u304a\u697d\u3057\u307f\u306b\uff01<\/p>\n<ul>\n<li>\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u4f7f\u3044\u65b9<\/li>\n<li>Play framework\u306a\u3069\u3092\u5229\u7528\u3057\u305f\u5b9f\u969b\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c7\u30d7\u30ed\u30a4\u65b9\u6cd5<\/li>\n<li>\u7121\u505c\u6b62\u30c7\u30d7\u30ed\u30a4(Rolling Deploy)<\/li>\n<\/ul>\n<p>\u660e\u65e5\u306fRubyist\u3067\u3042\u308a\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3082\u3042\u308b\u5927\u5c71\u3055\u3093\u306b\u3088\u308bTrema\u3068OpenFlow\u306e\u8a18\u4e8b\u3067\u3059\u3002\u304a\u697d\u3057\u307f\u306b\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u3053\u306e\u8a18\u4e8b\u306fGREE Advent Calendar 2013\u5e74\u306e21\u65e5\u76ee\u3067\u3059\u3002\u304a\u697d\u3057\u307f\u304f\u3060\u3055\u3044\uff01 \u3053\u3093\u306b\u3061\u306f\u3001\u30a2\u30b4\u3072\u3052\u304c\u30c0\u30f3\u30c7\u30a3\u30fc\u3060\u3068\u8a55\u5224\u306e\u4e5d\u5ca1\u3067\u3059\u3002GREE\u3067\u306f\u3001Java\u3084Scala\u3092\u5e03\u6559\u3059\u308b\u305f\u3081\u306e\u571f\u53f0\u3092\u56fa\u3081 [&hellip;]<\/p>\n","protected":false},"author":63,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[54,61],"class_list":["post-10084","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-advent-calendar","tag-capistrano"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/10084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=10084"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/10084\/revisions"}],"predecessor-version":[{"id":10216,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/10084\/revisions\/10216"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=10084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=10084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=10084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}