Forge Home

chrislea

Puppet module for Chris Lea packages for Ubuntu, e.g. Node.js and ZeroMQ.

10,373 downloads

10,373 latest version

1.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.2 (latest)
released Apr 3rd 2012

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'garthk-chrislea', '1.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add garthk-chrislea
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install garthk-chrislea --version 1.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

garthk/chrislea — version 1.0.2 Apr 3rd 2012

Puppet module for Chris Lea packages for Ubuntu, e.g. node.js and zeromq.

Inspired by niallo.

Testing:

Either:

  • make test to perform a simple smoke test; or
  • make vm to create the Vagrant virtual machine and install Node.js.

I use the latter for my own testing.

Usage:

  • apt-get update if you have a fresh Ubuntu install, just in case
  • cd /etc/puppet/modules
  • git clone git://github.com/garthk/puppet-chrislea
  • ln -s puppet-chrislea chris
  • Use chris::lea::nodejs and other classes as below
  • Use chris::lea::repo to define your own classes as below

Installing Node.js:

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::nodejs
  • chris::lea::zeromq

Installing Other Packages:

To add a package from a repository for which I haven't made a class:

  • Use chris::lea::repo to add the repositories
  • Declare your package
  • Use the right $name between the curly bracket and the colon: this will be the argument to apt-get install
  • require the 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"

Adjustments from original:

  • Fixed operation on Ubuntu with sources.list.d in /etc/apt
  • Fixed operation on Ubuntu with current add-apt-repository entry filenames
  • Broke out definition for repository
  • Set timeout=3600 for apt-get update, which can be slow
  • Avoided apt-get update if it's been done once since add-apt-repository
  • Added g++, libexpat1-dev to nodejs
  • Broke out zeromq to its own class
  • Packaged it all as a Puppet module
  • Added Vagrantfile and Makefile