Question

I try to setup chef on a node through knife bootstrap IP. It seems to work fine, until a native extention (mkmf) requires build-essentials. The user that knife uses to log in is root, so knife should be able to install build-essentials.

Anyone knows if this can be automated or do I have to log into every machine I want to bootstrap and install these packages before?

Thanks,
Robin

Was it helpful?

Solution

There's a couple things you can do.

  1. Put build-essentials in your OS installation or base image so it is there before trying to install anything that compiles native extensions (this is probably the JSON RubyGem if installing Chef).

  2. Add the build-essentials package to the list installed in the bootstrap script. The default bootstrap template, ubuntu10.04-gems does this already, though.

  3. Use the Opscode full stack installer. Opscode builds precompiled, native packages of everything above libc required to run Chef client (or solo). That page contains instructions on how to use a small script to detect the platform and download the correct package from an S3 bucket. For example, if you're on Ubuntu 10.04, it will detect the platform, version and architecture, then retrieve the proper .deb package. This can be done with knife bootstrap, using this template (it will be in the next released version of Chef.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top