How to install packages from source code with Puppet?
Solution 1:
After trying few dead-ends and from @Mike Renfro comments I came up with following steps (feel free to improve it):
Don't install packages from source code with Puppet (it takes too long and brings too many problems)
Always create binary packages. It can be easily redistributed and tested.
-
Set up your own repository - for Debian a good choice is reprepro, documentation seems to be awful, but there's a Puppet module for installing: puppet-reprepro. Adding new package is quite easy:
$ reprepro -Vb . includedeb squeeze ~/packages/my_package.deb
Create new packages with fpm. The process of building a package is surprisingly simple and much easier than writing it in Puppet script.
-
Install packages simply with:
package { "leiningen": ensure => present }
You can simply get packages which are still in testing version deploy it with your local repository.
- Use hiera for machine-specific configuration, in manifests should be only generally reusable templates for certain tasks (like web-server, db-server, etc.)