joerocklin / chef-mariadb Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sous-chefs/mysql
A cookbook for installing MariaDB, based on a fork of the Opscode Cookbook for MySQL.
License: Apache License 2.0
This project forked from sous-chefs/mysql
A cookbook for installing MariaDB, based on a fork of the Opscode Cookbook for MySQL.
License: Apache License 2.0
I've included the recipes in another recipe:
include_recipe "mariadb::client"
include_recipe "mariadb::ruby"
include_recipe "mariadb::server"
But it seems like the repo isn't added on time.
* No version specified, and no candidate version available for mariadb-client
================================================================================
Error executing action `install` on resource 'package[mariadb-client]'
================================================================================
Chef::Exceptions::Package
-------------------------
No version specified, and no candidate version available for mariadb-client
Cookbook Trace:
---------------
/tmp/chef-solo/cookbooks/mariadb/recipes/ruby.rb:29:in `block in from_file'
/tmp/chef-solo/cookbooks/mariadb/recipes/ruby.rb:28:in `each'
/tmp/chef-solo/cookbooks/mariadb/recipes/ruby.rb:28:in `from_file'
/tmp/chef-solo/site-cookbooks/apps/recipes/webapp.rb:7:in `from_file'
/tmp/chef-solo/site-cookbooks/apps/recipes/stats.rb:11:in `from_file'
Resource Declaration:
---------------------
# In /tmp/chef-solo/cookbooks/mariadb/recipes/client.rb
48: package mariadb_pack do
49: action :install
50: end
51: end
Compiled Resource:
------------------
# Declared in /tmp/chef-solo/cookbooks/mariadb/recipes/client.rb:48:in `block in from_file'
package("mariadb-client") do
action [:install]
retries 0
retry_delay 2
package_name "mariadb-client"
cookbook_name :mariadb
recipe_name "client"
end
================================================================================
Recipe Compile Error in /tmp/chef-solo/site-cookbooks/apps/recipes/stats.rb
================================================================================
Chef::Exceptions::Package
-------------------------
package[mariadb-client] (mariadb::client line 48) had an error: Chef::Exceptions::Package: No version specified, and no candidate version available for mariadb-client
Cookbook Trace:
---------------
/tmp/chef-solo/cookbooks/mariadb/recipes/ruby.rb:29:in `block in from_file'
/tmp/chef-solo/cookbooks/mariadb/recipes/ruby.rb:28:in `each'
/tmp/chef-solo/cookbooks/mariadb/recipes/ruby.rb:28:in `from_file'
/tmp/chef-solo/site-cookbooks/apps/recipes/webapp.rb:7:in `from_file'
/tmp/chef-solo/site-cookbooks/apps/recipes/stats.rb:11:in `from_file'
Relevant File Content:
----------------------
/tmp/chef-solo/cookbooks/mariadb/recipes/ruby.rb:
22:
23: node.set['build_essential']['compiletime'] = true
24: include_recipe "build-essential"
25: include_recipe "mariadb::mariadb_repo"
26: include_recipe "mariadb::client"
27:
28: node['mariadb']['client']['packages'].each do |mariadb_pack|
29>> resources("package[#{mariadb_pack}]").run_action(:install)
30: end
31:
32: chef_gem "mysql"
33:
[2013-10-10T15:16:27+00:00] ERROR: Running exception handlers
[2013-10-10T15:16:27+00:00] ERROR: Exception handlers complete
[2013-10-10T15:16:27+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
Chef Client failed. 2 resources updated
[2013-10-10T15:16:27+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.
I'm running chef with knife solo.
~>1.1 (I believe limits to any version 1.X
1.X isn't available thru 'knife cookbook site download openssl'
when changed to >1.1 it works fine.
When running mariadb::ruby I get this error:
* chef_gem[mysql] action install
================================================================================
Error executing action `install` on resource 'chef_gem[mysql]'
================================================================================
Gem::Installer::ExtensionBuildError
-----------------------------------
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for mysql_ssl_set()... *** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/chef/embedded/bin/ruby
--with-mysql-config
--without-mysql-config
/opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:894:in `block in have_func'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /opt/chef/embedded/lib/ruby/1.9.1/mkmf.rb:893:in `have_func'
from extconf.rb:45:in `<main>'
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mysql-2.9.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mysql-2.9.1/ext/mysql_api/gem_make.out
Cookbook Trace:
---------------
/root/chef-solo/cookbooks-2/mariadb/recipes/ruby.rb:34:in `from_file'
Resource Declaration:
---------------------
# In /root/chef-solo/cookbooks-2/mariadb/recipes/ruby.rb
34: chef_gem 'mysql'
Compiled Resource:
------------------
# Declared in /root/chef-solo/cookbooks-2/mariadb/recipes/ruby.rb:34:in `from_file'
chef_gem("mysql") do
provider Chef::Provider::Package::Rubygems
action :install
retries 0
retry_delay 2
guard_interpreter :default
package_name "mysql"
version "2.9.1"
cookbook_name :mariadb
recipe_name "ruby"
end
Is there a way to fix this? Maybe I'm missing some dependencies?
I have the following in attributes/defaults.rb:
default['mariadb']['remove_anonymous_users'] = true
default['mariadb']['remove_test_database'] = true
default['mariadb']['allow_remote_root'] = false
default['mariadb']['server_root_password'] = 'root'
and recipes/default.rb:
include_recipe "mariadb::server"
but after chef runs:
MariaDB [mysql]> select Host, User, Password from user;
+-----------------------+------+-------------------------------------------+
| Host | User | Password |
+-----------------------+------+-------------------------------------------+
| localhost | root | |
| localhost.localdomain | root | |
| 127.0.0.1 | root | |
| ::1 | root | |
| localhost | | |
| localhost.localdomain | | |
+-----------------------+------+-------------------------------------------+
6 rows in set (0.00 sec)
MariaDB [mysql]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
What am i doing wrong?
Last two commits to _server_debian.rb removed the upstart template for /etc/init/mysql
Starting mariadb with /etc/init.d/mysql fails. The init script tries to start mysql using mysqld_safe which is not installed.
I'm new to chef, but it appears there is an issue with the install:
[2014-09-24T00:26:18+00:00] INFO: package[MariaDB-server] installing MariaDB-server-10.0.13-1.el6 from mariadb repository
================================================================================
Error executing action `install` on resource 'package[MariaDB-server]'
================================================================================
Chef::Exceptions::Exec
----------------------
returned 1, expected 0
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/mariadb/recipes/_server_rhel.rb
4: package name do
5: action :install
6: end
7: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/mariadb/recipes/_server_rhel.rb:4:in `block in from_file'
package("MariaDB-server") do
action [:install]
retries 0
retry_delay 2
guard_interpreter :default
package_name "MariaDB-server"
version "10.0.13-1.el6"
timeout 900
cookbook_name "mariadb"
recipe_name "_server_rhel"
end
[2014-09-24T00:26:19+00:00] INFO: Running queued delayed notifications before re-raising exception
[2014-09-24T00:26:19+00:00] INFO: bash[install_zCrowd_management] sending install action to package[MySQL-python] (delayed)
[2014-09-24T00:26:19+00:00] INFO: bash[venv_install] sending run action to bash[pip_install] (delayed)
[2014-09-24T00:26:21+00:00] INFO: bash[pip_install] ran successfully
[2014-09-24T00:26:21+00:00] ERROR: Running exception handlers
[2014-09-24T00:26:21+00:00] ERROR: Exception handlers complete
[2014-09-24T00:26:21+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-09-24T00:26:21+00:00] ERROR: package[MariaDB-server] (mariadb::_server_rhel line 4) had an error: Chef::Exceptions::Exec: returned 1, expected 0
[2014-09-24T00:26:21+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
When I add mariadb::ruby to the run list, it wants to install the mariadb packages at the beginning of the chef run, and because the repository has not been added yet, it fails with this message:
Recipe: mariadb::client
* package[mariadb-client-5.5] action install
* No version specified, and no candidate version available for mariadb-client-5.5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.