Friday, November 23, 2012

Raspberry pi puppet

So, I decided I really wanted to have an easy way to get my raspberry pi images to a somewhat sane state but I did not really want to write shell scripts to do this.

I've been using puppet at work for over a year now and its pretty simple really - most of the time I spend on puppet configs is debugging various isms ( like, for an ssh authorized keys manipulation, you can't throw an array to user :-< )

Planning to test out my image process soon-ish. Still need to get mcollective working properly - think its about the last module still erroring out on me.

So far, I have:

  1. ssh configuration
  2. various package installations
    • rasp-config, ruby-shadow, python-pip, ruby-dev
    • ruby packages: builder ( for gem installs ), wiringpi
    • pip ( python ) package rpi.gpio
  3. rsync backup, just a simple backup to my fileserver
  4. /boot/config.txt so I can preserve any modifications I may want
  5. locales config
  6. user maint, putting my ssh key in place, forcing pi's password to be maintained/not raspberry
  7. automate git clone of remote repos
    ( So I don't have to remember to do those by hand though updates/pull will be manual )
Only down side is that I'll still need a bootstrap script to put a few packages on the box - puppet/facter gems and puppet.conf, then I should just need to run puppet agent and everything should magically appear

I may upload the puppet configs to github but most of the configurations are going to be local

1 comment:

bilsch said...

In case someone finds it useful,

https://github.com/bilsch/puppet-raspberrypi
https://github.com/bilsch/puppet-git

I can't promise those modules will work right out the gate. I'm only publishing parts not my entire puppet config ( for instance keys and such are in a users module which I don't publish :-> )