Knife diff and JSON files in environments/ & roles/

When I use knife diff from the knife-essentials[1] gem (which is awesome,
by the way), it shows me a lot of JSON files in the environments/ and
roles/ folders that don’t exist in my local filesystem (e.g. only on the
chef server) [2]. But I have corresponding .rb files for each .json file
that is indicated as “missing”.

This is confusing… either (a) chef creates the .json files when I upload
environments or roles to the server, from the .rb files, or (b) these are
left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] https://github.com/jkeiser/knife-essentials

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
…etc for all roles…


Denis Haskin
cell: 781-258-7414

Hi Denis. Glad you like the tool!

It's option (a): Chef takes the .rb files and turns them into JSON before
we send them. But a brief note: the Chef server is just a REST interface
(which admittedly uses the JSON format) and is not actually a filesystem.
knife-essentials imposes that structure: it maps the server's REST
interface into a virtual filesystem composed of .json files (i.e. the
environments/blah.json "file" corresponds to HTTP GET/PUT/DELETE operations
on /environments/blah). It turns out this gives us a powerful toolset, and
is a super convenient way to think about the system, but just FYI, that's
an invention of knife-essentials.

The issue you are seeing is that knife diff assumes that your local
filesystem looks the same as the virtual mapping (it assumes a certain
directory structure, and assumes that files are .json). For many people
this is true, but not everyone (i.e. .rb files). I've filed an
issuehttps://github.com/jkeiser/knife-essentials/issues/67 for
its lack of .rb support, because I still need to weigh the complexity costs
of supporting multiple file formats against the benefits of .rb files.

Solution: If you're OK with JSON instead of RB files, the simplest
solution is to:

  1. Run "knife download roles environments", which will download all your
    current environments and roles as .json files.
  2. Verify that the .json files actually represent when you wrote in the .rb
    files, and delete the .rb files to get rid of confusion.

I'd love to hear whether this solution works for you.

Thanks!

--John

On Mon, Aug 20, 2012 at 8:24 AM, Denis Haskin denis@constantorbit.comwrote:

When I use knife diff from the knife-essentials[1] gem (which is awesome,
by the way), it shows me a lot of JSON files in the environments/ and
roles/ folders that don't exist in my local filesystem (e.g. only on the
chef server) [2]. But I have corresponding .rb files for each .json file
that is indicated as "missing".

This is confusing... either (a) chef creates the .json files when I upload
environments or roles to the server, from the .rb files, or (b) these are
left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] GitHub - jkeiser/knife-essentials: Knife commands to treat the Chef server like a filesystem

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
...etc for all roles...

--
Denis Haskin
cell: 781-258-7414

Thanks. Sorry if I was unclear; I do understand that knife-essentials is
just presenting me with a filesystem-ish view of the REST resources, not an
actual filesystem.

What's common practice? Using JSON files instead of ruby, as you suggest?

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 12:34 PM, John Keiser jkeiser@opscode.com wrote:

Hi Denis. Glad you like the tool!

It's option (a): Chef takes the .rb files and turns them into JSON before
we send them. But a brief note: the Chef server is just a REST interface
(which admittedly uses the JSON format) and is not actually a filesystem.
knife-essentials imposes that structure: it maps the server's REST
interface into a virtual filesystem composed of .json files (i.e. the
environments/blah.json "file" corresponds to HTTP GET/PUT/DELETE operations
on /environments/blah). It turns out this gives us a powerful toolset, and
is a super convenient way to think about the system, but just FYI, that's
an invention of knife-essentials.

The issue you are seeing is that knife diff assumes that your local
filesystem looks the same as the virtual mapping (it assumes a certain
directory structure, and assumes that files are .json). For many people
this is true, but not everyone (i.e. .rb files). I've filed an issuehttps://github.com/jkeiser/knife-essentials/issues/67 for
its lack of .rb support, because I still need to weigh the complexity costs
of supporting multiple file formats against the benefits of .rb files.

Solution: If you're OK with JSON instead of RB files, the simplest
solution is to:

  1. Run "knife download roles environments", which will download all your
    current environments and roles as .json files.
  2. Verify that the .json files actually represent when you wrote in the
    .rb files, and delete the .rb files to get rid of confusion.

I'd love to hear whether this solution works for you.

Thanks!

