草庐IT

chef_environment

全部标签

ruby - Wercker:在 'set up environment' 上构建失败。为什么?

我有一个Jekyll博客,我正试图将其推送到AWSS3存储桶。我关注了thistutorial.构建一直失败。Wercker给我以下错误消息:BuildfailedonmastersetupenvironmentGEThttps://registry.hub.docker.com/v1/repositories/wercker/ruby/imagesreturned404它显示我的wercker.yml文件:box:wercker/rubyno-response-timeout:10build:steps:-bundle-install-script:name:RunJekylldoc

ruby Chef 指令 : include_attribute vs. include_attributes

我在chef属性文件中看到了这段代码。include_recipe"deployment"include_attribute"postgresql"include_attribute"redis"include_attributes"uaa"include_attributes"service_lifecycle"有什么不同?include_attribute与include_attribute*S*我找不到任何关于include_attribute*S*的文档 最佳答案 include_attribute属性用于对收敛时加载属性文

ruby - 属性上的 Chef 错误 - 字符串不匹配

我似乎无法解决处理我的attributes/default.rb文件中类似命名属性的chef错误。我有两个属性:default['test']['webservice']['https']['keyManagerPwd']='password'......default['test']['webservice']['https']['keyManagerPwd']['type']='encrypted'请注意,直到最后一个括号(['type']),名称是相同的。我在模板和配方的模板block中引用这些属性。当我去运行它时,我收到这个错误:========================

ruby - Chef - 使用同一本 Recipe 中的 Recipe

我有Recipebase和Recipemyappbase有2个配方-my_java和java_with_custom_stuff在java_with_custom_stuff中,我想使用my_java的Recipe(相同的Recipe)。像include_recipe'my_java'bash'customstuff'do...end在myapp我做include_recipe"base::java_with_custom_stuff"但它提示找不到my_java有没有办法使用同一本Recipe中的Recipe? 最佳答案 incl

ruby - Chef 独奏示例

我们正在学习chef-solo,需要一个很好的例子来更好地理解。在网上搜索了很多,但想法很困惑。任何人都可以建议一些例子..以及如何运行它们..我们已经安装了chef-0.8.16gem但无法弄清楚如何使用它..我们正在使用windows平台..它紧急.. 最佳答案 Windows平台支持非常新(version0.8.14),因此它在Windows上配置资源的能力相当有限,直到下一个版本将为该平台添加新的资源提供程序。ChefSolo的一个很好的资源是它的pageontheWiki.您还可以从IRCchannel获得帮助和maili

ruby - 如何在 ruby​​_block 中使用另一本 Chef Recipe 中的 Chef 助手库

AWSOpsworks:Chef11.10版,Berkshelf3.2.0版。我不知道如何在RecipeB的ruby_block中使用RecipeA中的帮助程序库。我找到了一个post讨论如何在ruby​​_block和another中包含一个方法讨论如何跨cooking书共享库,但我无法同时工作。cookbookA/libraries/helpers.rbmodulelibraryAmoduleHelpersdeflog(output)Chef::Log.info("#{cookbook_name}:#{recipe_name}:#output}")endendendcookbook

ruby - 如何在 Chef 的 ruby​​_block 中调用 Chef 资源?

我正在尝试调用ruby​​_block中的Chef资源。谁能告诉我这段代码有什么问题?file'/tmp/arockia/storage.txt'doendlines=`cat/tmp/arockia/storage.txt|wc-l`ruby_block'Checkforcontent'doblockdolines=`cat/tmp/arockia/storage.txt|wc-l`ifInteger(lines)==0r=Chef::Resource::Execute.new('Get-Disk-Storage',run_context)r.command'df-kh>>/tmp/

ruby-on-rails - rails config/environments 'config' 在哪里定义?

在config/environments/production.rb(和其他环境)中有:config.eager_load=true和一大堆其他config.foobar调用。但是“配置”从何而来?通常你有这样的东西:SomeClass.eachdo|block_variable|block_variable.some_methodend但对于神秘的“配置”,情况并非如此,它就像一个未在任何地方声明的block变量。打开Rails控制台,当我这样做时:irb(main):001:0>configNameError:undefinedlocalvariableormethod`confi

ruby - Sinatra 和 environment.rb

我正在开发一个基于Sinatra的应用程序,并且看到一些应用程序在应用程序的根目录中使用environment.rb文件,代码放置在配置block中。请参阅示例:https://github.com/zapnap/sinatra-template/blob/master/environment.rb;和https://github.com/andrewkolesnikov/sinatra-pro-template/blob/master/environment.rb.我尝试在Google上搜索但找不到关于environment.rb文件如何与Sinatra一起工作以及为什么要将某些内容

ruby - Chef Recipe 的执行顺序是什么

我正试图了解Chef,但我终其一生都找不到cooking书是如何运作的如果我有文件结构chef-repo├──cookbooks│  └──test│  ├──attributes│  │  ├──default.rb│  │  └──test.rb│  ├──files...│  ├──metadata.rb│  ├──recipes│  │  ├──default.rb│  │  └──test.rb│  └──templates...├──roles│  └──starter.rb└──Vagrantfile如何加载属性以及加载顺序?例如,它加载所有属性(default.rb和t