0

There are 2 subscriptions in Azure and migrating Chef from Chef Server1(subscr-1) to another Server2(subscr-2) in Azure. The process followed is using the VHD files. The VHD files are created from Server1(Subscr1) and VMs are provisioned using the VHD images in the subscription-2. This worked and able to login to Server2 using the same credentials from Server1.

The services are running and did restarted the services. Chef URL was not working and made hostname change(edited /etc/hosts,/etc/hostname) and executed "chef-server-ctl reconfigure".But the URL is not coming up. Then reverted hostname change(no explict hostname or ip in the hosts file) and added the line like below to hosts file.

#/etc/hosts
127:0.0.1 old.chef.server.blob-url.cloud.com 

And rebooted the server and Chef URL worked. Thought of reproducing the issue and did changed the hostname and could not bring the Chef URL working.Did executed reconfigure and restarted the services and restarted the VM. But Chef URL is not coming up.

What is the correct way to migrate Chef from one subscription to another and what are files/changes needs to be made to make the Chef working.

intechops6
  • 1,007
  • 4
  • 22
  • 43

1 Answers1

0

Rather than copying the whole disk image, take an actual Chef Server backup and then restore it to the new server. Make sure you include any needed config settings from your chef-server.rb too.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • yeah this is the traditional way for migration and since Azure has a option to copy image to another subscription, copied the image to new subscription. There is no documentation for Chef server migration using the traditional way(backup in old server and create configuration in the new server). – intechops6 Jul 18 '16 at 05:06
  • I mean the docs are to just do that. If you mean docs on backups, https://docs.chef.io/server_backup_restore.html – coderanger Jul 18 '16 at 06:13