Migrate Hosts to a new Foreman instance

Well hello there!

So we created a new Foreman instance to replace an old one that we currently have in production. The version of Foreman is 1.15 and the puppet client installed in all hosts is 3.8.7.

And so now the current task is to transfer all the hosts(about 600) to this new instance(Foreman 1.21 and Puppet 5.5.14), and I don’t know how to do it. I’ve gone through the docs and forum and I didn’t really find something that would help me. But, you know, searching isn’t one of my greatest strengths : p

So basically what I would like to get out of this thread is what precautions should I have, and what should be done on the hosts, server, or both for this migration to work.

1 Like

I also need info about this topic.
Anyone knows something about this ? Whats the best procedure to migrate a large number of hosts between servers ?

So, after a ton bit of trial’n’error, I figured how to do it.

#change hostname of puppet master
[client]# vi /etc/puppet/puppet.conf

#delete certs, maybe, it’s not that necessary, but it doesn’t hurt
[client]# rm -rf /var/lib/puppet/ssl/*

#add puppetmaster to hosts, incase of no DNS resolution
[client]# vi /etc/hosts

#create certs and test connection
[client]# puppet agent -t

#on puppet maestro
[master]# puppet cert sign --all #because I’m too lazy to write all of the FQDN, judge me

#it is done, but just to test
[client]# puppet agent -t

Now the client/node/host should show up on the new foreman instance. It’s curious that I didn’t had to update the puppet agent, but that’s fine by me :stuck_out_tongue:

And now I just have to figure how to mass run this few set of commands on all of the hosts, but that’s another problem. And honestly, shouldn’t be much of a problem really.


1 Like