Closed sersut closed 8 years ago
@stevendanna I added a commit per your comments. LMK what you think.
@sersut My only high-level question is whether it would be better to do this at package install time?
I'm not thrilled with the idea of chef-server users hitting this on upgrade, but I gather that this is more or less a requirement.
We have considered doing something during the postinst
but didn't want to go that path since it will be platform specific and much more fragile.
Even during that path though, users will hit this on upgrade no?
Even during that path though, users will hit this on upgrade no?
Yup.
:white_check_mark: http://wilson.ci.chef.co/job/chef-server-12-test/179/
@stevendanna having moved Chef Server out of the way, is there anything else needed for this PR?
Anyone else needs to :eyes: at this?
:+1:
Information on the various ways to accept the license should probably be added to any --help output as well, so that it is easier for someone to find that information.
👍 tech wise. I think we should think really carefully around the UX of this though. This has the potential to be a painful user experience. I'd feel a lot better about this if we demoed this to our UX people first.
Looks good to me @sersut. Thanks for all the work here.
This PR adds license checking functionality to
ctl reconfigure
command. At a high level this PR:ctl reconfigure
display the LICENSE to the user and asks for acceptance if a license exists for a project.--accept-license
CLI option to be used in scripts.More details about this feature can be found here
I have been investigating which component is the best to implement this functionality. I have thought about using:
enterprise-chef-common
cookbook which is shared across most of our projects.chef-license
which contains this logic.The main issue I ran into was to implement
--accept-license
functionality.reconfigure()
runs Chef and the only way to parameterize the chef run is to use--json-attributes
option which is already being used with file"#{base_path}/embedded/cookbooks/dna.json"
in reconfigure.I'm open to suggestions of implementing this in a different place. And yes this change will be a breaking change and we are working on a communication plan here.
Please LMK of your thoughts and please include others who would be interested in what's happening here :smile: If all is good I will finalize the PR with more tests.
/cc: @nellshamrell, @stevendanna, @marcparadise, @smith, @tylercloke, @sdelano, @schisamo, @patrick-wright