hawknewton / puppet-pulp

A module for installing and managing the pulp repository on redhat linux
9 stars 15 forks source link

Build Status

Overview

This module makes an honest attempt at installing the The Pulp Repository, including it's consumer and administration clients, onto a redhat system of your choice. The Pulp Repo brings to the table (among other things) the ability to host an internal puppet repository (like puppetforge but without the pretty web interface).

Quickstart

Install the server, admin client, and consumer on the same box:

class { 'pulp': }               # Install pulp v2 yum repo
class { 'pulp::server': }       # Install pulp server
class { 'pulp::admin_client': } # Install admin client
class { 'pulp::consumer': }     # Install pulp agent and client

# Create a puppet repo
puppet_repo { 'repo_id':
  # Default pulp admin login/password
  ensure       => 'present',
  login        => 'admin',
  password     => 'admin',
  display_name => 'my test repo',
  description  => "I lifted this repo from the pulp puppet module and didn't change the description!",
  feed         => 'http://forge.puppetlabs.com',
  queries      => ['query1', 'query2'],
  schedules    => [ '2012-12-16T00:00Z/P1D', '2012-12-17T00:00Z/P1D' ],
  serve_http   => true,
  serve_https  => true,
  notes        => {
    'note1' => 'value 1',
    'note2' => 'value 2'
  }
}

The default configuration is rather nieve. It does nothing beyond what's outlined int The Pulp's installation section. If you want to use this for real you'll likely want to provide additional configuration to secure and customize your installation.

Installation

Detailed information is avaialble in the installation section of The Pulp user guide

Supported Operating Systems

Server

Consumer

Module Prerequisites

This module needs a few thing to make it go:

Usage

Class pulp

Installs a local pulp v2 yumrepo.

class { 'pulp':
  ensure => 'present'
}
Parameters

ensure

proxy

If you want to manage the pulp repo yourself, don't include the pulp class.

Class pulp::server

Fires up a pulp server, including mongo, qpid, and httpd.

class { 'pulp::server':
  ensure => 'present'
}
Parametres:

ensure (defaults to present)

conf_template (optional)

If provided, use this template instead of the built-in templates/server.conf.erb

Class pulp::admin_client

Installs and configures the pulp admin client.

class { 'pulp::admin_client':
  ensure => 'present'
}
Parameters:

ensure -- optional, defaults to present

server -- optional, defaults to the current host

conf_template -- optional

If provided, use this template instead of the built-in templates/admon.conf.erb

Class pulp::consumer

Installs and configures the pulp consumer.

class { 'pulp::consumer':
  ensure => 'present'
}
Parameters:

ensure -- optional, defaults to present

server -- optional, defaults to the current host

conf_template -- optional

If provided, use this template instead of the built-in templates/consumer.conf.erb

Type puppet_repo

Sets up a puppet module repository on your pulp server

puppet_repo { 'repo_id':
  # Default pulp admin login/password
  ensure       => 'present',
  login        => 'admin',
  password     => 'admin',
  display_name => 'my test repo',
  description  => "I lifted this repo from the pulp puppet module and didn't change the description!",
  feed         => 'http://forge.puppetlabs.com',
  queries      => ['query1', 'query2'],
  schedules    => [ '2012-12-16T00:00Z/P1D', '2012-12-17T00:00Z/P1D' ],
  serve_http   => true,
  serve_https  => true,
  notes        => {
    'note1' => 'value 1',
    'note2' => 'value 2'
  }
}
Parameters:

ensure -- required, may be present or absent

login -- Login to your pulp repo (think pulp-admin login)

password -- Password to your pulp repo (think pulp-admin login)

display_name -- optional, the display name for your repo

description -- optional, the description for your repo

feed -- optional, feed url for your repo

queries -- optional list, queries for your repo, see pulp-admin puppet repo create

schedules -- optional list, sync schedules for your repo in 8601 format

serve_http -- optional defaults to true, serve the repo via http

serve_https -- optional defaults to false, serve the repo via https

notes -- optional map, notes for your repo, see pulp-admin puppet repo create. An empty map has no effect, to remove a note set the value to an empty string

Developing

If you want to issue a pull request, that'd be awesome. Make sure you have a fairly recent version of both vagrant and ruby, then do this:

bundle install
bundle exec rake spec spec:system

TODO