sohnemann / raspberry-chef

Chef bootstrap for Raspberry Pi

Home Page:https://tevps.net/blog/2015/12/22/raspberry-chef/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chef bootstrap for Raspberry Pi

CI

This project creates an auto-updating chef-zero based Raspberry Pi node.

  1. Write a Debian-based image to the SD card for your Pi (I advise the Buster Lite image as a good small base)
  2. SSH into the node (possibly just ssh pi@raspberrypi with password "raspberry" if you're using the defaults)
  3. wget https://raw.githubusercontent.com/sohnemann/raspberry-chef/master/bootstrap.sh
  4. cat bootstrap.sh
  • Read the contents of bootstrap.sh and make sure you understand it before just randomly running something I told you to.
  1. sudo bash bootstrap.sh
  2. sudo poweroff

You've now got an auto-updating SD card, which you can backup and re-use for other nodes. To configure it, there's a series of files in /boot which is a FAT32 partition, which means it'll get mounted on Linux, OS X or Windows which means you can configure it without having a working Pi.

The following files in /boot are of particular use:

  • wifi.conf - a wpa_supplicant configuration file. For simple configs, the changes should be obvious, but for more complicated settings see the example config
  • chef-url - a git URL to clone that contains Chef cookbooks
  • chef-cookbook - Chef cookbook from the chef-url path to run with chef-client
  • chef-directory - Optional subdirectory of the git repo to run chef commands from

The update_chef daemon will automatically check chef-url/chef-cookbook and run chef-client in chef-zero configuration if it finds a valid set of configuration.

About

Chef bootstrap for Raspberry Pi

https://tevps.net/blog/2015/12/22/raspberry-chef/

License:Other


Languages

Language:Ruby 56.3%Language:Python 38.2%Language:Shell 5.5%