LittleChef Berkshelf Support

13 views
Skip to first unread message

chengkai liang

unread,
Dec 30, 2014, 11:12:34 AM12/30/14
to littl...@googlegroups.com
Based on littlechef's README document, it supports Berkshelf if Berksfile exists.  Now, I have a Berksfile in current directory like

.
├── Berksfile
├── Berksfile.lock
├── Gemfile
├── Gemfile.lock
├── README.md
├── Thorfile
├── Vagrantfile
├── attributes
├── aws.rb
├── berks-cookbooks
├── boothook.sh
├── chefignore
├── cloud-config.yaml
├── combined.txt
├── cookbooks
├── data_bags
├── definitions
├── environments
├── files
├── get_aws_creds.rb
├── littlechef.cfg
├── local-machines.rb
├── metadata.rb
├── nodes
├── recipes
├── roles
├── site-cookbooks
├── test
├── user_data.yaml
├── write-mime-multipart
└── write-sudoer-requiretty.yaml

And content of my littlechef.cfg is,

[userinfo]
user = ec2-user
password = 
keypair-file = /Users/xxx/.ssh/ec2-us-west-2.pem
ssh-config   = /Users/xxx/.ssh/config
encrypted_data_bag_secret = 

[kitchen]
node_work_path = /tmp/chef-solo/
berksfile = Berksfile
berksfile_cookbooks_directory = cookbooks

Based on README if user does not provide berksfile_cookbooks_directory, littlechef will execute berks vendor berks_cookbook_directory.  However, this is not happening.  In stead I have to execute 
berks vendor berks_cook_directory in order to get all the dependent cookbooks install to that directory.  Do I missing any configuration in littlechef.cfg?

-Chengkai
 

Adam Hamsik

unread,
Jan 1, 2015, 5:33:26 PM1/1/15
to littl...@googlegroups.com
Hi,

You should not need to run berks vendor manually. Can you share screen log with me from littlechef run with debug flag enabled and with/without berk_cookbook_directory in your config.

Another question is what version of littlechef do you use and from which repository ?

chengkai liang

unread,
Jan 6, 2015, 5:34:58 PM1/6/15
to littl...@googlegroups.com
Adam,

As you say, it is working.  But I swear that the first couple time I used it is not work.  Anyway, thanks for responding to this email.

-Chengkai

Miquel Torres

unread,
Jan 7, 2015, 4:23:51 AM1/7/15
to littl...@googlegroups.com
Do you think the README could be improved in some way to avoid confusion?
> --
> You received this message because you are subscribed to the Google Groups
> "littlechef" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to littlechef+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

haad

unread,
Jan 7, 2015, 4:56:51 AM1/7/15
to littl...@googlegroups.com

Frankly I'm not sure where the problem was.

Miquel Torres

unread,
Jan 7, 2015, 9:49:58 AM1/7/15
to littl...@googlegroups.com
Yeah, i was asking Chengkai, in case he could have avoided being stuck
by having extra pointers in the README

chengkai liang

unread,
Jan 7, 2015, 9:56:39 AM1/7/15
to littl...@googlegroups.com
Adam,

I took my word back.  If I remove the cookbooks directory from kitchen folder, and run fix -V node:jenkins-master, it gives these error message:

zsh 4847  (git)-[master]-% fix -V node:jenkins-master

Verbose output on

Fatal error: Couldn't find cookbooks. Are you executing 'fix' outside of a kitchen?
To create a new kitchen in the current directory  type 'fix new_kitchen'

Aborting.

Wether berksfile_cookbooks_directory set or not.  After I ran berks vendor cookbooks command to sync cookbooks into cookbooks directory.  The 
fix command will work with or without berksfile_cookbooks_directory.

chengkai liang

unread,
Jan 7, 2015, 10:04:08 AM1/7/15
to littl...@googlegroups.com
The littlechef version I have is

zsh 4300 [1]  (git)-[master]-% fix -v
LittleChef 1.7.2

On Thursday, January 1, 2015 2:33:26 PM UTC-8, Adam Hamsik wrote:

haad

unread,
Jan 7, 2015, 10:26:57 AM1/7/15
to littl...@googlegroups.com
Frankly I'm not sure if it's correct version or not(but it looks like
it's not). @tobami said that he is going to merge my changes/fixes
sometimes this week and do a release. This exact same setup works on
my machine with my own for so as a hack you can do berks vendor for
now and wait for release.
> --
> You received this message because you are subscribed to the Google Groups
> "littlechef" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to littlechef+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--


Regards.

Adam

chengkai liang

unread,
Jan 7, 2015, 10:56:19 AM1/7/15
to littl...@googlegroups.com
What's the right way to get littlechef?  I use pip install to get it.

-Chengkai

Miquel Torres

unread,
Jan 7, 2015, 11:05:00 AM1/7/15
to littl...@googlegroups.com
Yeah, that is the right way. There are just a couple of berkshelf
fixes both unreleased and unmerged. I will do a release tomorrow so
you can get them with 1.7.3 (or 1.8!) using a pip install -U

chengkai liang

unread,
Jan 7, 2015, 12:02:29 PM1/7/15
to littl...@googlegroups.com
Thanks and looking forward to this release.
Reply all
Reply to author
Forward
0 new messages