This project creates an auto-updating chef-zero based Raspberry Pi node.
- Write a Debian-based image to the SD card for your Pi (I advise the Buster Lite image as a good small base)
- SSH into the node (possibly just
ssh pi@raspberrypi
with password "raspberry" if you're using the defaults) wget https://raw.githubusercontent.com/palfrey/raspberry-chef/master/bootstrap.sh
cat bootstrap.sh
- Read the contents of bootstrap.sh and make sure you understand it before just randomly running something I told you to.
sudo bash bootstrap.sh
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 configchef-url
- a git URL to clone that contains Chef cookbookschef-cookbook
- Chef cookbook from the chef-url path to run with chef-clientchef-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.