--John

On Mon, Aug 20, 2012 at 8:24 AM, Denis Haskin denis@constantorbit.comwrote:

When I use knife diff from the knife-essentials[1] gem (which is awesome,
by the way), it shows me a lot of JSON files in the environments/ and
roles/ folders that don't exist in my local filesystem (e.g. only on the
chef server) [2]. But I have corresponding .rb files for each .json file
that is indicated as "missing".

This is confusing... either (a) chef creates the .json files when I
upload environments or roles to the server, from the .rb files, or (b)
these are left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] GitHub - jkeiser/knife-essentials: Knife commands to treat the Chef server like a filesystem

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
...etc for all roles...

--
Denis Haskin
cell: 781-258-7414

At Opscode, we're using .json files to store this information when
deploying Hosted Chef. But other people may be using .rb so they can write
code in their data files. I'm not sure which is more common, but they will
work identically well as long as you are just recording data and not
writing code in there.

--John

On Mon, Aug 20, 2012 at 10:43 AM, Denis Haskin denis@constantorbit.comwrote:

Thanks. Sorry if I was unclear; I do understand that knife-essentials is
just presenting me with a filesystem-ish view of the REST resources, not an
actual filesystem.

What's common practice? Using JSON files instead of ruby, as you suggest?

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 12:34 PM, John Keiser jkeiser@opscode.com wrote:

Hi Denis. Glad you like the tool!

It's option (a): Chef takes the .rb files and turns them into JSON before
we send them. But a brief note: the Chef server is just a REST interface
(which admittedly uses the JSON format) and is not actually a filesystem.
knife-essentials imposes that structure: it maps the server's REST
interface into a virtual filesystem composed of .json files (i.e. the
environments/blah.json "file" corresponds to HTTP GET/PUT/DELETE operations
on /environments/blah). It turns out this gives us a powerful toolset, and
is a super convenient way to think about the system, but just FYI, that's
an invention of knife-essentials.

The issue you are seeing is that knife diff assumes that your local
filesystem looks the same as the virtual mapping (it assumes a certain
directory structure, and assumes that files are .json). For many people
this is true, but not everyone (i.e. .rb files). I've filed an issuehttps://github.com/jkeiser/knife-essentials/issues/67 for
its lack of .rb support, because I still need to weigh the complexity costs
of supporting multiple file formats against the benefits of .rb files.

Solution: If you're OK with JSON instead of RB files, the simplest
solution is to:

  1. Run "knife download roles environments", which will download all your
    current environments and roles as .json files.
  2. Verify that the .json files actually represent when you wrote in the
    .rb files, and delete the .rb files to get rid of confusion.

I'd love to hear whether this solution works for you.

Thanks!

--John

On Mon, Aug 20, 2012 at 8:24 AM, Denis Haskin denis@constantorbit.comwrote:

When I use knife diff from the knife-essentials[1] gem (which is
awesome, by the way), it shows me a lot of JSON files in the environments/
and roles/ folders that don't exist in my local filesystem (e.g. only on
the chef server) [2]. But I have corresponding .rb files for each .json
file that is indicated as "missing".

This is confusing... either (a) chef creates the .json files when I
upload environments or roles to the server, from the .rb files, or (b)
these are left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] GitHub - jkeiser/knife-essentials: Knife commands to treat the Chef server like a filesystem

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
...etc for all roles...

--
Denis Haskin
cell: 781-258-7414

Does this apply only to environment and role files? Or other files as well?

Thanks,

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 1:52 PM, John Keiser jkeiser@opscode.com wrote:

At Opscode, we're using .json files to store this information when
deploying Hosted Chef. But other people may be using .rb so they can write
code in their data files. I'm not sure which is more common, but they will
work identically well as long as you are just recording data and not
writing code in there.

--John

On Mon, Aug 20, 2012 at 10:43 AM, Denis Haskin denis@constantorbit.comwrote:

Thanks. Sorry if I was unclear; I do understand that knife-essentials is
just presenting me with a filesystem-ish view of the REST resources, not an
actual filesystem.

What's common practice? Using JSON files instead of ruby, as you suggest?

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 12:34 PM, John Keiser jkeiser@opscode.comwrote:

Hi Denis. Glad you like the tool!

