Production Puppet

This page describes the steps that the Puppet configuration management system should be responsible for.

Setup
Setup DW user account and add it to sudo.

adduser dw echo "dw ALL=NOPASSWD: ALL" >> /etc/sudoers

Configure /etc/apt/sources.list to use our cache:

deb http://dw-lb01:9999/ubuntu/ hardy main restricted universe deb-src http://dw-lb01:9999/ubuntu/ hardy main restricted universe deb http://dw-lb01:9999/ubuntu/ hardy-updates main restricted universe deb-src http://dw-lb01:9999/ubuntu/ hardy-updates main restricted universe deb http://dw-lb01:9999/ubuntu hardy-security main restricted universe deb-src http://dw-lb01:9999/ubuntu hardy-security main restricted universe

Let's do a system update and upgrade. This may not be something we can easily do in puppet? Or is it? I only want to do this from time to time - i.e., only on initial install, and only manually. (I don't want to automatically update packages every night, e.g.)

apt-get update apt-get dist-upgrade

Now install packages:

vim-perl screen mercurial subversion dh-make-perl apache2-mpm-prefork libgtop2-dev libapache2-mod-perl2 libapache2-request-perl libcaptcha-recaptcha-perl libclass-accessor-perl libclass-autouse-perl libclass-data-inheritable-perl libclass-trigger-perl libcompress-zlib-perl libcrypt-dh-perl libdbd-mysql-perl libdbi-perl libdatetime-perl libdigest-hmac-perl libmd5-perl libdigest-sha1-perl libgd-gd2-perl libgd-graph-perl libgnupg-interface-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libio-stringy-perl perlmagick libimage-size-perl libwww-perl libwww-perl libmime-lite-perl libmime-perl libmailtools-perl libmail-gnupg-perl libmath-bigint-gmp-perl libnet-dns-perl libproc-process-perl librpc-xml-perl libsoap-lite-perl libstring-crc32-perl libtext-vcard-perl liburi-fetch-perl liburi-perl libunicode-maputf8-perl libxml-atom-perl libxml-rss-perl libxml-simple-perl mysql-client

Next up, we need to configure Apache. This only needs to be done on webservers. On non-webservers, we need to DISABLE "apache2" from starting at boot time.

$ cat /etc/apache2/conf.d/dw.conf User dw Group dw UseCanonicalName off StartServers 3 MaxSpareServers 5 MinSpareServers 1 MaxClients 2 MaxRequestsPerChild 200 DocumentRoot /home/dw/current/htdocs PerlSetEnv LJHOME /home/dw/current PerlPassEnv LJHOME PerlRequire /home/dw/current/cgi-bin/modperl.pl

There's some more Apache setup that is required to get rid of the default site and enable the request library:

sudo a2dissite default sudo a2enmod apreq

...