Friday, October 09, 2009

Puppet - Installing a library for scratchbox

Today I deployed a library that was needed for the mobile team to add a feature to Fennec in all of our Linux slaves.

To do this we use Puppet and I had to modify our puppet-manifests to do so. It was kind of different that the last time Ben Hearsum guided me to deploy the latest binaries for the JS coverage (bug 511911). This time it was about adding a library inside of scratchbox rather than just adding it straight to the slave.

The puppet manifest pretty much work like this:
  • In the site-{staging,production}.pp files we declare the slaves we control and which classes to include for each one of them
  • In the buildslave.pp and staging-buildslave.pp file we include packages
  • Each package contains instructions on what to do. From user management, to file permission verification to file execution if a file is missing. A complete example is devtools.pp but a simple example is the extras.pp I wrote.
In my situation this deployment was a little special because puppet runs as root user but scratchbox does not allow calling it by a privileged user so I had to use "su - cltbld -c ".

For full details you can read the bug I worked on (bug 520562) or read my monologue on the puppet-users mailing list.





Creative Commons License
This work by Zambrano Gasparnian, Armen is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

No comments:

Post a Comment