It's option (a): Chef takes the .rb files and turns them into JSON
before we send them. But a brief note: the Chef server is just a REST
interface (which admittedly uses the JSON format) and is not actually a
filesystem. knife-essentials imposes that structure: it maps the server's
REST interface into a virtual filesystem composed of .json files (i.e. the
environments/blah.json "file" corresponds to HTTP GET/PUT/DELETE operations
on /environments/blah). It turns out this gives us a powerful toolset, and
is a super convenient way to think about the system, but just FYI, that's
an invention of knife-essentials.

The issue you are seeing is that knife diff assumes that your local
filesystem looks the same as the virtual mapping (it assumes a certain
directory structure, and assumes that files are .json). For many people
this is true, but not everyone (i.e. .rb files). I've filed an issuehttps://github.com/jkeiser/knife-essentials/issues/67 for
its lack of .rb support, because I still need to weigh the complexity costs
of supporting multiple file formats against the benefits of .rb files.

Solution: If you're OK with JSON instead of RB files, the simplest
solution is to:

  1. Run "knife download roles environments", which will download all
    your current environments and roles as .json files.
  2. Verify that the .json files actually represent when you wrote in the
    .rb files, and delete the .rb files to get rid of confusion.

I'd love to hear whether this solution works for you.

Thanks!

--John

On Mon, Aug 20, 2012 at 8:24 AM, Denis Haskin denis@constantorbit.comwrote:

When I use knife diff from the knife-essentials[1] gem (which is
awesome, by the way), it shows me a lot of JSON files in the environments/
and roles/ folders that don't exist in my local filesystem (e.g. only on
the chef server) [2]. But I have corresponding .rb files for each .json
file that is indicated as "missing".

This is confusing... either (a) chef creates the .json files when I
upload environments or roles to the server, from the .rb files, or (b)
these are left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] GitHub - jkeiser/knife-essentials: Knife commands to treat the Chef server like a filesystem

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
...etc for all roles...

--
Denis Haskin
cell: 781-258-7414

I just installed knife-essentials and did a "knife diff" and got:

morgan@rain:~/svn/OPS/chef-repo/roles$ knife diff
ERROR: Errno::ENOENT: No such file or directory -
/var/chef/cookbooks/var/chef
morgan@rain:~/svn/OPS/chef-repo/roles$

Do I need to create some directories for it to work or?

--
~~ StormeRider ~~

"Every world needs its heroes [...] They inspire us to be better than we
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

On Mon, Aug 20, 2012 at 10:43 AM, Denis Haskin denis@constantorbit.comwrote:

Thanks. Sorry if I was unclear; I do understand that knife-essentials is
just presenting me with a filesystem-ish view of the REST resources, not an
actual filesystem.

What's common practice? Using JSON files instead of ruby, as you suggest?

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 12:34 PM, John Keiser jkeiser@opscode.com wrote:

Hi Denis. Glad you like the tool!

It's option (a): Chef takes the .rb files and turns them into JSON before
we send them. But a brief note: the Chef server is just a REST interface
(which admittedly uses the JSON format) and is not actually a filesystem.
knife-essentials imposes that structure: it maps the server's REST
interface into a virtual filesystem composed of .json files (i.e. the
environments/blah.json "file" corresponds to HTTP GET/PUT/DELETE operations
on /environments/blah). It turns out this gives us a powerful toolset, and
is a super convenient way to think about the system, but just FYI, that's
an invention of knife-essentials.

The issue you are seeing is that knife diff assumes that your local
filesystem looks the same as the virtual mapping (it assumes a certain
directory structure, and assumes that files are .json). For many people
this is true, but not everyone (i.e. .rb files). I've filed an issuehttps://github.com/jkeiser/knife-essentials/issues/67 for
its lack of .rb support, because I still need to weigh the complexity costs
of supporting multiple file formats against the benefits of .rb files.

Solution: If you're OK with JSON instead of RB files, the simplest
solution is to:

  1. Run "knife download roles environments", which will download all your
    current environments and roles as .json files.
  2. Verify that the .json files actually represent when you wrote in the
    .rb files, and delete the .rb files to get rid of confusion.

I'd love to hear whether this solution works for you.

Thanks!

--John

On Mon, Aug 20, 2012 at 8:24 AM, Denis Haskin denis@constantorbit.comwrote:

