{"id":10270,"date":"2015-06-15T16:11:11","date_gmt":"2015-06-15T07:11:11","guid":{"rendered":"http:\/\/www.creationline.com\/?p=10270"},"modified":"2023-08-29T14:12:37","modified_gmt":"2023-08-29T05:12:37","slug":"chef-provisioning%e3%81%a8vagrant%e3%81%a7serf%e3%82%af%e3%83%a9%e3%82%b9%e3%82%bf%e7%92%b0%e5%a2%83%e3%82%92%e4%bd%9c%e6%88%90%e3%81%99%e3%82%8b-getchef-vagrant-serf","status":"publish","type":"post","link":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270","title":{"rendered":"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf"},"content":{"rendered":"<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf \u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3059\u3002\u975e\u5e38\u306b\u7c21\u5358\u306a\u4f8b\u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u5b9f\u74b0\u5883\u306b\u6d41\u7528\u3067\u304d\u308b\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3001Chef Provisioning \u306e\u5229\u7528\u4f8b\u3084 Serf \u30af\u30e9\u30b9\u30bf\u306e\u6319\u52d5\u3092\u3064\u304b\u3080\u306b\u306f\u5341\u5206\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u672c\u7a3f\u3067\u4f7f\u7528\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3059\u3079\u3066 <a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\">https:\/\/github.com\/cl-lab-k\/chef-serf-cluster<\/a> \u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>Serf\u3001Vagrant\u3068\u306f<\/h3>\n<p><a href=\"https:\/\/www.serfdom.io\/\">Serf<\/a> \u3068\u306f\u3001\u7c73 <a href=\"https:\/\/www.hashicorp.com\/\">HashiCorp<\/a> \u793e\u304c\u958b\u767a\u3059\u308b\u30af\u30e9\u30b9\u30bf\u7ba1\u7406\u30c4\u30fc\u30eb\u3067\u3059\u3002\u8efd\u91cf\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3068\u7c21\u5358\u306a\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u307f\u3067\u52d5\u4f5c\u3057\u3001\u975e\u5e38\u306b\u624b\u8efd\u306b\u30af\u30e9\u30b9\u30bf\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.vagrantup.com\/\">Vagrant<\/a> \u3068\u306f\u3001\u3053\u3061\u3089\u3082\u7c73 HashiCorp \u793e\u304c\u958b\u767a\u3059\u308b\u3001\u4eee\u60f3\u74b0\u5883\u3092\u81ea\u52d5\u3067\u69cb\u7bc9\u3059\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002\u7c21\u5358\u306a\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u975e\u5e38\u306b\u624b\u8efd\u306b\u4eee\u60f3\u4eee\u60f3\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u53c2\u8003: <a href=\"\/news\/9272\">\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\u304c\u7c73\u56fdHashiCorp\u793e\u30d7\u30ed\u30c0\u30af\u30c8\u306e\u65e5\u672c\u56fd\u5185\u3067\u306e\u5c0e\u5165\u652f\u63f4\u4e8b\u696d\u3092\u958b\u59cb<\/a><\/li>\n<\/ul>\n<h3>Chef Provisioning\u3068\u306f<\/h3>\n<p><a href=\"https:\/\/docs.chef.io\/provisioning.html\">Chef Provisioning<\/a> (\u65e7\u79f0:Chef Metal)\u3068\u306f\u3001\u7c73 <a href=\"https:\/\/www.chef.io\/\">Chef<\/a> \u793e\u304c\u958b\u767a\u3059\u308b\u30af\u30e9\u30b9\u30bf\u7ba1\u7406\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002Chef \u306e Recipe \u3067\u30de\u30b7\u30f3\u3092\u7ba1\u7406\u3059\u308b\u3053\u3068\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u30af\u30e9\u30b9\u30bf\u3092\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u53c2\u8003: <a href=\"\/lab\/6410\">[\u548c\u8a33] Chef Provisioning (\u65e7Chef Metal): Infrastructure As Code<\/a><\/li>\n<\/ul>\n<h2>\u4e8b\u524d\u6e96\u5099<\/h2>\n<p>\u5b9f\u9a13\u306f Debian GNU\/Linux 8.1 \u4e0a\u3067\u884c\u3044\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/downloads.chef.io\/chef-dk\/\">Chef-DK<\/a> 0.6.0<\/li>\n<li><a href=\"https:\/\/www.vagrantup.com\/\">Vagrant<\/a> 1.7.2\n<ul>\n<li>Vagrant\u30d7\u30e9\u30b0\u30a4\u30f3: <a href=\"https:\/\/github.com\/cogitatio\/vagrant-hostsupdater\">vagrant-hostsupdater<\/a> 0.0.11<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/www.virtualbox.org\/\">VirtualBox<\/a> 4.3.28<\/li>\n<\/ul>\n<p>Chef-DK 0.6.0 \u306b\u540c\u68b1\u306e Chef Client 12.3.0 \u306b\u306f\u3001<strong>\/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb<\/strong> \u306b <a href=\"https:\/\/github.com\/chef\/chef\/commit\/5e9598c0de9cc4bd12530147caab1ecc298df973\">fixes access keys attribute in knife show<\/a> \u306e\u4fee\u6b63\u3092\u9069\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u672c\u5b9f\u9a13\u3067\u306f Vagrant \u30d7\u30e9\u30b0\u30a4\u30f3\u306e vagrant-hostsupdater \u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u53b3\u5bc6\u306b\u306f\u5fc5\u8981\u3068\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u5f8c\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<h2>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u53d6\u5f97<\/h2>\n<p><a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/sample_blog\">https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/tree\/sample_blog<\/a> \u3092 clone \u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% git clone https:\/\/github.com\/cl-lab-k\/chef-serf-cluster -b sample_blog<br \/>\nCloning into 'chef-serf-cluster'...<br \/>\nremote: Counting objects: 29, done.<br \/>\nremote: Compressing objects: 100% (24\/24), done.<br \/>\nremote: Total 29 (delta 0), reused 29 (delta 0), pack-reused 0<br \/>\nUnpacking objects: 100% (29\/29), done.<br \/>\nChecking connectivity... done.<br \/>\nNote: checking out 'a29fdafe14e0acb17d08bb9c8b68d2f136e53c5e'.<\/code><\/p>\n<p><code lang=\"bash\"><code lang=\"bash\"><\/code><\/code><\/p>\n<p>You are in 'detached HEAD' state. You can look around, make experimental<br \/>\nchanges and commit them, and you can discard any commits you make in this<br \/>\nstate without impacting any branches by performing another checkout.<\/p>\n<p><code lang=\"bash\"><code lang=\"bash\"><\/code><\/code><\/p>\n<p>If you want to create a new branch to retain commits you create, you may<br \/>\ndo so (now or later) by using -b with the checkout command again. Example:<\/p>\n<p><code lang=\"bash\"><code lang=\"bash\"><\/code><\/code><\/p>\n<p>git checkout -b new_branch_name<\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">% chef-serf-cluster<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u4ee5\u964d\u306f\u3053\u306e\u30c4\u30ea\u30fc\u5185\u3067\u4f5c\u696d\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>Chef-Server VM \u306e\u4f5c\u6210<\/h2>\n<p>Chef Provisioning \u3092\u7528\u3044\u3066\u3001Chef-Server 12 \u7528\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<strong>provisioning\/chef-server<\/strong> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% cd provisioning\/chef-server<br \/>\n% ls -la<br \/>\n\u5408\u8a08 16<br \/>\ndrwxr-xr-x 2 dai dai 120  6\u6708 12 15:30 .<br \/>\ndrwxr-xr-x 4 dai dai 100  6\u6708 12 15:30 ..<br \/>\n-rw-r--r-- 1 dai dai  73  6\u6708 12 15:30 Berksfile<br \/>\n-rw-r--r-- 1 dai dai 405  6\u6708 12 15:30 Rakefile<br \/>\n-rw-r--r-- 1 dai dai 971  6\u6708 12 15:30 chef-server.rb<br \/>\n-rw-r--r-- 1 dai dai 181  6\u6708 12 15:30 destroy.rb<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u8a2d\u5b9a\u306f <a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/provisioning\/chef.json\">chef.json<\/a> \u30d5\u30a1\u30a4\u30eb\u3067\u884c\u3048\u307e\u3059\u304c\u3001\u901a\u5e38\u306f\u5909\u66f4\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n\u4e00\u9023\u306e\u4f5c\u696d\u306f\u57fa\u672c\u7684\u306b <strong>rake<\/strong> \u30bf\u30b9\u30af\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u3042\u308a\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f <strong>berks vendor<\/strong> \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066 <a href=\"https:\/\/supermarket.chef.io\/cookbooks\/chef-server\">chef-server<\/a> Cookbook \u3092\u53d6\u5f97\u3057\u3001Chef Provisioning \u306b\u3088\u3063\u3066 Chef-Server 12 \u7528\u306e VirtualBox VM \u3092 Vagrant \u3067\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10273\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png\" alt=\"chef-serf-cluster-sample-chef-server\" width=\"332\" height=\"325\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png 332w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server-97x95.png 97w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/provisioning\/chef-server\/Rakefile\">Rakefile<\/a> \u3092\u898b\u3066\u306e\u901a\u308a\u3001Chef Provisioning \u306f Chef \u30ed\u30fc\u30ab\u30eb\u30e2\u30fc\u30c9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059(<strong>chef-client -z<\/strong>)\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake<br \/>\nberks vendor cookbooks<br \/>\nResolving cookbook dependencies...<br \/>\nFetching cookbook index from https:\/\/supermarket.chef.io...<br \/>\nUsing chef-server (3.1.1)<br \/>\nUsing packagecloud (0.0.18)<br \/>\nUsing chef-server-ingredient (0.4.0)<br \/>\nVendoring chef-server (3.1.1) to cookbooks\/chef-server<br \/>\nVendoring chef-server-ingredient (0.4.0) to cookbooks\/chef-server-ingredient<br \/>\nVendoring packagecloud (0.0.18) to cookbooks\/packagecloud<br \/>\nCHEF_DRIVER=vagrant chef-client -z chef-server.rb<br \/>\n[2015-06-12T15:54:31+09:00] WARN: No config file found or specified on command line, using command line options.<br \/>\ntarting Chef Client, version 12.3.0<br \/>\nresolving cookbooks for run list: []<br \/>\nSynchronizing Cookbooks:<br \/>\nCompiling Cookbooks...<br \/>\n[2015-06-12T15:54:32+09:00] WARN: Node XXXXXXXX has an empty run list.<br \/>\nConverging 1 resources<br \/>\nRecipe: @recipe_files::\/tmp\/chef-serf-cluster\/provisioning\/chef-server\/chef-server.rb<br \/>\n* machine[chef-server] action converge<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nRunning handlers:<br \/>\nRunning handlers complete<br \/>\nChef Client finished, 13\/15 resources updated in 187.109386539 seconds<br \/>\n- run 'chef-client -l auto' on chef-server<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">Running handlers:<br \/>\nRunning handlers complete<br \/>\nChef Client finished, 1\/1 resources updated in 244.394462204 seconds<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u3067 <strong>https:\/\/chef-server.example.jp<\/strong> (192.168.33.10) \u306b Chef-Server 12 \u7528\u306e VM \u304c\u8d77\u52d5\u3057\u307e\u3057\u305f\u3002\u672c\u5b9f\u9a13\u3067\u306f\u5fc5\u8981\u306a\u3044\u305f\u3081\u3001<a href=\"https:\/\/docs.chef.io\/manage.html\">Chef Manage<\/a> \u30a2\u30c9\u30aa\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u306e\u3067 Web UI \u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h2>Serf \u30ce\u30fc\u30c9\u7528 VM \u306e\u4f5c\u6210<\/h2>\n<p>\u3055\u3089\u306b Chef Provisioning \u3092\u7528\u3044\u3066\u3001Serf \u306e\u30ce\u30fc\u30c9\u3068\u306a\u308b VM \u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<strong>provisioning\/vms<\/strong> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% cd ..\/..<br \/>\n% cd provisioning\/vms<br \/>\n% ls -la<br \/>\n\u5408\u8a08 8<br \/>\ndrwxr-xr-x 2 dai dai   80  6\u6708 12 15:30 .<br \/>\ndrwxr-xr-x 4 dai dai  100  6\u6708 12 15:30 ..<br \/>\n-rw-r--r-- 1 dai dai 3030  6\u6708 12 15:30 Rakefile<br \/>\n-rw-r--r-- 1 dai dai 1390  6\u6708 12 15:30 vms.rb<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u8a2d\u5b9a\u306f Chef-Server \u7528 VM \u306e\u5834\u5408\u3068\u540c\u3058\u304f <a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/provisioning\/chef.json\">chef.json<\/a> \u30d5\u30a1\u30a4\u30eb\u3067\u884c\u3048\u307e\u3059\u304c\u3001\u901a\u5e38\u306f\u5909\u66f4\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002<br \/>\n\u3053\u3061\u3089\u3082\u4f5c\u696d\u306f <strong>rake<\/strong> \u30bf\u30b9\u30af\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u3042\u308a\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f Chef-Server \u306b\u3066 User \u3068 Organization \u3092\u4f5c\u6210\u3057\u3001\u4e21\u8005\u306e\u9375\u3092\u53d6\u5f97\u3001<a href=\"https:\/\/docs.chef.io\/config_rb_knife.html\">knife.rb<\/a> \u3092\u4f5c\u6210\u3001<a href=\"https:\/\/docs.chef.io\/knife_ssl_fetch.html\">knife ssl fetch<\/a> \u3092\u5b9f\u884c\u3057\u3066\u9375\u53d6\u5f97(\u53c2\u8003: <a href=\"\/lab\/6644\">Chef 12\u306e\u65b0\u6a5f\u80fd: knife ssl check\/fetch<\/a>)\u3001Chef Provisioning \u306b\u3088\u3063\u3066 Serf \u30ce\u30fc\u30c9\u7528\u306e VirtualBox VM \u3092 Vagrant \u3067 3\u53f0\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-vms.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10276\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-vms.png\" alt=\"chef-serf-cluster-sample-vms\" width=\"332\" height=\"325\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-vms.png 332w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-vms-97x95.png 97w\" sizes=\"auto, (max-width: 332px) 100vw, 332px\" \/><\/a><\/p>\n<p>\u4f5c\u6210\u3057\u305f Serf \u30ce\u30fc\u30c9\u7528 VM \u306e Node Object \u306f Chef-Server 12 \u306b\u767b\u9332\u3055\u308c\u307e\u3059\u3002<a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/provisioning\/vms\/Rakefile\">Rakefile<\/a> \u3067\u306f Chef Provisioning \u306f Chef \u30ed\u30fc\u30ab\u30eb\u30e2\u30fc\u30c9\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059(<strong>chef-client -z<\/strong>)\u304c\u3001\u3053\u308c\u306f\u3042\u304f\u307e\u3067 Chef Provisioning \u304c\u5fc5\u8981\u3068\u3057\u3066\u3044\u308b\u3082\u306e\u306a\u306e\u3067\u3001\u6df7\u540c\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake<br \/>\nssh -i ~\/.chef\/vms\/.vagrant\/machines\/chef-server\/virtualbox\/private_key vagrant@chef-server.example.jp 'sudo chef-server-ctl user-create testuser TEST USER testuser@example.jp testpswd --filename testuser.pem'<br \/>\nscp -i ~\/.chef\/vms\/.vagrant\/machines\/chef-server\/virtualbox\/private_key vagrant@chef-server.example.jp:testuser.pem \/tmp\/chef-serf-cluster\/provisioning\/vms\/..\/..\/.chef\/testuser.pem<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nknife ssl fetch<br \/>\nWARNING: Certificates from chef-server.example.jp will be fetched and placed in your trusted_cert<br \/>\ndirectory (\/tmp\/chef-serf-cluster\/.chef\/trusted_certs).<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nCHEF_DRIVER=vagrant chef-client -z vms.rb<br \/>\n[2015-06-12T16:28:02+09:00] WARN: No cookbooks directory found at or above current directory.  Assuming \/tmp\/chef-serf-cluster\/provisioning\/vms.<br \/>\nStarting Chef Client, version 12.3.0<br \/>\nresolving cookbooks for run list: []<br \/>\nSynchronizing Cookbooks:<br \/>\nCompiling Cookbooks...<br \/>\n[2015-06-12T16:28:03+09:00] WARN: Node testuser has an empty run list.<br \/>\nConverging 3 resources<br \/>\nRecipe: @recipe_files::\/tmp\/chef-serf-cluster\/provisioning\/vms\/vms.rb<br \/>\n* machine[node101] action converge<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\n- run 'chef-client -l auto' on node103<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">Running handlers:<br \/>\nRunning handlers complete<br \/>\nChef Client finished, 3\/3 resources updated in 173.498869383 seconds<br \/>\n<\/code><\/p>\n<ul>\n<li>node101 (192.168.33.101)<\/li>\n<li>node102 (192.168.33.102)<\/li>\n<li>node103 (192.168.33.103)<\/li>\n<\/ul>\n<p>\u306e 3\u53f0\u306e Serf \u7528 VM \u304c\u8d77\u52d5\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3055\u3066\u3001\u3053\u308c\u3089\u306e VM \u306b <a href=\"https:\/\/docs.chef.io\/knife_ssh.html\">knife ssh<\/a> \u306a\u3069\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u4ed5\u639b\u3051\u304c\u5fc5\u8981\u3067\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u3053\u308c\u3089\u306e VM \u306e Attribute \"ipaddress\" \u306f\u3059\u3079\u3066 <strong>10.0.2.15<\/strong> \u3060\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u672c\u5b9f\u9a13\u3067\u306f <a href=\"https:\/\/github.com\/cogitatio\/vagrant-hostsupdater\">vagrant-hostsupdater<\/a> \u3092\u7528\u3044\u3066\u3001\u30db\u30b9\u30c8\u5074\u306e \/etc\/hosts \u3092\u66f4\u65b0\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% tail -5 \/etc\/hosts<br \/>\n192.168.33.10  chef-server  # VAGRANT: d60dbc76afe87633bd242cc480b13aa6 (chef-server) \/ c8c040ff-f349-48dd-803f-a7f0ef94b223<br \/>\n192.168.33.10  chef-server.example.jp  # VAGRANT: d60dbc76afe87633bd242cc480b13aa6 (chef-server) \/ c8c040ff-f349-48dd-803f-a7f0ef94b223<br \/>\n192.168.33.101  node101  # VAGRANT: a0983c432e6838a69f708f6068a0f772 (node101) \/ 966fb052-054b-4d9b-91de-5fc38314cc4b<br \/>\n192.168.33.102  node102  # VAGRANT: 9226e6d398b35f9723c957b821058308 (node102) \/ 6b994ee1-5c04-4537-bed3-68465f1dc7c3<br \/>\n192.168.33.103  node103  # VAGRANT: 9425c22ebf37ecc98719c19e104cf5ed (node103) \/ 14175974-6183-47aa-9b7e-b3043ec64cf2<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001knife \u30b3\u30de\u30f3\u30c9\u306f\u305d\u306e\u307e\u307e\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% knife ssh \"name:node101\" -x vagrant -P vagrant uptime<br \/>\nnode101  07:49:49 up 21 min,  1 user,  load average: 0.00, 0.01, 0.02<br \/>\n<\/code><\/p>\n<p>\u3082\u3057\u3001vagrant-hostsupdater \u3092\u7528\u3044\u308b\u306a\u3069\u3057\u3066\u540d\u524d\u89e3\u6c7a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001knife \u30b3\u30de\u30f3\u30c9\u306f 10.0.2.15 \u306b\u63a5\u7d9a\u306b\u884c\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% knife ssh \"name:node101\" -x vagrant -P vagrant hostname<br \/>\nWARNING: Failed to connect to 10.0.2.15 -- Errno::ETIMEDOUT: Connection timed out - connect(2) for \"10.0.2.15\" port 22<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u63a5\u7d9a\u3067\u304d\u307e\u305b\u3093\u3002eth1 \u306e IP\u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f <strong>-a network.interfaces.eth1.addresses.keys.rotate.first<\/strong> \u306e\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059(\u53c2\u8003: <a href=\"https:\/\/twitter.com\/sawanoboly\/status\/562838805796106240\">\u3048\u30fc\u3001\u3053\u308c\u3067\u3082\u3044\u3051\u307e\u3057\u305f\u3002\u3002\u3002\u304c\u666e\u901a\u306b\u30aa\u30b9\u30b9\u30e1\u3067\u304d\u306a\u3044\u3002 `knife zero chef_client \"name:*\" -x vagrant --sudo -a network.interfaces.eth1.addresses.keys.rotate.first`<\/a>)\u3002\u3057\u304b\u3057\u3001Chef-DK 0.6.0 \u306b\u540c\u68b1\u306e Chef Client 12.3.0 \u306f\u3053\u306e -a \u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u5f15\u6570\u306e\u53d6\u308a\u6271\u3044\u306b\u30d0\u30b0\u304c\u3042\u308a\u3001\u3053\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u3066\u3082\u63a5\u7d9a\u3067\u304d\u306a\u3044\u306e\u3067\u3059(\u53c2\u8003: <a href=\"https:\/\/github.com\/chef\/chef\/pull\/3195\">Pass name by knife cil attribute<\/a>)\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% % knife ssh \"name:node101\" -x vagrant -P vagrant -a network.interfaces.eth1.addresses.keys.rotate.first hostname<br \/>\nFATAL: 1 node found, but does not have the required attribute to establish the connection. Try setting another attribute to open the connection using --attribute.<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u3053\u306e\u4fee\u6b63\u306f Chef Client \u306e HEAD \u306b\u306f\u53d6\u308a\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u304c\u300112.3.0 \u306b\u306f\u53d6\u308a\u8fbc\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u3088\u3063\u3066\u624b\u3067\u4fee\u6b63\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code lang=\"diff\"><br \/>\n% sudo cp -a \/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb \/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb.orig<br \/>\n% sudo vi \/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb<br \/>\n% diff -u \/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb.orig \/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb<br \/>\n--- \/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb.orig2015-06-12 16:44:44.584210095 +0900<br \/>\n+++ \/opt\/chefdk\/embedded\/apps\/chef\/lib\/chef\/knife\/core\/generic_presenter.rb\t2015-06-12 16:45:47.427309197 +0900<br \/>\n@@ -181,7 +181,7 @@<br \/>\n# Must check :[] before attr because spec can include<br \/>\n#   `keys` - want the key named `keys`, not a list of<br \/>\n#   available keys.<br \/>\n-            elsif data.respond_to?(:[])<br \/>\n+            elsif data.respond_to?(:[]) &amp;&amp; data.kind_of?(Chef::Node)<br \/>\ndata = data[attr]<br \/>\nelsif data.respond_to?(attr.to_sym)<br \/>\ndata = data.send(attr.to_sym)<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u3053\u306e\u4fee\u6b63\u3092\u65bd\u3057\u305f\u5f8c\u306a\u3089\u3070\u3001\u63a5\u7d9a\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% knife ssh \"name:node101\" -x vagrant -P vagrant -a network.interfaces.eth1.addresses.keys.rotate.first hostname<br \/>\n192.168.33.101 node101<br \/>\n<\/code><\/p>\n<p>\u5148\u306b\u8ff0\u3079\u305f\u901a\u308a\u3001\u672c\u5b9f\u9a13\u3067\u306f vagrant-hostsupdater \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3053\u306e\u4fee\u6b63\u306f\u53b3\u5bc6\u306b\u306f\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h2>\u30dd\u30ea\u30b7\u30fc<\/h2>\n<p>\u30c8\u30c3\u30d7\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002\u3053\u3053\u306b\u306f Recipe\u3001Role\u3001Attribute \u7b49\u3001chef-serf-cluster Cookbook \u306e\u30dd\u30ea\u30b7\u30fc\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% cd ..\/..<br \/>\n% ls -la<br \/>\n\u5408\u8a08 24<br \/>\ndrwxr-xr-x  9 dai  dai   300  6\u6708 12 16:57 .<br \/>\ndrwxrwxrwt 86 root root 1920  6\u6708 12 16:57 ..<br \/>\ndrwxr-xr-x  5 dai  dai   160  6\u6708 12 16:28 .chef<br \/>\ndrwxr-xr-x  8 dai  dai   280  6\u6708 12 16:57 .git<br \/>\n-rw-r--r--  1 dai  dai   126  6\u6708 12 15:30 .gitignore<br \/>\n-rw-r--r--  1 dai  dai    47  6\u6708 12 15:30 Berksfile<br \/>\n-rw-r--r--  1 dai  dai   805  6\u6708 12 15:30 README.md<br \/>\n-rw-r--r--  1 dai  dai   825  6\u6708 12 16:57 Rakefile<br \/>\ndrwxr-xr-x  2 dai  dai    60  6\u6708 12 15:30 attributes<br \/>\n-rw-r--r--  1 dai  dai  1022  6\u6708 12 15:30 chefignore<br \/>\ndrwxr-xr-x  3 dai  dai    60  6\u6708 12 15:30 files<br \/>\n-rw-r--r--  1 dai  dai   298  6\u6708 12 15:30 metadata.rb<br \/>\ndrwxr-xr-x  4 dai  dai   100  6\u6708 12 15:30 provisioning<br \/>\ndrwxr-xr-x  2 dai  dai    60  6\u6708 12 15:30 recipes<br \/>\ndrwxr-xr-x  2 dai  dai    60  6\u6708 12 15:30 roles<br \/>\n%<br \/>\n<\/code><\/p>\n<p>\u8a2d\u5b9a\u306f <a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/attributes\/default.rb\">attributes\/default.rb<\/a> \u3068 <a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/roles\/chef-serf-cluster.json\">roles\/chef-serf-cluster.json<\/a> \u306b\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u305e\u308c <a href=\"https:\/\/supermarket.chef.io\/cookbooks\/serf\">serf<\/a> Cookbook \u3068 <a href=\"https:\/\/supermarket.chef.io\/cookbooks\/sudo\">sudo<\/a> Cookbook \u306e\u8a2d\u5b9a\u3068\u306a\u308a\u307e\u3059\u3002\u901a\u5e38\u306f\u5909\u66f4\u306e\u5fc5\u8981\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>serf \u8a2d\u5b9a<\/h3>\n<p><strong>default['serf']['event_handlers']<\/strong> \u306f Serf \u306e\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u8a2d\u5b9a\u306e\u30cf\u30c3\u30b7\u30e5\u3092\u914d\u5217\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u307e\u3059\u3002<strong>url<\/strong> \u306f\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3068\u3057\u3066\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u5148\u3067\u3059\u3002\u672c\u5b9f\u9a13\u3067\u306f\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u53d6\u5f97\u3059\u308b\u305f\u3081\u3001<strong>file:\/\/<\/strong> \u3068\u3057\u3066\u3042\u308a\u307e\u3059\u3002<strong>event_type<\/strong> \u306f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u3092\u30b3\u30f3\u30de\u3067\u9023\u7d50\u3057\u305f\u6587\u5b57\u5217\u3067\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f Serf \u30af\u30e9\u30b9\u30bf\u306b\u65b0\u3057\u3044\u30e1\u30f3\u30d0\u30fc\u304c\u53c2\u52a0(<strong>member-join<\/strong>)\u3001\u30e1\u30f3\u30d0\u30fc\u3068\u306e\u901a\u4fe1\u304c\u9014\u7d76(<strong>member-failed<\/strong>)\u3001\u30e1\u30f3\u30d0\u30fc\u304c\u96e2\u8131(<strong>member-leave<\/strong>)\u306e\u5834\u5408\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u8a73\u3057\u304f\u306f <a href=\"http:\/\/www.serfdom.io\/docs\/agent\/event-handlers.html\">Event Handlers<\/a> \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>default['serf']['version']<\/strong> \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b Serf \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002Cookbook \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f 2013\/12\/5 \u306b\u516c\u958b\u3055\u308c\u305f 0.3.0 \u3068\u3044\u3046\u5927\u5909\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306a\u306e\u3067\u5fc5\u305a\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u672c\u5b9f\u9a13\u3067\u306f 0.4.x \u3067\u8ffd\u52a0\u3055\u308c\u305f -iface (interface) \u3084 -discover \u3068\u3044\u3063\u305f\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u8a73\u3057\u304f\u306f <a href=\"http:\/\/www.serfdom.io\/docs\/agent\/options.html\">Configuration<\/a> \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>default['serf']['agent']['discover']<\/strong> \u306f Serf \u30af\u30e9\u30b9\u30bf\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002Serf \u306f mDNS \u3092\u5229\u7528\u3057\u3066\u81ea\u52d5\u7684\u306b Serf \u306e\u30d4\u30a2\u3092\u63a2\u3057\u51fa\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u304a\u4e92\u3044\u306e IP \u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3057\u306a\u304f\u3066\u3088\u3044\u3068\u3044\u3046\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3060\u3057\u3001mDNS (\u30de\u30eb\u30c1\u30ad\u30e3\u30b9\u30c8)\u304c\u4f7f\u3048\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u3042\u308b\u3053\u3068\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p><strong>default['serf']['agent']['interface']<\/strong> \u306f Serf \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u5f85\u3061\u53d7\u3051\u3059\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5148\u306e discover \u306f\u3053\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3067\u884c\u3044\u307e\u3059\u3002\u8a73\u3057\u304f\u306f <a href=\"http:\/\/www.serfdom.io\/docs\/agent\/options.html\">Configuration<\/a> \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u672c\u5b9f\u9a13\u3067\u306f Vagrant \u304c\u30d1\u30d6\u30ea\u30c3\u30af\u306a IP \u30a2\u30c9\u30ec\u30b9\u3068\u3059\u308b eth1 \u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>sudo \u8a2d\u5b9a<\/h3>\n<p>Serf Cookbook \u3067\u306f\u3001Serf \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092 <strong>serf<\/strong> \u3068\u3044\u3046\u4e00\u822c\u30e6\u30fc\u30b6\u306e\u6a29\u9650\u3067\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u3001\u4ed6\u306e\u30e6\u30fc\u30b6\u306e\u6a29\u9650\u304c\u5fc5\u8981\u306a\u64cd\u4f5c\u304c\u884c\u3048\u307e\u305b\u3093\u3002\u672c\u5b9f\u9a13\u3067\u306f\u3001\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3067\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067 sudo \u3092\u4f7f\u3063\u3066 root \u6a29\u9650\u3092\u5f97\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002serf \u30e6\u30fc\u30b6\u304c sudo \u3092\u4ecb\u3057\u3066\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p><strong>default['authorization']['sudo']['sudoers_defaults']<\/strong> \u3067\u306f\u3001Ubuntu 14.04 \u306e <strong>\/etc\/sudoers<\/strong> \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u540c\u3058\u306b\u306a\u308b\u3088\u3046\u8a2d\u5b9a\u306b\u52a0\u3048\u3066\u3001<strong>SERF_EVENT<\/strong> \u74b0\u5883\u5909\u6570\u3092\u4fdd\u6301\u3059\u308b\u8a2d\u5b9a\u3092\u3057\u3066\u3044\u307e\u3059\u3002\u901a\u5e38\u3001sudo \u306f\u6307\u5b9a\u4ee5\u5916\u306e\u74b0\u5883\u5909\u6570\u3092\u524a\u9664\u3059\u308b\u305f\u3081\u3001\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u306e\u51e6\u7406\u306b\u5fc5\u8981\u306a SERF_EVENT \u74b0\u5883\u5909\u6570\u307e\u3067\u6d88\u53bb\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u3053\u308c\u3092\u9632\u304e\u307e\u3059\u3002sudo \u306e\u8a2d\u5b9a\u306b\u95a2\u3057\u3066\u306f root \u6a29\u9650\u3067 <strong>sudo -V<\/strong> \u3092\u5b9f\u884c\u3059\u308b\u3068\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>default['authorization']['sudo']['users']<\/strong> \u3067\u306f\u3001serf \u30e6\u30fc\u30b6\u3092 sudo \u53ef\u80fd\u30e6\u30fc\u30b6\u3068\u3057\u3066\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>default['authorization']['sudo']['groups']<\/strong> \u3067\u306f\u3001Ubuntu 14.04 \u306e <strong>\/etc\/sudoers<\/strong> \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u540c\u3058\u306b\u306a\u308b\u3088\u3046\u8a2d\u5b9a\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>default['authorization']['sudo']['passwordless']<\/strong> \u3067\u306f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u6c42\u3081\u306a\u3044\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>chef-serf-cluster Cookbook<\/h2>\n<h3><a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/recipes\/default.rb\">default Recipe<\/a><\/h3>\n<p><a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/files\/default\/sample.conf\">files\/default\/sample.conf<\/a> \u304b\u3089 <strong>\/etc\/sample.conf<\/strong> \u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u304c Serf \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3067\u66f4\u65b0\u3059\u308b\u5bfe\u8c61\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<strong>Serf \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3067 Chef-Client \u3092\u5b9f\u884c\u3057\u3066\u53ce\u675f\u3092\u884c\u3044\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u66f4\u65b0\u3059\u308b\u306e\u3067\u306f\u306a\u3044<\/strong>\u3068\u3044\u3046\u70b9\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u306a\u305c\u306a\u3089\u3001Serf \u30af\u30e9\u30b9\u30bf\u306b\u6240\u5c5e\u3057\u3066\u3044\u308b\u30e1\u30f3\u30d0\u30fc\u306b\u5909\u5316\u304c\u3042\u3063\u305f\u304b\u3089\u3068\u3044\u3063\u3066\u3001Chef-Server \u304c\u4fdd\u6301\u3057\u3066\u3044\u308b\u30a4\u30f3\u30d9\u30f3\u30c8\u30ea\u306b\u5909\u5316\u304c\u3042\u308b\u3068\u306f\u9650\u3089\u306a\u3044\u304b\u3089\u3067\u3059\u3002\u3084\u308a\u3088\u3046\u306b\u3088\u3063\u3066\u306f\u305d\u306e\u3088\u3046\u306a\u51e6\u7406\u3082\u53ef\u80fd\u3067\u3057\u3087\u3046\u3002\u3057\u304b\u3057\u672c\u5b9f\u9a13\u3067\u306f\u7c21\u4fbf\u3055\u306e\u305f\u3081\u3001Serf \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u306b Chef-Server \u3092\u4ecb\u5165\u3055\u305b\u306a\u3044\u3053\u3068\u3068\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/files\/default\/chef-apply.sh\">file:\/\/\/var\/lib\/serf\/scripts\/chef-apply.sh<\/a> \u3067\u3059\u3002Serf \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3068\u3057\u3066\u5b9f\u884c\u3055\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002sudo \u3092\u4ecb\u3057\u3066 <a href=\"https:\/\/docs.chef.io\/ctl_chef_apply.html\">chef-apply<\/a> \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002chef-apply \u306f Recipe \u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u3060\u3051\u306e\u6975\u5c0f\u306e Chef Client \u3067\u3001Chef-Server \u3068\u306e\u901a\u4fe1\u306f\u884c\u3044\u307e\u305b\u3093\u3002\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4ee3\u308f\u308a\u3068\u3057\u3066 Chef DSL \u306e\u6069\u6075\u306b\u3042\u305a\u304b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059(\u53c2\u8003: <a href=\"\/lab\/6924\">[\u548c\u8a33] Bash\u30b9\u30af\u30ea\u30d7\u30c8\u3092chef-apply\u306b\u5909\u63db\u3059\u308b<\/a>)\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/files\/default\/update-sample-conf.rb\">\/var\/lib\/serf\/scripts\/update-sample-conf.rb<\/a> \u306f chef-apply \u304c\u5b9f\u884c\u3059\u308b Recipe \u3067\u3059\u3002Chef::Util \u3092\u5229\u7528\u3057\u3066 <strong>\/etc\/sample.conf<\/strong> \u3092\u66f4\u65b0\u3057\u307e\u3059(\u53c2\u8003: <a href=\"http:\/\/qiita.com\/sawanoboly\/items\/355288c4592bdf4a3550\">Chef\u306e\u30ec\u30b7\u30d4\u3067sed\u7684\u306a\u4e8b\u3092\u5b9f\u65bd<\/a>)\u3002serf \u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304b\u3089\u306e\u901a\u77e5\u3092\u74b0\u5883\u5909\u6570\u3068\u6a19\u6e96\u5165\u529b\u3067\u53d7\u3051\u53d6\u308a\u3001Serf \u30af\u30e9\u30b9\u30bf\u306b\u65b0\u3057\u3044\u30e1\u30f3\u30d0\u30fc\u304c\u53c2\u52a0\u3057\u305f\u5834\u5408\u306f\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3001Serf \u30af\u30e9\u30b9\u30bf\u306e\u30e1\u30f3\u30d0\u30fc\u304b\u3089\u901a\u4fe1\u304c\u9014\u7d76\u3057\u305f\u304b Serf \u30af\u30e9\u30b9\u30bf\u304b\u3089\u30e1\u30f3\u30d0\u30fc\u304c\u96e2\u8131\u3057\u305f\u5834\u5408\u306f\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30dd\u30ea\u30b7\u30fc\u3092 Chef-Server \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<\/h3>\n<p>\u5148\u7a0b\u4f5c\u6210\u3057\u305f Serf \u7528 Node \u306f run_list \u304c\u7a7a\u306e\u305f\u3081\u3001\u4f55\u3082\u8d77\u304d\u307e\u305b\u3093\u3002Node \u306b\u9069\u7528\u3059\u308b\u305f\u3081\u306e\u30dd\u30ea\u30b7\u30fc\u3092 Chef-Server \u306b\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\u3053\u3061\u3089\u3082\u4f5c\u696d\u306f<strong>rake<\/strong> \u30bf\u30b9\u30af\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3066\u3042\u308a\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f <strong>berks vendor<\/strong> \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3001<strong>berks upload<\/strong> \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066 Cookbook \u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u3001<strong>knife role<\/strong> \u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066 Role \u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3001Serf \u7528 Node \u306e\u53ce\u675f\u3092\u884c\u3044\u307e\u3059\u3002\u3053\u306e\u6642\u70b9\u3067\u306f run_list \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u53ce\u675f\u3092\u884c\u3063\u3066\u3082 Node \u306b\u7279\u306b\u5909\u5316\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake<br \/>\nberks vendor cookbooks<br \/>\nResolving cookbook dependencies...<br \/>\nFetching 'chef-serf-cluster' from source at .<br \/>\nFetching cookbook index from https:\/\/supermarket.chef.io...<br \/>\nUsing sudo (2.7.1)<br \/>\nUsing serf (0.9.0)<br \/>\nUsing chef-serf-cluster (0.1.0) from source at .<br \/>\nUsing logrotate (1.9.1)<br \/>\nVendoring chef-serf-cluster (0.1.0) to cookbooks\/chef-serf-cluster<br \/>\nVendoring logrotate (1.9.1) to cookbooks\/logrotate<br \/>\nVendoring serf (0.9.0) to cookbooks\/serf<br \/>\nVendoring sudo (2.7.1) to cookbooks\/sudo<br \/>\nberks upload --no-ssl-verify --force<br \/>\nUploaded chef-serf-cluster (0.1.0) to: 'https:\/\/chef-server.example.jp:443\/organizations\/testorg'<br \/>\nUploaded logrotate (1.9.1) to: 'https:\/\/chef-server.example.jp:443\/organizations\/testorg'<br \/>\nUploaded serf (0.9.0) to: 'https:\/\/chef-server.example.jp:443\/organizations\/testorg'<br \/>\nUploaded sudo (2.7.1) to: 'https:\/\/chef-server.example.jp:443\/organizations\/testorg'<br \/>\nknife role from file roles\/chef-serf-cluster.json<br \/>\nUpdated Role chef-serf-cluster!<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'sudo chef-client'<br \/>\nnode101 Starting Chef Client, version 12.3.0<br \/>\nnode103 Starting Chef Client, version 12.3.0<br \/>\nnode102 Starting Chef Client, version 12.3.0<br \/>\nnode101 resolving cookbooks for run list: []<br \/>\nnode103 resolving cookbooks for run list: []<br \/>\nnode101 Synchronizing Cookbooks:<br \/>\nnode101 Compiling Cookbooks...<br \/>\nnode101 [2015-06-12T08:44:24+00:00] WARN: Node node101 has an empty run list.<br \/>\nnode101 Converging 0 resources<br \/>\nnode101<br \/>\nnode101 Running handlers:<br \/>\nnode101 Running handlers complete<br \/>\nnode101 Chef Client finished, 0\/0 resources updated in 1.267921461 seconds<br \/>\nnode103 Synchronizing Cookbooks:<br \/>\nnode103 Compiling Cookbooks...<br \/>\nnode103 [2015-06-12T08:44:24+00:00] WARN: Node node103 has an empty run list.<br \/>\nnode103 Converging 0 resources<br \/>\nnode103<br \/>\nnode103 Running handlers:<br \/>\nnode103 Running handlers complete<br \/>\nnode103 Chef Client finished, 0\/0 resources updated in 1.315651996 seconds<br \/>\nnode102 resolving cookbooks for run list: []<br \/>\nnode102 Synchronizing Cookbooks:<br \/>\nnode102 Compiling Cookbooks...<br \/>\nnode102 [2015-06-12T08:44:29+00:00] WARN: Node node102 has an empty run list.<br \/>\nnode102 Converging 0 resources<br \/>\nnode102<br \/>\nnode102 Running handlers:<br \/>\nnode102 Running handlers complete<br \/>\nnode102 Chef Client finished, 0\/0 resources updated in 6.391368714 seconds<br \/>\n%<br \/>\n<\/code><\/p>\n<h2>Serf \u7528 VM \u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528<\/h2>\n<p>\u3067\u306f\u3001Serf \u7528 VM \u306b 1\u3064\u305a\u3064\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p><code lang=\"yaml\"><br \/>\n% knife node run_list add node101 \"role[chef-serf-cluster]\"<br \/>\nnode101:<br \/>\nrun_list: role[chef-serf-cluster]<br \/>\n<\/code><\/p>\n<p>\u9069\u7528\u3057\u305f\u3089\u3001\u53ce\u675f\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake converge<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'sudo chef-client'<br \/>\nnode103 Starting Chef Client, version 12.3.0<br \/>\nnode101 Starting Chef Client, version 12.3.0<br \/>\nnode102 Starting Chef Client, version 12.3.0<br \/>\nnode102 resolving cookbooks for run list: []<br \/>\nnode101 resolving cookbooks for run list: [\"sudo\", \"chef-serf-cluster\", \"serf\"]<br \/>\nnode102 Synchronizing Cookbooks:<br \/>\nnode102 Compiling Cookbooks...<br \/>\nnode102 [2015-06-12T08:46:55+00:00] WARN: Node node102 has an empty run list.<br \/>\nnode102 Converging 0 resources<br \/>\nnode102<br \/>\nnode102 Running handlers:<br \/>\nnode102 Running handlers complete<br \/>\nnode102 Chef Client finished, 0\/0 resources updated in 1.317966938 seconds<br \/>\nnode101 Synchronizing Cookbooks:<br \/>\nnode101   - sudo<br \/>\nnode101   - chef-serf-cluster<br \/>\nnode101   - serf<br \/>\nnode101   - logrotate<br \/>\nnode101 Compiling Cookbooks...<br \/>\nnode101 Converging 27 resources<br \/>\nnode101 Recipe: sudo::default<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode101 Running handlers:<br \/>\nnode101 Running handlers complete<br \/>\nnode101 Chef Client finished, 27\/29 resources updated in 17.392931293 seconds<br \/>\n<\/code><\/p>\n<p>VM \u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake serf_members<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'serf members'<br \/>\nnode101 node101  192.168.33.101:7946  alive<br \/>\nnode102 bash: serf: command not found<br \/>\nnode103 bash: serf: command not found<br \/>\nrake aborted!<br \/>\nCommand failed with status (127): [knife ssh 'name:*' -x vagrant -P vagrant '...]<br \/>\n\/tmp\/chef-serf-cluster\/Rakefile:38:in `block in '<br \/>\nTasks: TOP =&gt; serf_members<br \/>\n(See full trace by running task with --trace)<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n% rake sample_conf<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'cat \/etc\/sample.conf'<br \/>\nnode101 server {<br \/>\nnode101 \tserver 192.168.33.101;<br \/>\nnode101 \t#server<br \/>\nnode101 }<br \/>\nnode102 cat: \/etc\/sample.conf: No such file or directory<br \/>\nnode103 cat: \/etc\/sample.conf: No such file or directory<br \/>\nrake aborted!<br \/>\nCommand failed with status (1): [knife ssh 'name:*' -x vagrant -P vagrant '...]<br \/>\n\/tmp\/chef-serf-cluster\/Rakefile:43:in `block in '<br \/>\nTasks: TOP =&gt; sample_conf<br \/>\n(See full trace by running task with --trace)<br \/>\n<\/code><\/p>\n<p>\u307e\u305a\u3001node101 \u306e\u307f\u304c Serf \u30af\u30e9\u30b9\u30bf\u306e\u30e1\u30f3\u30d0\u30fc\u3068\u306a\u3063\u3066\u3044\u3066\u3001\/etc\/sample.conf \u30d5\u30a1\u30a4\u30eb\u306b\u3082 node101 \u306e\u307f\u304c\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10278\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-1.png\" alt=\"chef-serf-cluster-sample-install-1\" width=\"302\" height=\"356\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-1.png 302w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-1-81x95.png 81w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/a><\/p>\n<p>\u6b21\u306b node102 \u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"yaml\"><br \/>\n% knife node run_list add node102 \"role[chef-serf-cluster]\"<br \/>\nnode102:<br \/>\nrun_list: role[chef-serf-cluster]<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n% rake converge<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'sudo chef-client'<br \/>\nnode101 Starting Chef Client, version 12.3.0<br \/>\nnode102 Starting Chef Client, version 12.3.0<br \/>\nnode103 Starting Chef Client, version 12.3.0<br \/>\nnode102 resolving cookbooks for run list: [\"sudo\", \"chef-serf-cluster\", \"serf\"]<br \/>\nnode102 Synchronizing Cookbooks:<br \/>\nnode102   - sudo<br \/>\nnode102   - chef-serf-cluster<br \/>\nnode102   - serf<br \/>\nnode102   - logrotate<br \/>\nnode102 Compiling Cookbooks...<br \/>\nnode102 Converging 27 resources<br \/>\nnode102 Recipe: sudo::default<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode102 Running handlers:<br \/>\nnode102 Running handlers complete<br \/>\nnode102 Chef Client finished, 27\/29 resources updated in 18.963169116 seconds<br \/>\n<\/code><\/p>\n<p>VM \u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% LC_ALL=C TERM=xterm-color rake serf_members<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'serf members'<br \/>\nnode103 bash: serf: command not found<br \/>\nnode102 node102  192.168.33.102:7946  alive<br \/>\nnode102 node101  192.168.33.101:7946  alive<br \/>\nnode101 node101  192.168.33.101:7946  alive<br \/>\nnode101 node102  192.168.33.102:7946  alive<br \/>\nrake aborted!<br \/>\nCommand failed with status (127): [knife ssh 'name:*' -x vagrant -P vagrant '...]<br \/>\n\/tmp\/chef-serf-cluster\/Rakefile:38:in `block in '<br \/>\nTasks: TOP =&gt; serf_members<br \/>\n(See full trace by running task with --trace)<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n% rake sample_conf<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'cat \/etc\/sample.conf'<br \/>\nnode103 cat: \/etc\/sample.conf: No such file or directory<br \/>\nnode102 server {<br \/>\nnode102 \tserver 192.168.33.102;<br \/>\nnode102 \tserver 192.168.33.101;<br \/>\nnode102 \t#server<br \/>\nnode102 }<br \/>\nnode101 server {<br \/>\nnode101 \tserver 192.168.33.101;<br \/>\nnode101 \tserver 192.168.33.102;<br \/>\nnode101 \t#server<br \/>\nnode101 }<br \/>\nrake aborted!<br \/>\nCommand failed with status (1): [knife ssh 'name:*' -x vagrant -P vagrant '...]<br \/>\n\/tmp\/chef-serf-cluster\/Rakefile:43:in `block in '<br \/>\nTasks: TOP =&gt; sample_conf<br \/>\n(See full trace by running task with --trace)<br \/>\n<\/code><\/p>\n<p>node102 \u3082\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u306a\u304a\u3001\/etc\/sample.conf \u306e\u66f4\u65b0\u306f chef-client \u30b3\u30de\u30f3\u30c9\u306e\u53ce\u675f\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u305f\u306e\u3067\u306f<strong>\u3042\u308a\u307e\u305b\u3093<\/strong>\u3002Serf \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u306b\u3088\u3063\u3066\u547c\u3073\u51fa\u3055\u308c\u305f chef-apply \u30b3\u30de\u30f3\u30c9\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u4e8b\u5b9f\u3001chef-client \u30b3\u30de\u30f3\u30c9\u306b\u3088\u3063\u3066\u9069\u7528\u3055\u308c\u308b\u30dd\u30ea\u30b7\u30fc\u306f<a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/recipes\/default.rb#L8-L14\">\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304f\u3060\u3051<\/a>\u3067\u3001chef-apply \u30b3\u30de\u30f3\u30c9\u306b\u3088\u3063\u3066\u9069\u7528\u3055\u308c\u308b\u30dd\u30ea\u30b7\u30fc\u304c<a href=\"https:\/\/github.com\/cl-lab-k\/chef-serf-cluster\/blob\/sample_blog\/files\/default\/update-sample-conf.rb#L9-L23\">\u30d5\u30a1\u30a4\u30eb\u3092\u66f4\u65b0<\/a>\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10279\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-2.png\" alt=\"chef-serf-cluster-sample-install-2\" width=\"302\" height=\"356\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-2.png 302w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-2-81x95.png 81w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/a><\/p>\n<p>node103 \u306b\u3082\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"yaml\"><br \/>\n% knife node run_list add node103 \"role[chef-serf-cluster]\"<br \/>\nnode103:<br \/>\nrun_list: role[chef-serf-cluster]<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n% rake converge<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'sudo chef-client'<br \/>\nnode101 Starting Chef Client, version 12.3.0<br \/>\nnode103 Starting Chef Client, version 12.3.0<br \/>\nnode102 Starting Chef Client, version 12.3.0<br \/>\nnode103 resolving cookbooks for run list: [\"sudo\", \"chef-serf-cluster\", \"serf\"]<br \/>\nnode103 Synchronizing Cookbooks:<br \/>\nnode103   - chef-serf-cluster<br \/>\nnode103   - serf<br \/>\nnode103   - logrotate<br \/>\nnode103 Compiling Cookbooks...<br \/>\nnode103 Converging 27 resources<br \/>\nnode103 Recipe: sudo::default<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode103 Running handlers:<br \/>\nnode103 Running handlers complete<br \/>\nnode103 Chef Client finished, 27\/29 resources updated in 17.828711263 seconds<br \/>\n%<br \/>\n<\/code><\/p>\n<p>node103 \u3082\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake serf_members<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'serf members'<br \/>\nnode101 node103  192.168.33.103:7946  alive<br \/>\nnode101 node101  192.168.33.101:7946  alive<br \/>\nnode101 node102  192.168.33.102:7946  alive<br \/>\nnode103 node101  192.168.33.101:7946  alive<br \/>\nnode103 node102  192.168.33.102:7946  alive<br \/>\nnode103 node103  192.168.33.103:7946  alive<br \/>\nnode102 node102  192.168.33.102:7946  alive<br \/>\nnode102 node101  192.168.33.101:7946  alive<br \/>\nnode102 node103  192.168.33.103:7946  alive<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n% rake sample_conf<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'cat \/etc\/sample.conf'<br \/>\nnode103 server {<br \/>\nnode103 \tserver 192.168.33.101;<br \/>\nnode103 \tserver 192.168.33.102;<br \/>\nnode103 \tserver 192.168.33.103;<br \/>\nnode103 \t#server<br \/>\nnode103 }<br \/>\nnode102 server {<br \/>\nnode102 \tserver 192.168.33.102;<br \/>\nnode102 \tserver 192.168.33.101;<br \/>\nnode102 \tserver 192.168.33.103;<br \/>\nnode102 \t#server<br \/>\nnode102 }<br \/>\nnode101 server {<br \/>\nnode101 \tserver 192.168.33.101;<br \/>\nnode101 \tserver 192.168.33.102;<br \/>\nnode101 \tserver 192.168.33.103;<br \/>\nnode101 \t#server<br \/>\nnode101 }<br \/>\n%<br \/>\n<\/code><\/p>\n<p><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10280\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-3.png\" alt=\"chef-serf-cluster-sample-install-3\" width=\"302\" height=\"356\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-3.png 302w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-install-3-81x95.png 81w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/a><\/p>\n<h2>Serf \u7528 VM \u306e\u505c\u6b62\u3068\u5fa9\u5e30<\/h2>\n<p>\u8a66\u3057\u306b node102 \u3092 halt \u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% vagrant halt node102<br \/>\n==&gt; node102: Removing cache buckets symlinks...<br \/>\n==&gt; node102: Attempting graceful shutdown of VM...<br \/>\n==&gt; node102: Removing hosts<br \/>\n%<br \/>\n<\/code><\/p>\n<p>VM \u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake serf_members<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'serf members'<br \/>\nWARNING: Failed to connect to node102 -- SocketError: getaddrinfo: Name or service not known<br \/>\nnode101 node101  192.168.33.101:7946  alive<br \/>\nnode101 node102  192.168.33.102:7946  left<br \/>\nnode101 node103  192.168.33.103:7946  alive<br \/>\nnode103 node103  192.168.33.103:7946  alive<br \/>\nnode103 node101  192.168.33.101:7946  alive<br \/>\nnode103 node102  192.168.33.102:7946  left<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n% rake sample_conf<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'cat \/etc\/sample.conf'<br \/>\nWARNING: Failed to connect to node102 -- SocketError: getaddrinfo: Name or service not known<br \/>\nnode103 server {<br \/>\nnode103 \tserver 192.168.33.101;<br \/>\nnode103 \tserver 192.168.33.103;<br \/>\nnode103 \t#server<br \/>\nnode103 }<br \/>\nnode101 server {<br \/>\nnode101 \tserver 192.168.33.101;<br \/>\nnode101 \tserver 192.168.33.103;<br \/>\nnode101 \t#server<br \/>\nnode101 }<br \/>\n<\/code><\/p>\n<p>node102 \u306f Serf \u30af\u30e9\u30b9\u30bf\u304b\u3089\u96e2\u8131\u3057\u305f <strong>left<\/strong> \u30b9\u30c6\u30fc\u30bf\u30b9\u3068\u306a\u308a\u3001\/etc\/sample.conf \u304b\u3089\u3082\u524a\u9664\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>node102 \u3092 up \u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% vagrant up node102<br \/>\nBringing machine 'node102' up with 'virtualbox' provider...<br \/>\n==&gt; node102: Checking if box 'chef\/ubuntu-14.04' is up to date...<br \/>\n==&gt; node102: Clearing any previously set forwarded ports...<br \/>\n==&gt; node102: Fixed port collision for 22 =&gt; 2222. Now on port 2201.<br \/>\n==&gt; node102: Clearing any previously set network interfaces...<br \/>\n==&gt; node102: Preparing network interfaces based on configuration...<br \/>\nnode102: Adapter 1: nat<br \/>\nnode102: Adapter 2: hostonly<br \/>\n==&gt; node102: Forwarding ports...<br \/>\nnode102: 22 =&gt; 2201 (adapter 1)<br \/>\n==&gt; node102: Running 'pre-boot' VM customizations...<br \/>\n==&gt; node102: Booting VM...<br \/>\n==&gt; node102: Waiting for machine to boot. This may take a few minutes...<br \/>\nnode102: SSH address: 127.0.0.1:2201<br \/>\nnode102: SSH username: vagrant<br \/>\nnode102: SSH auth method: private key<br \/>\nnode102: Warning: Connection timeout. Retrying...<br \/>\n==&gt; node102: Machine booted and ready!<br \/>\n==&gt; node102: Checking for guest additions in VM...<br \/>\n==&gt; node102: Checking for host entries<br \/>\n==&gt; node102: adding to (\/etc\/hosts) : 192.168.33.102  node102  # VAGRANT: 9226e6d398b35f9723c957b821058308 (node102) \/ 6b994ee1-5c04-4537-bed3-68465f1dc7c3<br \/>\n==&gt; node102: Setting hostname...<br \/>\n==&gt; node102: Configuring and enabling network interfaces...<br \/>\n==&gt; node102: Mounting shared folders...<br \/>\nnode102: \/vagrant =&gt; \/tmp\/chef-serf-cluster\/.chef\/vms<br \/>\nnode102: \/tmp\/vagrant-cache =&gt; \/var\/local\/kitchen\/vagrant\/cache\/chef\/ubuntu-14.04<br \/>\n==&gt; node102: Configuring cache buckets...<br \/>\n==&gt; node102: Skipping Yum cache bucket as the guest machine does not support it<br \/>\n==&gt; node102: Machine already provisioned. Run `vagrant provision` or use the `--provision`<br \/>\n==&gt; node102: to force provisioning. Provisioners marked to run always will still run.<br \/>\n%<br \/>\n<\/code><\/p>\n<p>VM \u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n% rake serf_members<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'serf members'<br \/>\nnode101 node101  192.168.33.101:7946  alive<br \/>\nnode101 node102  192.168.33.102:7946  alive<br \/>\nnode101 node103  192.168.33.103:7946  alive<br \/>\nnode102 node101  192.168.33.101:7946  alive<br \/>\nnode102 node102  192.168.33.102:7946  alive<br \/>\nnode102 node103  192.168.33.103:7946  alive<br \/>\nnode103 node103  192.168.33.103:7946  alive<br \/>\nnode103 node101  192.168.33.101:7946  alive<br \/>\nnode103 node102  192.168.33.102:7946  alive<br \/>\n%<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n% rake sample_conf<br \/>\nknife ssh 'name:*' -x vagrant -P vagrant 'cat \/etc\/sample.conf'<br \/>\nnode101 server {<br \/>\nnode101 \tserver 192.168.33.101;<br \/>\nnode101 \tserver 192.168.33.103;<br \/>\nnode101 \tserver 192.168.33.102;<br \/>\nnode101 \t#server<br \/>\nnode101 }<br \/>\nnode103 server {<br \/>\nnode103 \tserver 192.168.33.101;<br \/>\nnode103 \tserver 192.168.33.103;<br \/>\nnode103 \tserver 192.168.33.102;<br \/>\nnode103 \t#server<br \/>\nnode103 }<br \/>\nnode102 server {<br \/>\nnode102 \tserver 192.168.33.102;<br \/>\nnode102 \tserver 192.168.33.103;<br \/>\nnode102 \tserver 192.168.33.101;<br \/>\nnode102 \t#server<br \/>\nnode102 }<br \/>\n%<br \/>\n<\/code><\/p>\n<p>node102 \u304c Serf \u30af\u30e9\u30b9\u30bf\u306b\u5fa9\u5e30\u3057\u3001\/etc\/sample.conf \u306b\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u66f4\u65b0\u306f\u3059\u3079\u3066 Serf \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u304b\u3089\u547c\u3073\u51fa\u3055\u308c\u305f chef-apply \u306b\u3088\u3063\u3066\u884c\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-serf.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10281\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-serf.png\" alt=\"chef-serf-cluster-sample-serf\" width=\"302\" height=\"356\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-serf.png 302w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-serf-81x95.png 81w\" sizes=\"auto, (max-width: 302px) 100vw, 302px\" \/><\/a><\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u672c\u7a3f\u3067\u306f\u3001Chef Provisioning\u3068Vagrant (VirtualBox)\u3092\u7528\u3044\u3066\u3001\u975e\u5e38\u306b\u7c21\u5358\u306a Serf \u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002Chef Provisioning \u3092\u4f7f\u3063\u305f Chef-Server\/Client \u74b0\u5883\u306e\u4f5c\u6210\u3001Serf \u30af\u30e9\u30b9\u30bf\u306e\u52d5\u4f5c\u3001chef-apply \u306e\u6d3b\u7528\u4f8b\u306b\u3064\u3044\u3066\u3001\u6982\u8981\u3092\u3064\u304b\u3093\u3067\u3044\u305f\u3060\u3051\u305f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5f53\u521d\u306f Nginx \u306b\u3088\u308b\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b5\u3092\u4f5c\u6210\u3059\u308b\u4e88\u5b9a\u3060\u3063\u305f\u5b9f\u9a13\u306f\u3001\u7c21\u4fbf\u306e\u305f\u3081\u306b\u304b\u306a\u308a\u7e2e\u5c0f\u3057\u3001Serf \u30af\u30e9\u30b9\u30bf\u306f\u30ce\u30fc\u30c9\u304c\u3059\u3079\u3066\u5bfe\u7b49\u3068\u306a\u308a\u307e\u3057\u305f\u3002\/etc\/sample.conf \u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u306f\u5f53\u521d\u306e\u8a08\u753b\u306e\u306a\u3054\u308a\u3067\u3059\u3002Serf \u30ce\u30fc\u30c9\u306e\u5f79\u5272\u3092\u500b\u5225\u306b\u5272\u308a\u5f53\u3066\u308c\u3070\u3001\u305d\u306e\u3088\u3046\u306a\u52d5\u4f5c\u3082\u53ef\u80fd\u3068\u306a\u308b\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u672c\u6587\u4e2d\u3067\u3082\u8ff0\u3079\u305f\u901a\u308a\u3001Serf \u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u3068\u3057\u3066 chef-client \u30b3\u30de\u30f3\u30c9\u3092\u8d77\u52d5\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u4ed5\u7d44\u307f\u304c\u8907\u96d1\u306b\u306a\u308b\u305f\u3081\u65ad\u5ff5\u3057\u307e\u3057\u305f\u3002Serf \u304b\u3089 chef-client \u3092\u8d77\u52d5\u3057\u3066\u53ce\u675f\u3092\u884c\u3046\u305f\u3081\u306e\u3088\u3044\u65b9\u6cd5\u304c\u306a\u3044\u304b\u306f\u4eca\u5f8c\u306e\u8ab2\u984c\u3067\u3059\u3002<\/p>\n<h3>\u53c2\u8003\u6587\u732e<\/h3>\n<h4>Chef-Provisioning<\/h4>\n<ul>\n<li><a href=\"\/lab\/9406\">chef-provisioning\u3068chef-provisioning-ssh\u3067\u304a\u624b\u8efd\u30af\u30e9\u30b9\u30bf\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/chef\/chef-provisioning\/issues\/177\">Way to not need an \/etc\/chef for provisioning chef-client run?<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/chef\/chef-provisioning\/issues\/237\">trusted_certs directory not copied to provisioning node<\/a><\/li>\n<\/ul>\n<h4>Serf<\/h4>\n<ul>\n<li><a href=\"http:\/\/www.serfdom.io\/docs\/index.html\">Serf Documentation<\/a><\/li>\n<li><a href=\"http:\/\/gihyo.jp\/admin\/feature\/01\/serf-consul\">Serf\uff0fConsul\u3067\u7ba1\u7406\u3092\u81ea\u52d5\u5316\uff01\u3000\uff5e\u5b9f\u8df5\u7684\u306a\u624b\u6cd5\u3092\u7d39\u4ecb\uff5e<\/a><\/li>\n<li><a href=\"http:\/\/pocketstudio.jp\/log3\/archives\/serf\/\">serf | Pocketstudio.jp log3<\/a><\/li>\n<li><a href=\"http:\/\/pocketstudio.jp\/log3\/2014\/03\/05\/serf_0_4_5_updates\/\">\u3010\u691c\u8a3c\u3011Serf v0.4.5\u307e\u3067\u306e\u65b0\u6a5f\u80fd\u3010\u3057\u3066\u307f\u305f\u3011<\/a><\/li>\n<li><a href=\"http:\/\/deeeet.com\/writing\/2014\/04\/08\/docker-serf-haproxy\/\">Docker+Serf+HAproxy (+Supervisor)<\/a><\/li>\n<\/ul>\n<h4>Chef<\/h4>\n<ul>\n<li><a href=\"https:\/\/twitter.com\/sawanoboly\/status\/562838805796106240\">-a network.interfaces.eth1.addresses.keys.rotate.first<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/chef\/chef\/pull\/3195\">Pass name by knife cil attribute<\/a><\/li>\n<li><a href=\"http:\/\/qiita.com\/sawanoboly\/items\/355288c4592bdf4a3550\">Chef\u306e\u30ec\u30b7\u30d4\u3067sed\u7684\u306a\u4e8b\u3092\u5b9f\u65bd<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf \u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3059\u3002\u975e\u5e38\u306b\u7c21\u5358\u306a\u4f8b\u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u5b9f\u74b0\u5883\u306b\u6d41\u7528\u3067\u304d\u308b\u3082\u306e\u3067\u306f\u3042\u308a [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":10273,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[36,31,42],"tags":[],"class_list":["post-10270","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chef","category-higuchi","category-hashicorp"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3<\/title>\n<meta name=\"description\" content=\"Chef, d-higuchi, HashiCorp |\u306f\u3058\u3081\u306b \u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"og:description\" content=\"Chef, d-higuchi, HashiCorp |\u306f\u3058\u3081\u306b \u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270\" \/>\n<meta property=\"og:site_name\" content=\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/creationline\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-15T07:11:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-29T05:12:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png\" \/>\n\t<meta property=\"og:image:width\" content=\"332\" \/>\n\t<meta property=\"og:image:height\" content=\"325\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daisuke Higuchi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@creationline\" \/>\n<meta name=\"twitter:site\" content=\"@creationline\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daisuke Higuchi\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"14\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270\"},\"author\":{\"name\":\"Daisuke Higuchi\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"headline\":\"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf\",\"datePublished\":\"2015-06-15T07:11:11+00:00\",\"dateModified\":\"2023-08-29T05:12:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270\"},\"wordCount\":593,\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/chef-serf-cluster-sample-chef-server.png\",\"articleSection\":[\"Chef\",\"d-higuchi\",\"HashiCorp\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270\",\"name\":\"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/chef-serf-cluster-sample-chef-server.png\",\"datePublished\":\"2015-06-15T07:11:11+00:00\",\"dateModified\":\"2023-08-29T05:12:37+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"description\":\"Chef, d-higuchi, HashiCorp |\u306f\u3058\u3081\u306b \u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270#primaryimage\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/chef-serf-cluster-sample-chef-server.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2015\\\/06\\\/chef-serf-cluster-sample-chef-server.png\",\"width\":332,\"height\":325},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/10270#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HOME\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Chef\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/\",\"name\":\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"description\":\"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\",\"name\":\"Daisuke Higuchi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"caption\":\"Daisuke Higuchi\"},\"description\":\"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"Chef, d-higuchi, HashiCorp |\u306f\u3058\u3081\u306b \u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270","og_locale":"ja_JP","og_type":"article","og_title":"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","og_description":"Chef, d-higuchi, HashiCorp |\u306f\u3058\u3081\u306b \u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf","og_url":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270","og_site_name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","article_publisher":"https:\/\/www.facebook.com\/creationline","article_published_time":"2015-06-15T07:11:11+00:00","article_modified_time":"2023-08-29T05:12:37+00:00","og_image":[{"width":332,"height":325,"url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png","type":"image\/png"}],"author":"Daisuke Higuchi","twitter_card":"summary_large_image","twitter_creator":"@creationline","twitter_site":"@creationline","twitter_misc":{"\u57f7\u7b46\u8005":"Daisuke Higuchi","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"14\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270#article","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270"},"author":{"name":"Daisuke Higuchi","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"headline":"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf","datePublished":"2015-06-15T07:11:11+00:00","dateModified":"2023-08-29T05:12:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270"},"wordCount":593,"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png","articleSection":["Chef","d-higuchi","HashiCorp"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270","url":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270","name":"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270#primaryimage"},"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png","datePublished":"2015-06-15T07:11:11+00:00","dateModified":"2023-08-29T05:12:37+00:00","author":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"description":"Chef, d-higuchi, HashiCorp |\u306f\u3058\u3081\u306b \u672c\u7a3f\u3067\u306f\u3001Chef Provisioning \u3068 Vagrant (VirtualBox) \u3092\u7528\u3044\u3066\u3001\u30c6\u30b9\u30c8\u7528\u306e Serf","breadcrumb":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270#primaryimage","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2015\/06\/chef-serf-cluster-sample-chef-server.png","width":332,"height":325},{"@type":"BreadcrumbList","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/10270#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"HOME","item":"https:\/\/www.creationline.com\/tech-blog"},{"@type":"ListItem","position":2,"name":"\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6","item":"https:\/\/www.creationline.com\/tech-blog\/cloudnative"},{"@type":"ListItem","position":3,"name":"Chef","item":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef"},{"@type":"ListItem","position":4,"name":"Chef Provisioning\u3068Vagrant\u3067Serf\u30af\u30e9\u30b9\u30bf\u74b0\u5883\u3092\u4f5c\u6210\u3059\u308b #getchef #vagrant #serf"}]},{"@type":"WebSite","@id":"https:\/\/www.creationline.com\/tech-blog\/#website","url":"https:\/\/www.creationline.com\/tech-blog\/","name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.creationline.com\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206","name":"Daisuke Higuchi","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","caption":"Daisuke Higuchi"},"description":"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002","url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi"}]}},"_links":{"self":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/10270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=10270"}],"version-history":[{"count":1,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/10270\/revisions"}],"predecessor-version":[{"id":65788,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/10270\/revisions\/65788"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media\/10273"}],"wp:attachment":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=10270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=10270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=10270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}