Regarding to DataBag

12 views
Skip to first unread message

chengkai liang

unread,
Jan 8, 2015, 11:58:44 AM1/8/15
to littl...@googlegroups.com
Hi,

So littlechef confines every chef structure within a kitchen directory.  When you run fix new_kitchen command, it will create chef layout for you.  It seems that littlechef will not follow the symlink at least in data_bags directory (which use to store global chef attributes).  Let say if I have users data bags that globally across all my environments.  How am I going to manage those? Should I use git to sync databags to different kitchen repos?

-Chengkai

Miquel Torres

unread,
Jan 9, 2015, 3:39:47 AM1/9/15
to littl...@googlegroups.com
Hi,

when you say environments, you mean different projects, right?

Inside a given kitchen you may manage and define multiple
environments. For example:
http://docs.chef.io/data_bags.html#with-environments
> --
> 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.

chengkai liang

unread,
Jan 9, 2015, 10:27:06 AM1/9/15
to littl...@googlegroups.com
Well, I am trying manage environments, roles, and data_bags in one place for all different kitchen projects.  I think, git submodule can be used for that purpose. But may develop a process to sync those repos.

-Chengkai

Miquel Torres

unread,
Jan 9, 2015, 10:35:02 AM1/9/15
to littl...@googlegroups.com
Maybe if you explain a bit your use case we can think of something
that fits your workflow.

chengkai liang

unread,
Jan 9, 2015, 10:58:33 AM1/9/15
to littl...@googlegroups.com
Yes.  Different projects but share the same chef environment json file ... I think I use confused word.


On Friday, January 9, 2015 at 12:39:47 AM UTC-8, Miquel Torres wrote:

Miquel Torres

unread,
Jan 9, 2015, 11:13:16 AM1/9/15
to littl...@googlegroups.com
Yeah, but what is the use case? Why would you reuse same environment
file in different projects? And I get how you would *start* a new
project reusing environment config, but maintaining the same changes
over time to all projects? It just sounds like it should be the same
project.

chengkai liang

unread,
Jan 9, 2015, 12:21:09 PM1/9/15
to littl...@googlegroups.com
I am trying to figure out what's the way work under littlechef based on Chef's one cookbook per git repo.  Now say I am going provision a set of machines to be jenkins cluster.  I wrote up a wrapper cookbook, and use Berkshelf to manage third party cookbook dependencies.  Here I use fix new_ktichen to setup littlechef layout.  Now, we already have a numbers of existing environment, roles, and data bags exists in our git repo.  How am I integrate existing environments, roles, and data_bags into current kitchen structure without duplcate in every other cookbooks' kitchen structure.  Or I should just have one kitchen for all different in-house develop cookbooks?

-Chengkai 

Miquel Torres

unread,
Jan 13, 2015, 9:58:47 AM1/13/15
to littl...@googlegroups.com
It sounds like your git repo already contains "your kitchen". So you
should start from there. If you then want to deploy a jenkins cluster,
you add the necesary roles and cookbook to the repo, everything in the
same kitchen/repo

chengkai liang

unread,
Jan 13, 2015, 10:16:04 AM1/13/15
to littl...@googlegroups.com
Thanks. 
Reply all
Reply to author
Forward
0 new messages