2012Q1 Grant Proposal: Cooking Perl with Chef

Cooking Perl with Chef

Name:

David Golden (DAGOLDEN/xdg)

Email:

[Hidden]

Amount Requested:

USD $2000

Synopsis

I propose to create ready-to-use tools and supporting tutorials that teach Perl developers (and the sysadmins that support them) how to deploy Perl applications repeatable and reliably using the Chef configuration management tool.

Benefits to the Perl Community

First-class support for Perl in Chef, just like other web development languages

Open cookbooks and tutorials to encourage sharing techniques and practices for app deployment

Deliverables

Code deliverables:

Publish a Chef cookbook for Perl interpreter deployment

Publish a Chef cookbook for CPAN module deployment

Publish a Chef a cookbook for Plack application deployment

Improve the Pantry command line tool for configuring servers with Chef Solo

Publish a document-style "real world" tutorial with step by step instructions for deploying a complete application stack for a real application

Release a video demonstration of "hello world" deployment, as either a screencast or a recording of a conference/seminar presentation

Project Details

Motivation (aka "the problem")

Automated configuration management tools are increasingly part of the toolbox for Internet technology companies, but support for Perl and Perl application frameworks lags behind other dynamic languages. This makes Perl harder to integrate into an environment that already uses such tools and makes it harder for Perl-oriented companies to adopt such tools.

While these difficulties can be overcome, deploying Perl applications with configuration management tools remains an idiosyncratic black art, with the knowledge of how to do it locked up in the minds (or companies) that have done it. For someone new to configuration management, the learning curve is steep.

Approach (aka "the solution")

Over the last couple months, I have been experimenting with deploying Perl applications using the Chef configuration management tool. I demonstrated my "proof-of-concept" code at the Orlando Perl Workshop in January. I continue to tinker with this code and seek a grant to support and motivate turning this experiment into public resources for the Perl community at large.

Multiple perls and multiple apps deployed simultaneously on a single server

My proof-of-concept combines existing tools like perlbrew, local::lib, carton, Plack, and so on to achieve these goals. While the proof-of-concept tools work, they need further refinement, documentation end testing before they are release-ready for general use.

Once these cookbooks and tools are created, I want to make them easy to learn. Since not everyone learns the RTFM way, I propose to create two step-by-step tutorials that walk someone though deploying an application from bare (virtual) metal to live server.

The first tutorial will be the configuration management equivalent of "hello world" -- it will be the smallest code that can show the essential components and steps of the solution. Since not everyone learns from reading tutorials and since there appears to be popular appeal for screencast tutorials, I will also record a video of this tutorial. (Or, if an appropriate conference/seminar opportunity arises to make such a demonstration during the grant period, I will provide that instead.)

The second tutorial will be a "real world" one that shows how a full application -- including supporting, non-Perl components like a web-server, database, caching layer, etc. -- can be deployed and configured. I have not settled on an application for this tutorial, but I consider the CPAN Testers Metabase or the Jitterbug continuous integration server to be leading candidates.

Inch-stones

See "Deliverables" for general work-blocks.

Each of the code deliverables will be broken into "coding", "documentation" and "release" inch-stones.

Written teaching documents will be broken into "rough draft", "peer review", "final draft" and "release" inch-stones.

The video deliverable will be broken into "storyboard", "recording", "post-production" and "release" inch-stones.

Project Schedule

The project is estimated to take three months. I will begin immediately upon being awarded the grant.

Completeness Criteria

All code and teaching deliverables will be published online under open licenses.

I have absolutely zero doubt that David will deliver what he promises. His track record in following through on what he starts is excellent.

As for the choice of tool, I'd also prefer to see puppet used as well, simply because $work uses it heavily. That being said, I believe that David's work on Chef would be valuable, not only standing on its own, but also as research and example on how other volunteers can build similar setups with other tools. His inclusion of documentation and learning material in the grant may go a long way towards sharing the design work.

I left a comment before, but it seems lost in the moderation queue, so I'll try again.

Re: Chef developer support -- no direct support needed. Their community cookbook site seems open to just about any reasonable contribution.

Re: Chef vs puppet -- I think this is like emacs-vs-vi. I looked at both and Chef fit my brain better. Support for standalone mode with Chef Solo also seems better than the equivalent with Puppet, which has nice properties that I won't go into here, but might blog about someday.

As Steffen said, I think the techniques/patterns I'm developing for Chef could be translated to Puppet by a reasonably skilled Puppet hacker.

I'd like to see better integration for Perl projects in such projects. Companies often want use the same tools for all applications they develop (no matter what language the application is written in). So I support this grant application!

What I would really love is a good interface to apt. I have tried to write a script to run immediately after installing a fresh Ubuntu. I finally gave up because I couldn't get useful information about what was installed, installable, which repositories were available, etc etc. That would be a great thing. Once that was running, I would be happy to incorporate it into Alien::Base or support its existence in some other installer mechanism.