When I use knife diff from the knife-essentials[1] gem (which is
awesome, by the way), it shows me a lot of JSON files in the environments/
and roles/ folders that don't exist in my local filesystem (e.g. only on
the chef server) [2]. But I have corresponding .rb files for each .json
file that is indicated as "missing".

This is confusing... either (a) chef creates the .json files when I
upload environments or roles to the server, from the .rb files, or (b)
these are left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] GitHub - jkeiser/knife-essentials: Knife commands to treat the Chef server like a filesystem

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
...etc for all roles...

--
Denis Haskin
cell: 781-258-7414

It applies to data_bags, roles and environments ... cookbooks can have
whatever files they want.

--John

On Mon, Aug 20, 2012 at 10:53 AM, Denis Haskin denis@constantorbit.comwrote:

Does this apply only to environment and role files? Or other files as
well?

Thanks,

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 1:52 PM, John Keiser jkeiser@opscode.com wrote:

At Opscode, we're using .json files to store this information when
deploying Hosted Chef. But other people may be using .rb so they can write
code in their data files. I'm not sure which is more common, but they will
work identically well as long as you are just recording data and not
writing code in there.

--John

On Mon, Aug 20, 2012 at 10:43 AM, Denis Haskin denis@constantorbit.comwrote:

Thanks. Sorry if I was unclear; I do understand that knife-essentials
is just presenting me with a filesystem-ish view of the REST resources, not
an actual filesystem.

What's common practice? Using JSON files instead of ruby, as you
suggest?

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 12:34 PM, John Keiser jkeiser@opscode.comwrote:

Hi Denis. Glad you like the tool!

It's option (a): Chef takes the .rb files and turns them into JSON
before we send them. But a brief note: the Chef server is just a REST
interface (which admittedly uses the JSON format) and is not actually a
filesystem. knife-essentials imposes that structure: it maps the server's
REST interface into a virtual filesystem composed of .json files (i.e. the
environments/blah.json "file" corresponds to HTTP GET/PUT/DELETE operations
on /environments/blah). It turns out this gives us a powerful toolset, and
is a super convenient way to think about the system, but just FYI, that's
an invention of knife-essentials.

The issue you are seeing is that knife diff assumes that your local
filesystem looks the same as the virtual mapping (it assumes a certain
directory structure, and assumes that files are .json). For many people
this is true, but not everyone (i.e. .rb files). I've filed an issuehttps://github.com/jkeiser/knife-essentials/issues/67 for
its lack of .rb support, because I still need to weigh the complexity costs
of supporting multiple file formats against the benefits of .rb files.

Solution: If you're OK with JSON instead of RB files, the simplest
solution is to:

  1. Run "knife download roles environments", which will download all
    your current environments and roles as .json files.
  2. Verify that the .json files actually represent when you wrote in the
    .rb files, and delete the .rb files to get rid of confusion.

I'd love to hear whether this solution works for you.

Thanks!

--John

On Mon, Aug 20, 2012 at 8:24 AM, Denis Haskin denis@constantorbit.comwrote:

When I use knife diff from the knife-essentials[1] gem (which is
awesome, by the way), it shows me a lot of JSON files in the environments/
and roles/ folders that don't exist in my local filesystem (e.g. only on
the chef server) [2]. But I have corresponding .rb files for each .json
file that is indicated as "missing".

This is confusing... either (a) chef creates the .json files when I
upload environments or roles to the server, from the .rb files, or (b)
these are left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] GitHub - jkeiser/knife-essentials: Knife commands to treat the Chef server like a filesystem

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
...etc for all roles...

--
Denis Haskin
cell: 781-258-7414

What is cookbook_dir in your Chef config file?

knife-essentials assumes a local directory structure like this (assuming
you have environments, data_bags and roles):

cookbooks/
data_bags/
environments/
roles/

Your Chef configuration needs to point cookbook_dir at the cookbooks
directory, and it will try to find the roles directory in
cookbook_dir/../roles. This structure is fairly typical for people who are
managing their cookbooks and other information in source control, but I'm
sure there's a great variety out there :slight_smile:

--John

On Mon, Aug 20, 2012 at 10:59 AM, Morgan Blackthorne
stormerider@gmail.comwrote:

I just installed knife-essentials and did a "knife diff" and got:

