{"id":4776,"date":"2013-11-18T00:38:46","date_gmt":"2013-11-17T15:38:46","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=4776"},"modified":"2014-01-05T01:55:59","modified_gmt":"2014-01-04T16:55:59","slug":"vagrant-chef-solo-%e3%81%ae%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e4%bd%bf%e3%81%84%e6%96%b9%ef%bc%88%e8%a8%ad%e5%ae%9a%e6%96%b9%e6%b3%95%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=4776","title":{"rendered":"Vagrant + Chef Solo \u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\uff08\u8a2d\u5b9a\u65b9\u6cd5\uff09"},"content":{"rendered":"<p>\u524d\u56de\u3001<\/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<p>\u3068\u3001Vagrant \u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u306a\u3093\u305b\u3053\u308c\u3092\u6bce\u56de\u884c\u3046\u3068\u306a\u308b\u3068\u3001\u975e\u5e38\u306b\u5927\u5909\u306a\u3053\u3068\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u69cb\u7bc9\u3092\u697d\u306b\u884c\u3046\u70ba\u306bChef\u3092\u4f7f\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4>Chef<\/h4>\n<p>Chef\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u305f\u8a2d\u5b9a\u5185\u5bb9\u306b\u5fdc\u3058\u3066\u81ea\u52d5\u7684\u306b\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210\u3084\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u7de8\u96c6\u306a\u3069\u3092\u884c\u3046\u30c4\u30fc\u30eb\u3067\u3001OPSCODE\u304c\u958b\u767a\u3057\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>OPSCODE<\/strong><\/p>\n<p><a href=\"http:\/\/docs.opscode.com\" target=\"_blank\">http:\/\/docs.opscode.com<\/a><\/p>\n<p><strong>Chef<\/strong><\/p>\n<p><a href=\"http:\/\/www.opscode.com\/chef\/\" target=\"_blank\">http:\/\/www.opscode.com\/chef\/<\/a><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/a5f6c508b4afc5fd7a116afa8e5ee184.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/a5f6c508b4afc5fd7a116afa8e5ee184.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 5.25.12\" width=\"259\" height=\"234\" class=\"alignnone  wp-image-4777\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/a5f6c508b4afc5fd7a116afa8e5ee184.png 324w, https:\/\/www.webcyou.com\/wp-content\/uploads\/a5f6c508b4afc5fd7a116afa8e5ee184-300x271.png 300w\" sizes=\"auto, (max-width: 259px) 100vw, 259px\" \/><\/a><\/p>\n<p>\u305d\u3082\u305d\u3082Chef\u3063\u3066\u306a\u3093\u306a\u306e\uff1f\u3063\u3066\u3053\u3068\u306a\u3093\u3067\u3059\u304c\u3001<\/p>\n<p>\u5168\u4f53\u50cf\u306f\u3053\u3061\u3089\u306e\u30da\u30fc\u30b8\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001<\/p>\n<p><a href=\"http:\/\/docs.opscode.com\/chef_quick_overview.html\" target=\"_blank\">http:\/\/docs.opscode.com\/chef_quick_overview.html<\/a><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/overview_chef_quick.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/overview_chef_quick.png\" alt=\"\" title=\"overview_chef_quick\" width=\"420\" height=\"440\" class=\"alignnone size-full wp-image-4778\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/overview_chef_quick.png 420w, https:\/\/www.webcyou.com\/wp-content\/uploads\/overview_chef_quick-286x300.png 286w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/a><\/p>\n<p><strong>\u30fbWORKSTATION<\/strong><\/p>\n<p><strong>\u30fbCHEF SERVER<\/strong><\/p>\n<p><strong>\u30fbNODES<\/strong><\/p>\n<p>\u3068\u5927\u304d\u304f3\u3064\u306b\u5206\u304b\u308c\u3066\u304a\u308a\u3001WORKSTATION\uff08\u4f7f\u3063\u3066\u3044\u308b PC\uff09\u3067\u8a2d\u5b9a\u3057\u305fcpplbooks\u3092knife\u30b3\u30de\u30f3\u30c9\u3092\u7528\u3044\u3066\u3001<strong>CHEF SERVER<\/strong>\u306b\u9001\u3089\u308c\u3001\u9001\u3089\u308c\u3066\u304d\u305f\u60c5\u5831\u3092\u5143\u306bNODES\u306b\u53cd\u6620\u3055\u305b\u308b\u3002\u3068\u3044\u3063\u305f\u6d41\u308c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u3067Vagrant\u7b49\u3067\u74b0\u5883\u3092\u69cb\u7bc9\u3057\u305f\u5834\u5408\u306e\u8a2d\u5b9a\u3067\u3001<strong>\u30fbWORKSTATION \u21d4\u00a0<strong>\u30fbNODES\u00a0<\/strong><\/strong>\u306e\u3084\u308a\u53d6\u308a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>Chef \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>\u3067\u306f\u65e9\u901f\u3001\u00a0<strong>Chef\u00a0<\/strong>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>Chef<\/strong> \u3092\u4f7f\u3046\u306b\u306f\u00a0<strong>ruby\u00a0<\/strong>\u3068 <strong>gem\u00a0<\/strong>\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u5c0e\u5165\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u78ba\u8a8d\u306f\u305d\u308c\u305e\u308c\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">ruby -v<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">gem -v<\/pre>\n<\/p>\n<p>\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<h5>\u516c\u5f0f\u30b5\u30a4\u30c8<\/h5>\n<p><strong>Workstation Setup<\/strong><\/p>\n<p><a href=\"https:\/\/learnchef.opscode.com\/quickstart\/workstation-setup\" target=\"_blank\">https:\/\/learnchef.opscode.com\/quickstart\/workstation-setup<\/a><\/p>\n<p>\u306e\u30da\u30fc\u30b8\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u74b0\u5883\u306b\u3042\u3063\u305f\u30b3\u30de\u30f3\u30c9\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/10f10b43e210b65f7f1e48d9db9ea78c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/10f10b43e210b65f7f1e48d9db9ea78c.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 21.09.51\" width=\"305\" height=\"165\" class=\"alignnone  wp-image-4779\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/10f10b43e210b65f7f1e48d9db9ea78c.png 424w, https:\/\/www.webcyou.com\/wp-content\/uploads\/10f10b43e210b65f7f1e48d9db9ea78c-300x162.png 300w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/><\/a><\/p>\n<p>mac\u306e\u5834\u5408\u306f\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">curl -L\u00a0https:\/\/www.opscode.com\/chef\/install.sh\u00a0| sudo bash<\/pre>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3061\u3087\u3063\u3068\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u306e\u3067\u3001\u3057\u3070\u3089\u304f\u5f85\u3061\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3089\u3001knife-solo\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>knife-solo\u306fknife\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u3001knife\u306e\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">sudo gem install knife-solo <\/pre>\n<p>\u3053\u3053\u3067\u5f53\u65b9\u306f\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u304a\u3001\u304a\u3046\u3045\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">ERROR: Failed to build gem native extension.<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">You have not agreed to the Xcode license agreements<\/pre>\n<p>\u3069\u3046\u3084\u3089xcode\u304c\u3046\u307e\u304f\u3044\u3063\u3066\u3044\u306a\u3044\u7684\u306a\u3002\u3002\u3069\u3046\u3082Xcode\u3092\u3057\u3070\u3089\u304f\u8d77\u3061\u4e0a\u3052\u3066\u3044\u306a\u304b\u3063\u305f\u308f\u3051\u3067\u8d77\u3061\u4e0a\u3052\u3001\u898f\u7d04\u66f8\u306b\u540c\u610f\u3057\u3066\u518d\u5ea6\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3061\u306a\u304a\u3057\u305f\u3089\u3044\u3051\u307e\u3057\u305f\u3002\u3088\u304b\u3063\u305f\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001gem list\u3067\u78ba\u8a8d\u3059\u308b\u3068\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">gem list<\/pre>\n<p>\u306a\u3093\u3084\u304b\u3093\u3084\u843d\u3061\u3066\u304d\u305f\u306e\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u78ba\u8a8d\u51fa\u6765\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/08f62fa9ea2be1d9863e888434f0e01c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/08f62fa9ea2be1d9863e888434f0e01c.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 21.36.45\" width=\"195\" height=\"294\" class=\"alignnone  wp-image-4780\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/08f62fa9ea2be1d9863e888434f0e01c.png 244w, https:\/\/www.webcyou.com\/wp-content\/uploads\/08f62fa9ea2be1d9863e888434f0e01c-199x300.png 199w\" sizes=\"auto, (max-width: 195px) 100vw, 195px\" \/><\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3057\u305f\u3089\u3001knife configure\u3067Knife\u30b3\u30de\u30f3\u30c9\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife configure<\/pre>\n<p>\u57fa\u672c\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u554f\u984c\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u30ea\u30bf\u30fc\u30f3\u306e\u9023\u6253\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h4>NODE \u8a2d\u5b9a<\/h4>\n<p>\u7d9a\u3044\u3066\u306fNODE\u306e\u65b9\u306e\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>NODE\u306fVagrant + VirtualBox\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u65b9\u306f\u3001<\/p>\n<h3><a href=\"https:\/\/www.webcyou.com\/?p=4632\">VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9<\/a><\/h3>\n<p>\u7b49\u3092\u53c2\u8003\u306b\u3057\u3066\u3044\u305f\u3060\u3051\u308c\u3070\u3068\u3002<\/p>\n<p>Vagrant \u306e\u521d\u671f\u5316\u3092\u884c\u3044\u3001Vagrantfile\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\uff08\u5229\u7528\u3059\u308b\uff09\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306ftest\/vagrant\/ \u5185\u306b\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">vagrant init centos64<\/pre>\n<p>\u521d\u671f\u5316\u306e\u30b3\u30de\u30f3\u30c9\u3067\u00a0Vagrantfile\u304c\u51fa\u6765\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001Vagrantfile\u306e26\u884c\u76ee<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># config.vm.network :private_network, ip: \"192.168.33.10\"<\/pre>\n<p>\u2193<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">config.vm.network :private_network, ip: \"192.168.33.10\"<\/pre>\n<p>\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30ed\u30fc\u30ab\u30ebip\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u969b\u306f\u3001Vagrantfile\u306e22\u884c\u76ee<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\"># config.vm.network :forwarded_port, guest: 80, host: 8080<\/pre>\n<p>\u2193<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">config.vm.network :forwarded_port, guest: 80, host: 8080<\/pre>\n<p>\u3053\u3061\u3089\u3082\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u5916\u3059\u3068\u826f\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u306e\u30b3\u30de\u30f3\u30c9 vagrant up \u3067\u8d77\u52d5\u3059\u308b\u306e\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">vagrant up<\/pre>\n<p>\u554f\u984c\u306a\u304f\u7acb\u3061\u4e0a\u304c\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<h4>SSH\u8a2d\u5b9a<\/h4>\n<p>vagrant \u306bSSH\u3067\u63a5\u7d9a\u3059\u308b\u969b\u306f\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">vagrant ssh<\/pre>\n<p>\u3067\u63a5\u7d9a\u3067\u304d\u308b\u306e\u3067\u3059\u304c\u3001knife\u30b3\u30de\u30f3\u30c9\u304b\u3089\u6271\u3044\u3084\u3059\u304f\u3059\u308b\u305f\u3081SSH\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">vagrant ssh-config --host &#x5B;ssh\u30a8\u30a4\u30ea\u30a2\u30b9\u540d] <\/pre>\n<p>\u3067\u4f5c\u6210\u3057\u3001<\/p>\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<p>\u3067\u53cd\u6620\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u3001hogege\u3067\u4f5c\u6210\u3057\u305f\u306e\u3067<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">ssh\u00a0hogege<\/pre>\n<p>\u306e\u30b3\u30de\u30f3\u30c9\u3067vagrant\u306b\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>Chef\u30ea\u30dd\u30b8\u30c8\u30ea\uff08Cookbook\uff09\u4f5c\u6210<\/h4>\n<p>Chef\u30ea\u30dd\u30b8\u30c8\u30ea\u4f5c\u6210\u306e\u30b3\u30de\u30f3\u30c9\u306f<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo init &#x5B;\u30ea\u30dd\u30b8\u30c8\u30ea\u540d]<\/pre>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f test\/ \u76f4\u4e0b\u306bchef-repo \u3068\u3044\u3046\u30ec\u30dd\u30b8\u30c8\u30ea\u540d\u3067\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo init chef-repo<\/pre>\n<p>\u3068\u3059\u308b\u3068\u3001<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/b0ff59c3fa7e15158054262fe4eaf809.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/b0ff59c3fa7e15158054262fe4eaf809.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 17.20.19\" width=\"204\" height=\"129\" class=\"alignnone size-full wp-image-4781\" \/><\/a><\/p>\n<p>\u3068\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u4e3b\u306b\u4f7f\u3046\u306e\u306f<strong>\u300csite-cookbooks\u300d<\/strong>\u3068<strong>\u300cnodes\u300d<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u307e\u3067\u884c\u3044\u307e\u3057\u305f\u3089\u3001\u5148\u307b\u3069\u306e\u30ec\u30dd\u30b8\u30c8\u30ea\u76f4\u4e0b\u3078\u79fb\u52d5\u3057\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">cd chef-repo\/ <\/pre>\n<p>Vagrant\uff08node\uff09\u306e\u65b9\u306b\u53cd\u6620\u3055\u305b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo prepare &#x5B;ssh\u30a8\u30a4\u30ea\u30a2\u30b9\u540d]<\/pre>\n<p>hogege\u3068\u8a2d\u5b9a\u3057\u307e\u3057\u305f\u306e\u3067\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo prepare hogege<\/pre>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u51e6\u7406\u5b8c\u4e86\u5f8c\u3001\u53cd\u6620\u3055\u308c\u305f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>cookbook\u4f5c\u6210<\/h4>\n<p>\u305d\u308c\u3067\u306f\u3001cookbook\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u4f5c\u696d\u306f\u30ec\u30dd\u30b8\u30c8\u30ea\u76f4\u4e0b\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">cd chef-repo\/ <\/pre>\n<p><strong>knife\u30b3\u30de\u30f3\u30c9 cookbook create<\/strong>\u3067\u3001cookbook\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>-o \u3067\u51fa\u529b\u5148\u3067\u3059\u304c\u3001\u5236\u4f5c\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5148\u3067\u3042\u308b site-cookbook\/\u306b\u6307\u5b9a\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife cookbook create &#x5B;cookbook\u540d] -o site-cookbooks\/ <\/pre>\n<p><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\"><\/p>\n<p><\/span><\/p>\n<p>\u306a\u306b\u306f\u3068\u3082\u3042\u308c\u3001\u307e\u305a\u306f\u3001Hello World\u3067\u306f\u306a\u3044\u304b\u3068\u3002\u3002\u3002\u00a0knife cookbook create hello \u3067\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/16944d05b8c35636202ed7bc8d76516a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/16944d05b8c35636202ed7bc8d76516a.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 17.34.10\" width=\"610\" height=\"218\" class=\"alignnone size-full wp-image-4782\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/16944d05b8c35636202ed7bc8d76516a.png 610w, https:\/\/www.webcyou.com\/wp-content\/uploads\/16944d05b8c35636202ed7bc8d76516a-300x107.png 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>\u3059\u308b\u3068\u3001\u3053\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u6765\u308b\u306e\u3067\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e<strong>\u300crecipes\u300d\u4ee5\u4e0b\u306b\u3042\u308b \u300cdefault.rb\u300d<\/strong>\u3092\u6271\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><strong>default.rb<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">log \"Hello World\"<\/pre>\n<p>\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u307e\u307e\u3067\u306f\u53cd\u6620\u3055\u308c\u307e\u305b\u3093\u306e\u3067\u3001\u30ec\u30dd\u30b8\u30c8\u30ea\u4f5c\u6210\u6642\u306b\u51fa\u6765\u305f<\/p>\n<p>chef-repo\/nodes\/ [SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d].json<\/p>\n<p>\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">chef-repo\/nodes\/hogege.json<\/pre>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n{\r\n  \"run_list\":&#x5B;\r\n      \"recipe&#x5B;hello]\"\r\n  ]\r\n}\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b runlist\u306b\u5148\u7a0b\u306ehello\u3092\u5b9f\u884c\u3059\u308b\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210\u3057\u307e\u3057\u305f\u3089\u3001knife\u30b3\u30de\u30f3\u30c9\u3067\u53cd\u6620\u3055\u305b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo cook &#x5B;SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d]<\/pre>\n<p>\u3067\u53cd\u6620\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>hogege\u3067\u4f5c\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo cook hogege<\/pre>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b\u3068\u3001<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/36f9c499222fc78e96b2ab2b935a8f9a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/36f9c499222fc78e96b2ab2b935a8f9a.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 22.41.11\" width=\"247\" height=\"31\" class=\"alignnone size-full wp-image-4783\" \/><\/a><\/p>\n<p>\u3068log\u304c\u51fa\u529b\u3055\u308c\u3066\u3044\u3066\u6210\u529f\u3057\u305f\u306e\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>package \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>\u3068\u3001Hello World\u3068\u8a00\u3063\u3066\u3044\u3066\u3082\u3057\u304b\u305f\u306a\u3044\u306e\u3067 package\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6d41\u308c\u306f\u4e0a\u8a18\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<p><strong>package\u306b\u3088\u308bvim \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\npackage \"vim-enhanced\" do\r\n   action :install\r\nend\r\n<\/pre>\n<p><strong>service\u306b\u3088\u308b iptables\u306e\u6307\u5b9a<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nservice \"iptables\" do\r\n    action &#x5B;:stop, :disable]\r\nend\r\n<\/pre>\n<p>\u3068\u3001\u3044\u307e\u307e\u3067\u30b3\u30de\u30f3\u30c9\u53e9\u3044\u3066\u3044\u305f\u306e\u304c\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3067\u6307\u5b9a\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001PHP\u3001MySQL\u7b49\u4e00\u901a\u308a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>default.rb<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nservice \"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}.each do |p|\r\n    package p do\r\n        action :install\r\n    end\r\nend\r\n\r\n# apache\u306e\u8d77\u52d5 CentOS\u306e\u5834\u5408\r\nservice \"httpd\" do\r\n    action &#x5B;:start, :enable]\r\nend\r\n \r\ntemplate \"\/var\/www\/html\/index.html\" do\r\n    source \"index.html.erb\"\r\n    mode 0644\r\nend<\/pre>\n<p>\u3068\u3001\u624b\u4f5c\u696d\u3067\u884c\u3063\u3066\u3044\u305f\u306e\u3092\u4e00\u62ec\u3067\u5b8c\u4e86\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>ruby\u304c\u4f7f\u3048\u307e\u3059\u306e\u3067\u3001 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5bfe\u8c61\u3092\u914d\u5217\u306b\u683c\u7d0d\u3057\u3066\u884c\u3046\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo cook &#x5B;SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d]<\/pre>\n<p>\u3067\u53cd\u6620\u3059\u308b\u3068\u3001\u30ef\u30b5\u30fc\u3063\u3068\u5165\u3063\u3066\u304f\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/0e45994d822a705c1d3608e97398a834.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/0e45994d822a705c1d3608e97398a834.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 22.50.33\" width=\"346\" height=\"228\" class=\"alignnone  wp-image-4784\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/0e45994d822a705c1d3608e97398a834.png 433w, https:\/\/www.webcyou.com\/wp-content\/uploads\/0e45994d822a705c1d3608e97398a834-300x197.png 300w\" sizes=\"auto, (max-width: 346px) 100vw, 346px\" \/><\/a><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5f8c\u3001\u5b9f\u884c\u3059\u308b\u3068UPDATE\u306e\u78ba\u8a8d\u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3054\u5fc3\u914d\u306a\u304f\u3002<\/p>\n<h4>template<\/h4>\n<p>\u3055\u3089\u30fc\u3068\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ntemplate \"\/var\/www\/html\/index.html\" do\r\n    source \"index.html.erb\"\r\n    mode 0644\r\nend<\/pre>\n<p>\u3068\u8a18\u8ff0\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001template\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u6271\u3046\u3053\u3068\u3082\u53ef\u80fd\u3067\u3001\u5909\u6570\u3092\u6e21\u3059\u3053\u3068\u3082\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>template &#8220;\/var\/www\/html\/index.html&#8221;<\/strong> \u306f <strong>vagrant\u306e\u30d1\u30b9<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>source &#8220;index.html.erb&#8221;<\/strong> \u306f <strong>cookbook\u5185\u306e\u5bfe\u8c61\u30d5\u30a1\u30a4\u30eb<\/strong><\/p>\n<p>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u683c\u7d0d\u5148\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f<\/p>\n<p><strong>site-cookbooks\/cookbook\u540d\/templates\/default<\/strong><\/p>\n<p>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/a80307633af17135f437d3867d67d1fd.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/a80307633af17135f437d3867d67d1fd.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 23.21.30\" width=\"378\" height=\"221\" class=\"alignnone  wp-image-4785\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/a80307633af17135f437d3867d67d1fd.png 420w, https:\/\/www.webcyou.com\/wp-content\/uploads\/a80307633af17135f437d3867d67d1fd-300x175.png 300w\" sizes=\"auto, (max-width: 378px) 100vw, 378px\" \/><\/a><\/p>\n<p>\u8a66\u3057\u306b\u3001<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/337a6ddd3984b896ae1fee02f1225d09.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/337a6ddd3984b896ae1fee02f1225d09.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 23.27.01\" width=\"116\" height=\"57\" class=\"alignnone size-full wp-image-4787\" \/><\/a><\/p>\n<p>\u3042\u3042\u3042\u3042\u3042\u3042\u3068\u66f8\u3044\u305f\uff08\u9069\u5f53\u3067\u3059\u307f\u307e\u305b\u3093\u3002\uff09<\/p>\n<p><strong>index.html.erb\u30d5\u30a1\u30a4\u30eb<\/strong>\u3092<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/807c7dd33c8df2089425d200b8214832.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 23.27.19\" width=\"338\" height=\"102\" class=\"alignnone  wp-image-4786\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/807c7dd33c8df2089425d200b8214832.png 375w, https:\/\/www.webcyou.com\/wp-content\/uploads\/807c7dd33c8df2089425d200b8214832-300x90.png 300w\" sizes=\"auto, (max-width: 338px) 100vw, 338px\" \/><\/p>\n<p>template\u306e\u683c\u7d0d\u5148\u306b\u683c\u7d0d\u3057\u3001\u30d6\u30e9\u30a6\u30b6\uff08192.168.33.10\uff09\u3067\u78ba\u8a8d\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/c1d5d93fd38223751203a8b9867c3362.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/c1d5d93fd38223751203a8b9867c3362.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 23.26.33\" width=\"157\" height=\"96\" class=\"alignnone size-full wp-image-4788\" \/><\/a><\/p>\n<p>\u4e0a\u624b\u304f\u3044\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u66f4\u306b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u5909\u6570\u3092\u6e21\u3059\u3053\u3068\u3082\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<h5>\u5909\u6570\u306e\u53d7\u3051\u6e21\u3057<\/h5>\n<p>\u5148\u7a0b\u306e<strong>\u300cnodes\u300d<\/strong>\u5185\u306eJSON\u30d5\u30a1\u30a4\u30eb\u306e\u3001\u4eca\u56de\u3067\u3044\u3046\u3068\u3053\u308d\u300chogege.json\u300d\u306b\u8a18\u5165\u3057\u3066<\/p>\n<p>\u5909\u6570\u306e\u53d7\u3051\u6e21\u3057\u3092\u884c\u3046\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p><strong>hogege.json<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">{ \r\n  \"user\": {\r\n    \"name\": \"webcyou!\"\r\n  },\r\n  \"run_list\":&#x5B;\r\n    \"recipe&#x5B;hello]\"\r\n  ]\r\n}<\/pre>\n<p>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5148 \u30d5\u30a1\u30a4\u30eb<\/p>\n<p><strong>index.html.erb<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;html&gt;\r\n&lt;p&gt;Hello\uff01\uff01 &lt;%= node&#x5B;'user']&#x5B;'name'] %&gt; &lt;\/p&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>\u3068\u3001\u3053\u306e\u3088\u3046\u306b\u4fee\u6b63\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3092\u53cd\u6620\u3055\u305b\u308b\u3068\u3001<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/6ac0671984f1e3a691bc846f5860ff4e.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/6ac0671984f1e3a691bc846f5860ff4e.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-17 23.48.26\" width=\"180\" height=\"115\" class=\"alignnone size-full wp-image-4789\" \/><\/a><\/p>\n<p>\u51fa\u6765\u3066\u308b\u30fc\uff01<\/p>\n<h5>httd.conf \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316<\/h5>\n<p>\u66f4\u306b\u3001web\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b\u3001httd.conf\u3092\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>ssh [SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d] \u3067\u3001SSH\u63a5\u7d9a\u3057\u3001httd.conf\u3092\u30ed\u30fc\u30ab\u30eb\u306e\u65b9\u3078\u3068\u6301\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p>httd.conf\u306f\u4ee5\u4e0b\u306b\u683c\u7d0d\u3055\u308c\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u30b5\u30fc\u30d0\u30fc\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\/etc\/httpd\/conf\/httpd.conf<\/pre>\n<p>\u3053\u308c\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">cp \/etc\/httpd\/conf\/httpd.conf \/vagrant<\/pre>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/f529f2d461a5ff9393bc47b457138280.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/f529f2d461a5ff9393bc47b457138280.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-18 0.01.07\" width=\"421\" height=\"115\" class=\"alignnone size-full wp-image-4790\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/f529f2d461a5ff9393bc47b457138280.png 421w, https:\/\/www.webcyou.com\/wp-content\/uploads\/f529f2d461a5ff9393bc47b457138280-300x81.png 300w\" sizes=\"auto, (max-width: 421px) 100vw, 421px\" \/><\/a><\/p>\n<p>\u3059\u308b\u3068\u3001\u30ed\u30fc\u30ab\u30eb\u306b\u3082\u53cd\u6620\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u3053\u308c\u3092<strong>site-cookbooks\/cookbook\u540d\/templates\/default\u00a0<\/strong>\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3001\u62e1\u5f35\u5b50\u3092erb\u306b\u5909\u63db\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/5392a836af68b95f9d98620677d3812f.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/5392a836af68b95f9d98620677d3812f.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-18 0.08.35\" width=\"341\" height=\"62\" class=\"alignnone size-full wp-image-4791\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/5392a836af68b95f9d98620677d3812f.png 341w, https:\/\/www.webcyou.com\/wp-content\/uploads\/5392a836af68b95f9d98620677d3812f-300x54.png 300w\" sizes=\"auto, (max-width: 341px) 100vw, 341px\" \/><\/a><\/p>\n<p><strong>site-cookbooks\/cookbook\u540d\/recipes\/default.rb<\/strong><\/p>\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\nend\r\n<\/pre>\n<p>\u4e0a\u8a18\u3092\u8ffd\u52a0\u5f8c\u3001node\u306b\u53cd\u6620\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">knife solo cook &#x5B;SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d]<\/pre>\n<p>\u3053\u308c\u3067\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316\u5b8c\u6210\u3002<\/p>\n<p>\u76f4\u63a5\u6271\u3046\u306a\u308a\u3001json\u3067\u8a2d\u5b9a\u3057\u305f\u5024\u3092\u53d7\u3051\u6e21\u3057\u305f\u308a\u3057\u3066\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>notifies<\/h4>\n<p>\u5148\u307b\u3069\u3001web\u30b5\u30fc\u30d0\u30fc\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b\u3001httpd.conf\u3092\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5316\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u7de8\u96c6\u3057\u305f\u969b Apache\u306e\u518d\u8d77\u52d5\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u3001\u624b\u52d5\u3067\u884c\u3046\u306e\u3067\u306f\u306a\u304f\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u4fee\u6b63\u3055\u308c\u305f\u969b\u306b\u884c\u3046\u69d8\u306b\u3057\u305f\u3044\u5834\u5408\u306b notifies \u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u5148\u307b\u3069\u306e<strong>recipes\/default.rb \u306e<\/strong>httpd.conf\u306e\u90e8\u5206\u306b\u4ee5\u4e0b\u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">notifies :restart, 'service&#x5B;httpd]'<\/pre>\n<p>\u3092\u8ffd\u8a18\u3002<\/p>\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\r\n<\/pre>\n<p>\u3053\u308c\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u304c\u3042\u3063\u305f\u969b\u3001Apache\u306e\u518d\u8d77\u52d5\u304c\u81ea\u52d5\u3067\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\uff08httpd.conf\u5909\u66f4\u5f8c\u3001knife solo cook [SSH\u30a8\u30a4\u30ea\u30a2\u30b9\u540d]\u3067\u53cd\u6620\uff09<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/3efa06bd5a6b0a0f025f23c29a0ab053.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/3efa06bd5a6b0a0f025f23c29a0ab053.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-11-18 0.23.42\" width=\"270\" height=\"90\" class=\"alignnone  wp-image-4792\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/3efa06bd5a6b0a0f025f23c29a0ab053.png 337w, https:\/\/www.webcyou.com\/wp-content\/uploads\/3efa06bd5a6b0a0f025f23c29a0ab053-300x100.png 300w\" sizes=\"auto, (max-width: 270px) 100vw, 270px\" \/><\/a><\/p>\n<h4>\u305d\u306e\u4ed6<\/h4>\n<p>\u305d\u306e\u4ed6\u3001\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u3042\u308b\u3001<\/p>\n<p><strong>Resources and Providers Reference<\/strong><\/p>\n<p><a href=\"http:\/\/docs.opscode.com\/chef\/resources.html\" target=\"_blank\">http:\/\/docs.opscode.com\/chef\/resources.html<\/a><\/p>\n<p>\u3067\u3001\u884c\u3048\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3044\u3084\u30fc\u8272\u3005\u3068\u3042\u308a\u307e\u3059\u306d\u30fc\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u3001 VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9 VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9 \u305d\u306e2 PHP + MySQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb VirtualBox\u3068Vagrant\u3067\u958b\u767a\u74b0\u5883\u3092\u69cb\u7bc9 \u305d\u306e3 [&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":[153,154,107,180,173,58,150,44,45,78,114,118],"class_list":{"0":"post-4776","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-tool","7":"tag-chef","8":"tag-chef-solo","9":"tag-mamp","10":"tag-mysql","11":"tag-php","12":"tag-sdk","13":"tag-vagrant","14":"tag-web","16":"tag-78","17":"tag-114","18":"tag-118"},"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4776","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=4776"}],"version-history":[{"count":5,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4776\/revisions"}],"predecessor-version":[{"id":4795,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4776\/revisions\/4795"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}