Created
May 25, 2012 17:36
-
-
Save gumayunov/2789382 to your computer and use it in GitHub Desktop.
Chef bootstrap on Ubuntu
This file contains 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
vagrant box add precise32 http://files.vagrantup.com/precise32.box |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |m_config| | |
setuper = lambda do |name, ip| | |
m_config.vm.define name do |config| | |
config.vm.box = "precise32" | |
config.vm.customize ["modifyvm", :id, "--memory", 512] | |
config.vm.customize ["modifyvm", :id, "--cpus", 2] | |
config.vm.host_name = "ghs-#{name}.local" | |
# adapter 1 is a NAT adapter used to configure VM network | |
config.vm.network :bridged, adapter: 2, bridge: "en1: Wi-Fi (AirPort)" | |
config.vm.network :hostonly, ip, adapter: 3 | |
config.vm.provision :chef_client do |chef| | |
chef.log_level = :info | |
chef.chef_server_url = "https://api.opscode.com/organizations/ghs" | |
chef.validation_key_path = "/Users/gumayunov/work/ghs/.chef/ghs-validator.pem" | |
chef.validation_client_name = "ghs-validator" | |
end | |
end | |
end | |
setuper.call :app, "10.11.12.13" | |
setuper.call :db, "10.11.12.14" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment