{"id":6738,"date":"2015-01-09T11:30:43","date_gmt":"2015-01-09T02:30:43","guid":{"rendered":"http:\/\/www.creationline.com\/?p=6738"},"modified":"2015-03-12T12:53:57","modified_gmt":"2015-03-12T03:53:57","slug":"%e5%92%8c%e8%a8%b3-sysadvent-day-21-chef%e3%81%a7%e3%81%8a%e3%81%84%e3%81%97%e3%81%8fresource%e3%82%92%e8%aa%bf%e7%90%86-getchef","status":"publish","type":"post","link":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/6738","title":{"rendered":"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef"},"content":{"rendered":"<p>\u672c\u7a3f\u306f <a href=\"https:\/\/www.chef.io\/blog\/2014\/12\/22\/sysadvent-day-21-baking-delicious-resources-with-chef\/\">SysAdvent Day 21: Baking Delicious Resources with Chef<\/a> (2014\/12\/22) \u306e\u548c\u8a33\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306f<a href=\"http:\/\/sysadvent.blogspot.com\/2014\/12\/day-21-baking-delicious-resources-with.html\">SysAdvent\u304b\u3089\u306e\u8ee2\u8f09<\/a>(\u8a33\u6ce8:\u539f\u6587)\u3067\u3059\u3002<\/p>\n<p>\u307f\u306a\u3055\u3093\u3001\u30af\u30ea\u30b9\u30de\u30b9\u306f\u3044\u3064\u3082\u713c\u304d\u305f\u3066\u306e\u30af\u30c3\u30ad\u30fc\u306e\u7518\u3044\u5302\u3044\u306b\u6e80\u3061\u3066\u3044\u307e\u3059\u3002\u30ad\u30c3\u30c1\u30f3\u306f\u30a2\u30a4\u30b7\u30f3\u30b0\u30b7\u30e5\u30ac\u30fc\u30af\u30c3\u30ad\u30fc\u304b\u3089\u30d4\u30fc\u30ca\u30c3\u30c4\u30d0\u30bf\u30fc\u30af\u30c3\u30ad\u30fc\u307e\u3067\u3044\u308d\u3044\u308d\u6e96\u5099\u3057\u3066\u3072\u3069\u304f\u6563\u3089\u304b\u3063\u3066\u3044\u307e\u3059\u3002\u30af\u30c3\u30ad\u30fc\u7f36\u306f\u8fd1\u6240\u306e\u4eba\u3005\u3084\u53cb\u4eba\u306b\u304f\u3070\u308b\u305f\u3081\u306b\u3042\u3075\u308c\u3093\u3070\u304b\u308a\u306b\u306a\u3063\u3066\u3044\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3053\u306e\u7fd2\u6163\u306e\u5e7c\u5c11\u306e\u8a18\u61b6\u3067\u306f\u3001\u7956\u6bcd\u304c\u30d4\u30fc\u30ca\u30c3\u30c4\u30d0\u30bf\u30fc\u30af\u30c3\u30ad\u30fc\u306b\u4e01\u5be7\u306b\u7db2\u76ee\u3092\u3064\u3051\u308b\u306b\u306f\u3069\u306e\u3088\u3046\u306b\u3057\u305f\u3089\u3088\u3044\u304b\u6559\u3048\u3066\u304f\u308c\u305f\u3053\u3068\u3067\u3059\u3002\u30af\u30c3\u30ad\u30fc\u751f\u5730\u306b\u523a\u3055\u3089\u306a\u3044\u3088\u3046\u306b\u30d5\u30a9\u30fc\u30af\u3092\u7802\u7cd6\u306b\u5dee\u3057\u8fbc\u307f\u3001\u614e\u91cd\u306b\u30af\u30c3\u30ad\u30fc\u751f\u5730\u306b\u62bc\u3057\u8fbc\u307f\u307e\u3059\u3002\u3053\u306e\u30af\u30c3\u30ad\u30fc\u306e\u4f1d\u7d71\u306e\u3088\u3046\u306b\u3001Chef\u306e\u77e5\u8b58\u3092\u62e1\u5145\u3057\u3066LWRP\u3092\u4f7f\u3063\u3066\u30af\u30c3\u30ad\u30fc\u3092\u713c\u304d\u4e0a\u3052\u3089\u308c\u308b\u306e\u306b\u5fc5\u8981\u306a\u30b3\u30f3\u30bb\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u304b\u3089\u7d39\u4ecb\u3059\u308b\u4e00\u901a\u308a\u306e\u4f8b\u3092\u8a66\u3059\u306b\u306f\u3001<a href=\"https:\/\/downloads.chef.io\/chef-dk\/\">Chef Development Kit (Chef DK)<\/a>\u3001<a href=\"https:\/\/www.vagrantup.com\/downloads.html\">Vagrant<\/a>\u3001<a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\">Virtual Box<\/a>\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002\u3082\u3057Amazon\u306e\u3088\u3046\u306a\u30af\u30e9\u30a6\u30c9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u30d7\u30ed\u30d0\u30a4\u30c0\u3092\u5229\u7528\u3059\u308b\u306a\u3089\u3001Chef DK\u540c\u68b1\u306e<strong>.kitchen.yml<\/strong>\u8a2d\u5b9a\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u25a0<a name=\"resource-and-provider-review\" href=\"#resource-and-provider-review\">Resource\u3068Provider\u306e\u5fa9\u7fd2<\/a><\/h2>\n<p>Resource\u306fChef\u306e\u57fa\u672c\u7684\u306a\u7d44\u307f\u7acb\u3066\u30d6\u30ed\u30c3\u30af\u3067\u3059\u3002Chef\u306b\u306f<a href=\"http:\/\/docs.chef.io\/chef\/resources.html\">\u591a\u304f\u306eResource<\/a>\u304c\u540c\u68b1\u3055\u308c\u3066\u3044\u307e\u3059\u3002Resource\u306f<a href=\"https:\/\/ja.wikipedia.org\/wiki\/%E5%AE%A3%E8%A8%80%E5%9E%8B%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0\">\u5ba3\u8a00\u578b<\/a>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u6301\u3061\u3001\u3053\u308c\u306f\u3064\u307e\u308a\u3001\u3042\u308b\u72b6\u614b\u306b\u5230\u9054\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u624b\u9806\u3092\u8a18\u8ff0\u3059\u308b\u3068\u3044\u3046\u3088\u308a\u3001Resource\u304c\u3069\u306e\u3088\u3046\u306a\u72b6\u614b\u3067\u3042\u3063\u3066\u307b\u3057\u3044\u304b\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002Resource\u306f<strong>type<\/strong>\u3001<strong>name<\/strong>\u30011\u3064\u4ee5\u4e0a\u306e<strong>\u30d1\u30e9\u30e1\u30fc\u30bf<\/strong>\u3001<strong>actions<\/strong>\u3001<strong>notifications<\/strong>\u3092\u6301\u3061\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306fResource\u306e\u4f8b\u3068\u3057\u3066<a href=\"http:\/\/www.rubydoc.info\/github\/opscode\/chef\/Chef\/Resource\/Route\">route<\/a>\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nroute \"NAME\" do<br \/>\n  gateway \"10.0.0.20\"<br \/>\n  action :delete<br \/>\nend<br \/>\n<\/code><\/p>\n<p><a href=\"https:\/\/docs.chef.io\/resource_route.html\">route Resource<\/a>\u306f<a href=\"http:\/\/linux-ip.net\/html\/tools-route.html\">\u30b7\u30b9\u30c6\u30e0\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u30c6\u30fc\u30d6\u30eb<\/a>\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002Resource\u306e<strong>type<\/strong>\u306froute\u3067\u3059\u3002Resource\u306e<strong>name<\/strong>\u306ftype\u306b\u7d9a\u304f\u6587\u5b57\u5217\u3067\u3059\u3002<strong>route<\/strong> Resource\u306f<strong>device<\/strong>\u3001<strong>gateway<\/strong>\u3001<strong>netmask<\/strong>\u3001<strong>provider<\/strong>\u3001<strong>target<\/strong>\u3068\u3044\u3063\u305f\u4efb\u610f\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u542b\u307f\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f<strong>gateway<\/strong>\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u307f\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f<strong>delete<\/strong> action\u3092\u7528\u3044\u3001notifications\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>Chef\u306e\u5404Resource\u306f\u3001Resource\u3092\u5b9f\u969b\u306b\u671b\u307e\u3057\u3044\u72b6\u614b\u3078\u3068\u5c0e\u304f\u305f\u3081\u306eProvider\u30921\u3064\u4ee5\u4e0a\u542b\u307f\u307e\u3059\u3002Chef\u516c\u5f0f\u306eResource\u3092\u4f7f\u3063\u3066\u3044\u308b\u306a\u3089\u3001\u901a\u5e38\u3001Provider\u3092\u9078\u3076\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002Chef\u306f\u4f5c\u696d\u3092\u884c\u3046\u305f\u3081\u306e\u6700\u9069\u306eProvider\u3092\u9078\u629e\u3057\u307e\u3059\u3002Provider\u3092\u691c\u67fb\u3059\u308b\u306a\u3089\u3001Chef\u306e\u57fa\u790e\u30b3\u30fc\u30c9\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u3067\u884c\u3048\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001route Provider\u306e<a href=\"https:\/\/github.com\/opscode\/chef\/blob\/master\/lib\/chef\/provider\/route.rb\">\u30b3\u30fc\u30c9<\/a>\u3084\u3001\u30af\u30e9\u30b9\u306e<a href=\"http:\/\/www.rubydoc.info\/github\/opscode\/chef\/Chef\/Provider\/Route\">rubydoc<\/a>\u3067\u3059\u3002<\/p>\n<p>\u65e2\u88fd\u306eResource\u3068Provider\u3067\u306f\u3001\u30a4\u30f3\u30d5\u30e9\u3092\u5358\u7d14\u660e\u5feb\u306aRecipe\u3067\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3059\u308b\u3088\u3046\u306b\u8a18\u8ff0\u3059\u308b\u3068\u3044\u3046\u8981\u6c42\u3092\u5341\u5206\u6e80\u305f\u305b\u306a\u3044\u3053\u3068\u3082\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u7e70\u308a\u8fd4\u3057\u3084\u8907\u96d1\u3055\u3092\u6e1b\u3089\u3057\u3001\u53ef\u8aad\u6027\u3092\u9ad8\u3081\u305f\u3044\u3068\u3044\u3046\u6bb5\u968e\u306b\u5230\u9054\u3057\u307e\u3057\u305f\u3002Chef\u306f\u6a5f\u80fd\u62e1\u5f35\u306e\u305f\u3081\u306b\u3001<strong>Definition<\/strong>\u3001Heavy Weight Resources and Providers (<strong>HWRP<\/strong>)\u3001Light Weight Resources and Providers (<strong>LWRP<\/strong>)\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><strong>Definition<\/strong>\u306f\u672c\u8cea\u7684\u306b\u306fRecipe\u30de\u30af\u30ed\u3067\u3059\u3002\u3053\u308c\u306fCookbook\u306e<strong>definitions<\/strong>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308c\u307e\u305b\u3093\u3002<\/p>\n<p><strong>HWRP<\/strong>\u306fCookbook\u306e<strong>libraries<\/strong>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u683c\u7d0d\u3055\u308c\u308b\u7d14\u7c8b\u306aRuby\u30b3\u30fc\u30c9\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306fChef DSL\u304b\u3089\u30b3\u30a2Resource\u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u672c\u7a3f\u306e\u4e3b\u984c\u3067\u3042\u308b<strong>LWRP<\/strong>\u306f\u3001Chef DSL\u3068Ruby\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u3059\u3002\u7e70\u308a\u8fd4\u3057\u30d1\u30bf\u30fc\u30f3\u3092\u62bd\u8c61\u5316\u3059\u308b\u306e\u306b\u6709\u7528\u3067\u3059\u3002\u5b9f\u884c\u6642\u306b\u69cb\u6587\u89e3\u6790\u3055\u308c\u3066Ruby\u30af\u30e9\u30b9\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u25a0<a name=\"lwrp\" href=\"#lwrp\">LWRP<\/a><\/h2>\n<p>Resource\u3092\u62e1\u5f35\u3059\u308b\u305f\u3081\u306b\u306f\u3001Resource\u306e\u69cb\u6210\u8981\u7d20\u3067\u3042\u308b<strong>type<\/strong>\u3001<strong>name<\/strong>\u3001<strong>\u30d1\u30e9\u30e1\u30fc\u30bf<\/strong>\u3001<strong>actions<\/strong>\u3001<strong>notifications<\/strong>\u3092\u518d\u691c\u8a0e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/docs.chef.io\/chef_why.html#idempotence\">\u3079\u304d\u7b49\u6027<\/a>\u3068\u53ce\u675f\u6027\u3082\u8003\u616e\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u3079\u304d\u7b49\u6027\u304c\u610f\u5473\u3059\u308b\u3068\u3053\u308d\u306f\u3001\u671b\u307e\u3057\u3044\u72b6\u614b\u307e\u305f\u306f\u30dd\u30ea\u30b7\u30fc\u306b\u8ffd\u5f93\u3059\u308b\u3088\u3046Resource\u3092\u5c0e\u304f\u5fc5\u8981\u304c\u3042\u308b\u5909\u66f4\u304c\u3042\u308b\u5834\u5408\u306e\u307f\u3001Provider\u306fResource\u306e\u72b6\u614b\u3092\u5909\u66f4\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u53ce\u675f\u6027\u306e\u610f\u5473\u3059\u308b\u3068\u3053\u308d\u306f\u3001Provider\u306f\u73fe\u5728\u306eResource\u306e\u72b6\u614b\u3092\u671b\u307e\u3057\u3044Resource\u306e\u72b6\u614b\u306b\u8fd1\u3065\u3051\u3066\u3044\u304f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p><strong>Resource\u306ftype\u3092\u6301\u3061\u307e\u3059<\/strong>\u3002LWRP\u306e<strong>Resource Type<\/strong>\u306fCookbook\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306f<strong>cookbook_resource<\/strong>\u5f0f\u306b\u3088\u3063\u3066\u660e\u793a\u7684\u306b\u547d\u540d\u3055\u308c\u307e\u3059\u3002\u3082\u3057<strong>default.rb<\/strong>\u30d5\u30a1\u30a4\u30eb\u304c\u7528\u3044\u3089\u308c\u305f\u5834\u5408\u3001\u65b0\u3057\u3044Resource\u306e\u540d\u524d\u306f<strong>cookbook<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u3001<strong>resources<\/strong>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068<strong>providers<\/strong>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306eLWRP\u306e<strong>Resource<\/strong>\u3068<strong>Provider<\/strong>\u306b\u4e00\u81f4\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002<strong>chef generator<\/strong>\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3048\u3070\u3001\u9069\u5207\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u304f\u308c\u307e\u3059\u3002<\/p>\n<p>Resource\u3068\u6709\u52b9\u306aaction\u3092LWRP\u306eResource\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b7\u30b9\u30c6\u30e0\u306e\u4e00\u90e8\u3092\u671b\u307e\u3057\u3044\u72b6\u614b\u3078\u5c0e\u304f\u305f\u3081\u306b\u5fc5\u8981\u306a\u624b\u9806\u306f\u3001LWRP\u306eProvider\u30d5\u30a1\u30a4\u30eb\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002\u3079\u304d\u7b49\u6027\u3068\u53ce\u675f\u6027\u306e\u4e21\u65b9\u3092\u3001Provider\u3092\u8a18\u8ff0\u3059\u308b\u969b\u306b\u8003\u616e\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<h2>\u25a0<a name=\"resource-dsl\" href=\"#resource-dsl\">Resource DSL<\/a><\/h2>\n<p>LWRP\u306eResource\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u63d0\u4f9b\u3057\u305f\u3044\u65b0\u3057\u3044Resource\u306e\u7279\u5fb4\u3092<a href=\"http:\/\/www.rubydoc.info\/github\/opscode\/chef\/Chef\/Resource\/LWRPBase\">Chef Resource DSL<\/a>\u3092\u7528\u3044\u3066\u5b9a\u7fa9\u3057\u307e\u3059\u3002Resource DSL\u306f\u3001<strong>actions<\/strong>\u3001<strong>attribute<\/strong>\u3001<strong>default_action<\/strong>\u3068\u3044\u3046\u8907\u6570\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u6301\u3061\u307e\u3059\u3002<\/p>\n<p><strong>Resources\u306f\u540d\u524d\u3092\u6301\u3061\u307e\u3059<\/strong>\u3002Resource DSL\u306f\u3001<strong>:name_attribute<\/strong>\u3067\u3001Resource\u306e<strong>name<\/strong>\u3068\u3057\u3066\u7279\u5b9a\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u30bf\u30b0\u3065\u3051\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>Resource\u306f\u52d5\u4f5c\u3092\u6301\u3061\u307e\u3059<\/strong>\u3002Resource DSL\u306f<strong>actions<\/strong>\u30e1\u30bd\u30c3\u30c9\u3067\u3001\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u52d5\u4f5c\u306e\u4e00\u89a7\u3092\u30b3\u30f3\u30de\u533a\u5207\u308a\u306e\u30b7\u30f3\u30dc\u30eb\u306e\u30ea\u30b9\u30c8\u3067\u5b9a\u7fa9\u3057\u307e\u3059\u3002<strong>default_action<\/strong>\u30e1\u30bd\u30c3\u30c9\u3067\u3001Recipe\u3067\u52d5\u4f5c\u3092\u6307\u5b9a\u3057\u306a\u304b\u3063\u305f\u5834\u5408\u306e\u52d5\u4f5c\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<p>\u6ce8\u610f: \u5e38\u306bdefault_action\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u3092\u63a8\u5968\u3057\u307e\u3059\u3002<\/p>\n<p><strong>Resource\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6301\u3061\u307e\u3059<\/strong>\u3002Resource DSL\u306f<strong>attribute<\/strong>\u30e1\u30bd\u30c3\u30c9\u3067Resource\u306e\u65b0\u3057\u3044\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u5404\u30d1\u30e9\u30e1\u30fc\u30bf\u306f<a href=\"http:\/\/docs.chef.io\/lwrp_custom_resource.html#validation-parameters\">\u691c\u8a3c\u30d1\u30e9\u30e1\u30fc\u30bf<\/a>\u3068\u95a2\u9023\u3065\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u65e2\u5b58\u306eCookbook\u306eLWRP Resource\u306e\u4f8b\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/opscode-cookbooks\/djbdns\/blob\/master\/resources\/rr.rb\">djbdns<\/a>\u306f<strong>djbdns_rr<\/strong> Resource\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nactions :add<br \/>\ndefault_action :add<\/p>\n<p>attribute :fqdn,     :kind_of => String, :name_attribute => true<br \/>\nattribute :ip,       :kind_of => String, :required => true<br \/>\nattribute :type,     :kind_of => String, :default => \"host\"<br \/>\nattribute :cwd,      :kind_of => String<br \/>\n<\/code><\/p>\n<p><strong>rr<\/strong> Resource\u306f<strong>add<\/strong>\u3068\u3044\u30461\u3064\u306e\u52d5\u4f5c\u3092\u6301\u3061\u3001<strong>fqdn<\/strong>\u3001<strong>ip<\/strong>\u3001<strong>type<\/strong>\u3001<strong>cwd<\/strong>\u3001\u3068\u3044\u30464\u3064\u306e\u52d5\u4f5c\u3092\u6301\u3064\u3053\u3068\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002Attribute\u306e\u691c\u8a3c\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u3001\u3059\u3079\u3066\u306eAttribute\u304c<strong>String<\/strong>\u30af\u30e9\u30b9\u304c\u671f\u5f85\u3055\u308c\u3066\u3044\u308b\u3068\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u52a0\u3048\u3066\u3001<strong>ip<\/strong>\u304c\u3053\u306eResource\u3092Recipe\u3067\u7528\u3044\u308b\u969b\u306e\u552f\u4e00\u5fc5\u9808\u306eAttribute\u3067\u3059\u3002<\/p>\n<h3>\u25cf<a name=\"provider-dsl\" href=\"#provider-dsl\">Provider DSL<\/a><\/h3>\n<p>LWRP\u306eProvider\u30d5\u30a1\u30a4\u30eb\u306f\u3001<a href=\"http:\/\/www.rubydoc.info\/github\/opscode\/chef\/Chef\/Provider\/LWRPBase\">Chef Provider DSL<\/a>\u3092\u7528\u3044\u3066\u65b0\u3057\u3044Resource\u304c\u201c\u3069\u3046\u3059\u308b\u304b\u201d\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<p>\u65b0\u3057\u3044Resource\u306e\u6a5f\u80fd\u304c\u3079\u304d\u7b49\u6027\u3068\u53ce\u675f\u6027\u3092\u6301\u3064\u305f\u3081\u306b\u306f\u3001\u6b21\u306e\u8981\u7d20\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<ul>\n<li>Resource\u306e\u671b\u307e\u3057\u3044\u72b6\u614b<\/li>\n<li>Resource\u306e\u73fe\u5728\u306e\u72b6\u614b<\/li>\n<li>\u5b9f\u884c\u5f8c\u306eResource\u306e\u6700\u7d42\u7684\u306a\u72b6\u614b<\/li>\n<\/ul>\n<table border=\"border\">\n<tr>\n<th style=\"padding:5px;\">\u5fc5\u8981\u9805\u76ee<\/th>\n<th style=\"padding:5px;\">Chef DSL Provider\u30e1\u30bd\u30c3\u30c9<\/th>\n<\/tr>\n<tr>\n<td  style=\"padding:5px;\">\u671b\u307e\u3057\u3044\u72b6\u614b<\/td>\n<td  style=\"padding:5px;\">new_resource<\/td>\n<\/tr>\n<tr>\n<td  style=\"padding:5px;\">\u73fe\u5728\u306e\u72b6\u614b<\/td>\n<td  style=\"padding:5px;\">load_current_resource<\/td>\n<\/tr>\n<tr>\n<td  style=\"padding:5px;\">\u6700\u7d42\u7684\u306a\u72b6\u614b<\/td>\n<td  style=\"padding:5px;\">updated_by_last_action<\/td>\n<\/tr>\n<\/table>\n<p>Chef DSL Provider\u30e1\u30bd\u30c3\u30c9\u306e\u8aac\u660e\u306e\u305f\u3081\u306b\u3001\u65e2\u5b58\u306eCookbook\u304b\u3089LWRP Provider\u306e\u4f8b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/opscode-cookbooks\/djbdns\/blob\/master\/providers\/rr.rb\">djbdns<\/a>\u306f<strong>djbdns_rr<\/strong> \u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\naction :add do<br \/>\n  type = new_resource.type<br \/>\n  fqdn = new_resource.fqdn<br \/>\n  ip = new_resource.ip<br \/>\n  cwd = new_resource.cwd ? new_resource.cwd : \"#{node['djbdns']['tinydns_internal_dir']}\/root\"<\/p>\n<p>  unless IO.readlines(\"#{cwd}\/data\").grep(\/^[\\.\\+=]#{fqdn}:#{ip}\/).length >= 1<br \/>\n    execute \".\/add-#{type} #{fqdn} #{ip}\" do<br \/>\n      cwd cwd<br \/>\n      ignore_failure true<br \/>\n    end<br \/>\n    new_resource.updated_by_last_action(true)<br \/>\n  end<br \/>\nend<br \/>\n<\/code><\/p>\n<h4>\u25bc<a name=\"new-resource\" href=\"#new-resource\">new_resource<\/a><\/h4>\n<p><strong>new_resource<\/strong>\u306f\u3001Resource\u306e\u671b\u307e\u3057\u3044\u72b6\u614b\u3092\u8868\u73fe\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u307e\u3059\u3002\u3059\u3079\u3066\u306eAttribute\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u3001Resource\u306e\u671b\u307e\u3057\u3044\u6700\u7d42\u72b6\u614b\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u7684\u306b\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>type = new_resource.type<\/strong>\u306f\u3001<strong>rr<\/strong> Resource\u3092<strong>type<\/strong>\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u5171\u306bRecipe\u3067\u5229\u7528\u3057\u305f\u969b\u306b\u4f5c\u3089\u308c\u308b<strong>new_resource<\/strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e<strong>type<\/strong> Attribute\u306e\u5024\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002<\/p>\n<h4>\u25bc<a name=\"load-current-resource\" href=\"#load-current-resource\">load_current_resource<\/a><\/h4>\n<p><strong>load_current_resource<\/strong>\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7a7a\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002Resource\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092\u8868\u73fe\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3059\u3088\u3046\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306fResource\u306e\u73fe\u5728\u306e\u72b6\u614b\u3092<strong>@current_resource<\/strong>\u306b\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p>\u524d\u8ff0\u306e\u4f8b\u3067\u306f<strong>load_current_resource<\/strong>\u3092\u7528\u3044\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<h4>\u25bc<a name=\"updated-by-last-action\" href=\"#updated-by-last-action\">updated_by_last_action<\/a><\/h4>\n<p><strong>updated_by_last_action<\/strong>\u306fResource\u3092\u671b\u307e\u3057\u3044\u72b6\u614b\u306b\u53ce\u675f\u3055\u305b\u308b\u5909\u66f4\u304c\u767a\u751f\u3057\u305f\u3053\u3068\u3092Chef\u306b\u901a\u77e5\u3057\u307e\u3059\u3002<\/p>\n<p><strong>new_resource.updated_by_last_action(true)<\/strong>\u3092\u5b9f\u884c\u3059\u308b<strong>unless<\/strong>\u30d6\u30ed\u30c3\u30af\u304c\u3001Resource\u3092\u671b\u307e\u3057\u3044\u72b6\u614b\u306b\u53ce\u675f\u3055\u305b\u308b\u5909\u66f4\u304c\u767a\u751f\u3057\u305f\u3053\u3068\u3092Chef\u306b\u901a\u77e5\u3057\u307e\u3059\u3002<\/p>\n<h4>\u25bc<a name=\"actions\" href=\"#action\">action<\/a><\/h4>\n<p>LWRP\u306eResource\u30d5\u30a1\u30a4\u30eb\u4e2d\u306b\u3001\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u305d\u308c\u305e\u308c\u306e\u52d5\u4f5c\u306b\u3064\u3044\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u671b\u307e\u3057\u3044\u72b6\u614b\u3078Resource\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u3001\u3069\u306e\u3088\u3046\u306a\u52d5\u4f5c\u3082\u6271\u3048\u306a\u304f\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002<\/p>\n<p>\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u52d5\u4f5c\u306f\u3001LWRP\u306eResource\u3067\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u52d5\u4f5c\u306b\u4e00\u81f4\u3059\u308b<strong>:add<\/strong>\u3067\u3042\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<h2>\u25a0<a name=\"cooking-up-a-cookies-cookie-resource\" href=\"#cooking-up-a-cookies-cookie-resource\">Cooking up a cookies_cookie resource<\/a><\/h2>\n<h3>\u25cf<a name=\"preparing-our-kitchen\" href=\"#preparing-our-kitchen\">Preparing our kitchen<\/a><\/h3>\n<p>\u307e\u305a\u3001\u6599\u7406\u306e\u305f\u3081\u306e\u30ad\u30c3\u30c1\u30f3\u306e\u6e96\u5099\u3092\u59cb\u3081\u307e\u3057\u3087\u3046\uff01 <a href=\"http:\/\/kitchen.ci\/docs\/getting-started\/\">Test Kitchen<\/a>\u304c<a href=\"https:\/\/downloads.getchef.com\/chef-dk\/\">Chef DK<\/a>\u306e\u30c4\u30fc\u30eb\u7fa4\u306e1\u3064\u3068\u3057\u3066\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002omnibus\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u3001\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u500b\u4eba\u5411\u3051\u306b\u6700\u9069\u5316\u3059\u308b\u3088\u3046\u306a\u591a\u304f\u306e\u30c4\u30fc\u30eb\u3092\u542b\u3093\u3067\u3044\u307e\u3059\u3002\u3067\u306f\u3001\u30ad\u30c3\u30c1\u30f3\u306b\u623b\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6ce8\u610f: Windows\u3067\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u542b\u3080\u3088\u3046\u306bPATH\u304c\u6b63\u3057\u304f\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304b\u691c\u8a3c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<a href=\"\/lab\/6395\">ChefDK on Windows \u30b5\u30d0\u30a4\u30d0\u30eb\u30ac\u30a4\u30c9<\/a> (\u8a33\u6ce8:\u548c\u8a33)\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/www.vagrantup.com\/downloads.html\">Vagrant<\/a>\u3068<a href=\"https:\/\/www.virtualbox.org\/wiki\/Downloads\">Virtual Box<\/a>\u306e\u4e21\u65b9\u3092\u3001\u307e\u3060\u6e96\u5099\u3067\u304d\u3066\u3044\u306a\u3044\u306a\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4ee3\u308f\u308a\u306bAWS\u3092\u5229\u7528\u3059\u308b\u306a\u3089\u3001<strong>.kitchen.yml<\/strong>\u3092\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>cookie Recipe\u306e\u305f\u3081\u306e\u201ccookies\u201dCookbook\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u3001Cookbook\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u3001Cookbook\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u751f\u6210\u5668\u3068\u3057\u3066<strong>chef<\/strong> CLI\u30c4\u30fc\u30eb\u3092\u7528\u3044\u307e\u3057\u3087\u3046\u3002\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u72ec\u81ea\u306eCookbook\u751f\u6210\u5668\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059: <a href=\"\/lab\/6654\">\u72ec\u81ea\u306eChef Cookbook\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b<\/a> (\u8a33\u6ce8:\u548c\u8a33)<\/p>\n<p><code lang=\"bash\"><br \/>\n$ chef generate cookbook cookies<br \/>\nCompiling Cookbooks...<br \/>\nRecipe: code_generator::cookbook<br \/>\n<\/code><\/p>\n<p>\u3053\u306e\u5f8c\u306b\u307e\u3060\u307e\u3060\u51fa\u529b\u304c\u7d9a\u304d\u307e\u3059\u3002<\/p>\n<p><strong>cookies<\/strong> Cookbook\u306b\u5bfe\u3059\u308b\u4f5c\u696d\u3092\u884c\u3046\u305f\u3081\u306b\u3001Cookbook\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u79fb\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ cd cookies<br \/>\n<\/code><\/p>\n<p><strong>chef generate cookbook<\/strong>\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4e8b\u524d\u8a2d\u5b9a\u6e08\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u3044\u304f\u3064\u3082\u5f97\u3089\u308c\u307e\u3059\u3002\u305d\u306e\u3046\u3061\u306e1\u3064\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u306eTest Kitchen\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u30ad\u30c3\u30c1\u30f3\u306e\u8a2d\u5b9a\u306f<strong>.kitchen.yml<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u308b\u3053\u3068\u3067\u8abf\u3079\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><code lang=\"yaml\"><br \/>\n$ cat .kitchen.yml<\/p>\n<p>---<br \/>\ndriver:<br \/>\n  name: vagrant<\/p>\n<p>provisioner:<br \/>\n  name: chef_zero<\/p>\n<p>platforms:<br \/>\n  - name: ubuntu-12.04<br \/>\n  - name: centos-6.5<\/p>\n<p>suites:<br \/>\n  - name: default<br \/>\n    run_list:<br \/>\n      - recipe[cookies::default]<br \/>\n    attributes:<br \/>\n<\/code><\/p>\n<p><strong>driver<\/strong>\u30bb\u30af\u30b7\u30e7\u30f3\u306f\u3001Test Kitchen\u306e\u52d5\u4f5c\u3092\u8a2d\u5b9a\u3059\u308b\u90e8\u5206\u3067\u3059\u3002\u3053\u306e\u5834\u5408\u3001Chef DK\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b<strong>kitchen-vagrant<\/strong>\u30c9\u30e9\u30a4\u30d0\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u7c21\u5358\u306b<a href=\"https:\/\/gist.github.com\/iennae\/737667f7eef2f9b65e4e\">AWS\u3092\u7528\u3044\u308b\u8a2d\u5b9a<\/a>\u3084\u4ed6\u306e\u30af\u30e9\u30a6\u30c9\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u30d7\u30ed\u30d3\u30b8\u30e7\u30ca\u3092\u7528\u3044\u308b\u8a2d\u5b9a\u306b\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>provisioner<\/strong>\u306f\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084\u7ba1\u7406\u306e\u624b\u9593\u304c\u5fc5\u8981\u306a\u3044Chef Server\u3067\u3042\u308b<strong>chef_zero<\/strong>\u306e\u6a5f\u80fd\u306e\u591a\u304f\u3092\u7528\u3044\u307e\u3059\u3002<\/p>\n<p><strong>platforms<\/strong>\u306f\u30c6\u30b9\u30c8\u3092\u884c\u3044\u305f\u3044\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308bCentOS\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u307f\u3067\u4f5c\u696d\u3057\u307e\u3059\u3002Ubuntu\u306e\u884c\u306f\u524a\u9664\u3059\u308b\u304b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><strong>suites<\/strong>\u306f\u3069\u306e\u3088\u3046\u306a\u30c6\u30b9\u30c8\u3092\u884c\u3044\u305f\u3044\u304b\u3092\u5b9a\u7fa9\u3059\u308b\u90e8\u5206\u3067\u3059\u3002<strong>cookbook::default<\/strong> Recipe\u3092\u542b\u3080run_list\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001CentOS\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6ce8\u610f: Test Kitchen\u306f\u3001\u30ef\u30fc\u30af\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306b\u5b58\u5728\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u81ea\u52d5\u7684\u306bVagrant Box\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\u5341\u5206\u306a\u901f\u5ea6\u304c\u51fa\u308b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306b\u63a5\u7d9a\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen create<br \/>\n<\/code><\/p>\n<p>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen list<\/p>\n<p>\u279c  cookies git:(master) \u2717 kitchen list<br \/>\nInstance             Driver   Provisioner  Last Action<br \/>\ndefault-centos-65    Vagrant  ChefZero     Created<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u3067\u30ed\u30fc\u30ab\u30eb\u306b\u4eee\u60f3\u30ce\u30fc\u30c9\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eee\u60f3\u30ce\u30fc\u30c9\u306bChef\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066Node\u306e\u53ce\u675f\u3092\u3055\u305b\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen converge<br \/>\n<\/code><\/p>\n<h3>\u25cf<a name=\"cookie-lwrp-prep\" href=\"#cookie-lwrp-prep\">Cookie LWRP\u306e\u6e96\u5099<\/a><\/h3>\n<p>LWRP\u306eResource\u30d5\u30a1\u30a4\u30eb\u3068Provider\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308a\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306eRecipe\u3092\u66f4\u65b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Chef DK\u306b\u542b\u307e\u308c\u3066\u3044\u308b<strong>chef<\/strong> cli\u30c4\u30fc\u30eb\u3092\u7528\u3044\u3066LWRP\u306e\u96db\u5f62\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306f<strong>resources\/cookie.rb<\/strong>\u30d5\u30a1\u30a4\u30eb\u3068<strong>providers\/cookie.rb<\/strong>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ chef generate lwrp cookie<br \/>\n<\/code><\/p>\n<p>cookie LWRP Resource\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3001<strong>create<\/strong>\u3068\u3044\u3046\u5358\u4e00\u306e\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u52d5\u4f5c\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6b21\u306e\u5185\u5bb9\u3092<strong>resources\/cookie.rb<\/strong>\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nactions :create<br \/>\n<\/code><\/p>\n<p>\u6b21\u306b\u3001cookie LWRP Provider\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3001\u30b5\u30dd\u30fc\u30c8\u3059\u308b<strong>create<\/strong>\u306e\u52d5\u4f5c\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<strong>create<\/strong>\u30e1\u30bd\u30c3\u30c9\u306fnew_resource\u306e\u540d\u524d\u3092\u542b\u3080\u30ed\u30b0\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6a19\u6e96\u51fa\u529b\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u5185\u5bb9\u3092<strong>providers\/cookie.rb<\/strong>\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nuse_inline_resources<\/p>\n<p>action :create do<br \/>\n log \" My name is #{new_resource.name}\"<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u6ce8\u610f: <a href=\"http:\/\/www.rubydoc.info\/github\/opscode\/chef\/Chef\/Provider\/LWRPBase#use_inline_resources-class_method\">use_inline_resources<\/a>\u306fChef 11\u3067\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u5909\u66f4\u306f\u3001LWRP Resource\u304c\u3069\u306e\u3088\u3046\u306bResource\u306e\u30a4\u30f3\u30e9\u30a4\u30f3\u8a55\u4fa1\u3092\u6709\u52b9\u306b\u6271\u3046\u304b\u3092\u5909\u66f4\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u901a\u77e5\u304c\u3069\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3059\u308b\u304b\u3092\u5909\u66f4\u3057\u305f\u306e\u3067\u3001\u73fe\u5728\u306eLWRP\u3092\u5909\u66f4\u3059\u308b\u524d\u306b\u614e\u91cd\u306b\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6ce8\u610f: Chef Resource DSL\u30e1\u30bd\u30c3\u30c9\u306f<strong>action<em>s<\/em><\/strong>\u3067\u3059\u3002Provider\u30d5\u30a1\u30a4\u30eb\u4e2d\u3067\u500b\u5225\u306b\u5b9a\u7fa9\u3067\u304d\u308b<strong>action<\/strong>\u3092\u8907\u6570\u5b9a\u7fa9\u3067\u304d\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u308c\u3089\u3092\u7528\u3044\u305fRecipe\u3092\u66f8\u304f\u3053\u3068\u3067\u65b0\u3057\u3044Resource\u306e\u6a5f\u80fd\u3092\u30c6\u30b9\u30c8\u3057\u307e\u3057\u3087\u3046\u3002cookie Cookbook\u306e\u30c7\u30d5\u30a9\u30eb\u30c8Recipe\u3092\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u65b0\u3057\u3044Resource\u306f<strong>#{cookbookname}_#{resource}<\/strong>\u306e\u5f62\u5f0f\u3067\u547d\u540d\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\ncookies_cookie \"peanutbutter\" do<br \/>\n   action :create<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u30a4\u30e1\u30fc\u30b8\u3092\u518d\u5ea6\u53ce\u675f\u3055\u305b\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen converge<br \/>\n<\/code><\/p>\n<p>\u6b21\u306e\u3088\u3046\u306a\u51fa\u529b\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\nConverging 1 resources<br \/>\nRecipe: cookies::default<br \/>\n  * cookies_cookie[peanutbutter] action create[2014-12-19T02:17:39+00:00] INFO: Processing cookies_cookie[peanutbutter] action create (cookies::default line 1)<br \/>\n (up to date)<br \/>\n  * log[ My name is peanutbutter] action write[2014-12-19T02:17:39+00:00] INFO: Processing log[ My name is peanutbutter] action write (\/tmp\/kitchen\/cache\/cookbooks\/cookies\/providers\/cookie.rb line 2)<br \/>\n[2014-12-19T02:17:39+00:00] INFO:  My name is peanutbutter<br \/>\n<\/code><\/p>\n<p><strong>cookies_cookie<\/strong> Resource\u304c\u6b63\u3057\u304f\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>\u25cf<a name=\"improving-the-cookie-lwrp\" href=\"#improving-the-cookie-lwrp\">Cookie LWRP\u306e\u6539\u826f<\/a><\/h3>\n<p><strong>cookies_cookie<\/strong> Resource\u3092\u6539\u826f\u3057\u305f\u304f\u306a\u3063\u305f\u3068\u3057\u307e\u3057\u3087\u3046\u3002\u3044\u304f\u3064\u304b\u306e<strong>\u30d1\u30e9\u30e1\u30fc\u30bf<\/strong>\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3057\u307e\u3059\u3002LWRP\u306e\u9069\u5207\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6c7a\u5b9a\u3059\u308b\u306b\u306f\u3001\u5909\u66f4\u3057\u305f\u3044Resource\u306e\u69cb\u6210\u8981\u7d20\u306b\u3064\u3044\u3066\u691c\u8a0e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30af\u30c3\u30ad\u30fc\u306e\u57fa\u672c\u7684\u306a\u5171\u901a\u306e\u69cb\u6210\u8981\u7d20\u304c\u3042\u308a\u307e\u3059\u3002\u5fc5\u9808\u306e\u8981\u7d20\u3068\u3057\u3066\u306f\u3001\u6cb9\u8102\u3001\u3064\u306a\u304e\u3001\u7518\u5473\u6599\u3001\u3075\u304f\u3089\u3057\u7c89\u3001\u5c0f\u9ea6\u7c89\u3001\u30c1\u30e7\u30b3\u30c1\u30c3\u30d7\u3084\u30d4\u30fc\u30ca\u30c3\u30c4\u30d0\u30bf\u30fc\u306e\u3088\u3046\u306a\u6dfb\u52a0\u7269\u3067\u3059\u3002\u6cb9\u8102\u306f\u5473\u3001\u304d\u3081\u3001\u30d0\u30bf\u30fc\u3067\u3059\u3002\u3064\u306a\u304e\u306f\u6210\u5206\u3092\u4e92\u3044\u306b\u304f\u3063\u3064\u3051\u308b\u201c\u63a5\u7740\u5264\u201d\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002\u7518\u5473\u6599\u306f\u8272\u3001\u5473\u3001\u304d\u3081\u3001\u3084\u308f\u3089\u304b\u3055\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u307e\u3059\u3002\u3075\u304f\u3089\u3057\u7c89\u306f\u30af\u30c3\u30ad\u30fc\u306b\u7a7a\u6c17\u3092\u9001\u308a\u8fbc\u3093\u3067\u304d\u3081\u3068\u76db\u308a\u306b\u5909\u5316\u3092\u4e0e\u3048\u307e\u3059\u3002\u5c0f\u9ea6\u7c89\u306f\u30af\u30c3\u30ad\u30fc\u306e\u69cb\u9020\u306e\u5927\u90e8\u5206\u3068\u540c\u3058\u3088\u3046\u306a\u304d\u3081\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u6dfb\u52a0\u7269\u306f\u30af\u30c3\u30ad\u30fc\u306e\u5473\u306b\u9055\u3044\u3092\u4e0e\u3048\u307e\u3059\u3002<\/p>\n<p>\u57fa\u672c\u7684\u306a\u30ec\u30b7\u30d4\u3067\u306f\u3001\u6c34\u6c17\u306e\u3042\u308b\u5177\u6750\u3068\u4e7e\u71e5\u3057\u305f\u5177\u6750\u3092\u5225\u3005\u306b\u304b\u304d\u6df7\u305c\u3066\u3001\u305d\u308c\u304b\u3089\u4e21\u65b9\u3092\u6df7\u305c\u3066\u6700\u5f8c\u306b\u6dfb\u52a0\u7269\u3092\u5165\u308c\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u3059\u3079\u3066\u306e\u5177\u6750\u30921\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u307e\u3068\u3081\u3066\u3057\u307e\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ed6\u306e\u8981\u7d20\u3067\u306f\u3001\u30af\u30c3\u30ad\u30fc\u3092\u3069\u308c\u304f\u3089\u3044\u306e\u6e29\u5ea6\u3067\u3069\u308c\u304f\u3089\u3044\u306e\u6642\u9593\u713c\u3051\u3070\u3044\u3044\u306e\u304b\u77e5\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>LWRP Resource\u306b<strong>\u30d1\u30e9\u30e1\u30fc\u30bf<\/strong>\u3092\u8ffd\u52a0\u3059\u308b\u969b\u3001<strong>attribute<\/strong>\u30ad\u30fc\u30ef\u30fc\u30c9\u304b\u3089\u59cb\u3081\u3066\u3001Attribute\u306e\u540d\u524d\u30680\u500b\u4ee5\u4e0a\u306e\u691c\u8a3c\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u7d9a\u3051\u307e\u3059\u3002<\/p>\n<p><strong>resources\/cookie.rb<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nactions :create<\/p>\n<p>attribute :name, :name_attribute => true<br \/>\nattribute :bake_time<br \/>\nattribute :temperature<br \/>\nattribute :ingredients<br \/>\n<\/code><\/p>\n<p>\u3053\u308c\u3089\u306eAttribute\u3092\u7d44\u307f\u8fbc\u3080\u3088\u3046\u306bRecipe\u3092\u66f4\u65b0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\ncookies_cookie \"peanutbutter\" do<br \/>\n   bake_time 10<br \/>\n   temperature 350<br \/>\n   action :create<br \/>\nend<br \/>\n<\/code><\/p>\n<h3>\u25cf<a name=\"using-a-data-bag\" href=\"#using-a-data-bag\">Data Bag\u306e\u5229\u7528<\/a><\/h3>\n<p>\u8981\u7d20\u3092\u6587\u5b57\u5217\u304b\u914d\u5217\u306b\u5165\u308c\u3089\u308c\u308b\u306e\u306a\u3089\u3001\u30b3\u30fc\u30c9\u304b\u3089\u5206\u96e2\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u3087\u3046\u3002\u305d\u3046\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u306e1\u3064\u304c<a href=\"http:\/\/docs.chef.io\/data_bags.html\">Data Bag<\/a>\u3067\u3059\u3002<\/p>\n<p>\u30af\u30c3\u30ad\u30fc\u306e\u5177\u6750\u3092\u5165\u308c\u3066\u304a\u304f\u306e\u306bdata_bag\u3092\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002\u672c\u756a\u306edata_bags\u306f\u901a\u5e38\u306f\u3001Organization policy_repo\u306b\u3042\u308bCookbook\u306e\u5916\u306b\u5b58\u5728\u3057\u307e\u3059\u3002<strong>chef_zero<\/strong>\u3092\u7528\u3044\u3066\u958b\u767a\u3057\u3066\u3044\u308b\u306e\u3067\u3001Data Bag\u306fCookbook\u306e<strong>test\/integration\/data_bags<\/strong>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u542b\u3081\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3092\u958b\u767a\u74b0\u5883\u3067\u884c\u3046\u306b\u306f\u3001<strong>chef_zero<\/strong>\u304cdata_bags\u3092\u898b\u3064\u3051\u3089\u308c\u308b\u3088\u3046\u306b\u3001<strong>.kitchen.yml<\/strong>\u3092\u66f4\u65b0\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u65b0\u3057\u3044Resource\u6a5f\u80fd\u306e\u30c6\u30b9\u30c8\u306e\u305f\u3081\u306b\u3001<strong>.kitchen.yml<\/strong>\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306esuite\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u6b21\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"yaml\"><br \/>\ndata_bags_path: \"test\/integration\/data_bags\"<br \/>\n<\/code><\/p>\n<p>\u3053\u306e\u6642\u70b9\u3067<strong>.kitchen.yml<\/strong>\u306f<a href=\"https:\/\/gist.github.com\/iennae\/33084091121456dab359\">\u6b21<\/a>\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p><code lang=\"yaml\"><br \/>\n---<br \/>\ndriver:<br \/>\n  name: vagrant<\/p>\n<p>provisioner:<br \/>\n  name: chef_zero<\/p>\n<p>platforms:<br \/>\n  - name: centos-6.5<\/p>\n<p>suites:<br \/>\n  - name: default<br \/>\n     run_list:<br \/>\n       - recipe[cookies::default]<br \/>\n     attributes:<br \/>\n     data_bags_path: \"test\/integration\/data_bags\"<br \/>\n<\/code><\/p>\n<p><strong>peanutbutter.json<\/strong>\u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u306b\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3001\u30d4\u30fc\u30ca\u30c3\u30c4\u30d0\u30bf\u30fc\u3092\u683c\u7d0d\u3057\u3066\u304a\u304f<strong>cookies_ingredients<\/strong> data_bag\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"javascript\"><br \/>\n{<br \/>\n  \"id\" : \"peanutbutter\",<br \/>\n  \"ingredients\" :<br \/>\n    [<br \/>\n      \"1 cup peanut butter\",<br \/>\n      \"1 cup sugar\",<br \/>\n      \"1 egg\"<br \/>\n    ]<br \/>\n}<br \/>\n<\/code><\/p>\n<p>\u5b9f\u969b\u306b<strong>cookies_ingredients<\/strong> data_bag\u3092\u7528\u3044\u308b\u3088\u3046\u306bRecipe\u3092\u66f4\u65b0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nsearch('cookies_ingredients', '*:*').each do |cookie_type|<br \/>\n  cookies_cookie cookie_type['id'] do<br \/>\n    ingredients cookie_type['ingredients']<br \/>\n    bake_time 10<br \/>\n    temperature 350<br \/>\n    action :create<br \/>\n  end<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u5165\u529b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u691c\u8a3c\u3059\u308b\u3088\u3046\u306bLWRP Resource\u3092\u66f4\u65b0\u3057\u3001\u30ce\u30fc\u30c9\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b\u3088\u3046\u306bProvider\u3092\u66f4\u65b0\u3057\u3001Attribute\u3092\u4f7f\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u305f\u3001Resource\u306b\u201ceat\u201dAction\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>resources\/cookie.rb<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u6b21\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nactions :create, :eat<\/p>\n<p>attribute :name, :name_attribute => true<br \/>\n# bake time in minutes<br \/>\nattribute :bake_time, :kind_of => Integer<br \/>\n# temperature in F<br \/>\nattribute :temperature, :kind_of => Integer<br \/>\nattribute :ingredients, :kind_of => Array<br \/>\n<\/code><\/p>\n<p>\u6a19\u6e96\u51fa\u529b\u306b\u30ed\u30b0\u3092\u66f8\u304d\u51fa\u3059\u4ee3\u308f\u308a\u306b\u30ce\u30fc\u30c9\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3088\u3046\u306bProvider\u3092\u66f4\u65b0\u3057\u307e\u3057\u3087\u3046\u3002Provider\u306btemplate Resource\u3092\u7528\u3044\u308b\u306e\u3067\u3001\u5fc5\u8981\u306a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ chef generate template basic_recipe<br \/>\n<\/code><\/p>\n<p><strong>templates\/default\/basic_recipe.erb<\/strong>\u3092\u6b21\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nRecipe: <%= @name %> cookies<\/p>\n<p><% @ingredients.each do |ingredient| %><br \/>\n<%= ingredient %><br \/>\n<% end %><\/p>\n<p>Combine wet ingredients.<br \/>\nCombine dry ingredients.<\/p>\n<p>Bake at <%= @temperature %>F for <%= @bake_time %> minutes.<br \/>\n<\/code><\/p>\n<p>\u3067\u306fcookie Provider\u3092\u3053\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u7528\u3044\u308b\u3088\u3046\u306b\u66f4\u65b0\u3057\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u306fAttribute\u3092\u6e21\u3059\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u305f\u3001<strong>eat<\/strong> action\u3092\u5b9a\u7fa9\u3057\u3001<strong>create<\/strong>\u3067\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p><strong>providers\/cookie.rb<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u6b21\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nuse_inline_resources<\/p>\n<p>action :create do<\/p>\n<p>  template \"\/tmp\/#{new_resource.name}\" do<br \/>\n    source \"basic_recipe.erb\"<br \/>\n    mode \"0644\"<br \/>\n    variables(<br \/>\n      :ingredients => new_resource.ingredients,<br \/>\n      :bake_time   => new_resource.bake_time,<br \/>\n      :temperature => new_resource.temperature,<br \/>\n      :name        => new_resource.name,<br \/>\n    )<br \/>\n  end<br \/>\nend<\/p>\n<p>action :eat do<\/p>\n<p>  file \"\/tmp\/#{new_resource.name}\" do<br \/>\n    action :delete<br \/>\n  end<\/p>\n<p>end<br \/>\n<\/code><\/p>\n<p>\u66f4\u65b0\u3057\u305fLWRP\u3092Test Kitchen\u3067\u53ce\u675f\u3055\u305b\u3066\u307f\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen converge<br \/>\n<\/code><\/p>\n<p>\u30ce\u30fc\u30c9\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3001peanutbutter Resource\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen login<br \/>\n<\/code><\/p>\n<p><strong>\/tmp\/peanutbutter<\/strong>\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n[vagrant@default-centos-65 ~]$ cat \/tmp\/peanutbutter<br \/>\nRecipe: peanutbutter cookies<\/p>\n<p>1 cup peanut butter<br \/>\n1 cup sugar<br \/>\n1 egg<\/p>\n<p>Combine wet ingredients.<br \/>\nCombine dry ingredients.<\/p>\n<p>Bake at 350F for 10 minutes.<br \/>\n<\/code><\/p>\n<p>\u3067\u306f<strong>eat<\/strong> Action\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002Recipe\u3092\u6b21\u306e\u3088\u3046\u306b\u66f4\u65b0\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"ruby\"><br \/>\nsearch(\"cookies_ingredients\", \"*:*\").each do |cookie_type|<br \/>\n  cookies_cookie cookie_type['id'] do<br \/>\n    action :eat<br \/>\n  end<br \/>\nend<br \/>\n<\/code><\/p>\n<p>\u30ce\u30fc\u30c9\u3092\u53ce\u675f\u3055\u305b\u3066\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen converge<br \/>\n$ kitchen login<br \/>\nLast login: Fri Dec 19 05:45:23 2014 from 10.0.2.2<br \/>\n[vagrant@default-centos-65 ~]$ cat \/tmp\/peanutbutter<br \/>\ncat: \/tmp\/peanutbutter: No such file or directory<br \/>\n<\/code><\/p>\n<p>\u30af\u30c3\u30ad\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u306b\u306f\u3001\u65b0\u3057\u3044data_bag item\u3092\u8ffd\u52a0\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<h3>\u25cf<a name=\"cleaning-up-the-kitchen\" href=\"#cleaning-up-the-kitchen\">\u30ad\u30c3\u30c1\u30f3\u306e\u7247\u4ed8\u3051<\/a><\/h3>\n<p>\u6700\u5f8c\u306b\u3001\u30ad\u30c3\u30c1\u30f3\u3067\u672c\u65e5\u30c6\u30b9\u30c8\u3092\u7d42\u3048\u305f\u306a\u3089\u3001<strong>kitchen destroy<\/strong>\u3067\u4eee\u60f3\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u7247\u4ed8\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code lang=\"bash\"><br \/>\n$ kitchen destroy<br \/>\n<\/code><\/p>\n<h2>\u25a0<a name=\"next-steps\" href=\"#next-steps\">\u6b21\u306e\u624b\u9806<\/a><\/h2>\n<p>\u30d4\u30fc\u30ca\u30c3\u30c4\u30d0\u30bf\u30fc\u30af\u30c3\u30ad\u30fc\u3065\u304f\u308a\u306b\u6210\u529f\u3057\u305f\u3068\u3053\u308d\u3067\u3001LWRP\u3067Chef\u3092\u62e1\u5f35\u3059\u308b\u3053\u3068\u306e\u307b\u3093\u306e\u3055\u308f\u308a\u3092\u898b\u305f\u3060\u3051\u306b\u904e\u304e\u307e\u305b\u3093\u3002<a href=\"http:\/\/shop.oreilly.com\/product\/0636920032984.do\">Jon Cowie\u306e\u300cCustomizing Chef\u300d8\u7ae0<\/a>\u3084<a href=\"http:\/\/dougireton.com\/blog\/2012\/12\/31\/creating-an-lwrp\/\">Doug Ireton\u306eLWRP\u4f5c\u6210\u306b\u95a2\u3059\u308b3\u3064\u306e\u8a18\u4e8b<\/a>\u304c\u53c2\u8003\u306b\u306a\u308b\u3067\u3057\u3087\u3046(\u8a33\u6ce8:<a href=\"\/news\/4489\">\u300eChef\u6d3b\u7528\u30ac\u30a4\u30c9 \u30b3\u30fc\u30c9\u3067\u306f\u3058\u3081\u308b\u69cb\u6210\u7ba1\u7406\u300f<\/a>13\u7ae0\u3082\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044)\u3002<strong>load_current_resource<\/strong>\u3068<strong>updated_by_last_action<\/strong>\u3092\u7528\u3044\u3066\u3053\u306e\u4f8b\u3092\u62e1\u5f35\u30fb\u691c\u67fb\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<strong>why_run<\/strong>\u6a5f\u80fd\u3092\u3069\u306e\u3088\u3046\u306b\u52d5\u304b\u3059\u304b\u3082\u8abf\u3079\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002Chef\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3067LWRP\u3092\u5171\u6709\u3057\u3066\u3044\u305f\u3060\u3051\u308b\u3053\u3068\u3092\u697d\u3057\u307f\u306b\u3057\u3066\u3044\u307e\u3059\uff01<\/p>\n<p>\u7591\u554f\u3084\u8cea\u554f\u306f<a href=\"mailto:iennae@gmail.com\">iennae@gmail.com<\/a>\u307e\u3067\u304a\u5bc4\u305b\u304f\u3060\u3055\u3044(\u8a33\u6ce8:\u82f1\u8a9e\u3067)\u3002<\/p>\n<h2>\u25a0<a name=\"additional-resources\" href=\"#additional-resources\">\u8ffd\u52a0\u8cc7\u6599<\/a><\/h2>\n<ul>\n<li><a href=\"http:\/\/dougireton.com\/blog\/2012\/12\/31\/creating-an-lwrp\/\">Doug Ireton\u306eLWRP\u4f5c\u6210\u306b\u95a2\u3059\u308b3\u3064\u306e\u8a18\u4e8b<\/a><\/li>\n<li><a href=\"https:\/\/medium.com\/@echohack\/creating-your-own-chef-cookbook-generator-5e998db1255b\">Creating your own chef Cookbook Generator<\/a> (\u8a33\u6ce8: <a href=\"\/lab\/6654\">\u548c\u8a33<\/a>)<\/li>\n<li><a href=\"https:\/\/supermarket.chef.io\/\">Supermarket - \u30b3\u30df\u30e5\u30cb\u30c6\u30a3Cookbook\u30b5\u30a4\u30c8<\/a><\/li>\n<li><a href=\"http:\/\/sweets.seriouseats.com\/2013\/12\/the-food-lab-the-best-chocolate-chip-cookies.html\">Science behind the Best Chocolate Chip Cookies<\/a><\/li>\n<li><a href=\"http:\/\/www.christmas-cookies.com\/recipes\/bycountry.php\">Christmas Cookies from around the world<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/nathenharvey\/cookies\">Nathen Harvey's Cookie Cookbook Repo<\/a><\/li>\n<\/ul>\n<h2>\u25a0<a name=\"thank-you\" href=\"#thank-you\">\u8b1d\u8f9e<\/a><\/h2>\n<p>\u30af\u30c3\u30ad\u30fc\u304c\u304a\u3044\u3057\u304f\u306a\u308b\u3088\u3046\u306b\u52a9\u3051\u3066\u3044\u305f\u3060\u3044\u305f\u3059\u3070\u3089\u3057\u3044\u8457\u8005\u9663\u306b\u611f\u8b1d\u3057\u307e\u3059\uff01<\/p>\n<ul>\n<li><a href=\"https:\/\/twitter.com\/beerops\">Katherine Daniels<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/gwaldo\">H.\u201cWaldo\u201dGrunenwald<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/mattstratton\">Matt Straton<\/a><\/li>\n<li><a href=\"https:\/\/twitter.com\/nathenharvey\">Nathen Harvey<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u7a3f\u306f SysAdvent Day 21: Baking Delicious Resources with Chef (2014\/12\/22) \u306e\u548c\u8a33\u3067\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u306fSysAdvent\u304b\u3089\u306e\u8ee2\u8f09(\u8a33\u6ce8:\u539f\u6587)\u3067\u3059\u3002 \u307f [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[36],"tags":[],"class_list":["post-6738","post","type-post","status-publish","format-standard","hentry","category-chef"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3<\/title>\n<meta name=\"description\" content=\"Chef |\u672c\u7a3f\u306f SysAdvent Day 21: Baking Delicious Resources with Chef (2014\/12\/22) \u306e\u548c\u8a33\u3067\u3059\u3002\" \/>\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\/6738\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"og:description\" content=\"Chef |\u672c\u7a3f\u306f SysAdvent Day 21: Baking Delicious Resources with Chef (2014\/12\/22) \u306e\u548c\u8a33\u3067\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.creationline.com\/tech-blog\/6738\" \/>\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-01-09T02:30:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-03-12T03:53:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2026\/01\/screenshot.png\" \/>\n\t<meta property=\"og:image:width\" content=\"470\" \/>\n\t<meta property=\"og:image:height\" content=\"394\" \/>\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=\"6\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\\\/6738#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738\"},\"author\":{\"name\":\"Daisuke Higuchi\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"headline\":\"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef\",\"datePublished\":\"2015-01-09T02:30:43+00:00\",\"dateModified\":\"2015-03-12T03:53:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738\"},\"wordCount\":596,\"commentCount\":0,\"articleSection\":[\"Chef\"],\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738\",\"name\":\"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\"},\"datePublished\":\"2015-01-09T02:30:43+00:00\",\"dateModified\":\"2015-03-12T03:53:57+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"description\":\"Chef |\u672c\u7a3f\u306f SysAdvent Day 21: Baking Delicious Resources with Chef (2014\\\/12\\\/22) \u306e\u548c\u8a33\u3067\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/6738#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\":\"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef\"}]},{\"@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\\\/2026\\\/05\\\/pngout-25-230x230.png\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/pngout-25-230x230.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/pngout-25-230x230.png\",\"caption\":\"Daisuke Higuchi\"},\"description\":\"\u306f\u3084\u308a\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":"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"Chef |\u672c\u7a3f\u306f SysAdvent Day 21: Baking Delicious Resources with Chef (2014\/12\/22) \u306e\u548c\u8a33\u3067\u3059\u3002","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\/6738","og_locale":"ja_JP","og_type":"article","og_title":"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","og_description":"Chef |\u672c\u7a3f\u306f SysAdvent Day 21: Baking Delicious Resources with Chef (2014\/12\/22) \u306e\u548c\u8a33\u3067\u3059\u3002","og_url":"https:\/\/www.creationline.com\/tech-blog\/6738","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-01-09T02:30:43+00:00","article_modified_time":"2015-03-12T03:53:57+00:00","og_image":[{"width":470,"height":394,"url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2026\/01\/screenshot.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":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.creationline.com\/tech-blog\/6738#article","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/6738"},"author":{"name":"Daisuke Higuchi","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"headline":"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef","datePublished":"2015-01-09T02:30:43+00:00","dateModified":"2015-03-12T03:53:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/6738"},"wordCount":596,"commentCount":0,"articleSection":["Chef"],"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.creationline.com\/tech-blog\/6738#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.creationline.com\/tech-blog\/6738","url":"https:\/\/www.creationline.com\/tech-blog\/6738","name":"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#website"},"datePublished":"2015-01-09T02:30:43+00:00","dateModified":"2015-03-12T03:53:57+00:00","author":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"description":"Chef |\u672c\u7a3f\u306f SysAdvent Day 21: Baking Delicious Resources with Chef (2014\/12\/22) \u306e\u548c\u8a33\u3067\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.creationline.com\/tech-blog\/6738#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.creationline.com\/tech-blog\/6738"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.creationline.com\/tech-blog\/6738#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":"[\u548c\u8a33] SysAdvent Day 21: Chef\u3067\u304a\u3044\u3057\u304fResource\u3092\u8abf\u7406 #getchef"}]},{"@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\/2026\/05\/pngout-25-230x230.png","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2026\/05\/pngout-25-230x230.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2026\/05\/pngout-25-230x230.png","caption":"Daisuke Higuchi"},"description":"\u306f\u3084\u308a\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\/6738","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=6738"}],"version-history":[{"count":0,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/6738\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=6738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=6738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=6738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}