Last active
August 29, 2015 14:01
-
-
Save 1000k/d25b2ea0a37346f17fa1 to your computer and use it in GitHub Desktop.
Enable official MySQL reporisoty & install MySQL Community Server using Chef. ref: http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mysql_1000k/recipes/client.rb | |
| # Install MySQL Client. | |
| include_recipe 'mysql_1000k::mysql_repo' | |
| yum_package 'mysql-community-client' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mysql_1000k/recipes/mysql_repo.rb | |
| rpm_path = "#{Chef::Config[:file_cache_path]}/mysql-repo.rpm" | |
| remote_file rpm_path do | |
| source 'http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm' | |
| action :create_if_missing | |
| end | |
| yum_package 'install-mysql-repository' do | |
| package_name 'mysql-community-release' | |
| source rpm_path | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mysql_1000k/recipes/server.rb | |
| # Install MySQL Server. | |
| include_recipe 'mysql_1000k::mysql_repo' | |
| yum_package 'mysql-community-server' | |
| service 'mysqld' do | |
| supports [:restart, :reload, :status] | |
| action [ :enable, :start ] | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment