OverviewWe do not recommend the approach of having Chef upgrade itself. It is tricky from a process management perspective during the upgrade process, and can also result in you being surprised by something in the new release. We recommend following the specific guide for the upgrade being performed. That said, if there is some reason that you'd like to proceed with this approach within your environment, the following information may be helpful. Upgrading via aptDoing an upgrade through package distribution, as done on the individual version update guides, causes apt to restart chef-client. So in order to update chef via apt with chef, you'll need to fork off a new process that can survive the chef process being killed. For example: Clearly, not as nice as using the package resource. Alternatively, you could create a custom resource by using Chef's Lightweight Resources and Providers (LWRP) DSL. Install via apt with Knife Use to UpgradeAs mentioned, it's tricky to have chef upgrade itself. For most software that gets significant updates, chef included, we don't recommend having the system update automatically. If doing so, when using apt packages, we would use action :install, not :upgrade. This greatly reduces the potential of being surprised by anything in a new release. You can use knife to upgrade individual environments when you're ready to test and deploy. A few knife examples for consideration:
|
Labels:
None