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
Add multitenancy support to Chef client config and local mode #49
Conversation
Per implementation at chef/chef#1960 (PR does not do the repo_mode bit, but does everything else). |
9b64385
to
41ede76
Compare
1. When `Chef::Config.organization` is set, `Chef::Config.chef_server_url` default to `https://api.opscode.com/organizations/#{organization}` | ||
|
||
Multitenant root URL support: | ||
1. A new configuration parameter, `Chef::Config.chef_server_root`, be added that points to the top of the server (above /organizations) where users and organization lists can be found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Having this as a core option will also help 3rd party tools. For example, I already use a config option by this name here:
https://github.com/opscode/knife-opc/blob/master/lib/chef/knife/opc_org_create.rb#L46
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we be explicit about what the default value of chef_server_root will be? I am assuming that if chef_server_url is set then the default would be something like this:
chef_server_url.gsub(/\/organizations\/+[^\/]+\/*$/, '')
although for the RFC it is probably better to specify it via example than the above code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think it would be good to add api helpers for knife plugins that gives you access to a properly configured Chef::REST object for the root_url, much like the rest
method currently provides for knife plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done and done. @stevendanna I added the example in the RFC and added "rest_root" in the PR.
Lets bring this up at the next community meeting, and if there are no dissenting voices, merge it. 👍 |
👍 @opscode/rfc-editors take it away |
Add multitenancy support to Chef client config and local mode
This adds multitenant chef-zero support to local mode by default, and adds options to make multitenancy and Hosted Chef much easier to develop for and work with.