# Best way to (minor) upgrade chef server?

**URL:** <https://discourse.chef.io/t/best-way-to-minor-upgrade-chef-server/5037>\
**Category:** Chef Infra (archive)\
**Created:** [February 4, 2014, 2:35pm UTC](https://discourse.chef.io/t/best-way-to-minor-upgrade-chef-server/5037 "2014-02-04T14:35:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_De\_Coeyer](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steven_de_coeyer/32/328_2.png) [@Steven\_De\_Coeyer](https://discourse.chef.io/u/Steven_De_Coeyer)\
**Post date:** [February 4, 2014, 2:35pm UTC](https://discourse.chef.io/t/best-way-to-minor-upgrade-chef-server/5037/1 "2014-02-04T14:35:06Z")

</div>

Hi

I couldn’t find this in the docs. What’s the best way to upgrade chef server from say 11.0.8 to 11.0.10?  
Just "dpkg -i chef-server.deb && chef-server-ctl reconfigure” or are there any more actions required?

Kr,  
S

---

<div class="post-metadata">

**Author:** ![Seth\_Falcon10](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/seth_falcon10/32/307_2.png) [@Seth\_Falcon10](https://discourse.chef.io/u/Seth_Falcon10)\
**Post date:** [February 4, 2014, 5:13pm UTC](https://discourse.chef.io/t/best-way-to-minor-upgrade-chef-server/5037/2 "2014-02-04T17:13:46Z")

</div>

steven@banteng.be writes:

> I couldn’t find this in the docs. What’s the best way to upgrade chef server from say 11.0.8 to 11.0.10?  
> Just "dpkg -i chef-server.deb && chef-server-ctl reconfigure” or are  
> there any more actions required?

You should stop the services first before upgrading. So for a minor  
update:

chef-server-ctl stop  
dpkg -i chef-server-$VERSION.deb  
chef-server-ctl reconfigure  
chef-server-ctl start  
chef-server-ctl status

- seth

--  
Seth Falcon | Development Lead | CHEF | [http://www.getchef.com/](http://www.getchef.com/) | @sfalcon

---

<div class="post-metadata">

**Author:** ![sdelano](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sdelano/32/35_2.png) [@sdelano](https://discourse.chef.io/u/sdelano)\
**Post date:** [February 4, 2014, 5:25pm UTC](https://discourse.chef.io/t/best-way-to-minor-upgrade-chef-server/5037/3 "2014-02-04T17:25:31Z")

</div>

Unfortunately, `chef-server-ctl stop` will not work on the most recently  
released versions of chef-server. The reconfigure recipe for Postgres tries  
to determine if it needs to create the database, and the database needs to  
be running for this to take place. You should be just fine running the  
commands you mentioned in your first post (dpkg -i / reconfigure).  
Depending on the size of your infrastructure, Solr may take some time to  
restart and has even timed out on occasion. If this happens, simply wait  
for Solr to start back up and run reconfigure again.

The Postgres recipe bug will be fixed in the next release of chef-server,  
which is currently in the works:

> <https://github.com/chef-boneyard/omnibus-chef-server/commit/70f48c174dae13a5fb63ae2aeefff55ab0d181de>
>
> Add PgHelper to organize guards used in the postgresql recipe. With
> these change…s we skip resources that create dbs and db users if the db
> isn't running. If the db \_is\_ running, then we run checks to make the
> resources idempotent.
> 
> This change allows the following command sequence to succeed:
> 
> chef-server-ctl stop
> chef-server-ctl reconfigure
> chef-server-ctl start
> 
> This is an important pattern for upgrades and for major config
> changes, such as changing the port on which a service runs.

-Stephen

On Tue, Feb 4, 2014 at 9:13 AM, Seth Falcon [seth@getchef.com](mailto:seth@getchef.com) wrote:

> steven@banteng.be writes:
> 
> > I couldn't find this in the docs. What's the best way to upgrade chef  
> > server from say 11.0.8 to 11.0.10?  
> > Just "dpkg -i chef-server.deb && chef-server-ctl reconfigure" or are  
> > there any more actions required?
> 
> You should stop the services first before upgrading. So for a minor  
> update:
> 
> chef-server-ctl stop  
> dpkg -i chef-server-$VERSION.deb  
> chef-server-ctl reconfigure  
> chef-server-ctl start  
> chef-server-ctl status
> 
> - seth
> 
> --  
> Seth Falcon | Development Lead | CHEF | [http://www.getchef.com/](http://www.getchef.com/) | @sfalcon

--  
Stephen Delano  
Software Development Engineer  
Opscode, Inc.  
1008 Western Avenue  
Suite 601  
Seattle, WA 98104
