I wanted to get Chef running on my BeagleBone Black running Debian, using the full-stack Omnibus builder they use for their packages. While ARM is not a supported platform, the open source community had already done a lot of work getting it ready. The first step was to get the build toolchain in place, so I followed the instructions from https://github.com/chef/omnibus-toolchain. I had to make 1 small fix (already merged), but here’s how I got omnibus-toolchain installed:
sudo apt-get install autoconf binutils-doc bison build-essential flex gettext ncurses-dev libssl-dev libreadline-dev zlib1g-dev git libffi6 libffi-dev ruby ruby-dev sudo gem install bundler git clone https://github.com/chef/omnibus-toolchain.git cd omnibus-toolchain sudo bundle install --without development sudo bundle exec omnibus build omnibus-toolchain sudo FORCE_UNSAFE_CONFIGURE=1 bundle exec omnibus build omnibus-toolchain
Note the FORCE_UNSAFE_CONFIGURE=1, there was a bug in gtar that I didn’t debug.
Luckily Carl Perry already had an ARMHF Chef 12.8.1 build available for bootstrapping.
After installing the package locallly
dpkg -i /tmp/chef_12.8.1%2B20160319051316-1_armhf.deb
I did a chef-client run remotely
$ knife bootstrap 192.168.0.11 -x debian --sudo -N beaglebone Creating new client for beaglebone Creating new node for beaglebone Connecting to 192.168.0.11 192.168.0.11 -----> Existing Chef installation detected 192.168.0.11 Starting the first Chef Client run... 192.168.0.11 Starting Chef Client, version 12.8.1 192.168.0.11 resolving cookbooks for run list: [] 192.168.0.11 Synchronizing Cookbooks: 192.168.0.11 Installing Cookbook Gems: 192.168.0.11 Compiling Cookbooks... 192.168.0.11 [2016-10-13T07:53:21+11:00] WARN: Node beaglebone has an empty run list. 192.168.0.11 Converging 0 resources 192.168.0.11 192.168.0.11 Running handlers: 192.168.0.11 Running handlers complete 192.168.0.11 Chef Client finished, 0/0 resources updated in 14 seconds
The next step was to get the omnibus cookbook in place to use my machine as a builder. After sorting through the dependencies and getting it uploaded, I had to make 1 small change to disable grabbing the omnibus-toolchain because I had already built it locally. Once that was in place, it was a matter of sudoing to the omnibus user, downloading the Chef source and running
. load-omnibus-toolchain.sh cd chef/omnibus bundle install --without development bundle exec omnibus build chef -l debug
And approximately 3 hours later I had a new chef_12.15.27+20161013214455-1_armhf.deb which worked great once installed.
root@beaglebone:/home/omnibus/chef-12.15.27/omnibus/pkg# dpkg -i chef_12.15.27+20161013214455-1_armhf.deb Selecting previously unselected package chef. (Reading database ... 82288 files and directories currently installed.) Preparing to unpack chef_12.15.27+20161013214455-1_armhf.deb ... Unpacking chef (12.15.27+20161013214455-1) ... Setting up chef (12.15.27+20161013214455-1) ... Thank you for installing Chef!
I’ll continue to refine the build process and follow along with new releases of Chef. Now I can move on to the next more important piece, which is actually using the box. Feel free to download it: chef_12.15.27+20161013214455-1_armhf.deb