# Berksfile and metadata.rb

**URL:** <https://discourse.chef.io/t/berksfile-and-metadata-rb/5312>\
**Category:** Chef Infra (archive)\
**Created:** [May 16, 2014, 10:50am UTC](https://discourse.chef.io/t/berksfile-and-metadata-rb/5312 "2014-05-16T10:50:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Gil](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@David\_Gil](https://discourse.chef.io/u/David_Gil)\
**Post date:** [May 16, 2014, 10:50am UTC](https://discourse.chef.io/t/berksfile-and-metadata-rb/5312/1 "2014-05-16T10:50:06Z")

</div>

Hi!

If I add

cookbook ‘apt’

to the Berksfile, do I have to add

depends ‘apt’

to the metadata.rb?

If I understand it correctly, sometimes I may want to add cookbooks to the  
Berksfile (for example, local ones) for the run list in .kitchen.yml, but I may  
not want to add them to the metadata.rb file. I’m a bit confused…

Thanks,

David Gil  
Agència Estatal de Meteorologia a Catalunya

---

<div class="post-metadata">

**Author:** ![Stewart\_Curtis](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/stewart_curtis/32/237_2.png) [@Stewart\_Curtis](https://discourse.chef.io/u/Stewart_Curtis)\
**Post date:** [May 16, 2014, 12:39pm UTC](https://discourse.chef.io/t/berksfile-and-metadata-rb/5312/2 "2014-05-16T12:39:56Z")

</div>

If it’s something your cookbooks are dependent on, not just for tests, then always add it to your metadata.

Otherwise, you can add an :integration group to your Berksfile (and leave the cookbook out of the metadata) and test kitchen will always pickup that group. Granted they’re local cookbooks, you can see the jenkins cookbook ([https://github.com/opscode-cookbooks/jenkins/blob/master/Berksfile](https://github.com/opscode-cookbooks/jenkins/blob/master/Berksfile)) for an example.

Curtis Stewart  
Consultant  
m 217.390.5067  
Skype cstewart8710  
[cstewart@momentumsi.com](mailto:cstewart@momentumsi.com)[mailto:cstewart@momentumsi.com](mailto:cstewart@momentumsi.com)  
[www.momentumsi.com](http://www.momentumsi.com)[http://www.momentumsi.com/](http://www.momentumsi.com/)

[cid:71466434-A311-4F82-BC03-F7D6BA0FA526][http://www.momentumsi.com/](http://www.momentumsi.com/)[http://www.momentumsi.com/](http://www.momentumsi.com/)

Cloud Migration - Architecture - DevOps - Big Data - App Dev

On May 16, 2014, at 5:50 AM, [dgilo@aemet.es](mailto:dgilo@aemet.es)[mailto:dgilo@aemet.es](mailto:dgilo@aemet.es) wrote:

Hi!

If I add

cookbook ‘apt’

to the Berksfile, do I have to add

depends ‘apt’

to the metadata.rb?

If I understand it correctly, sometimes I may want to add cookbooks to the  
Berksfile (for example, local ones) for the run list in .kitchen.yml, but I may  
not want to add them to the metadata.rb file. I’m a bit confused…

Thanks,

David Gil  
Agència Estatal de Meteorologia a Catalunya

---

<div class="post-metadata">

**Author:** ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)\
**Post date:** [May 16, 2014, 2:44pm UTC](https://discourse.chef.io/t/berksfile-and-metadata-rb/5312/3 "2014-05-16T14:44:48Z")

</div>

Right, and in case that example wasn't clear, you can mix-and-match fixture  
cookbooks and regular cookbooks in that :integration clause.

> <https://github.com/juliandunn/oracle-xe/blob/master/Berksfile>

- Julian

On Fri, May 16, 2014 at 7:39 AM, Stewart, Curtis [cstewart@momentumsi.com](mailto:cstewart@momentumsi.com)wrote:

> If it’s something your cookbooks are dependent on, not just for tests,  
> then always add it to your metadata.
> 
> Otherwise, you can add an :integration group to your Berksfile (and  
> leave the cookbook out of the metadata) and test kitchen will always pickup  
> that group. Granted they’re local cookbooks, you can see the jenkins  
> cookbook (  
> [https://github.com/opscode-cookbooks/jenkins/blob/master/Berksfile](https://github.com/opscode-cookbooks/jenkins/blob/master/Berksfile)) for  
> an example.
> 
> ```
> *Curtis Stewart*
> 
> ```
> 
> Consultant  
> m 217.390.5067  
> Skype cstewart8710  
> [cstewart@momentumsi.com](mailto:cstewart@momentumsi.com)  
> [www.momentumsi.com](http://www.momentumsi.com)
> 
> - [http://www.momentumsi.com/](http://www.momentumsi.com/) [http://www.momentumsi.com/](http://www.momentumsi.com/) Cloud  
> Migration - Architecture - DevOps - Big Data - App Dev \*
> 
> On May 16, 2014, at 5:50 AM, dgilo@aemet.es wrote:
> 
> Hi!
> 
> If I add
> 
> cookbook 'apt'
> 
> to the Berksfile, do I have to add
> 
> depends 'apt'
> 
> to the metadata.rb?
> 
> If I understand it correctly, sometimes I may want to add cookbooks to the  
> Berksfile (for example, local ones) for the run list in .kitchen.yml, but  
> I may  
> not want to add them to the metadata.rb file. I'm a bit confused...
> 
> Thanks,
> 
> David Gil  
> Agència Estatal de Meteorologia a Catalunya

--  
[Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
[WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/ \* compliant!]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]
