Cooking Perl with Chef - Grant Report #3

No Comments

David Golden reported:

Current progress

Three of the eight deliverables are complete and a fourth is substantially complete:

  1. Publish a Chef cookbook for Perl interpreter deployment
  2. Publish a Chef cookbook for CPAN module deployment
  3. Publish a Chef cookbook for Plack application deployment
  4. Improve the Pantry command line tool (80%)

Pantry

I released new versions of Pantry to CPAN, which add support for command-line configuration of Chef nodes and roles for use with Chef Solo.

For example, here is how one might use it to create node and role configuration data in a project directory. The following commands create properly structured JSON configuration data files for a "web" role (that has NTP and nginx deployed, with nginx as user 'nobody') and for the "www.example.com" server that fulfills that role:

$ mkdir my-project && cd my-project
$ pantry init
$ pantry create role web
$ pantry apply role -r ntp -r nginx
$ pantry apply role --default nginx.user=nobody
$ pantry create node www.example.com
$ pantry apply node www -R web
Assuming the 'ntp' and 'nginx' cookbooks are copied into the 'cookbooks' directory of the project folder (whether from the Opscode community site or from a git repository), the following commands would configure the server by copying all necessary files via ssh/rsync and invoking 'chef-solo' on the server:
$ ssh-add ~/path/to/ssh/key/id_dsa
$ pantry sync www

The server must already be bootstrapped with chef-solo, but this step will be described in the teaching deliverables. I may explore tools like Vagrant to help people get virtual images bootstrapped for the tutorials.

Pantry needs some additional work to support different deployment environments, but I've put that on the back burner until the teaching deliverables are underway.

Other CPAN modules

I've also been working on getting Metabase code in shape to be used for the real-world tutorial. This took a bit longer than I anticipated as some of it had not been touched in some time and evolution of dependencies (e.g. Moose, Catalyst, CHI) broke some things that needed fixing.

Between Pantry and the Metabase work, over the last month, I released 10 distributions directly or indirectly related to my work on this grant:

I also shaved various yaks in my build tools. For those who use similar tools, you may appreciate some of the improvements in these:

Current work and next steps

I've spent a larger-than-expected chunk of time updating the Metabase codebase, but I now have complete proofs-of-concept for the following:

  • Deploying MongoDB nodes via pantry/chef-solo
  • Metabase web server using the new MongoDB backend (tested locally only)

The next step will be deploying Metabase via pantry/chef and then testing the two-node system. After that is complete, I will start drafting the teaching deliverables for the grant.

Leave a comment

About TPF

The Perl Foundation - supporting the Perl community since 2000. Find out more at www.perlfoundation.org.

About this Entry

This page contains a single entry by Alan Haggai Alavi published on May 20, 2012 10:06 AM.

2012Q2 Grant Proposals was the previous entry in this blog.

2012Q2 Grant Proposal Results is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.38