-
Notifications
You must be signed in to change notification settings - Fork 213
Another attempt at transfering to a re-writable protected path. #197
Conversation
First thing's first.
This should work by default now that we use relative paths or should be customizable using solo.rb and knife.rb if needed.
Now that we no longer have a solo.rb none of the typical kitchen files are actually required. Even a node config will get generated at runtime if it doesn't already exist. This test was originally included as a guard against syncing more than was intentional. I'm unable to come up with a way to effectively do that without getting tricky. Ideas are welcome.
@tmatilai I think I got this on lockdown this time. The only slight oddity is that kitchen validation basically falls away since no file or directory is required anymore. |
I will take a closer look when I can, but great work! Currently the users can use whatever directory names as long as solo.rb matches. This implementation seems to hardcode the paths? My idea was to read all local paths (cookbook_path, data_bag_path, etc.) from Knife configuration and sync them to dynamic paths like chef_path/cookbooks-1/, chef_path/cookbooks-2/, chef_path/data_bags-1/, etc. This way we can also sync for example the patch cookbook and Berkshelf cookbooks safely without risk of collisions. Downside is that we need separate rsync invocations (#196). Using knife configuration would also remove the need to validate the "kitchen". As long as the local directories can be found, everything is fine. We can require the ./nodes/ directory to be present if we want. Or just create it when needed. I'm sure there is more to this than fits to my head now. |
@tmatilai that's a really interesting call on configuring it all via knife.rb. At the moment I've side stepped by allowing solo.rb to be present but only if you also specify a knife[:solo_path] so we know where the root on the node should be without having to parse solo.rb. The only thing we now will use solo.rb for is the cookbook path which (I hope) would only be customized as a full path. I included a note about this caveat on https://github.com/matschaffer/knife-solo/wiki/Upgrading-to-0.3.0 |
So I was thinking of rolling this as 0.3.0.pre1 today in hopes of getting some early testing on it. @tmatilai do you concur? |
Go for it! |
Another attempt at transfering to a re-writable protected path.
No description provided.