Questions tagged [berkshelf]

Manage a Cookbook or an Application's Cookbook dependencies

Berkshelf can either mean the Berkshelf toolchain, or the directory location ("the Berkshelf") where you do the management. This location will typically contain files called Berksfile and Berksfile.lock.

218 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
21
votes
4 answers

Vagrant: Network type 'bridged' is invalid. Please use a valid network type

Can anyone explain why I am getting the following error "Vagrant: Network type 'bridged' is invalid. Please use a valid network type." when I try to bring vagrant up on Virtual Box with the following Vagrantfile # -*- mode: ruby -*- # vi: set…
Noel King
  • 545
  • 2
  • 4
  • 9
17
votes
4 answers

Why can't chef resolve my cookbooks?

Intro I am learning Chef to automate the server management at work. I downloaded chefdk 3.0 from here and now I am trying to build my first cookbook using chef. Important I am using this in a Windows environment for testing purpose, I do expect it…
JSBach
  • 4,679
  • 8
  • 51
  • 98
15
votes
4 answers

chef-client cannot find cookbooks using berkshelf

I'm new to chef and ran into problems with berkshelf and chef-client. I want to have my own cookbook with dependencies and apply it. My initial cookbook looks like this: . ├── Berksfile ├── Berksfile.lock ├── chefignore ├── client.rb ├── Gemfile ├──…
have_a_question
  • 153
  • 1
  • 5
14
votes
2 answers

How to use hand-written cookbooks when using berkshelf in chef?

I'm using vagrant+chef. My chef cookbooks worked perfectly. Then I installed vagrant-berkshelf plugin and from that moment I could not use own cookbooks. Berkshelf overrides cookbooks directory and chef does not see my cookbooks when I use them. My…
Daniil
  • 5,760
  • 5
  • 18
  • 29
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
8
votes
1 answer

How can I programmatically query Vagrant for its provisioning status?

The Goal I am attempting to conditionally run the vagrant-berkshelf plugin. By default, enabling the plugin causes Berkshelf to resolve and vendor cookbooks on every single vagrant up (which is a relatively expensive operation) even if the current…
Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199
6
votes
4 answers

I have installed chef-dk and started using berkshelf but berks upload failed

I have installed chef client 12.0.3, on top of it I have install chef-dk version 0.3.5 but why chef-dk is installing chef client version Chef: 11.18.0.rc.1 Unable to Upload cookbooks to chef server berks shelf list is working but berks upload…
user60679
  • 709
  • 14
  • 28
6
votes
1 answer

Is there a way to use private git repository with Berkshelf

I created a cookbook named foo, and want to use with Berkshelf. I wrote like this in Berksfile: cookbook 'foo', git: 'https://bitbucket.org/ironsand/cookbook-foo.git' Then vendor the cookbook to cookbooks directory, but it failed with error like…
ironsand
  • 14,329
  • 17
  • 83
  • 176
5
votes
2 answers

Resolve recursive git cookbook dependencies with Berkshelf

tl;dr version: Is Berkshelf able to resolve recursive dependencies within Git-based cookbooks and if yes - how? I try to manage my Chef cookbook dependencies with Berkshelf. The cookbooks are all stored in internal Git repositories. The dependencies…
Michael Lihs
  • 7,460
  • 17
  • 52
  • 85
5
votes
2 answers

How do you mock OpsWorks specific services/dependencies when developing locally with Kitchen and Chef?

I'm writing Chef wrappers around some of the built in OpsWorks cookbooks. I'm using Berkshelf to clone the OpsWorks cookbooks from their github repo. This is my Berksfile: source 'https://supermarket.getchef.com' metadata def…
5
votes
1 answer

chef solo - vagrant build error

Ive been struggling with this for hours and dont seem to be making any progress. Any tips on where I should start debugging this would be appreciated. I am attempting to provision a vagrant machine and get the following error. `==> default: Running…
RMcNairn
  • 491
  • 1
  • 5
  • 20
5
votes
1 answer

Provision developer environment with chef server and vagrant without registering node

I wish to create a developer environment of a web based application which will have an application server and database server installed on a VM using vagrant. I am using open source chef server and vagrant with chef_client provisioner. However each…
Vaibhav
  • 569
  • 6
  • 31
5
votes
1 answer

Nginx cookbook v 2.0.0: Cookbook http_gzip_static_module not found

I'm using berkshelf to manage cookbooks, chef 11.6.2, and nginx cookbook v 2.0.0 my settings to compile nginx from source: set[:nginx][:source][:modules] = ["http_gzip_static_module", "http_ssl_module"] The provisioning gives me the error: Cookbook…
DungHuynh
  • 118
  • 1
  • 7
5
votes
2 answers

Berkshelf cookbooks are not being copied to the Vagrant directory

I am trying to provision a Vagrant machine using Chef-solo, Berkshelf, and the vagrant-berkshelf plugin. However, the provisioning fails with this error: Berkshelf::CookbookNotFound: Cookbook not found in any of the default…
kries
  • 164
  • 1
  • 9
1
2 3
14 15