[chef] Re: Re: Re: Best Practice Performing Upgrade and Uninstall


Chronological Thread 
  • From: Torben Knerr < >
  • To:
  • Subject: [chef] Re: Re: Re: Best Practice Performing Upgrade and Uninstall
  • Date: Wed, 21 Aug 2013 07:10:38 +0200

Hi Howard,

If you want to uninstall a piece of software via chef the easiest way is to use the 'package' resource with the ':remove' action:

package "apache2" do
  action :remove
end

To make sure you always upgrade to the latest available version use ':upgrade':

package "apache2" do
  action :upgrade
end

You can also pin the specific version you want to install:

package "apache2" do
   version "1.0"
   action :install
end

See here for more information:
http://docs.opscode.com/resource_package.html

HTH,
Torben

On Aug 21, 2013 5:04 AM, "Howard Zhang" < "> > wrote:
I assumed Chef server could do it too. Chef Server bump all version of cookbooks I uploaded, all I need is to assign a specific version of cookbook to run list. I think that is not what I am talking about.

Take source code of tomcat for example. I download the source code zip, put it in "file" folder. I write a recipe to install it, blah, blah blah. 
What I concern is how to do the upgrade, when major version changes come? What is the best practice or say "common practice" you guys using?


Sincerely,
Howard Zhang Haohua
MSc Student in Information Technology
The Department of Computer Science and Engineering
School of Engineering
Hong Kong University of Science and Technology
Email: " target="_blank">
about.me/HowardZhang


On Wed, Aug 21, 2013 at 10:30 AM, Ranjib Dey < " target="_blank"> > wrote:
are you using berkshelf? berks can show you outdated cookbooks using `berks outdated`. We manually run this and update minor version changes whenever available, and then test it in staging. Except the version bump in Berksfile, rest is automates (i.e. uploading cookbook & testing it on staging ). 


On Tue, Aug 20, 2013 at 7:20 PM, Howard Zhang < " target="_blank"> > wrote:
Hi,

I am new to Chef.

I ran over some recipes in several cookbooks maintained by the community. 

All I see is installation.  I wonder the best practice of upgrading and uninstalling software?  

Could you give me some brief idea how to upgrade and uninstall software? (please do not say " apt-get uninstall").

PS: I also ran over some recipes on OpsWorks which is one part of service provided by AWS.

Cheers,
Howard






Archive powered by MHonArc 2.6.16.

§