modernizations

- always fetch lates WordPress version
- skip checksum
- add rake task :setup to install my custom shell
This commit is contained in:
Eric Teubert 2011-12-17 12:21:49 +01:00
parent 365c389255
commit c393a557a0
4 changed files with 36 additions and 24 deletions

19
Rakefile Normal file
View File

@ -0,0 +1,19 @@
require "vagrant"
task :setup do
env = Vagrant::Environment.new
raise "Must run `vagrant up`" if !env.primary_vm.created?
raise "Must be running!" if !env.primary_vm.vm.running?
env.primary_vm.ssh.execute do |ssh|
ssh.exec! "export LC_ALL=en_US.UTF-8"
ssh.exec! "git clone git://github.com/eteubert/dotfiles.git"
ssh.exec! "sudo gem install rake"
puts "\nNow do the following to finish the setup:"
puts "vagrant ssh"
puts "go to ~/dotfiles and type `rake install` to setup dotfiles"
puts "sudo chsh -s /usr/bin/zsh vagrant"
puts "sudo reboot"
end
end

35
Vagrantfile vendored
View File

@ -40,26 +40,19 @@ Vagrant::Config.run do |config|
chef.add_recipe "apt"
chef.add_recipe "wordpress"
chef.json.merge!(
"mysql" => {
"server_root_password" => "",
"allow_remote_root" => true
},
"wordpress" => {
"db" => {
"database" => "wordpress",
"user" => "wordpress",
"password" => "wordpress"
}
}
)
# das wäre noch nett anschließend auszuführen:
# export LC_ALL=en_US.UTF-8
# git clone git://github.com/eteubert/dotfiles.git
# notice: "go to ~/dotfiles and type `rake install` to setup dotfiles"
# sudo chsh -s /usr/bin/zsh vagrant
# sudo reboot
# chef.json.merge!(
# :mysql => {
# :server_root_password => "",
# :allow_remote_root => true
# },
#
# :wordpress => {
# :db => {
# :database => "wordpress",
# :user => "wordpress",
# :password => "wordpress"
# }
# }
# )
end
end

View File

@ -19,8 +19,8 @@
#
# General settings
default['wordpress']['version'] = "3.1.2"
default['wordpress']['checksum'] = "1006a1bb97b42381ad82490d00d9b7fb9f7a1c9d83ee2ed36935a9eb99c81064"
default['wordpress']['version'] = "latest"
# default['wordpress']['checksum'] = "1006a1bb97b42381ad82490d00d9b7fb9f7a1c9d83ee2ed36935a9eb99c81064"
default['wordpress']['dir'] = "/var/www/wordpress"
default['wordpress']['db']['database'] = "wordpressdb"
default['wordpress']['db']['user'] = "wordpressuser"

View File

@ -36,7 +36,7 @@ node.set['wordpress']['keys']['logged_in'] = secure_password
node.set['wordpress']['keys']['nonce'] = secure_password
remote_file "#{Chef::Config[:file_cache_path]}/wordpress-#{node['wordpress']['version']}.tar.gz" do
checksum node['wordpress']['checksum']
# checksum node['wordpress']['checksum']
source "http://wordpress.org/wordpress-#{node['wordpress']['version']}.tar.gz"
mode "0644"
end