How do I test the update/migration from Enterprise Chef 11 to Chef Server 12?

Peter Burkholder -

All commands are 'root'




EC11 = Enterprise Chef 11 aka Private Chef

CS12 = Chef Server 12

Debian/Ubuntu systems use the same process, except for the use of .deb files and dpkg commands

  1. Stop current server and get a backup (then start it again)
  2. On a new server, install Enterprise Chef 11, then overwrite data with your backup
  3. Test the new server functions as expected
  4. Continue with upgrade


On current Enterprise Chef server


Validate your current install passes tests

private-chef-ctl test

Stop things in sane state

private-chef-ctl reconfigure
private-chef-ctl stop
/bin/rm -f /etc/opscode/chef-server.rb #  (settings will be copied from private-chef.rb)

Make the backups

# Backup just the data and configs:
for i in \
  "`find /var/opt/opscode -name "data" && find /var/opt/opscode/rabbitmq -name "db"`"; do
    tar -cvpf $chefbackup $i;

tar --append -pvf $chefbackup /etc/opscode --exclude /etc/opscode/chef-server-running.json
bzip2 $chefbackup

# Backup everything -- we shouldn't need it, but just in case
tar -czpf /var/chefall.tgz /var/opt/opscode /etc/opscode

Verify the backup

ls -lh $chefbackup.bz2 # should be 8M at a min
bzip2 -d -c $chefbackup.bz2 | tar -tf -   # should see lots of files

(Restart the service, if desired)

private-chef-ctl start


On the new Chef Server 12 system:

Get the RPMs onto the box for the current version and the next version

You can get the current release URLs from, here's an example set of commands (the -L is needed to follow redirects)

curl -L \ \
  -o /root/chef-server.rpm -vs
curl -L \ \
  -o /root/private-chef.rpm -vs

Do the install of EC

rpm -Uvh /root/private-chef.rpm 

Delete data and restore with your data:

RM='/bin/rm -rf'
for i in \
  "`find /var/opt/opscode -name "data" && find /var/opt/opscode/rabbitmq -name "db"`"; do
    $RM $i;
    $RM /etc/opscode
# Assume you have copied over the $chefbackup file from EC11
bzip2 -d -c $chefbackup.bz2 | tar -C / -xvf -

Reconfigure and test

private-chef-ctl reconfigure
private-chef-ctl start
private-chef-ctl test

Test from workstation

knife node list --server https://<server_address>/organizations/<org_name>
knife node search '*:*'--server https://<server_address>/organizations/<org_name>
knife cookbook list --server https://<server_address>/organizations/<org_name>

Test from a client system

chef-client --server https://<server_address>/organizations/<org_name>


Continue with Upgrade...

Have more questions? Submit a request


Powered by Zendesk