Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have some servers managed by chef who are running (partly) the same software, e.g. nginx. If nginx has a security issue and there is a new version, what is the best practice to install the new version on all servers?
No, I actually meant to ask whether you've instructed Chef to install nginx through (for instance) yum or compile it from source. yum_package supports the definition of software versions. If you've compiled from source, you could check for the software version through the nginx -v command and grep for the version you want, only reinstalling nginx if it doesn't match your pattern.
I am using the offical nginx cookbook supermarket.getchef.com/cookbooks/nginx v.1.4.0, nginx not from source.. In this case the have a default version specified default['nginx']['version'] = "1.2.6"
Why not add nginx version as an attribute + download nginx binaries based on that. So, when you want to upgrade, just change the value of attribute and you are ready to upgrade. This will help you to copmare and backup old data
yum_package
supports the definition of software versions. If you've compiled from source, you could check for the software version through thenginx -v
command and grep for the version you want, only reinstalling nginx if it doesn't match your pattern.default['nginx']['version'] = "1.2.6"