我对流浪汉和厨师很陌生,所以这很可能是一个简单的问题。
我已经设法让厨师安装 MySql、PHP 等
在此之后,我需要 VM 运行大约 3 个 SQL 脚本,这可以使用 chef 还是我应该移动到 shell 脚本并在启动后运行?
我的流浪档案 -
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "raring32.box"
config.vm.box_url = "http://[local network location]/raring32.box"
config.vm.network :forwarded_port, guest: 80, host: 8888
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "openssl"
chef.add_recipe "apache2"
chef.add_recipe "mysql"
chef.add_recipe "mysql::server"
chef.add_recipe "php"
chef.add_recipe "php::module_apc"
chef.add_recipe "php::module_curl"
chef.add_recipe "php::module_mysql"
chef.add_recipe "apache2::mod_php5"
chef.add_recipe "apache2::mod_rewrite"
chef.json = {
"mysql" => {
"server_root_password" => "hello",
"server_repl_password" => "hello",
"server_debian_password" => "hello"
}
}
chef.add_recipe "Database:Mysql"
end
end
谢谢你的帮助。