Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Another attempt at transfering to a re-writable protected path. #197

Merged
merged 13 commits into from
Feb 12, 2013

Conversation

matschaffer
Copy link
Owner

No description provided.

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.
@matschaffer
Copy link
Owner Author

@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.

@tmatilai
Copy link
Collaborator

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.

@matschaffer
Copy link
Owner Author

@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

@matschaffer
Copy link
Owner Author

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?

@tmatilai
Copy link
Collaborator

Go for it!

matschaffer added a commit that referenced this pull request Feb 12, 2013
Another attempt at transfering to a re-writable protected path.
@matschaffer matschaffer merged commit 3ee5254 into master Feb 12, 2013
tmatilai added a commit that referenced this pull request Apr 6, 2013
…-199

- Generate solo.rb from knife.rb settings. Fixes #86, #125, #128, #177, #197.
- Read protect the uploaded directory. Fixes #1.
- Convert chef-solo-search as a submodule and upgrade it to v0.4.0. Should fix #216.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants