Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve knife commands and order #51

Closed
gmanfunky opened this issue Sep 23, 2013 · 5 comments
Closed

Improve knife commands and order #51

gmanfunky opened this issue Sep 23, 2013 · 5 comments

Comments

@gmanfunky
Copy link

If you run knife -h you can see that knife commands are usually in the form of knife NOUN VERB, such as knife environment list and knife data bag show.

The current chef-vault commands are a bit disjointed with most being under knife encrypt VAULTNAME ITEM. One is under knife decrypt VAULTNAME ITEM VALUE and then there is knife rotate keys which may not be valid at the moment.

I suggest we standardize all chef-vault commands as knife vault OPERATION VAULTNAME ...

e.g.:
knife vault encrypt vault1 item --json item.json --admin gmanfunky --mode client
knife vault decrypt vault1 id,foo,bar --mode client
knife vault rotate vault1 --mode client

Or consider revamping knife use-cases more thoroughly to continue the analogy of a data bag command overlay. We can get rid of encrypt+decrypt sub-commands and try to match the existing knife data bag create,delete,edit,from file, show. Note that chef-vault's knife plugins go beyond knife data bag parity to enable individual value modification.

@trinitronx
Copy link
Contributor

👍 +1

@trinitronx
Copy link
Contributor

Also particularly useful:

  1. An analogue to knife data bag show bag_name to show all _VALUE_s within a Chef Vault "ITEM" (also to show all _ITEM_s within a VAULT
  2. A way to decrypt the entire Chef Vault "ITEM" (all values) like knife data bag show BAG ITEM --secret-file ~/.chef/encrypted_data_bag_secret in Chef)
  3. json output format with -F j (also for extra credit: text, yaml, and pp like knife data bag has )

@trinitronx
Copy link
Contributor

Looks like #50 is related to (3) ⏫

@ghost
Copy link

ghost commented Dec 17, 2013

👍

It would be great if I could set the default mode in my knife.rb so I don't have to pass --mode client every run.

@jgeiger
Copy link
Contributor

jgeiger commented Jan 6, 2014

Some of these have been fixed in
#68
#69
#71

I just realized I referenced the wrong issue in my first pull request...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants