public
Description: Creates puppet projects and provides helper tools
Homepage:
Clone URL: git://github.com/albanpeignier/gepetto.git
name age message
file .gitignore Thu Jan 29 14:03:43 -0800 2009 Change gems version to 0.0.2 [albanpeignier]
file History.txt Tue Dec 15 08:14:35 -0800 2009 Increment gem version to 0.0.9 [albanpeignier]
file Manifest.txt Tue Dec 15 08:13:49 -0800 2009 Add sandbox manifest files [albanpeignier]
file README.rdoc Sun Feb 01 02:55:09 -0800 2009 Add puppet in requirements [albanpeignier]
file Rakefile Wed Dec 16 08:48:09 -0800 2009 Add rubigen and rake dependencies [albanpeignier]
directory app_generators/ Tue Dec 15 08:13:49 -0800 2009 Add sandbox manifest files [albanpeignier]
directory bin/ Mon Jan 19 02:26:19 -0800 2009 Initial import [albanpeignier]
file gepetto.gemspec Thu Aug 20 01:53:40 -0700 2009 Change version to 0.0.7 [albanpeignier]
directory lib/ Wed Dec 16 08:49:06 -0800 2009 Increment gem version to 0.0.10 [albanpeignier]
directory puppet_generators/ Mon Jan 19 06:04:55 -0800 2009 Fix puppet module generator (missing init.pp an... [albanpeignier]
directory script/ Mon Jan 19 02:26:19 -0800 2009 Initial import [albanpeignier]
directory tasks/ Wed Dec 16 08:48:51 -0800 2009 Use module-assistant only under debian, install... [albanpeignier]
README.rdoc

Gepetto

DESCRIPTION:

A helper suite for Puppet projects to create, manage and help daily development

More information about Puppet: reductivelabs.com/trac/puppet/

FEATURES:

Creates base project:

  • create Puppet File Hierarchy
  • create default manifests files

Provides helper tools:

  • script/puppetmasterd: to start a local puppetmasterd
  • script/puppetca: to manage local ssl directory
  • script/puppetrun: request a puppet run
  • script/module: to install external module
  • script/generate: generate puppet code (for module, …)

Provides rake tasks:

  • sandbox tasks: to create, start and control sandbox for development
  • puppet tasks: to check syntax
  • clean temporary or log files

SYNOPSIS:

Create a new puppet project

  gepetto /path/to/new/puppet/project

      create
      create  script
      create  config
      create  manifests
      create  files
      create  templates
      create  tasks
      create  Rakefile
      create  manifests/site.pp
      create  manifests/templates.pp
      create  manifests/nodes.pp
      create  config/puppet.conf
      create  config/fileserver.conf
      create  script/puppetmasterd
      create  script/puppetca
      create  script/puppetrun
      create  script/module
  dependency  install_rubigen_scripts
      exists    script
      create    script/generate
      create    script/destroy

Start a puppetmasterd with project files:

  ./script/puppetmasterd &

   notice: Starting Puppet server version 0.24.5

Create and start a sandbox:

  rake sandbox:setup sandbox:create sandbox:start

Follow sandbox console/syslog:

  tail -f log/sandbox.log

List waiting client certificates:

  ./script/puppetca --list
  sandbox

Sign the sandbox certificate:

  rake sandbox:puppet:sign

Request a puppet run in sandbox:

  rake sandbox:puppet:run

Install an external module:

  ./script/module install git://git.black.co.at/module-common

  install module common in modules/common

  Initialized empty Git repository in modules/common/.git/
  remote: Counting objects: 322, done.
  remote: Compressing objects: 100% (217/217), done.
  remote: Total 322 (delta 110), reused 210 (delta 70)
  Receiving objects: 100% (322/322), 37.75 KiB, done.
  Resolving deltas: 100% (110/110), done.

Create a new Puppet module

  ./script/generate module private

      create
      create  manifests
      create  files
      create  templates
      create  README
      create  manifests/init.pp

SANDBOX

For the moment, the sandbox tasks use qemu to create and run a virtual machine with a ready puppetd.

Define a sandbox in your rakefile:

  Sandbox.new do |s|
    s.bootstraper = DebianBoostraper.new do |d|
      d.version = 'lenny'
      d.mirror = 'http://ftp.fr.debian.org/debian'
    end

    s.disk_size = '1G'
    s.memory_size = '128M'
  end

Setup your host to create and start sandbox:

  rake sandbox:setup

It installs qemu, kqemu module and uml-utilities

Create a fresh image for sandbox:

  rake sandbox:create

By default, it will create a disk of 512M with a debian lenny.

Start a qemu instance with the sandbox image:

  rake sandbox:start

Follow the console (and syslog) output of the sandbox:

  tail -f log/sandbox.log

  [...]
  Starting puppet configuration management tool

  Debian GNU/Linux 5.0 sandbox ttyS0
  sandbox login:

  Jan 31 14:22:30 sandbox puppetd[1430]: Reopening log files.
  Jan 31 14:22:32 sandbox puppetd[1430]: Could not request certificate

Sign the new sandbox certificat:

  rake sandbox:puppet:sign

Request a puppet run in the sandbox:

  rake sandbox:puppet:run

Stop the sandbox vm:

  rake sandbox:stop

Destroy sandbox files:

  rake sandbox:destroy

REQUIREMENTS:

INSTALL:

  sudo gem install gepetto

or to use the development release:

  gem sources -a http://gems.github.com
  sudo gem install albanpeignier-gepetto

LICENSE:

(The MIT License)

Copyright © 2009 Alban Peignier

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.