-
Notifications
You must be signed in to change notification settings - Fork 75
Depend on Mixlib-install for install logic #105
Conversation
Rather than kill the chef client and leave it to the user to pick up the pieces and, in most cases, simply resume the run, do that by default by exec'ing chef-client again in the ruby_block to start using the new version. The original behavior is still accessible via attributes.
- Do not allow it when chef-zero is being used (chef client local mode)
If you do, it only re-execs the worker process, which is not the
process running the chef-zero server.
- Add argv on as well in case of a runlist override
- Skip the install notifier, cut out the middleman. If you include the
::install recipe, you want to install, and it will always happen after
the remote_file. This fixes #65, at the cost of making a few more
assumptions.
68dda75
to
05fe4cd
Compare
05fe4cd
to
49a9c3e
Compare
Note that the changes in this PR largely reproduce the chef-ingredient cookbook, which I assume will eventually make this community cookbook obsolete. However, |
I don't have time to review but that's the direction that the updating-of-chef-client needs to go. If it doesn't work to rewrite this cookbook that much, then i'd be good to have an omnibus_updater2 fork. I agree it overlaps with chef_ingredient, but I think its a good thing to do anyway. |
content 'conflict=nocheck\naction=nocheck' | ||
only_if { node['os'] =~ /^solaris/ } | ||
chef_gem "mixlib-install" do | ||
version '0.8.0.alpha.6' |
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.
This should get updated for the 1.X releases
Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog. Non-GitHub Verified CommittersThere are 1 commit author(s) whose commits are authored by a non-GitHub verified email address. Chef will have to manually verify that they are authorized to contribute. |
This is based off the work done in chef-boneyard/omnibus_updater#105, but updated for some of the new mixlib-install functionality and updated to be a custom resource. This allows simple update functionality without the mess of the ruby implementation in the omnibus_updater cookbook. It is going to require additional testing and functionality, but I wanted to get this 1/2 working bit out there. Signed-off-by: Tim Smith <tsmith@chef.io>
This is based off the work done in chef-boneyard/omnibus_updater#105, but updated for some of the new mixlib-install functionality and updated to be a custom resource. This allows simple update functionality without the mess of the ruby implementation in the omnibus_updater cookbook. It is going to require additional testing and functionality, but I wanted to get this 1/2 working bit out there. Signed-off-by: Tim Smith <tsmith@chef.io>
For anyone interested in this work I've taken the heart of the code and moved it into a pure resource in chef-client in this PR: chef-boneyard/chef-client#452 This would allow anyone to use the resource in their cookbook or apply the simple attribute driven recipe. It includes the new exit code logic and the version logic is a lot simpler due to improvements to mixlib-install over the last year. |
This is based off the work done in chef-boneyard/omnibus_updater#105, but updated for some of the new mixlib-install functionality and updated to be a custom resource. This allows simple update functionality without the mess of the ruby implementation in the omnibus_updater cookbook. It is going to require additional testing and functionality, but I wanted to get this 1/2 working bit out there. Signed-off-by: Tim Smith <tsmith@chef.io>
Closing this one out since I've reworked it into a PR to chef-client. I super appreciate everything you did here. This was a great push to making this cookbook do what everyone expects it to do. |
This branch addresses #46 by depending on the new mixlib-install library to provide the install.sh implementation, as suggested by @lamont-granquist in his comment. The changes are substantial so I'm just sharing this PR now for feedback/discussion and in hopes others might find this immediately useful.
mixlib-install
is installed viachef_gem
.OmnibusTrucker#collect_attributes
, theplatform_detection.sh
portion of the install script is invoked in a subprocess (via backticks ``).#install_command
provided by mixlib-install. (The upside is that this drastically simplifies the implementation!) I figure an improvement to this PR could leverage an existing package resource similar to what @lamont-granquist described in his comment.2.0.0
because I figured that these changes would be significant enough to break expected behavior.:prerelease
is not yet re-implemented, though it could be with a bit more work.exec
patch from exec() chef-client to resume the run after updating the omnibus install #102 is also included in this PR since I found it helpful for my use-case, though it's not necessary and could be extracted from this PR if needed.