{"id":5045,"date":"2014-01-05T06:03:11","date_gmt":"2014-01-04T21:03:11","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=5045"},"modified":"2014-01-05T06:03:11","modified_gmt":"2014-01-04T21:03:11","slug":"2014%e5%b9%b4%e3%81%af-vagrant-%e3%81%a8-chef-solo%e3%81%a7%e3%82%b5%e3%82%af%e3%81%a3%e3%81%a8%e7%92%b0%e5%a2%83%e6%a7%8b%e7%af%89","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=5045","title":{"rendered":"2014\u5e74\u306f Vagrant \u3068 Chef solo\u3067\u30b5\u30af\u3063\u3068\u74b0\u5883\u69cb\u7bc9"},"content":{"rendered":"<p>\u3068\u3044\u3046\u8a33\u3067\u3001\u306a\u308b\u3079\u304f\u6700\u5c0f\u9650\u3001\u6700\u77ed\u3067Vagrant + Chef Solo\u3067\u74b0\u5883\u69cb\u7bc9\u3092\u884c\u3044\u305f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/378bfc96f27337287c8992d83bafbdd3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/378bfc96f27337287c8992d83bafbdd3.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-05 6.02.08\" width=\"185\" height=\"148\" class=\"alignnone size-full wp-image-5055\" \/><\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u6982\u8981\u306a\u3069\u306f\u904e\u53bb\u306e\u8a18\u4e8b\u3092\u53c2\u7167\u3057\u3066\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3><a href=\"https:\/\/www.webcyou.com\/?p=4632\">VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9<\/a><\/h3>\n<h3><a href=\"https:\/\/www.webcyou.com\/?p=4697\">VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9 \u305d\u306e2 PHP + MySQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/a><\/h3>\n<h3><a href=\"https:\/\/www.webcyou.com\/?p=4703\">VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9 \u305d\u306e3 phpMyAdmin \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb centOS apache\u8a2d\u5b9a<\/a><\/h3>\n<h3><a href=\"https:\/\/www.webcyou.com\/?p=4776\">Vagrant + Chef Solo \u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\uff08\u8a2d\u5b9a\u65b9\u6cd5\uff09<\/a><\/h3>\n<p>\u305d\u308c\u3067\u306f\u65e9\u901f\u3002<\/p>\n<h4>Vagrant<\/h4>\n<div>\u307e\u305a\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u5efa\u3066\u307e\u3057\u3087\u3046\u3002<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">vagrant init<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">vagrant up<\/pre>\n<div><\/div>\n<div>ssh\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u4f5c\u6210\u3057\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">vagrant ssh-config --host &#x5B;ssh\u30a8\u30a4\u30ea\u30a2\u30b9\u540d] &gt;&gt; ~\/.ssh\/config<\/pre>\n<h4>Chef<\/h4>\n<p><strong>Knife solo\u30b3\u30de\u30f3\u30c9\u3067\u521d\u671f\u5316<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo init &#x5B;\u30ea\u30dd\u30b8\u30c8\u30ea\u540d]<\/pre>\n<p><strong>\u4f8b\uff1a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo init\u00a0chef-repo<\/pre>\n<div><\/div>\n<div><strong>\u4f5c\u6210\u3055\u308c\u305f\u30ec\u30dd\u30b8\u30c8\u30ea\u306b\u79fb\u52d5\u3002<\/strong><\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">cd chef-repo\/<\/pre>\n<div><\/div>\n<div><strong>chef\u306b\u53cd\u6620\u3002<\/strong><\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo prepare &#x5B;ssh\u30a8\u30a4\u30ea\u30a2\u30b9\u540d]<\/pre>\n<div><\/div>\n<div><strong>cookbook\u4f5c\u6210\u3002<\/strong><\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife cookbook create &#x5B;cookbook\u540d] -o site-cookbooks\/<\/pre>\n<div><\/div>\n<div><\/div>\n<div><strong>\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6<\/strong><\/div>\n<div>chef-repo\/nodes\/ [SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d].json<\/div>\n<p><strong>\u00a0[SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d].json<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">{\r\n  \"run_list\":&#x5B;\r\n    \u201crecipe&#x5B;cookbook\u540d]\"\r\n  ]\r\n} <\/pre>\n<div><\/div>\n<div><\/div>\n<div><strong>default.rb<\/strong><\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">service \"iptables\" do\r\n    action &#x5B;:stop, :disable]\r\nend\r\n\r\n%w{php php-common php-mbstring php-xml php-devel php-process php-cli php-pear php-mysql mysql-server httpd vim-enhanced git}.each do |p|\r\n    package p do\r\n        action :install\r\n    end\r\nend\r\n\r\nservice \"httpd\" do\r\n    action &#x5B;:start, :enable]\r\nend<\/pre>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/6f76dc700a113218ab6adef2c2aed063.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/6f76dc700a113218ab6adef2c2aed063.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-05 5.58.25\" width=\"188\" height=\"172\" class=\"alignnone size-full wp-image-5053\" \/><\/a><\/p>\n<div><strong>chef\u5b9f\u884c<\/strong><\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo cook&#x5B;ssh\u30a8\u30a4\u30ea\u30a2\u30b9\u540d]<\/pre>\n<div>\u3053\u3053\u307e\u3067\u3067\u4e00\u901a\u308a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u51fa\u6765\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/div>\n<h4>httpd.config\u30d5\u30a1\u30a4\u30eb\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316<\/h4>\n<div>httpd.config\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316\u3059\u308b\u624b\u9806\u3067\u3059\u3002<\/div>\n<div><\/div>\n<div>vagrant\u306bSSH\u63a5\u7d9a\u884c\u3044\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u6301\u3063\u3066\u304d\u307e\u3059\u3002<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">cp \/etc\/httpd\/conf\/httpd.conf \/vagrant<\/pre>\n<div><\/div>\n<div><\/div>\n<div>site-cookbooks\/cookbook\u540d\/templates\/default\u00a0\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u683c\u7d0d\u3002<\/div>\n<div><strong>httpd.conf.erb<\/strong>\u306b\u30ea\u30cd\u30fc\u30e0\u3002<\/div>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/cee58df67c9d520fe73e18539ec40f9f.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/cee58df67c9d520fe73e18539ec40f9f.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2014-01-05 5.58.13\" width=\"225\" height=\"60\" class=\"alignnone size-full wp-image-5054\" \/><\/a><\/p>\n<div>default.rb\u306b\u8ffd\u52a0\u3002<\/div>\n<div><\/div>\n<div><strong>recipes\/default.rb<\/strong><\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ntemplate \"httpd.conf\" do\r\n    path \"\/etc\/httpd\/conf\/httpd.conf\"\r\n    source \"httpd.conf.erb\"\r\n    mode 0644\r\n    notifies :restart, 'service&#x5B;httpd]'\r\nend<\/pre>\n<div>\n<div><\/div>\n<div><strong>CSS\u306e\u66f4\u65b0\u304c\u53cd\u6620\u3055\u308c\u306a\u3044\u306e\u3092\u56de\u907f\u3059\u308b\u305f\u3081\u00a0\u00a0sendfile\u3092\u4f7f\u308f\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/strong><\/div>\n<div><\/div>\n<div>httpd.conf.erb\u306eEnableSendfile off\u306e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u5916\u3059\u3002<\/div>\n<div><\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">EnableSendfile off<\/pre>\n<\/div>\n<div><\/div>\n<div>\u4ee5\u4e0a\u3001<\/div>\n<div>\u5fc5\u8981\u6700\u4f4e\u9650\u306eVagrant + Chef solo \u74b0\u5883\u69cb\u7bc9\u3067\u3057\u305f\u3002<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u3068\u3044\u3046\u8a33\u3067\u3001\u306a\u308b\u3079\u304f\u6700\u5c0f\u9650\u3001\u6700\u77ed\u3067Vagrant + Chef Solo\u3067\u74b0\u5883\u69cb\u7bc9\u3092\u884c\u3044\u305f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u6982\u8981\u306a\u3069\u306f\u904e\u53bb\u306e\u8a18\u4e8b\u3092\u53c2\u7167\u3057\u3066\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002 VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[107,180,173,150,44,45,111,178,78,114,118],"class_list":{"0":"post-5045","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-tool","7":"tag-mamp","8":"tag-mysql","9":"tag-php","10":"tag-vagrant","11":"tag-web","13":"tag-wordpress-2","14":"tag-178","15":"tag-78","16":"tag-114","17":"tag-118"},"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/5045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5045"}],"version-history":[{"count":9,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/5045\/revisions"}],"predecessor-version":[{"id":5057,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/5045\/revisions\/5057"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}