Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a good way to deploy a Perl application?

I posted this question looking for something similar to Buildout for Perl. I think Shipwright is what I'm looking for but I'm not really sure. I've played around with it and I created a project, imported all of my source and dependencies and I've exported everything to a vessel then the documentation sort of just stopped. What do I do with a shipyard vessel? Do I do my actual development work in the vessel, or do I do my development in the Shipyard? I'm assuming that the vessel is only for deployment, but how do I actually deploy a vessel to a web server (say I'm using linux, apache and just running straight cgi).

Is Shipwright the right thing for what I'm trying to accomplish or is there something else that would be more appropriate? Ideally I could use Shipwright similar to how I use Buildout. I use Buildout to create a nice isolated environment for my development, and also I use Buildout when deploying to live servers to manage all of my application's dependencies.

EDIT: Here are the highlights of what I can do with Buildout that I would like to be able to do in Perl.

With Buildout, I have a file in my codebase that lists dependencies (which for Perl would either be CPAN modules or other source repositories). I can run a bootstrap script that will fetch all of those dependencies and drop them into a directory within my project and NOT install them at a system level. Buildout also creates utility scripts which can do anything you want (run tests, other command line tools, anything really) and those scripts explicitly add the dependencies to the path so that as my scripts are running all of my dependencies are available to be imported.

What this really does very well is that it allows me to manage my dependencies without having to ever install anything at a system level. Which makes changing from one version to another very easy. Also, it allows me to have multiple Buildout projects running on the same system using different versions of the same module. Finally, one huge benefit is that with Buildout's directory structure, I can just commit the dependencies to source control and to deploy to a new machine I just need to do a checkout and all of my dependencies are already satisfied without having to touch anything installed at a system level.

like image 240
Matthew J Morrison Avatar asked Oct 14 '10 02:10

Matthew J Morrison


1 Answers

I don't think you'll find anything exactly like Buildout in Perl, but you could put together a couple of things that would do the trick.

You could use a standard Build.PL script for Module::Build for managing your dependencies and having commands to run tests, etc.

Then you could use cpanminus to do the installation of those dependencies into a local (non-system) directory.

Then you might be able to use Shipwright to do the bundling and deployment of the project with these now-local dependencies.

like image 107
mpeters Avatar answered Sep 18 '22 13:09

mpeters