GithubHelp home page GithubHelp logo

palfrey / raspberry-chef Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 6.0 79 KB

Chef bootstrap for Raspberry Pi

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

License: Other

Shell 5.47% Ruby 56.34% Python 38.19%
chef-cookbook raspberry-pi

raspberry-chef's Introduction

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/palfrey/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.

raspberry-chef's People

Contributors

palfrey avatar dependabot[bot] avatar pgardella avatar markdavison avatar

Stargazers

Jake avatar  avatar Frank Shearar avatar Jon Payne avatar

Watchers

James Cloos avatar  avatar

raspberry-chef's Issues

chef-utils version issues

Seeing build failures due to more recent chef-utils versions not supporting ruby 2.6. Unfortunately the gem_package bits seem to ignore when I specify locked down versions of it.

`<main>': undefined method `include_path' for Libyajl2:Module

Trying to get this working on my RPI2 B on buster lite. Any ideas what is wrong?

Thanks in advance.

Using berkshelf 4.3.3
Installing ffi-yajl 2.4.0 with native extensions
STDERR: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/var/lib/gems/2.5.0/gems/ffi-yajl-2.4.0/ext/ffi_yajl/ext/encoder
/usr/bin/ruby2.5 -r ./siteconf20210628-15489-1ggpxn5.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.5
extconf.rb:9:in <main>': undefined method include_path' for Libyajl2:Module
(NoMethodError)
Did you mean? include

extconf failed, exit code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.