Setting up a gem repository

It's every system administrator's dream: yet another incompatible packaging system. If you manage Ruby or Rails applications, you'll need to deal with Rubygems. Maintaining your own gem repository has many of the same advantages as having an APT repository. You can control availability and package versions, and you can also use it to distribute your own gems if you need to.

How to do it…

  1. Create the file /etc/puppet/modules/repo/manifests/gem-server.pp with the following contents:
    class repo::gem-server { include apache file { "/etc/apache2/sites-available/gemrepo": source => "puppet:///modules/repo/gemrepo.conf", require => Package["apache2-mpm-worker"], notify => Service["apache2"], } file { "/etc/apache2/sites-enabled/gemrepo": ...

Get Puppet 2.7 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.