Moving from gem chef to omnibus

Im not sure if this has been brought up before, but since omnibus
seems to be the prefered way to install chef in the future, both
client and server I was thinking about moving from gem installation to
omnibus. My questions are now. Whats the easiest way to do the move? I
need all my old conf and data from my current chef server including
certificates for the clients and so fourth in the new installation
aswell.
Is there a good way to do it. Was reading the wiki and it only told my
how to install it. But not how to migrate data and how to move from
gem to omnibus.

Jens Skott
Tel: +46-8-5142 4396
Schibsted Centralen IT

Hi,

On Thu, Jan 17, 2013 at 6:04 PM, Jens Skott jens.skott@schibsted.se wrote:

Im not sure if this has been brought up before, but since omnibus
seems to be the prefered way to install chef in the future, both
client and server I was thinking about moving from gem installation to
omnibus. My questions are now. Whats the easiest way to do the move? I
need all my old conf and data from my current chef server including
certificates for the clients and so fourth in the new installation
aswell.
Is there a good way to do it. Was reading the wiki and it only told my
how to install it. But not how to migrate data and how to move from
gem to omnibus.

A while ago I moved all the clients across to omnibus and it was relatively
painless. I would highly recommend the use of heavywaters cookbook [1] - I
used it to move each of my nodes across and remove the old packages. I also
use it to update the omnibus packages from time to time.

About the only hiccup was that the cookbook did not restart chef-client if
it was running as a service and thus the old clients were still in memory.
I think I manually knife ssh'ed in and restarted chef-client on the
relevant nodes.

As for upgfrading the server - we decided it was not work the risk to
upgrade to omnibus just yet as it was running just fine. The plan is to
move across to omnibus chef server when chef 11 comes out as that is likely
to have a nice upgrade/migrate mechanism in place. YMMV

[1] GitHub - chef-boneyard/omnibus_updater: DEPRECATED: Chef cookbook to update the omnibus packaged Chef client

--
Cheers,

Peter Donald

I found a fairly (but not completely) painless migration path to a different server is this:

  • Set up the new server

  • On the chef workstation, modify your client.rb to reflect the new server. You’ll also need to delete (or rename) your client.pem file and add the validation.pem from the new server.

  • upload all your cookbooks, databags, roles etc. to the new server. Note: if you used knife to edit a databag or node attributes, you will run into trouble here.

  • On each client, delete /etc/chef/client.pem, add /etc/chef/validation.pem, and modify the /etc/chef/client.rb to point to the new server. If running Chef as a daemon, you should probably also restart the daemon. You can use the knife bootstrap mechanism to execute this script, or simply use ssh.

You may also run into issues if you use environments, and quite possibly in other situations I didn’t see in my testing.

-----Original message-----
From:Jens Skott jens.skott@schibsted.se
Sent:Wed 01-16-2013 11:04 pm
Subject:[chef] Moving from gem chef to omnibus
To:chef@lists.opscode.com;
Im not sure if this has been brought up before, but since omnibus
seems to be the prefered way to install chef in the future, both
client and server I was thinking about moving from gem installation to
omnibus. My questions are now. Whats the easiest way to do the move? I
need all my old conf and data from my current chef server including
certificates for the clients and so fourth in the new installation
aswell.
Is there a good way to do it. Was reading the wiki and it only told my
how to install it. But not how to migrate data and how to move from
gem to omnibus.

Jens Skott
Tel: +46-8-5142 4396
Schibsted Centralen IT

You can just copy over the couchdb file to the new server. There is no reason to rekey all your clients just because you migrated your chef server.

Kevin Keane Subscription subscription@kkeane.com wrote:

I found a fairly (but not completely) painless migration path to a different server is this:

  • Set up the new server

  • On the chef workstation, modify your client.rb to reflect the new server. You’ll also need to delete (or rename) your client.pem file and add the validation.pem from the new server.

  • upload all your cookbooks, databags, roles etc. to the new server. Note: if you used knife to edit a databag or node attributes, you will run into trouble here.

  • On each client, delete /etc/chef/client.pem, add /etc/chef/validation.pem, and modify the /etc/chef/client.rb to point to the new server. If running Chef as a daemon, you should probably also restart the daemon. You can use the knife bootstrap mechanism to execute this script, or simply use ssh.

You may also run into issues if you use environments, and quite possibly in other situations I didn’t see in my testing.

-----Original message-----
From: Jens Skott jens.skott@schibsted.se
Sent: Wed 01-16-2013 11:04 pm
Subject: [chef] Moving from gem chef to omnibus
To: chef@lists.opscode.com;
Im not sure if this has been brought up before, but since omnibus
seems to be the prefered way to install chef in the future, both
client and server I was thinking about moving from gem installation to
omnibus. My questions are now. Whats the easiest way to do the move? I
need all my old conf and data from my current chef server including
certificates for the clients and so fourth in the new installation
aswell.
Is there a good way to do it. Was reading the wiki and it only told my
how to install it. But not how to migrate data and how to move from
gem to omnibus.

Jens Skott
Tel: +46-8-5142 4396
Schibsted Centralen IT

On Thursday, January 17, 2013 at 4:34 AM, Wolfe, Eric G wrote:

You can just copy over the couchdb file to the new server. There is no reason to rekey all your clients just because you migrated your chef server.

There is no "official" Omnibus package for Chef Server 10.x. If you poke around, you can probably find the ones we made as demos in the S3 bucket, but those will certainly have the security vulnerability we patched last week still present.

We decided to wait to officially release omnibus packages for Chef Server until Chef 11 because we were in the process of moving to a much easier and reliable test setup[0] and didn't have a great way to test server builds under 10.x.

Also keep in mind that Chef 11 server uses Postgres instead of couch, so migration will likely use a script of some sort to move the data around. Chef 11 is still prerelease and the aforementioned migration tool is not yet written, so I would only recommend migrating to omnibus server install if you feel like it's worth a lot of work to live on the edge.

--
Daniel DeLeo

  1. GitHub - chef-boneyard/chef-pedant: DEPRECATED Integration Test Suite for Chef Sever - replaced with oc-chef-pedant