- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Some Questions
- Date: Wed, 1 Dec 2010 21:50:09 -0800
On Wed, Dec 1, 2010 at 11:51 AM, Martin Eigenbrodt
<
>
wrote:
>
Hi everrybody,
>
>
I'm currently digging into Chef and have some questions regarding the Idea
>
to have
>
"Infrastructure as Code".
>
>
1) As I understand Cookbooks should be maintained in VCS. But it is still
>
possible
>
to locally modify a cookbook on a developers machine and upload it
>
to the chef server, thus applying changes not present in any version
>
control. How do you handle this situation?
>
I could think of two measurement to solve this: a) Change 'knife cookbook
>
upload' to only accept cookbooks not changed against the git/svn.
>
b) Do not ever upload changeds directly, but commit them and let a CI
>
server apply them to a chef server (and maybe run some tests?). Is anybody
>
doing like that? Am I getting things totaly wrong?
Either are fine choices. A common tactic would be to use a
post-commit/post-push hook in Git.
>
2) How are changes to attributes tracked? As far as I understand there ist
>
nothingh that keeps track of changes to attributes. So I can not my
>
infrastructure as it was as at a certain time.
You can back the data up easily. Something like this:
https://gist.github.com/671369
Stuck in a cron-job would allow you to back up the data (and perhaps
automatically check it in to source control.)
>
3) I've played around with some recipes and often succeeded to upload
>
recipe and/or attribute files to my chef server that were syntactically
>
wrong, atlhough there seems to be some validation done during 'knife
>
cookbook upload'. Is there a way to get a stronger validation for my files
>
before uploading them?
The syntax checks pre-upload are just that - pure syntax. Short of
running the code itself, there is no way to get a deeper validation.
>
4) Is there a way to download cookooks from a side including dependencies?
knife cookbook site vendor with the '-d' switch.
>
5) Is there any standard way to run automated tests against your cookbooks?
Not at this time - there has been some thought around cookbook
testing, but nothing formalized.
Best,
Adam
--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E:
Archive powered by MHonArc 2.6.16.