Puppetize
I'm trying to puppetize my server so that it will be possible to upgrade to new hardware.
I have been doing Ubuntu upgrades for several releases and there is a lot of cruft gathering. I should do a clean install, but that seems like too much work and is too dangerous when so many services are running on one machine.
Enter puppet.
Now my strategy is to define each service that is running on my server on a separate puppet master. I copy the configuration over, describe it to puppet, and have puppet enforce that configuration on a test VM. I can work on one service at a time until they are all defined properly. I can destroy and recreate the VM occasionally to make sure that the puppet config can get all the dependencies right. And eventually, I'll be able to buy a new machine, point puppet at it and press the button: wham, a new functioning server.
So how is that beautiful dream working out for me?
I'm running into troubles with init scripts. I've only started defining a few services, apache, mysql, mediawiki. And already I get this:
root@ferret:/var/lib/mediawiki/maintenance# puppetd -t --noop info: Caching catalog for ferret.finninday.net info: Applying configuration version '1305993346' notice: /Stage[main]/Mysql::Server/Service[mysql]/enable: is false, should be true (noop) notice: /Stage[main]/Apache/Service[apache2]/enable: is false, should be true (noop) notice: Finished catalog run in 12.84 seconds
Puppet thinks that mysql and apache are not enabled to start at boot, so it tries to fix that. But ubuntu's method of starting services at boot and puppet don't get along. Actually, those services are enabled at boot, so puppet's change has no effect, but the test still fails and puppet things they are not enabled.