https://github.com/mislav/puppet-personal
I'm learning Puppet. WIP
https://github.com/mislav/puppet-personal
Last synced: about 2 months ago
JSON representation
I'm learning Puppet. WIP
- Host: GitHub
- URL: https://github.com/mislav/puppet-personal
- Owner: mislav
- Created: 2012-08-09T18:01:03.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-08-12T17:44:00.000Z (almost 13 years ago)
- Last Synced: 2025-04-15T17:11:51.198Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 105 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Mislav's Puppet experiments
I'm no sysadmin expert but I've set up a personal server—usually
Debian-flavored—countless times manually. Time to automatize this. I would want
to be able to provision a single box quickly for personal use, but I want to do
it via recipes that I or anyone else can easily re-apply against another box.I've brushed with Chef, but after getting disillusioned with its complexity,
I've set out to try Puppet. Turns out, it's not any easier.
Both Chef and Puppet seem designed for uses much more sophisticated than
provisioning a single machine for personal use. I'm not sure if they're the
right tool for the job for this.## What services I need
* git
* rbenv
* postgresql, redis, mongo
* elasticsearch
* memcached
* nginx vhosts + Passenger, running multiple Ruby apps
* cron jobs for said apps
* postfix + dovecot, for personal emailMy target is CentOS 6.2 for now, but would like to support Ubuntu too so these
recipes get some wider reusability.## How I'm using puppet
I have installed "puppet" gem on the remote server. I rsync the "manifests" and
"modules" directories from my local machine up to the server and run "puppet
apply" there (see `apply.sh`).I'm using 2 puppet modules found on GitHub as git submodules: "rbenv" and "postfix".
## Testing locally
I test what I have right now locally using Vagrant.
$ vagrant up
To reprovision after making changes:
$ vagrant provision
## The problems that I have
1. Using rbenv module doesn't work with `puppet apply`:
Could not autoload rbenvgem:
no such file to load -- puppet/provider/rbenvgem
at /root/puppet/modules/rbenv/manifests/gem.pp:22AFAIK, the files in `{modulepath}/{module}/lib/pupppet/provider/` should be
autoloaded, but are not. **I've hacked this by setting**
`RUBYLIB=modules/rbenv/lib`.Seems like [pluginsync won't work with
apply](https://github.com/puppetlabs/puppet/pull/427) until v3.0?## The questions that I have
* Do I really have to manually manage RUBYLIB for plugins to work?
* How should I organize my manifests into multiple files once my setup grows?
* Is there a better way to run recipes on my remote box (currently rsync)
without resorting to master-client model?
* How can I automate provisioning a new box that can't run puppet yet (no Ruby,
rubygems, or puppet gem installed); using old school shell scripts that I run
via ssh?
* rbenv module currently manages bashrc; is there a way to hook into
`rbenv::install` for zshrc and avoid doing [zsh support
manually](https://github.com/mislav/puppet-personal/blob/55c3b61/manifests/centos62-64.pp#L10-17)?
Or should I contribute to upstream rbenv module?