- From: Seth Falcon <
>
- To: "<
>" <
>
- Subject: [chef] Re: chef-server 11 migration
- Date: Mon, 7 Jan 2013 04:56:14 +0000
- Accept-language: en-US
Hi there,
On Jan 5, 2013, at 5:50 AM, Jesse Campbell wrote:
>
They've been saying MySQL or postgresql will both be supported.. my group
>
has been all-in MySQL, so I'm hoping that will still be the case.
The Chef 11 Server will ship with a Postgresql db and schema. We are not
planning to support other database engines.
Initially we were targeting support for pg and mysql, but decided to
concentrate efforts on a single db engine. The primary motivation being that
we can spend time improving the server in terms of features, performance, and
reliability rather than on cross db compatibility. It's a compromise. And
that is to say, it is the sort of decision guaranteed not to make everyone
happy.
One thing to be aware of is that with Chef 11 we are moving to an
all-dependencies-included package model for the server (dubbed "omnibus").
So, for example, you will be able to install a complete Chef Server like:
dpkg -i chef-server.deb
sudo chef-server-ctl reconfigure
If you are a MySQL shop, you won't have to separately install postgresql.
>
On Fri, Jan 4, 2013 at 5:12 PM, Kirill Timofeev
>
<
>
>
wrote:
>
I want to try chef-server 11. In order to do this I installed chef-server
>
11 and want to migrate some clients to it preserving certificates so that I
>
could switch those clients back to old chef-server. I couldn't find any
>
guidelines on migration and since server 11 uses postgress instead of
>
couchdb I expect migration should have some peculiarities. May I ask you to
>
share knowledge on this kind of migration?
Thanks for giving the alpha builds a try! We don't yet have official
migration tools. But I think I can help you with a couple of knife exec type
scripts for experimenting with.
The only real trick is to know that in the Chef 11 server, you can set the
public_key of a client when you create the client as an alternative to having
the client generate a key pair for you.
On your existing Chef10 server, put the following in download.knife and run
it as an admin client like `knife exec download.knife`.
###
# disable JSON inflation
JSON.create_id = "no_thanks"
out_dir = "BACKUP"
Dir.mkdir(out_dir)
# backup nodes
Dir.mkdir(File.join(out_dir, "nodes"))
node_names = api.get("nodes").keys
node_names.each do |name|
the_node = api.get("nodes/#{name}")
open(File.join(out_dir, "nodes", name), "w") do |f|
f.write(the_node.to_json)
end
end
# backup clients for nodes
Dir.mkdir(File.join(out_dir, "clients"))
node_names.each do |name|
client = api.get("clients/#{name}")
open(File.join(out_dir, "clients", name), "w") do |f|
f.write(client.to_json)
end
end
###
Then in your Chef11 test environment, you can use the following to create
matching clients and nodes. The rest of the data should be pretty easy to
replicate (knife cookbook upload -a, etc)
###
# disable JSON inflation
JSON.create_id = "no_thanks"
out_dir = "BACKUP"
# load clients
Dir["#{out_dir}/clients/*"].each do |path|
client = JSON.parse(IO.read(path))
api.post("clients", {
:name => client['name'],
:public_key => client['public_key']
})
end
# load nodes
Dir["#{out_dir}/nodes/*"].each do |path|
the_node = JSON.parse(IO.read(path))
api.post("nodes", the_node)
end
###
Hope that helps. Please report any problems you encounter with Chef11 to the
list or file as bugs in the CHEF public bug tracker.
+ seth
--
Seth Falcon | Opscode
Archive powered by MHonArc 2.6.16.