I work on a pretty small website application, and we're just working on improving our deployment (improving it from "spend a day setting up all the modules we need on Windows and then throw files at it until everything works", so that's some improvement).
We've got three things which we need doing to set up our website:
- A Perl module made using
Module::Starter
, containing a Config
module which holds the site-wide configuration options. On installation, this module (using MakeMaker
's PREREQ_PM
to check that all the modules we require have already been installed). Any modules which haven't need to be installed before this module can be installed.
- A few SQL files which need to be executed to set up the database.
- The Perl CGI files which make up the website. As long as Apache is pointed to them, the website "just works". This includes the common code modules used by all Perl files.
Deployment consists in me pulling from everybody's Git branches and packaging a version. We can then hand this over for testing, either locally or on an Amazon EC2 instance. Once we're good to release, we either install it over the last version, or move the database over to the testing instance and make that the new instance.
Comparing this to your criteria:
- Control of libraries: Somewhat. We use CPAN modules quite extensively. To try a new version, we upgrade our own version of a module before doing that upgrade on the production server. We manually maintain a list, but since our codebase is fairly small, it's not hard to figure out which modules are being used (via
grep
ing for lines starting with use
, for instance).
- Makefile/Build integration: Yes. Any Makefile related stuff is done by our EU::MM setup. We don't have global tests, but since our entire test suite recently ended up in one folder, hopefully we'll soon have something you can run
prove
on directly.
- Version control friendly: Yes. Our entire source code is contained in a single folder, without too much duplication.
- Cross platform: Yes. We've got lots of weird stuff happening in MakeMaker to allow us to do this, but as a startup, having cross-platform code gives us valuable flexibility. We try to use Perl's core modules and tools, and Pure Perl modules from the CPAN, as much as possible.
- Single Perl install: Yes. We can handle Perl being anywhere, and installed under any settings, as long as all of Perl's own module tools can work - there's been a lot of effort put into getting
CPAN
, EU::MM
and others working well across all systems, and it seems a shame to waste it.
- Easy start up: Not really. This system evolved (ie: was not intelligently designed) from a single folder of all the source files and a text file with a list of modules which need to be installed. While formalizing testing for installed modules is a huge improvement, it still takes us something like a day to set this up, mainly spent installing our prerequisite modules (not all of them are easy to install on Windows). I'm hoping to use the Perl Win32 community to try and get issues with problematic CPAN modules ironed out.
Mind you, it's a really simple website, no XS, complicated web framework, or any such. We've also only supported this setup through about two versions, so we don't have enough experience as to how this is going to work as the code gets more complicated and our deployment platforms become more varied. I'd really appreciate any suggestions or comments on our system.