Introduction
Without applications, a server is just a very expensive space heater. In this chapter, I'll present some recipes for managing some specific software with Puppet: MySQL, Apache, Nginx, and Ruby. I hope the recipes will be useful to you in themselves. However, the patterns and techniques they use are applicable to almost any software, so you can adapt them to your own purposes without much difficulty.
One point to watch (if you're not using Ubuntu 12) is that package names will often be different from one Linux distribution to the next (mysqld
instead of mysql-server
, for example). So check with your distribution to find out the correct name for a given package. The name of the service and the location of the config files for a package may also vary depending on the packager's preferences. The logic of the Puppet manifests, however, shouldn't be affected by these local differences. If you need to make your manifest portable across distributions, you could use a mechanism like Hiera...