morgan@rain:~/svn/OPS/chef-repo/roles$ knife diff
ERROR: Errno::ENOENT: No such file or directory -
/var/chef/cookbooks/var/chef
morgan@rain:~/svn/OPS/chef-repo/roles$

Do I need to create some directories for it to work or?

--
~~ StormeRider ~~

"Every world needs its heroes [...] They inspire us to be better than we
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

On Mon, Aug 20, 2012 at 10:43 AM, Denis Haskin denis@constantorbit.comwrote:

Thanks. Sorry if I was unclear; I do understand that knife-essentials is
just presenting me with a filesystem-ish view of the REST resources, not an
actual filesystem.

What's common practice? Using JSON files instead of ruby, as you suggest?

--
Denis Haskin
cell: 781-258-7414

On Mon, Aug 20, 2012 at 12:34 PM, John Keiser jkeiser@opscode.comwrote:

Hi Denis. Glad you like the tool!

It's option (a): Chef takes the .rb files and turns them into JSON
before we send them. But a brief note: the Chef server is just a REST
interface (which admittedly uses the JSON format) and is not actually a
filesystem. knife-essentials imposes that structure: it maps the server's
REST interface into a virtual filesystem composed of .json files (i.e. the
environments/blah.json "file" corresponds to HTTP GET/PUT/DELETE operations
on /environments/blah). It turns out this gives us a powerful toolset, and
is a super convenient way to think about the system, but just FYI, that's
an invention of knife-essentials.

The issue you are seeing is that knife diff assumes that your local
filesystem looks the same as the virtual mapping (it assumes a certain
directory structure, and assumes that files are .json). For many people
this is true, but not everyone (i.e. .rb files). I've filed an issuehttps://github.com/jkeiser/knife-essentials/issues/67 for
its lack of .rb support, because I still need to weigh the complexity costs
of supporting multiple file formats against the benefits of .rb files.

Solution: If you're OK with JSON instead of RB files, the simplest
solution is to:

  1. Run "knife download roles environments", which will download all
    your current environments and roles as .json files.
  2. Verify that the .json files actually represent when you wrote in the
    .rb files, and delete the .rb files to get rid of confusion.

I'd love to hear whether this solution works for you.

Thanks!

--John

On Mon, Aug 20, 2012 at 8:24 AM, Denis Haskin denis@constantorbit.comwrote:

When I use knife diff from the knife-essentials[1] gem (which is
awesome, by the way), it shows me a lot of JSON files in the environments/
and roles/ folders that don't exist in my local filesystem (e.g. only on
the chef server) [2]. But I have corresponding .rb files for each .json
file that is indicated as "missing".

This is confusing... either (a) chef creates the .json files when I
upload environments or roles to the server, from the .rb files, or (b)
these are left over on the server from an old version of chef.

Anybody know which it is? Is there some way I can fix this?

Thanks!

[1] GitHub - jkeiser/knife-essentials: Knife commands to treat the Chef server like a filesystem

[2] (portion of output of knife diff --name-status)
D environments/obanyc_testrl.json
D environments/obanyc_prod.json
D environments/obanyc_dev.json
D environments/obanyc_demo.json
D environments/_default.json
D environments/obanyc_replay.json
D environments/staging.json
D environments/obanyc_qa.json
D environments/obanyc_staging.json
D roles/queuep.json
D roles/app.json
D roles/1ie.json
D roles/tds.json
D roles/2ie.json
D roles/queues.json
...etc for all roles...

--
Denis Haskin
cell: 781-258-7414

This thread reminded me I never posted my plugins for dealing with
data bags, nodes etc in JSON form while keeping sanity.

Here are a few of my plugins:

With these I'm able to close the loop and do stuff like:

  • notice cookbooks that unexpectedly add normal attributes on nodes
    (there are too many of them! we should work to fix them);
  • while developing cookbooks and roles, sometimes we make changes
    directly via "knife node edit". Sure, it's not the best way, but it
    happens. Now a "knife node export all" gets everything back into git;
  • and more.

I don't have a "knife environment export all" but it should be trivial.
I do have a plugin to fix "knife environment show -Fj", since it has
the annoying habit of showing pinned cookbooks in a random order.

Hope it's useful to someone else who has a "JSON-heavy" workflow.

Andrea