- From: "Julian C. Dunn" <
>
- To:
- Subject: [chef] Re: dependency issue with cookbook that uses gem with native code
- Date: Sun, 17 Nov 2013 22:53:58 -0500
On Sun, Nov 17, 2013 at 7:20 PM, Eric Swenson
<
>
wrote:
>
I'm trying to provision a server with a cookbook that uses the
>
mysql_database resource from the database cookbook. This cookbook depends
>
on the mysql cookbook, which requires building due to references to native
>
code (e.g. libmysqlclient).
>
In trying to bootstrap a brand new node, which doesn't have gcc (and other
>
build-essential components), I cannot get past the error:
>
>
Error executing action `install` on resource 'chef_gem[mysql]'
>
>
My cookbook has a "depends" statement for the "database" cookbook. And
>
that cookbook has a dependency on "mysql". Prior to executing any of the
>
recipes in any of the defined cookbook, chef-client tries to compile the
>
cookbooks it knows it needs.
>
It can't build the "mysql" cookbook because gcc is not yet installed. While
>
I've added "recipe[build-essential]" to the head of my run_list for the
>
role, chef-client never gets this far, as it wants to compile all cookbooks
>
in the dependency list prior to executing
>
any of the recipes in the run list.
>
>
How do I get around this? I want to bootstrap a node that doesn't have
>
gcc installed (yet). How do I get chef-client to install the
>
build-essential package BEFORE compiling cookbooks?
All that compile-time hackery code is an abomination. That aside, if
you include database::mysql in your run_list prior it will deal with
the setup of build-essential as a compile-time dependency.
- Julian
--
[ Julian C. Dunn
<
>
* Sorry, I'm ]
[ WWW:
http://www.aquezada.com/staff/julian * only Web 1.0 ]
[
gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
Archive powered by MHonArc 2.6.16.