{"id":253334,"date":"2015-03-18T17:44:03","date_gmt":"2015-03-18T13:44:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=253334"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=253334","title":{"rendered":"\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c Chef cookbook. \u0427\u0430\u0441\u0442\u044c 1"},"content":{"rendered":"<p>     \t<img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/f07\/4a5\/86e\/f074a586efd34a008187a0732bd7d2c8.png\" align=\"left\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441\u0435\u0440\u0438\u044e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e Devops, Chef, infrastructure as code \u0438 \u0432\u0441\u0435\u043c \u0442\u0430\u043a\u043e\u043c. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2013 \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0437 \u0442\u0440\u0435\u0445 \u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 Chef. \u0426\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0442\u0435\u043c, \u043a\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 Chef \u0438 \u0445\u043e\u0447\u0435\u0442 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<p>  \u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f <em>infrastructure as code<\/em> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437 \u043c\u0438\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f. \u041f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2013 \u043e\u0431\u0449\u0438\u0435 \u043a\u0443\u043a\u0431\u0443\u043a\u0438. \u041a\u043e\u0434 \u043a\u0443\u043a\u0431\u0443\u043a\u043e\u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0444\u0438\u043a\u0441\u044f\u0442\u0441\u044f \u0431\u0430\u0433\u0438, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u0443\u043a\u0431\u0443\u043a \u0438 \u0442\u0435\u0441\u0442 \u043a \u043d\u0435\u043c\u0443.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h3>\u0427\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c<\/h3>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<ol>\n<li><strong>Ruby Style Guide<\/strong>. \u0412 Ruby \u043c\u0438\u0440\u0435 \u043d\u0435\u0442 style guide \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/bbatsov\/ruby-style-guide\">style guide \u043e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/a>. \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u0434 \u043a\u0443\u043a\u0431\u0443\u043a\u043e\u0432 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u043d\u0430 ruby, \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435;<\/li>\n<li><strong>Cookbook linter.<\/strong> \u0417\u0430 \u0432\u0440\u0435\u043c\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f chef \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0438 \u0430\u043d\u0442\u0438-\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432, \u0438\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u0443\u043a\u0431\u0443\u043a\u0430;<\/li>\n<li><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043a\u0443\u043a\u0431\u0443\u043a\u043e\u0432, \u043f\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043a\u0443\u043a\u0431\u0443\u043a\u0430\u043c\u0438.<\/li>\n<\/ol>\n<p>  <\/p>\n<h4>Ruby Style Guide<\/h4>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 ruby \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 style guide \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 <strong>Rubocop<\/strong>.<br \/>  \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <em>gem install rubocop<\/em>, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 &#8216;<em>rubocop .<\/em>&#8216;, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0446\u0438\u0435\u0439 <em>-a<\/em>.<br \/>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0442\u043e \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b <em>.rubocop.yml<\/em> \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u043d\u0435\u043c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440. \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <em>test<\/em> \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0434\u043b\u0438\u043d\u0443 \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430 <em>spec_helper.rb:<\/em>  <\/p>\n<pre><code class=\"bash\">MethodLength:   Exclude:     - 'test\/**\/spec_helper.rb' <\/code><\/pre>\n<p>  <\/p>\n<h4>Cookbook linter<\/h4>\n<p>  \u0421\u0442\u0438\u043b\u044c \u043a\u0443\u043a\u0431\u0443\u043a\u043e\u0432 \u0438 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <strong>Foodcritic<\/strong>. \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <em>gem install foodcritic<\/em>, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <em>foodcritic &lt;\u043f\u0443\u0442\u044c \u0434\u043e \u043a\u0443\u043a\u0431\u0443\u043a\u0430&gt;<\/em><br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b:  <\/p>\n<pre><code class=\"bash\">foodcritic . FC017: LWRP does not notify when updated: .\/providers\/default.rb:32 <\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 Foodcritic \u043d\u0430\u0448\u0435\u043b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"http:\/\/acrmp.github.io\/foodcritic\/\">http:\/\/acrmp.github.io\/foodcritic\/<\/a> \u0435\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e.<\/p>\n<h4>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Chef \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <strong>Test Kitchen<\/strong>, <a href=\"http:\/\/kitchen.ci\">http:\/\/kitchen.ci<\/a>. \u042d\u0442\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0440\u0435\u0434\u0443 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b. \u0412 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Test Kitchen \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u0432 \u043d\u0435\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 chef-client \u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f chef-run \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b.<br \/>  \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Vagrant. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Vagrant. \u041f\u043e\u043c\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d Test Kitchen \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c\u0438 \u043e\u0431\u043b\u0430\u043a\u0430\u043c\u0438.<br \/>  \u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a\u043e\u0432. \u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f Bats, shUnit2, RSpec \u0438 Serverspec. \u042f\u0437\u044b\u043a \u0442\u0435\u0441\u0442\u043e\u0432 Bash(Bats, shUnit2) \u0438\u043b\u0438 Ruby( RSpec, Serverspec). \u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u0443\u043a\u0431\u0443\u043a \u043c\u043e\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Test Kitchen<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 chef \u043a\u0443\u043a\u0431\u0443\u043a\u0430\u043c\u0438 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>Chef Development Kit<\/strong>. ChefDK \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044e \u044f\u0437\u044b\u043a\u0430 ruby \u0438 \u0432\u0441\u0435\u0445 \u0433\u0435\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b chef. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u043d\u0441\u0442\u0430\u043b\u044f\u0446\u0438\u044f chef \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0443\u0431\u0438, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043a\u0440\u043e\u0441\u0441-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 gem-\u043e\u0432 \u0438 \u0438 \u0442\u0434.<br \/>  \u0412 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0443 ChefDK \u0432\u0445\u043e\u0434\u0438\u0442 \u0441\u0430\u043c chef \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u0433\u0435\u043c\u043e\u0432. \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0433\u0435\u043c\u0430 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0442\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<br \/>  <em>chef gem install &lt;\u0438\u043c\u044f \u0433\u0435\u043c\u0430&gt;<\/em>.<br \/>  \u0421\u043a\u0430\u0447\u0430\u0442\u044c ChefDK \u043f\u043e\u0434 \u0432\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0442\u0443\u0442: <a href=\"https:\/\/downloads.chef.io\/chef-dk\/\">https:\/\/downloads.chef.io\/chef-dk\/<\/a><\/p>\n<h3>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u0443\u043a\u0431\u0443\u043a<\/h3>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u0443\u043a\u0431\u0443\u043a <em>deploy-user<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <em>deployer<\/em> \u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u044e\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/home\/deployer. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e(\u0438 \u043d\u0443\u0436\u043d\u043e) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u043a\u0443\u043a\u0431\u0443\u043a\u0430\u043c <a href=\"https:\/\/supermarket.chef.io\">\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/a>.<br \/>  \u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043a\u0435\u043b\u0435\u0442\u0430 \u043a\u0443\u043a\u0431\u0443\u043a\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: <em>chef generate cookbook deploy-user<\/em>. \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e deploy-user \u0441 \u043a\u0443\u043a\u0431\u0443\u043a\u043e\u043c.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0447\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0435\u043b\u0435\u0442?<\/b><\/p>\n<div class=\"spoiler_text\">\u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u043a\u0443\u043a\u0431\u0443\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <em><\/p>\n<pre>knife cookbook create &lt;name&gt;<\/pre>\n<p><\/em> \u2013 \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043a\u0443\u043a\u0431\u0443\u043a \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 knife, \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043a\u0435\u043b\u0435\u0442 \u0442\u0435\u0441\u0442\u043e\u0432, \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 chefignore \u0444\u0430\u0439\u043b, \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0437\u0430\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0438\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u043f\u043e\u0434 \u0432\u0441\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 chef. \u0425\u043e\u0442\u044f, \u0432 2010-\u043e\u043c \u0433\u043e\u0434\u0443 \u0438 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0443\u0442\u043e =)<br \/>  <em><\/p>\n<pre>berks cookbook &lt;name&gt;<\/pre>\n<p><\/em> \u2013 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043a\u0435\u043b\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b berkshelf(\u044d\u0442\u043e \u043a\u0430\u043a bundler \u0432 ruby \u043c\u0438\u0440\u0435)<br \/>  <em><\/p>\n<pre>chef generate cookbook &lt;name&gt;<\/pre>\n<p><\/em> \u2013 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u043a\u0435\u043b\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b chef \u0438\u0437 ChefDK.<br \/>  berks cookbook \u0438 chef generate \u0434\u0435\u043b\u0430\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u043d\u043e \u0438 \u0442\u043e\u0436\u0435. \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u043c\u0435\u043b\u043e\u0447\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e.<br \/>  \u0412 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0439 Thor\/Rack \u0442\u0430\u0441\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0447\u0442\u0435\u0442 \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f.  <\/div>\n<\/div>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>attributes<\/em> \u0438 \u0444\u0430\u0439\u043b <em>default.rb<\/em> \u0432 \u043d\u0435\u0439. \u0412 \u0444\u0430\u0439\u043b\u0435 default.rb \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0435\u0433\u043e shell.<br \/>  <em>attributes\/default.rb<\/em>:  <\/p>\n<pre><code class=\"ruby\">default['deploy-user']['username'] = 'deployer' default['deploy-user']['shell'] = '\/bin\/bash' <\/code><\/pre>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 <em>recipes\/default.rb<\/em> \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 user \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0435\u043c\u0443 \u043d\u0430\u0448\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<br \/>  <em>recipes\/default.rb<\/em>:  <\/p>\n<pre><code class=\"ruby\">user node['deploy-user']['username'] do   shell node['deploy-user']['shell']   supports manage_home: true end <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a\u0443\u043a\u0431\u0443\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<\/p>\n<h3>kitchen.yml<\/h3>\n<p>  \u0412\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f Test Kitchen \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c .kitchen.yml. \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u043e\u043d \u0431\u044b\u043b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <em>chef<\/em>.<br \/>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c\u0443 .kitchen.yml.<br \/>  \u041a\u043e\u043d\u0444\u0438\u0433 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043d\u0430 \u0441\u0435\u043a\u0446\u0438\u0438, \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 <strong>.kitchen.yml<\/strong>:  <\/p>\n<pre><code class=\"ruby\">--- driver:   name: vagrant  provisioner:   name: chef_zero  platforms:   - name: ubuntu-12.04   - name: centos-6.5  suites:   - name: default     run_list:       - recipe[deploy-user::default]     attributes:  <\/code><\/pre>\n<p>  \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>driver<\/strong> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u0412 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Vagrant.<\/p>\n<p>  \u0412 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>provisioner<\/strong> \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u0443\u043a\u0431\u0443\u043a\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Chef \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430, chef-solo \u0438 chef-zero. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c chef-solo \u0431\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Chef \u0441\u0442\u0430\u0432\u0438\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u043a\u0443\u043a\u0431\u0443\u043a \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 Chef 12, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e <em>require_chef_omnibus: 11.18.6<\/em>.<\/p>\n<p>  \u0421\u0435\u043a\u0446\u0438\u044f <strong>platforms<\/strong> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043a\u0430\u043a\u0438\u0445 \u041e\u0421 \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0448 \u043a\u0443\u043a\u0431\u0443\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Ubuntu 14.04 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a: &#8216;<em> \u2014 name: ubuntu-14.04<\/em>&#8216;.<\/p>\n<p>  <strong>\u0412\u0410\u0416\u041d\u041e<\/strong> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0432\u043e\u0438 vagrant box-\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0442\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0443 \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440: \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440 Parallels Desktop \u0438 custom box.  <\/p>\n<pre><code class=\"ruby\">platforms:   - name: ubuntu-14.04     driver:       provider: parallels       box: express42\/ubuntu-14.04 <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438(<em>company\/image<\/em>) \u043e\u0431\u0440\u0430\u0437 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <a href=\"https:\/\/atlas.hashicorp.com\">https:\/\/atlas.hashicorp.com<\/a>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e url box-\u0430 \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0446\u0438\u044e <em>box_url<\/em>.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0435\u043a\u0446\u0438\u044f <strong>suites<\/strong> \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u0442\u0435\u0441\u0442\u043e\u0432. \u0423 \u043d\u0430\u0441 \u043e\u0434\u0438\u043d suite \u0441 \u0438\u043c\u0435\u043d\u0435\u043c default. \u0412 \u043d\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d run-list \u0441 \u043e\u0434\u043d\u0438\u043c \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u043c <em>deploy-user::default<\/em>. \u042d\u0442\u043e \u0442\u043e\u0442 \u0440\u0435\u0446\u0435\u043f\u0442, \u0432 \u043a\u043e\u0442\u043e\u043c \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Test Kitchen<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0430\u0448\u0435\u0439 \u043a\u0443\u0445\u043d\u0435\u0439.<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0430\u0448\u0438\u043d \u0438 \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <em>kitchen list<\/em>. \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0443 \u043d\u0430\u0441 \u043e\u043f\u0438\u0441\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d suite, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0435 \u043c\u0430\u0448\u0438\u043d\u044b: default-ubuntu-1404 \u0438 default-centos-70. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d suite, \u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0448\u0438\u043d \u0431\u044b \u0443\u0434\u0432\u043e\u0438\u043b\u043e\u0441\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u0448\u0438\u043d \u0440\u0430\u0432\u043d\u043e: \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e <em>suites<\/em> \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e <em>platforms<\/em><\/p>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <em>kitchen converge<\/em> \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0432\u0441\u0435\u0445 suites \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0434\u0438\u043d suite \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a: <em>kitchen converge default-ubuntu-1404<\/em>. \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <em>kitchen destroy<\/em>.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u0430\u043a \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443<\/b><\/p>\n<div class=\"spoiler_text\">\u0417\u0430\u0431\u0430\u0432\u043d\u044b\u0439 \u0444\u0430\u043a\u0442, \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 Test Kitchen \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u044b \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044f \u0438\u0445. \u041d\u0430 Github \u043e\u0431 \u044d\u0442\u043e\u043c \u0435\u0441\u0442\u044c \u044d\u043f\u0438\u0447\u043d\u0430\u044f \u0441\u0430\u0433\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 <s>\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445<\/s> issue <a href=\"https:\/\/github.com\/test-kitchen\/test-kitchen\/issues\/350\">https:\/\/github.com\/test-kitchen\/test-kitchen\/issues\/350<\/a>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <em>kitchen converge<\/em> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u043c <em>default.rb<\/em> \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0443\u043a\u0431\u0443\u043a\u0430 <em>deploy-user<\/em>.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u043a\u043e\u0434\u0435 \u043a\u0443\u043a\u0431\u0443\u043a\u0430 \u0435\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, chef-run \u043f\u0440\u0435\u0440\u0432\u0435\u0442\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u0432\u0430\u043b\u043e \u043e\u0448\u0438\u0431\u043a\u0443. \u0421\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e chef-run \u043f\u0440\u043e\u0448\u0435\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e =). \u0414\u0430\u043b\u0435\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e-\u043b\u0438 suite \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438 \u0441\u0434\u0435\u043b\u0430\u043b, \u0447\u0442\u043e \u043c\u044b \u043e\u0442 \u043d\u0435\u0433\u043e \u0436\u0434\u0430\u043b\u0438. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>kitchen login default-ubuntu-1404<\/em> \u0432\u043e\u0439\u0434\u0435\u043c \u043d\u0430 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043c\u0430\u0448\u0438\u043d.<\/p>\n<p>  \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <em>getent passwd deployer<\/em>:  <\/p>\n<pre><code class=\"bash\">deployer:x:1001:1001::\/home\/deployer:\/bin\/bash <\/code><\/pre>\n<p>  \u0418 \u043f\u0440\u0430\u0432\u0434\u0430, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c deployer \u0441\u043e\u0437\u0434\u0430\u043d, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u043d\u0430\u044f home \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u043c \u043d\u0430\u043c shell.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0430 home \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0438 \u0443 \u043d\u0435\u0435 \u0432\u0435\u0440\u043d\u044b\u0439 \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446, \u0433\u0440\u0443\u043f\u043f\u0430 \u0438 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <em>ls -lah \/home\/deployer\/<\/em>.  <\/p>\n<pre><code class=\"bash\">drwxr-xr-x 2 deployer deployer 4096 Mar 15 23:12 . drwxr-xr-x 4 root     root     4096 Mar 15 23:12 .. -rw-r--r-- 1 deployer deployer  220 Apr  8  2014 .bash_logout -rw-r--r-- 1 deployer deployer 3637 Apr  8  2014 .bashrc -rw-r--r-- 1 deployer deployer  675 Apr  8  2014 .profile <\/code><\/pre>\n<p>  \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0438\u043c\u0435\u0435\u0442 \u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430, \u0433\u0440\u0443\u043f\u043f\u0443 \u0438 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<p>  \u0423\u0440\u0430, \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0443\u043c\u0435\u0435\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0443\u043a\u0431\u0443\u043a\u0438!<\/p>\n<p>  \u0428\u0443\u0442\u043a\u0430 =)<\/p>\n<h4>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>kitchen verify<\/em> \u0438 <em>kitchen test<\/em>.<\/p>\n<p>  <em>kitchen verify<\/em> \u0441\u0442\u0430\u0432\u0438\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u044c vm \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0448\u0438 \u0442\u0435\u0441\u0442\u044b \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <em>verify<\/em>.<\/p>\n<p>  <em>kitchen test<\/em> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c <strong>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f kitchen destroy<\/strong>, \u0435\u0441\u043b\u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430, \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f suites, \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u044b \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f destroy. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e destroy \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0442\u0435\u0441\u0442\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0422\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0446\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>kitchen test<\/em>.<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0438 \u0434\u043d\u0438 \u043a\u0443\u043a\u0431\u0443\u043a\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c Serverspec, <a href=\"http:\/\/serverspec.org\">http:\/\/serverspec.org<\/a>. Serverspec \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 RSpec, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c serverspec \u043b\u044e\u0434\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c RSpec(\u043a\u0430\u043a \u0438 \u043d\u0430 bash).<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <em>kitchen verify<\/em>, \u0442\u043e \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u043d\u0430\u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442:<\/p>\n<pre><code class=\"ruby\">       deploy-user::default          does something (PENDING: Replace this with meaningful tests)         Pending: (Failures listed here are expected and do not affect your suite's status)           1) deploy-user::default does something             # Replace this with meaningful tests             # \/tmp\/busser\/suites\/serverspec\/default_spec.rb:8          Finished in 0.00185 seconds (files took 0.3851 seconds to load)        1 example, 0 failures, 1 pending         Finished verifying &lt;default-ubuntu-1404&gt; (0m36.87s). <\/code><\/pre>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b <em>test\/integration\/default\/serverspec\/default_spec.rb<\/em> \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u0435\u0441\u0442 \u043d\u0430 \u043d\u0430\u0448 \u043a\u0443\u043a\u0431\u0443\u043a:  <\/p>\n<pre><code class=\"ruby\">require 'spec_helper'  describe 'deploy-user::default' do    describe user('deployer') do     it { should exist }     it { should have_home_directory '\/home\/deployer' }     it { should have_login_shell '\/bin\/bash' }   end    describe file('\/home\/deployer') do     it { should be_directory }     it { should be_mode 755 }     it { should be_owned_by 'deployer' }     it { should be_grouped_into 'deployer' }   end  end <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<br \/>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <em>deployer<\/em> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u0438\u043c\u0435\u0442\u044c home \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <em>\/home\/deployer<\/em>, \u0438 \u0438\u043c\u0435\u0442\u044c shell <em>\/bin\/bash<\/em>.<br \/>  <em>\/home\/deployer<\/em> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439, \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 755, \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 <em>deployer<\/em> \u0438 \u0433\u0440\u0443\u043f\u043f\u0443 <em>deployer<\/em>.<\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u043e\u0448\u0438\u0431\u043b\u0438\u0441\u044c, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <em>kitchen verify<\/em> \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"ruby\">deploy-user::default          User &quot;deployer&quot;            should exist            should have home directory &quot;\/home\/deployer&quot;            should have login shell &quot;\/bin\/bash&quot;          File &quot;\/home\/deployer&quot;            should be directory            should be mode 755            should be owned by &quot;deployer&quot;            should be grouped into &quot;deployer&quot;         Finished in 0.10972 seconds (files took 0.306 seconds to load)        7 examples, 0 failures         Finished verifying &lt;default-ubuntu-1404&gt; (0m1.92s). <\/code><\/pre>\n<p>  \u0423\u0440\u0430, \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0443\u043c\u0435\u0435\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0443\u043a\u0431\u0443\u043a\u0438!<\/p>\n<h4>\u0411\u043e\u043d\u0443\u0441. Unit \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u043c\u0438\u0440\u0435 \u0421hef \u0442\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 unit \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0414\u043b\u044f \u043d\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 chefspec, <a href=\"http:\/\/sethvargo.github.io\/chefspec\/\">http:\/\/sethvargo.github.io\/chefspec\/<\/a>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 Test Kitchen \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 chef-run \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0443 \u0438 \u0442\u0430\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0442\u044c \u0432 \u043b\u044e\u0431\u043e\u0439 CI \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c LWRP.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0438\u0436\u0435.<\/p>\n<p>  <em>spec\/unit\/recipes\/default_spec.rb<\/em>  <\/p>\n<pre><code class=\"ruby\">require 'spec_helper'  describe 'deploy-user::default' do      let(:chef_run) do       runner = ChefSpec::ServerRunner.new       runner.converge(described_recipe)     end      it 'converges successfully' do       chef_run # This should not raise an error     end      it 'creates a user deployer with home &quot;\/home\/deployer&quot; and shell &quot;\/bin\/bash&quot;' do       expect(chef_run).to create_user('deployer').with(         home: '\/home\/deployer',         shell: '\/bin\/bash')     end  end <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u0444\u0430\u0439\u043b <em>spec\/spec_helper.rb<\/em> \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 <em>at_exit { ChefSpec::Coverage.report! }<\/em>, \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f.<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 chef exec rspec -c  <\/p>\n<pre><code class=\"ruby\">..  Finished in 0.51553 seconds (files took 3.34 seconds to load) 2 examples, 0 failures  ChefSpec Coverage report generated...    Total Resources:   1   Touched Resources: 1   Touch Coverage:    100.0%  You are awesome and so is your test coverage! Have a fantastic day! <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041a\u043e\u043d\u0435\u0446<\/h3>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e suite, \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c lwrp \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b.<\/p>\n<h4>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u041a\u0430\u043a\u0438\u0435 \u0435\u0449\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 serverspec <a href=\"http:\/\/serverspec.org\/resource_types.html\">http:\/\/serverspec.org\/resource_types.html<\/a><\/li>\n<li>Getting started \u043e\u0442 kitchen.ci <a href=\"http:\/\/kitchen.ci\/docs\/getting-started\/\">http:\/\/kitchen.ci\/docs\/getting-started\/<\/a><\/li>\n<li>ChefSpec \u2013 <a href=\"https:\/\/docs.chef.io\/chefspec.html\">https:\/\/docs.chef.io\/chefspec.html<\/a><\/li>\n<li>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 test \u0438 \u0444\u0430\u0439\u043b\u044b .kitchen.yml \u043e\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u0443\u043a\u0431\u0443\u043a\u043e\u0432 \u043d\u0430 github <a href=\"https:\/\/github.com\/chef-cookbooks\/\">https:\/\/github.com\/chef-cookbooks\/<\/a> \u0438 <a href=\"https:\/\/github.com\/opscode-cookbooks\/\">https:\/\/github.com\/opscode-cookbooks\/<\/a><\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/253139\/\"> http:\/\/habrahabr.ru\/post\/253139\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t<img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/f07\/4a5\/86e\/f074a586efd34a008187a0732bd7d2c8.png\" align=\"left\"\/><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441\u0435\u0440\u0438\u044e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043e Devops, Chef, infrastructure as code \u0438 \u0432\u0441\u0435\u043c \u0442\u0430\u043a\u043e\u043c. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2013 \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0437 \u0442\u0440\u0435\u0445 \u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 Chef. \u0426\u0438\u043a\u043b \u0441\u0442\u0430\u0442\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u0442\u0435\u043c, \u043a\u0442\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 Chef \u0438 \u0445\u043e\u0447\u0435\u0442 \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<p>  \u041a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f <em>infrastructure as code<\/em> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043a \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437 \u043c\u0438\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f. \u041f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2013 \u043e\u0431\u0449\u0438\u0435 \u043a\u0443\u043a\u0431\u0443\u043a\u0438. \u041a\u043e\u0434 \u043a\u0443\u043a\u0431\u0443\u043a\u043e\u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0444\u0438\u043a\u0441\u044f\u0442\u0441\u044f \u0431\u0430\u0433\u0438, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u043c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u0443\u043a\u0431\u0443\u043a \u0438 \u0442\u0435\u0441\u0442 \u043a \u043d\u0435\u043c\u0443.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-253334","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=253334"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/253334\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=253334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=253334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}