Created
August 17, 2010 18:40
-
-
Save griggheo/531367 to your computer and use it in GitHub Desktop.
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
%w{libmysqlclient16 mysql-common}.each do |pkg| | |
script "uninstall_default_mysql" do | |
only_if "dpkg -s #{pkg}" | |
interpreter "bash" | |
user "root" | |
cwd "/tmp" | |
code <<-EOH | |
apt-get remove -y pkg | |
apt-get -y autoremove | |
EOH | |
end | |
end | |
%w{libdbi-perl}.each do |pkg| | |
script "install_percona_prereqs" do | |
not_if "dpkg -s #{pkg}" | |
interpreter "bash" | |
user "root" | |
cwd "/tmp" | |
code <<-EOH | |
apt-get install -y pkg; apt-get -fy install | |
EOH | |
end | |
end | |
%w{percona-xtradb-common_5.1.43-xtradb-1.0.6-9.1-60.jaunty.11_all.deb libpercona-xtradb-client16_5.1.43-xtradb-1.0.6-9.1-60.jaunty.11_amd64.deb libpercona-xtradb-client-dev_5.1.43-xtradb-1.0.6-9.1-60.jaunty.11_amd64.deb percona-xtradb-client-5.1_5.1.43-xtradb-1.0.6-9.1-60.jaunty.11_amd64.deb percona-xtradb-server-5.1_5.1.43-xtradb-1.0.6-9.1-60.jaunty.11_amd64.deb}.each do |pfile| | |
remote_file "/root/#{pfile}" do | |
source "http://mydownloads.com/download/percona/#{pfile}" | |
end | |
package = $1 if pfile =~ /([^_]*)_.*/; | |
script "install_dpkg_percona" do | |
interpreter "bash" | |
user "root" | |
cwd "/tmp" | |
not_if "dpkg -s #{package}" | |
code <<-EOH | |
export DEBIAN_FRONTEND=noninteractive; dpkg -i "/root/#{pfile}" | |
EOH | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment