http://qs1969.pair.com?node_id=838262


in reply to advice sought on perl web dev setup

I have certainly done the deal where I stage and deploy at distinct vhosts on the same server. But its not ideal.

Having to deploy to both a staging server and a production server actually offers an opportunity to strengthen your Makefile.PL and other deployment tools.

On my desktop, where my sandbox has grown to over 620mb over the past few years, it is easy to overlook dependencies. Some of my early releases of new modules get plenty of red marks from the smoke testers because my Makefile.PL failed to list all the code I was relying on without being being conscious that it was underneath what I was doing.

Cloud providers like rackspacecloud or aws let you spin up a fresh server in a matter of moments (and for pennies an hour) where you get to build everything from scratch. Its an excellent environment in which to work out the details of your deployment code. And automating those builds helps to flush out the bugs.

CGI::App can have you monitoring cpan builds for days it seems, but even that can be nearly automated if you configure cpan appropriately to follow dependencies.

And every now and then, you can take your staging server, shut it down and spin up a new instance with which to test everything again. If you are careful to copy your /etc/shadow and other key config files from /etc, you can migrate your testbed from one staging server to another, without losing your team in the process.

And everytime you do so, you will flush out issues you manually worked through last time, but will automate this time for the next time. After a few iterations of that, you'll have pretty strong deployment code.

-- Hugh

if( $lal && $lol ) { $life++; }
if( $insurance->rationing() ) { $people->die(); }