问题标签 [berksfile]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
641 浏览

chef-infra - Chef-solo:缺少运行列表的食谱

我想开始使用chef-solo. 我还配置了solo.rband node.json

每当我运行命令时:chef-solo -c solo.rb -j node.json 我收到以下错误消息:

节点.json:

独奏.rb:

我的 metadata.json 的内容(食谱:build-essential):

我很感激任何帮助。非常感谢。

更新:厨师-stacktrace.out:

伯克斯文件

0 投票
1 回答
927 浏览

ruby - Chef - 在现有食谱上生成 Berksfile

食谱上缺少 Berksfile,这就是为什么我想创建一个新的,我只想在现有食谱上生成一个 Berksfile。所以当我尝试运行命令时: berks cookbook name_of_my_cookbook

我收到以下 /opt/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems.rb:271: in find_spec_for_exe: can't find gem berkshelf (>= 0.a) (Gem::GemNotFoundException) from /opt/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems.rb:299:in activate_bin_path from /usr/local/bin/berks:23:in错误

我尝试通过再次安装berkshelf,gem install berkshelf但收到另一条错误消息: ERROR: Error installing berkshelf: There are no versions of solve (~> 4.0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for? solve requires Ruby version >= 2.1.0. The current ruby version is .

我没有其他想法来解决这个问题。我是这方面的新手,所以我很感激任何帮助。

0 投票
1 回答
1424 浏览

chef-infra - Berks:无法满足对 package 的约束,该约束不存在,

我有一个非常小的例子。1 个带有 1 个食谱和 1 个 ohai 插件文件的食谱,但在运行厨房时出现错误运行 berks/berks 安装或收敛

我确实安装了 ohai gem:

该插件位于 ./files/default/apache_modules.rb 中:

错误是:

注意第一行,包和逗号之间有一个空格。所以我不知道它在抱怨什么包裹。

我的食谱名为 apache,有 1 个配方 default.rb:

元数据.rb:

伯克斯文件:

我的 Berksfile 和 metadata.rb 都在 cookbooks/apache 目录中

建议?

谢谢,

安德鲁

0 投票
1 回答
476 浏览

timeout - Chef Berks Install (Berkshelf) Timesout contacting Artifactory repository (Faraday Timeout / Actor Crashed)

Artifactory 5.8.4 Professional

Chef Development Kit Version: 1.1.16

chef-client version: 12.17.44

delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103)

berks version: 5.2.0

kitchen version: 1.14.2

In Artifactory, I have this repository (virtual): avirtual-repo

Berksfile contains:

When, I'm running berks install, it sometimes succeeds (takes time to fetch cookbook and dependent cookbook versions that it finds during berks install process) and most of the times, it fails with the following Timeout error messages.

For a successful run in Jenkins for berks intsall: I see this:

For a FAILED run of berks intstall in Jenkins: I see the following errors:

Error messages: /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/httpclient-2.8.3/lib/httpclient/session.rb:805:in `gets': execution expired ( Faraday::TimeoutError )

[2019-03-06T10:25:27.447804 #74360] ERROR -- : Actor crashed!

[2019-03-06T10:25:37.451708 #74360] ERROR -- : Couldn't cleanly terminate all actors in 10 seconds!

Full Console output of Failed run:

Looking at the source code of the gems .rb file, I see somewhere it talks about Timeout limit being 600 (seconds), but I think that's enough as during a successful run, everything works within 1-3 minutes. A failed run takes about 6-7 minutes before it finally times out by killing the whole single process thread.

0 投票
1 回答
80 浏览

dependencies - berks install - Artifactory - Fetching cookbook index from ARTIFACTORY_URL/api/chef/some-chef-repo HANGS

Artifactory version: Artifactory Professional 6.11.3 rev 61103900

Linux: Red Hat Enterprise Linux Server release 6.10 (Santiago)

berks install --debug just hangs at the following line (and spits no errors/warnings/etc):

Full log showing some previous log lines are:

and this process step is just sitting here for last 2+ hours.

I couldn't find anything in Artifactory's log or berks install --debug which could point why this is happening and hanging!



My Berksfile:

0 投票
0 回答
147 浏览

chef-infra - 是否可以在厨师食谱中同时使用 Berksfile 和 Policyfile?

有没有办法将 Berksfile 和 Policyfile 保存在厨师食谱中,以及控制在厨师运行期间使用哪个依赖管理引擎?