This looks like a chef issue, not a poolparty one. FWIW, my CentOS EC2
AMI's have the MySQL binaries and libraries burned in instead of
provisioned on demand (I'm not using pp for this stuff yet, just chef).
The primary reason was that I needed MySQL 5.1.34 RPMs (not on any well
known yum repos) and secondarily (pertinent to the issue in your gist)
the gem's build incantation needed to look like this
gem install mysql -- --with-mysql-lib=/usr/lib.mysql
--with-mysql-include=/usr/include/mysql
...if you can pass chef's gem resource custom build params, I couldn't
find examples of it or docs to reflect that. If you know how to
parameterize the gem resource, please post details!
-Ian
Emil Tin wrote:
> i'm trying to convert my pp rails example to use mysql instead of sqlite.
>
> here's what my my cloud.rb looks like:
>
http://github.com/emiltin/poolparty_example/blob/4c5a6273c60c06078d311f32c8d1171ba70571ea/config/poolparty/clouds.rb
>
>
> first i tried using include_recipe "mysql::server" in my chef.rb, but
> for some reason that didn't install mysql at all. doing it in the
> clouds.rb file instead seems to works:
>
> has_package "mysql-client"
> has_package "mysql-server"
> has_service "mysql"
>
> mysql gets installed, and i can use the mysql console on the instance.
>
>
> however, there's a problem. to run rake migration tasks i need the
> mysql gem. but when i include
> has_gem_package "mysql"
> in clouds.rb, the gem fails to build with the message:
>
> *** 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.
>
> (full chef debug: output
http://gist.github.com/105942)
> <
http://gist.github.com/105942%29>
>
>
>
>
> another problem seems to be that when using mysql, rake db:create
> needs to be run initially, before rake db:migrate can be run.
> has_rails_deploy doesn't seem to do this?
>
> i also don't understand why i need to point to the database.yml file
> inside has_rails_deploy when it's in the default location
> config/database.yml ?
>
>
> any help appreciated! thanks!
> emil tin
>
>
>
>
> >
--
Ian Kallen
blog:
http://www.arachna.com/roller/spidaman
tweetz:
http://twitter.com/spidaman
vox:
415.505.5208