32-bit Arm Chef Infra and Cinc Client Builds for Linux

I’ve done builds of Chef and Cinc for 32-bit Arm systems (Raspberry Pi and similar) for awhile, so I figured I’d create a landing page for them. You may download the builds I’ve made or follow the instructions to make your own. Now that I no longer work for Chef, I won’t be making Chef builds going forward but you’re welcome to create your own. I’ve also stopped building RPMs, so the only new builds I’m providing are Raspbian 10 armv6l and Debian 11 armv7l.

Graham Weldon has taken these instructions and created new armel builds for running on switches and other similar hardware. The build scripts do not require additional patches, but Graham has documented how to create the builds. Copies of the builds will be hosted here going forward.

Latest Builds

The 32-bit Arm build targets are Debian/Raspbian/Ubuntu on the armv6l (Raspberry Pi 1/Zero series) and armv7hl (Raspberry Pi 2/3/4 series). CentOS 7 RPMs are also provided for the armv7hl. Previous releases of the builds and their instructions are available here.

Version armv6l DEB armv7l DEB armv7l RPM armel DEB
Cinc Client 17.10.0 cinc-17.10.0-rpi-armv6l_armhf.deb cinc-17.10.0-rpi3-armv7l_armhf.deb    
Cinc Client 17.3.48     cinc-17.3.48-1.el7.armv7hl.rpm  
Cinc Client 17.1.35       cinc-17.1.35-armel.deb
Cinc Client 16.16.13 cinc-16.16.13-rpi-armv6l_armhf.deb cinc-16.16.13-rpi3-armv7l_armhf.deb    
Cinc Client 16.14.1     cinc-16.14.1-1.el7.armv7hl.rpm  
Cinc Client 16.11.7       cinc-16.11.7-armel.deb
Chef Infra Client 17.3.48 chef-17.3.48-rpi-armv6l_armhf.deb chef-17.3.48-rpi3-armv7l_armhf.deb chef-17.3.48-1.el7.armv7hl.rpm  
Chef Infra Client 17.1.35       chef-17.1.35-armel.deb
Chef Infra Client 16.14.1 chef-16.14.1-rpi-armv6l_armhf.deb chef-16.14.1-rpi3-armv7l_armhf.deb chef-16.14.1-1.el7.armv7hl.rpm  
Chef Infra Client 16.11.7       chef-16.11.7-armel.deb

Building with Omnibus

The Chef client is packaged with Omnibus, which builds the application and all of its runtime dependencies with the Omnibus-Toolchain. Omnibus is built with Ruby, so the instructions start with building Ruby. These instructions assume you have already installed either Debian 9, Raspbian 10, or CentOS 7 on your system already.

Preparation

There are several steps that need to be done before we get started. As the root user update to ensure the latest packages are installed and install the prerequisites for building Ruby and Omnibus-Toolchain.

For CentOS:

yum update
yum install -y autoconf automake bison flex gcc gcc-c++ gdbm-devel gettext git kernel-devel libffi-devel libyaml-devel m4 make ncurses-devel openssl-devel patch readline-devel rpm-build wget zlib-devel

For Debian/Raspbian:

apt-get update
apt-get upgrade
apt-get install -y autoconf build-essential byacc fakeroot git libreadline-dev libssl-dev zlib1g-dev

ld.so.preload

Raspbian sets the file /etc/ld.so.preload to

/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so

in an attempt to support both the 6l and 7l armhf platforms. This breaks the Chef 32-bit Arm builds on Raspbian so I have replaced this line with

echo /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so > /etc/ld.so.preload

on the Raspberry Pi 3 and 4 and

echo /usr/lib/arm-linux-gnueabihf/libarmmem-v6l.so > /etc/ld.so.preload

on the Raspberry Pi Zero.

Omnibus User

Add the omnibus user for performing the builds.

adduser omnibus

Ensure the omnibus user has sudo privileges and add the following file to /etc/sudoers.d/omnibus. Feel free to use the wheel group or more limited permissions as necessary.

omnibus  ALL=(ALL)       NOPASSWD: ALL

You can now sudo su - omnibus and continue without changing users.

Build Scripts

If you want detailed instructions for the steps for building on these platforms check out Chef 15 Build Instructions for 32-bit Arm. The build is currently Ruby 2.7.3 and does not require any additional patches. To build a specific version, you provide an environment variable VERSION before executing the script. I typically run them as the omnibus user with something similar to VERSION=17.3.48 nohup bash RPM-chef-cinc.sh & and tail -f nohup.out to monitor the output.

DEB Build Script: DEB-chef-cinc.sh

RPM Build Script: RPM-chef-cinc.sh

Build scripts for previous releases are available here.

Additional Notes

GPU Memory Usage

Because my systems are used primarily has headless servers, I’ve configured them to use less GPU memory by setting

gpu_mem=16

in the /boot/config.txt. I do this in the mattray::raspberrypi recipe used by all of my Raspbian systems.

Chef LEDs Handler Cookbook

If you’re using these builds you might be interested in the LEDs Handler cookbook. At the beginning of the Chef client run the LEDs blink a heartbeat pattern and at the end of the client run the LEDs are disabled. If the Chef client run fails the LEDs all stay on. It’s pretty simple but it’s a fun notification that the nodes are converging. It also works with Mac laptops running Linux, lighting up their keyboards when the Chef client is active.

Flashing LEDs

https://github.com/mattray/leds_handler-cookbook