I’m wondering what you guys use to compare the versions of your local
cookbooks to what is on the server and in a specific environment. Seems
like there should be a knife plugin for this, but I couldn’t find one that
does this. The knife-env-diff plugin compares versions in two local env
files, but I didn’t see anything comparing local cookbook versions to env
files or what’s currently on the server. Should be pretty easy to whip up
a knife plugin for this, but I figured I’d ask before I bother writing one.
Health Inspector is an awesome tool for keeping your local repo and the server in sync. It compares it all and looks at checksums so it's not just versions.
I'm wondering what you guys use to compare the versions of your local cookbooks to what is on the server and in a specific environment. Seems like there should be a knife plugin for this, but I couldn't find one that does this. The knife-env-diff plugin compares versions in two local env files, but I didn't see anything comparing local cookbook versions to env files or what's currently on the server. Should be pretty easy to whip up a knife plugin for this, but I figured I'd ask before I bother writing one.
this is already included in chef 11, you have to install it separately if
you are on chef 10.x
regards
ranjib
On Tue, Feb 19, 2013 at 9:28 AM, Tim Smith tsmith@llnw.com wrote:
Health Inspector is an awesome tool for keeping your local repo and the
server in sync. It compares it all and looks at checksums so it's not just
versions.
I'm wondering what you guys use to compare the versions of your local
cookbooks to what is on the server and in a specific environment. Seems
like there should be a knife plugin for this, but I couldn't find one that
does this. The knife-env-diff plugin compares versions in two local env
files, but I didn't see anything comparing local cookbook versions to env
files or what's currently on the server. Should be pretty easy to whip up
a knife plugin for this, but I figured I'd ask before I bother writing one.
Haven't seen that before. Looks interesting, though, I see a problem with
using it along with knife-spork.
Assumptions
Your roles and environments are written using the ruby DSL.
knife-spork only works with json env files and it's engrained in my
workflow, so that's a no go for me unfortunatley.
On Tue, Feb 19, 2013 at 11:28 AM, Tim Smith tsmith@llnw.com wrote:
Health Inspector is an awesome tool for keeping your local repo and the
server in sync. It compares it all and looks at checksums so it's not just
versions.
I'm wondering what you guys use to compare the versions of your local
cookbooks to what is on the server and in a specific environment. Seems
like there should be a knife plugin for this, but I couldn't find one that
does this. The knife-env-diff plugin compares versions in two local env
files, but I didn't see anything comparing local cookbook versions to env
files or what's currently on the server. Should be pretty easy to whip up
a knife plugin for this, but I figured I'd ask before I bother writing one.
this is already included in chef 11, you have to install it separately if
you are on chef 10.x
I tried this yesterday, but I couldn't figure out the syntax to compare my
local cookbooks to what's currently on the server. Any ideas how to do
this?
Haven't seen that before. Looks interesting, though, I see a problem with
using it along with knife-spork.
Assumptions
Your roles and environments are written using the ruby DSL.
knife-spork only works with json env files and it's engrained in my
workflow, so that's a no go for me unfortunatley.
On Tue, Feb 19, 2013 at 11:28 AM, Tim Smith tsmith@llnw.com wrote:
Health Inspector is an awesome tool for keeping your local repo and the
server in sync. It compares it all and looks at checksums so it's not just
versions.
I'm wondering what you guys use to compare the versions of your local
cookbooks to what is on the server and in a specific environment. Seems
like there should be a knife plugin for this, but I couldn't find one that
does this. The knife-env-diff plugin compares versions in two local env
files, but I didn't see anything comparing local cookbook versions to env
files or what's currently on the server. Should be pretty easy to whip up
a knife plugin for this, but I figured I'd ask before I bother writing one.
I'm not sure anymore that JSON is the right thing for me, but it may help
you
Very cool plugins. I can think of some other uses for these, but I don't
see how these will help me compare server cookbook versions to my local
repo versions. The 3 plugins you have work with data bags, nodes, and
roles.
That page should actually be updated. Adam Sinnett updated it with support for JSON a while back (quandrum (Adam Sinnett) · GitHub). We always used it against JSON file.
Haven't seen that before. Looks interesting, though, I see a problem with using it along with knife-spork.
Assumptions
Your roles and environments are written using the ruby DSL.
knife-spork only works with json env files and it's engrained in my workflow, so that's a no go for me unfortunatley.
On Tue, Feb 19, 2013 at 11:28 AM, Tim Smith tsmith@llnw.com wrote:
Health Inspector is an awesome tool for keeping your local repo and the server in sync. It compares it all and looks at checksums so it's not just versions.
I'm wondering what you guys use to compare the versions of your local cookbooks to what is on the server and in a specific environment. Seems like there should be a knife plugin for this, but I couldn't find one that does this. The knife-env-diff plugin compares versions in two local env files, but I didn't see anything comparing local cookbook versions to env files or what's currently on the server. Should be pretty easy to whip up a knife plugin for this, but I figured I'd ask before I bother writing one.
I'm not sure anymore that JSON is the right thing for me, but it may help
you
Very cool plugins. I can think of some other uses for these, but I don't
see how these will help me compare server cookbook versions to my local
repo versions. The 3 plugins you have work with data bags, nodes, and
roles.
Uh, ahem, right, I read too quickly and thought you wanted those too… Sorry
for the noise.
Maybe you could use health_inspector and strip it down to only deal with
cookbooks, and use these for roles etc?
On Tue, Feb 19, 2013 at 11:42 AM, Tim Smith tsmith@llnw.com wrote:
That page should actually be updated. Adam Sinnett updated it with
support for JSON a while back (quandrum (Adam Sinnett) · GitHub). We always
used it against JSON file.
On Tue, Feb 19, 2013 at 11:42 AM, Tim Smith tsmith@llnw.com wrote:
That page should actually be updated. Adam Sinnett updated it with
support for JSON a while back (quandrum (Adam Sinnett) · GitHub). We always
used it against JSON file.
this is already included in chef 11, you have to install it separately if you are on chef 10.x
I tried this yesterday, but I couldn’t figure out the syntax to compare my local cookbooks to what’s currently on the server. Any ideas how to do this?
this is already included in chef 11, you have to install it separately
if you are on chef 10.x
I tried this yesterday, but I couldn't figure out the syntax to compare my
local cookbooks to what's currently on the server. Any ideas how to do
this?
Yep, that works too. Though I much prefer the output of health_inspector
for just a simple comparison. Nice to the know the syntax for knife diff
to then see the actual changes.
Thanks
FYI if you’re only looking to find out what is different (not the actual changes), you can also do
knife diff —name-status /cookbooks
(The command line parameters are modeled off of git diff.)
Another thing: once you discover which things are different and decide which changes you want to keep / which you want to discard, you can use knife upload and knife download to do it (same command line parameters). Upload cookbooks/roles/etc. to the server with knife upload, or copy the server contents down with knife download. Knife upload /cookbooks will upload all cookbooks, knife upload /cookbooks/apache2 will upload apache2 only, knife download works the same way. If your current directory is the cookbooks directory, knife upload . Or knife upload apache2 will work (it’s aware of the current directory).
Yep, that works too. Though I much prefer the output of health_inspector for just a simple comparison. Nice to the know the syntax for knife diff to then see the actual changes.
Thanks