{"id":5519,"date":"2015-12-17T21:58:38","date_gmt":"2015-12-17T12:58:38","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=5519"},"modified":"2016-11-30T09:43:31","modified_gmt":"2016-11-30T00:43:31","slug":"serverspec-%e4%bd%9c%e6%88%90%e8%a3%9c%e5%8a%a9%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%82%92%e3%83%aa%e3%83%aa%e3%83%bc%e3%82%b9%e3%81%97%e3%81%be%e3%81%97%e3%81%9f","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/serverspec-%e4%bd%9c%e6%88%90%e8%a3%9c%e5%8a%a9%e3%82%a2%e3%83%97%e3%83%aa%e3%82%b1%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3%e3%82%92%e3%83%aa%e3%83%aa%e3%83%bc%e3%82%b9%e3%81%97%e3%81%be%e3%81%97%e3%81%9f\/","title":{"rendered":"Serverspec \u4f5c\u6210\u88dc\u52a9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u307e\u3057\u305f"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002<br \/>\n\u672c\u65e5\u306f Serverspec \u4f5c\u6210\u88dc\u52a9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u305f\u306e\u3067\u304a\u77e5\u3089\u305b\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/skyarch-networks\/serverspec-generator-app\">skyarch-networks\/serverspec-generator-app GitHub<\/a><\/p>\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p><a href=\"http:\/\/serverspec.org\/\">Serverspec<\/a> \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30c6\u30b9\u30c8\u3092Ruby\u306e\u30b3\u30fc\u30c9\u306b\u3088\u3063\u3066\u81ea\u52d5\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u4f8b\u3048\u3070\u3001HTTP\u30b5\u30fc\u30d0\u306e\u7c21\u5358\u306a\u30c6\u30b9\u30c8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u8868\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: ruby; title: ; notranslate\" title=\"\">\r\n# httpd \u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\r\ndescribe package('httpd') do\r\n  it { should be_installed }\r\nend\r\n\r\n# httpd\u30b5\u30fc\u30d3\u30b9\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3001\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\r\ndescribe service('httpd') do\r\n  it { should be_enabled }\r\n  it { should be_running }\r\nend\r\n\r\n# TCP 80\u756a\u306e\u30dd\u30fc\u30c8\u306b\u5916\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\r\ndescribe port(80) do\r\n  it { should be_listening }\r\nend\r\n<\/pre>\n<p>\u3053\u306eRuby\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u72b6\u614b\u3001\u30dd\u30fc\u30c8\u306e\u958b\u653e\u72b6\u614b\u306b\u3064\u3044\u3066\u81ea\u52d5\u7684\u306b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u554f\u984c\u70b9<\/h2>\n<p>\u3053\u306e\u3088\u3046\u306b\u4fbf\u5229\u306a Serverspec \u3067\u3059\u304c\u3001\u4f5c\u6210\u3059\u308b\u969b\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u554f\u984c\u70b9\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3072\u3068\u3064\u76ee\u306b\u306f\u3001\u6163\u308c\u306a\u3044\u3046\u3061\u306f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u78ba\u8a8d\u3057\u306a\u304c\u3089\u3067\u306a\u3044\u3068\u4f5c\u6210\u304c\u96e3\u3057\u3044\u3053\u3068\u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<code>package<\/code>, <code>service<\/code>, <code>port<\/code>\u306a\u3069\u306e\u30c6\u30b9\u30c8\u5bfe\u8c61\u3092\u6c7a\u3081\u308b\u3082\u306e(<code>Resource<\/code>\u3068\u8a00\u3044\u307e\u3059)\u306f\u30012015\u5e7412\u670817\u65e5\u6642\u70b9\u306739\u500b\u5b58\u5728\u3057\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001<code>be_installed<\/code>, <code>be_enabled<\/code>, <code>be_running<\/code>\u306a\u3069\u306e\u3069\u306e\u3088\u3046\u306a\u72b6\u614b\u306b\u3042\u308b\u304b\u3092\u6307\u5b9a\u3059\u308b\u3082\u306e(<code>matcher<\/code>\u3068\u8a00\u3044\u307e\u3059)\u3082\u3001\u305d\u308c\u305e\u308c\u306eResource\u306b\u5bfe\u3057\u3066\u7121\u6570\u306b\u5b58\u5728\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u591a\u304f\u306eResource\u3084matcher\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u3067\u3001\u69d8\u3005\u306a\u5c40\u9762\u306b\u5bfe\u3057\u3066\u30c6\u30b9\u30c8\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u5168\u3066\u3092\u899a\u3048\u308b\u3053\u3068\u306f\u96e3\u3057\u3044\u3068\u8a00\u3048\u308b\u3067\u3057\u3087\u3046\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001Serverspec \u3092\u4f5c\u6210\u3059\u308b\u4eba\u306f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u3092\u7247\u624b\u306b\u4f5c\u6210\u305b\u3056\u308b\u3092\u5f97\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<hr \/>\n<p>\u3075\u305f\u3064\u76ee\u306b\u3001Ruby \u521d\u5fc3\u8005\u306b\u3068\u3063\u3066\u306f\u6577\u5c45\u304c\u9ad8\u3044\u3053\u3068\u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>Serverspec \u306f Ruby \u306e\u5185\u90e8DSL\u3068\u3057\u3066\u5b9f\u88c5\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u308c\u306b\u3088\u308a Ruby \u306e\u67d4\u8edf\u6027\u3092\u6301\u3063\u3066\u3044\u308b\u3068\u8a00\u3048\u307e\u3059\u304c\u3001\u9006\u306b\u8a00\u3046\u3068 Ruby \u3067\u3067\u304d\u308b\u3053\u3068\u306a\u3089\u306a\u3093\u3067\u3082\u51fa\u6765\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br \/>\nRuby \u306e\u69cb\u6587\u30a8\u30e9\u30fc\u306b\u60a9\u307e\u3055\u308c\u305f\u308a\u3001\u610f\u56f3\u3057\u306a\u3044\u52d5\u304d\u3092\u3055\u308c\u305f\u308a\u3057\u3066\u3057\u307e\u3063\u3066\u306f\u30c6\u30b9\u30c8\u3092\u66f8\u304f\u3053\u3068\u306f\u6577\u5c45\u304c\u9ad8\u304f\u611f\u3058\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<h2>\u89e3\u6c7a\u7b56<\/h2>\n<p>\u4eca\u56de\u30ea\u30ea\u30fc\u30b9\u3057\u305f Serverspec Generator \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4e0a\u8a18\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<br \/>\nServerspec Generator \u3067\u306f\u3001GUI \u304b\u3089 Serverspec \u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h2>\n<p><a href=\"https:\/\/github.com\/skyarch-networks\/serverspec-generator-app\/releases\/latest\">https:\/\/github.com\/skyarch-networks\/serverspec-generator-app\/releases\/latest<\/a><\/p>\n<p>\u4e0a\u8a18\u30ea\u30f3\u30af\u304b\u3089\u304a\u4f7f\u3044\u306eOS\u306b\u5408\u3063\u305f\u5727\u7e2e\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u5c55\u958b\u3057\u305f\u30d5\u30a9\u30eb\u30c0\u306b\u5b58\u5728\u3059\u308b\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3053\u3068\u3067\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<p>Serverspec Generator \u3092\u8d77\u52d5\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u9762\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<a href=\"http:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341089.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341089.png\" alt=\"serverspec-generator\" width=\"804\" height=\"604\" class=\"alignnone size-full wp-image-5520\" srcset=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341089.png 804w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341089-300x225.png 300w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><\/a>\n<p>\u307e\u305a\u306f\u3001Add Resource \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066 Resource \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u30c6\u30b9\u30c8\u3057\u305f\u3044\u5bfe\u8c61\u306e Resource \u3092\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u304b\u3089\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<a href=\"http:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341125.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341125.png\" alt=\"serverspec-generator-resource\" width=\"374\" height=\"433\" class=\"alignnone size-full wp-image-5521\" srcset=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341125.png 374w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341125-259x300.png 259w\" sizes=\"auto, (max-width: 374px) 100vw, 374px\" \/><\/a>\n<p>Resource \u3092\u9078\u629e\u3057\u305f\u3089\u3001\u6b21\u306f Add It \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066 it \u30d6\u30ed\u30c3\u30af\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<br \/>\n\u305d\u3057\u3066\u3001\u5148\u307b\u3069\u3068\u540c\u3058\u3088\u3046\u306b\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u304b\u3089\u30c6\u30b9\u30c8\u3057\u305f\u3044\u9805\u76ee\u306ematcher\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<a href=\"http:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341314.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341314.png\" alt=\"serverspec-generator-matcher\" width=\"347\" height=\"515\" class=\"alignnone size-full wp-image-5522\" srcset=\"https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341314.png 347w, https:\/\/www.skyarch.net\/blog\/wp-content\/uploads\/2015\/12\/1450341314-202x300.png 202w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/a>\n<p>matcher \u306b\u4f55\u304b\u5f15\u6570\u3092\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001\u81ea\u52d5\u7684\u306b\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u304c\u73fe\u308c\u307e\u3059\u3002<br \/>\n\u3053\u3053\u306b\u9069\u5f53\u306a\u5024\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u3001\u3072\u3068\u3064\u306e\u30c6\u30b9\u30c8\u304c\u5b8c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b Save as File \u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3053\u3068\u3067\u3001\u4f5c\u6210\u3057\u305f Serverspec \u3092\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<hr \/>\n<p>\u3053\u308c\u3060\u3051\u3067\u4e00\u3064\u306e\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u304a\u305d\u3089\u304f\u3001\u6700\u521d\u306b\u6319\u3052\u305f\u554f\u984c\u70b9\u304c\u89e3\u6c7a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3069\u306e\u3088\u3046\u306a Resource\/matcher \u304c\u5b58\u5728\u3059\u308b\u304b\u306f\u3001\u305d\u308c\u3089\u306e\u4e00\u89a7\u304c\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u7c21\u5358\u306b\u5224\u5225\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001GUI\u304b\u3089\u81ea\u52d5\u3067 Serverspec \u3092\u751f\u6210\u3059\u308b\u305f\u3081\u3001Ruby \u306e\u30b3\u30fc\u30c9\u3092\u76f4\u63a5\u66f8\u304f\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br \/>\n\u305d\u306e\u305f\u3081\u3001\u975e\u5e38\u306b\u304a\u624b\u8efd\u306b Serverspec \u306e\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\uff01\u305c\u3072\u304a\u8a66\u3057\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002 \u672c\u65e5\u306f Serverspec \u4f5c\u6210\u88dc\u52a9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30ea\u30ea\u30fc\u30b9\u3057\u305f\u306e\u3067\u304a\u77e5\u3089\u305b\u3044\u305f\u3057\u307e\u3059\u3002 skyarch-networks\/serverspec-generator-app GitHub \u306f\u3058\u3081\u306b Se&#8230;<\/p>\n","protected":false},"author":1,"featured_media":5526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"5519","footnotes":""},"categories":[16,83,9],"tags":[98,118,68,40,46],"class_list":{"0":"post-5519","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ci-","8":"category-devops","9":"category-dev","10":"tag-ruby","11":"tag-serverspec","12":"tag-68","13":"tag-40","14":"tag-46","15":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/5519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=5519"}],"version-history":[{"count":4,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/5519\/revisions"}],"predecessor-version":[{"id":5765,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/5519\/revisions\/5765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/5526"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=5519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=5519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=5519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}