Puppet module for Chris Lea packages for Ubuntu, e.g. node.js and zeromq.
Inspired by niallo.
Either:
make testto perform a simple smoke test; ormake vmto create the Vagrant virtual machine and install Node.js.
I use the latter for my own testing.
apt-get updateif you have a fresh Ubuntu install, just in casecd /etc/puppet/modulesgit clone git://github.com/garthk/puppet-chrislealn -s puppet-chrislea chris- Use
chris::lea::nodejsand other classes as below - Use
chris::lea::repoto define your own classes as below
In your node definition, or whichever class it's including:
include chris::lea::nodejs
So far, I've only defined these two classes:
chris::lea::nodejschris::lea::zeromq
To add a package from a repository for which I haven't made a class:
- Use
chris::lea::repoto add the repositories - Declare your
package - Use the right
$namebetween the curly bracket and the colon: this will be the argument toapt-get install requirethe repositories you just added
Example:
class zeromq_development {
chris::lea::repo { 'libpgm': }
chris::lea::repo { 'zeromq': }
package { 'libzmq-dev':
ensure => installed,
require => [
Chris::Lea::Repo['libpgm'],
Chris::Lea::Repo['zeromq'],
],
}
}
To find out which repositories you need:
- Visit the archive page, e.g. zeromq
- Click "Technical details about this PPA"
- Look under the title "Dependencies"
- Fixed operation on Ubuntu with
sources.list.din/etc/apt - Fixed operation on Ubuntu with current
add-apt-repositoryentry filenames - Broke out definition for repository
- Set
timeout=3600forapt-get update, which can be slow - Avoided
apt-get updateif it's been done once sinceadd-apt-repository - Added
g++,libexpat1-devtonodejs - Broke out
zeromqto its own class - Packaged it all as a Puppet module
- Added Vagrantfile and Makefile