Just getting my feet wet with puppet (just reading so far), and was hoping there were some sample (real life) manifests/recipes that setup a typical web server with things like apache/mysql/php etc. along with basic server hardening (ubuntu)
Just getting my feet wet with puppet (just reading so far), and was hoping there were some sample (real life) manifests/recipes that setup a typical web server with things like apache/mysql/php etc. along with basic server hardening (ubuntu)
Unfortunately such a thing doesn't really exist. Using Puppet is kinda like developing web apps before there were frameworks. You will write a lot of scaffolding code.. well at least that's been my experience so far. The Puppet Module Forge is very hit or miss and I've been fairly unimpressed with most of the modules there.
I would recommend looking at Example42's attempts to create a coherent system. I used a number of his modules to bootstrap my latest Puppet install You're going to need to modify quite a bit of his code because it's based on RHEL/CentOS however he uses a params class which makes supporting other distros pretty simple.
With puppet the best thing to remember is to try to create modules for all of your manifest so the code an easily be reused for multiple servers and environments.
Also make use of SVN or GIT this way you can easily track changes and checkout config files needed for a given application. As kashani stated both Puppet Forge and Example42 can be some good references.
Below is a sample manifest that I have created for web servers. This will give you the option to both install/uninstall a web server if required. You'll notice it uses the facter facts for check for both OS and architecture to install the correct RPMS (Centos). Though you could easily take this as a template and expand to Ubuntu with the correct package names.
To add additional functionality to the basic manifest you just call it from within another manifest. Such as installing and SSL http server. The code below, you'll see that --include apache-- is used to call the manifest above then also install aditional options.
You can have something like this. The exact package name depends on the operating system you're using. Put the following in /etc/puppet/modules/webserver/manifests/init.pp:
Then in your /etc/puppet/site/nodes.pp file put: