> For example, this snippet of ruby could be used in a recipe to install a perl, configure > a library, install some CPAN modules to the library, and then run a perl command using that > perl and library: >
> >
> include_recipe 'perlbrew'
>
> perlbrew_lib 'perl-5.8.9@xdg'
>
> perlbrew_cpanm "Stuff we need" do
> perlbrew 'perl-5.8.9@xdg'
> modules ['Data::UUID::MT', 'Data::GUID::Any']
> end
>
> perlbrew_run "print a UUID" do
> perlbrew 'perl-5.8.9@xdg'
> command "perl -MData::GUID::Any -le 'print Data::GUID::Any::guid_as_string'"
> end
>
>
> carton
> >The carton cookbook > satisfies deliverable #3. It provides an LWRP called 'carton_app' that uses > carton to install application-specific > dependencies into a application-local directory and then sets up the application as a system service using > runit. >
> >> For example, this snippet of ruby could be used in a recipe to launch a > carton-based application from a deployment directory. Note that most of the > application-specific attributes are parameterized using Chef's 'node' data > structure for each deployment node, making it easy to change how the > application is deployed to different servers: >
> >
> include_recipe 'carton'
>
> carton_app "hello-world" do
> perlbrew node['hello-world']['perl_version']
> command "starman -p #{node['hello-world']['port']} app.psgi"
> cwd node['hello-world']['deploy_dir']
> user node['hello-world']['user']
> group node['hello-world']['group']
> end
>
> carton_app "hello-world" do
> action :start
> end
>
>
> Current work and next steps
> >> I have started refactoring the initial draft of pantry to make it easier to > configure nodes without requiring users to edit JSON directly (deliverable #4). > This will let me streamline the tutorials and help users following the tutorial > to avoid introducing JSON errors and getting stuck. >
> >> Next month I expect to finish and publish the hello-world tutorial (deliverable #5) > and have a (rough) draft of the "real world" tutorial (deliverable #6). >
> >> I was pleased to hear that my OSCON proposal was accepted and my Cooking Perl with Chef talk > will be on Thursday, July 19. That presentation will > satisfy deliverable #7 (though I may deliver a draft early as a test run). If > I find out that my OSCON session will be videotaped, I'll use that as the > video tutorial (deliverable #8). If not, I'll prepare a separate screen cast. > (I may do both and use the short screencast as part of the talk to avoid the > risk of a live demo.) >