[chef] Re: Re: Re: Re: Is it possible to version control Chef Repository when working from management workstation?


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Is it possible to version control Chef Repository when working from management workstation?
  • Date: Thu, 5 Jul 2012 23:41:39 +0530

yes. they are not very tightly integrated.
For you the truth is git repo, but for chef its couch and for knife its couch or local file system (depending upon the operation). As you see, people try to automate any one of the step , or practice certain methpds/workflows to use git as the master , and rest are based on that.

Chef is modular, if you want you can actually pull out the knife edit options and enforce knife from file as the only way to push data, and configure the system against a repo, where folks  can push changes. The only gotcha is the delay introduced .



On Thu, Jul 5, 2012 at 11:32 PM, anatoly techtonik < " target="_blank"> > wrote:
On Thu, Jul 5, 2012 at 8:10 PM, Joshua Miller < "> > wrote:
> The real problem in your example is to get away from commands like
>
> knife data bag edit
> And
> knife role edit
>
> Use the chef-repo example and have roles and data bags in there.  Edit the roles locally and then use standard source control options.  When your ready to push to the chef server use the from file commands.
>
> knife data bag from file users jmiller.json
>
> knife role from file base.json
>
> Hope that helps

Not really. I am trying to set a workflow and so far it is not very
satisfying as I hoped to manage my configuration as a source code. =)
I've made a cookbook with:
  knife cookbook create newcook

It is created in my local cookbooks directory. I've committed it, then
uploaded to server.
Now I need to create data bag.
  knife cookbook data bag create newbag

There are no files to commit. Neither before nor after. Your advice
basically mean that I manually need to keep layout in my local version
equal to the one the server maintains? That means I need to know the
layout and put .json file where it should belong on the server side.
  knife data bag from file users ~/chef-repo/data-bags/jmiller.json

That's not the version control I used to.


I've also noticed that knife doesn't synchronize my local cookbooks
with remote. When I do
  knife download newcook
it is not downloaded to my local cookbooks path - I have to specify
the path manually. Why?




Archive powered by MHonArc 2.6.16.

§