Questions tagged [berksfile]

The Berksfile is the file that specifies the cookbook dependencies for a Berkshelf

26 questions
63
votes
3 answers

Chef 'cookbook' in Berksfile vs 'depends' in metadata.rb

What's the difference between adding cookbooks to Berksfile using 'cookbook' and adding cookbooks to metadata.rb using 'depends'? For example, if I add to metadata.rb depends 'nginx' do I need to add it to Berksfile using cookbook 'nginx' ?
tokenvolt
  • 1,494
  • 2
  • 14
  • 14
13
votes
1 answer

What exactly does "berks update " do?

According to "berks help update", the command is supposed to: "Update the cookbooks (and dependencies) specified in the Berksfile" (Yes ... that's all it says!). But what exactly does this mean? And how does this vary with different kinds of…
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
3
votes
1 answer

How do I configure a berks API server?

I want to implement the Berks API in my infrastructure, comprise of Jenkins, a Git server, and a Chef 12 Enterprise server. Each cookbook is in it's own repo in the Git server, per the Berkshelf way. Basically, I just want my top level Berksfile to…
Chris F
  • 14,337
  • 30
  • 94
  • 192
2
votes
2 answers

FATAL: NoMethodError: undefined method `unreachable_cookbook?' for nil:NilClass

I am new to chef and started writing a simple recipe using the Users library. My Berksfile: name@name:~/chef-repo$ cat Berksfile site :opscode cookbook "users" and then I ran: berks install and my cookbooks: name@name:~/chef-repo$ ls…
akaphenom
  • 6,728
  • 10
  • 59
  • 109
2
votes
1 answer

Berks install on cookbook cannot find itself

I have started using Berkshelf, it seems to make sense, but I can't wrap my head around how it should work. First I created a cookbook using berks cookbook mycookbook. Then I added a dependency to only find that it cannot find mycookbook when I run…
onknows
  • 6,151
  • 12
  • 65
  • 109
2
votes
1 answer

Installing berks on centos

I am trying to install berks on centos using command: [root@ip~]#gem install berkshelf --no-ri --no-rdoc After installing I have verified whether berks have been installed using the command: [root@ip~]# berks -v -bash: berks: command not…
user3086014
  • 4,241
  • 5
  • 27
  • 56
2
votes
1 answer

Berksfile syntax questions

I've been hunting for detailed documentation on what goes into a Berksfile, but all I've found is examples, and "you can do this" informal stuff. (This includes the material at http://berkshelf.com ...) Q1: What is the basic syntax of a…
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
1
vote
1 answer

Berks: Unable to satisfy constraints on package , which does not exist,

I have a very small example. 1 cookbook with 1 recipe and 1 ohai plugin file but getting errors running berks/berks install or converging when running kitchen I do have the ohai gems installed: chefspec-ohai (0.2.0) ohai (14.2.0) the plugin is in…
KingAndrew
  • 1,164
  • 4
  • 21
  • 41
1
vote
1 answer

Berkshelf - Dependencies from another git repo

I have a cookbook which has a dependency to one of the opsworks cookbooks (in the git repo) which in turn has many dependencies defined in the metadata which also resides in the same repo.I have added the dependency in my cookbook metadata file. But…
1
vote
1 answer

Where should I write `node.default` variable in chef repository?

I want to use [chef-rbenv][1] cookbook. I created a Berksfile in a chef-repo top directory like this: source "https://api.berkshelf.com" cookbook 'rbenv' And installed cookbook by berks vendor cookbooks. Then I added a "recipe[rbenv::user]" to…
ironsand
  • 14,329
  • 17
  • 83
  • 176
1
vote
2 answers

Berkshelf::CommunitySiteError when run berks install

I meet this error sometimes when I run berks install. But it can be run normally sometimes. That is weird.I use Berkshelf(3.1.3). The error is like: E, [2014-07-14T15:36:13.966457 #21077] ERROR -- : Actor crashed! Berkshelf::CommunitySiteError: An…
Tony Han
  • 2,130
  • 3
  • 24
  • 37
1
vote
1 answer

Chef-Repo Berkshelf Confusion Setup

I am soooo confused when it comes to Chef / Berkshelf and need help and advice. What I've found / read there's an underlining assumption with some things with Berkshelf and for the newbie there is a bit of a grey area that needs filling Let me try…
stravze
  • 137
  • 3
  • 13
0
votes
0 answers

Is it possible to use both Berksfile and Policyfile at the same time in a chef cookbook?

Is there a way to keep both the Berksfile and the Policyfile in a chef cookbook and a way to control which dependency management engine to use during chef run?
0
votes
1 answer

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): Fetching cookbook index from…
AKS
  • 16,482
  • 43
  • 166
  • 258
0
votes
1 answer

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…
AKS
  • 16,482
  • 43
  • 166
  • 258
1
2