Test-kitch with roles


#1

I’m looking into getting started with using test-kitchen and I’m wondering,
how do I use roles in test-kitchen? Or is this yet another reason to stop
using roles and switch to cookbook roles?

John


John Alberts


#2

roles_path: roles

run_list:

  • role[foo]

Cheers,

AJ

On 23 May 2013 06:27, John Alberts john.m.alberts@gmail.com wrote:

I’m looking into getting started with using test-kitchen and I’m wondering,
how do I use roles in test-kitchen? Or is this yet another reason to stop
using roles and switch to cookbook roles?

John


John Alberts


#3

I just asked this question today in the foodfightshow "Testing in Practice"
discussion and no one mentioned that option. :slight_smile: I see in config.rb there
is a data_bags_path option as well, which was going to be my next question.

Thanks AJ

On Wed, May 22, 2013 at 3:22 PM, AJ Christensen aj@junglist.gen.nz wrote:

roles_path: roles

run_list:

  • role[foo]

Cheers,

AJ

On 23 May 2013 06:27, John Alberts john.m.alberts@gmail.com wrote:

I’m looking into getting started with using test-kitchen and I’m
wondering,
how do I use roles in test-kitchen? Or is this yet another reason to
stop
using roles and switch to cookbook roles?

John


John Alberts


John Alberts


#4

John,

Likely not the best suggestion here. But it is possible to do kitchen
init in chef-repo; you will just need a metadata.rb that indicates the
cookbook name and a Berksfile to indicate where the cookbooks come
from. Then you do not need to mention roles_path or data_bag path and
just load them from your chef-repo as-is.

This reduced the pattern of copying roles and data bags for each cookbook.

Scott
On 5/22/13 1:37 PM, John Alberts wrote:

I just asked this question today in the foodfightshow “Testing in
Practice” discussion and no one mentioned that option. :slight_smile: I see in
config.rb there is a data_bags_path option as well, which was going to
be my next question.

Thanks AJ

On Wed, May 22, 2013 at 3:22 PM, AJ Christensen <aj@junglist.gen.nz
mailto:aj@junglist.gen.nz> wrote:

roles_path: roles

run_list:
  - role[foo]

Cheers,

AJ

On 23 May 2013 06:27, John Alberts <john.m.alberts@gmail.com
<mailto:john.m.alberts@gmail.com>> wrote:
> I'm looking into getting started with using test-kitchen and I'm
wondering,
> how do I use roles in test-kitchen?  Or is this yet another
reason to stop
> using roles and switch to cookbook roles?
>
> John
>
>
> --
> John Alberts


John Alberts
!DSPAM:519d2caa264241804284693!


#5

On Thu, May 23, 2013 at 1:02 PM, Scott M. Likens scott@likens.us wrote:

Likely not the best suggestion here. But it is possible to do kitchen
init in chef-repo; you will just need a metadata.rb that indicates the
cookbook name and a Berksfile to indicate where the cookbooks come from.
Then you do not need to mention roles_path or data_bag path and just load
them from your chef-repo as-is.

This reduced the pattern of copying roles and data bags for each cookbook.

This is actually what I’ve just started to work on. So far so good, but I
have a lot of work to do yet… and so little time .:slight_smile:


John Alberts