Skip to content

Instantly share code, notes, and snippets.

@hhoover
Last active December 22, 2015 20:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hhoover/6525698 to your computer and use it in GitHub Desktop.
Save hhoover/6525698 to your computer and use it in GitHub Desktop.
Dummy Vagrantfiles
Vagrant.configure("2") do |config|
config.vm.box = "rax"
config.ssh.private_key_path = "~/.ssh/id_rsa_my_private_key"
config.vm.provider :rackspace do |rs|
rs.username = "YOUR USERNAME"
rs.api_key = "YOUR API KEY"
rs.flavor = /512MB/
rs.image = /Ubuntu 12.04/
rs.public_key_path = "my_public_key.pub"
end
end
Vagrant.configure("2") do |config|
config.vm.box = 'precise64'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "chef-repo/cookbooks"
chef.roles_path = "chef-repo/roles"
chef.add_role "mysql_server"
chef.add_role "web_server"
end
end
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.define "web" do |web|
web.vm.network :private_network, ip: "192.168.57.10"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe("apache2")
end
end
config.vm.define "database" do |database|
database.vm.network :private_network, ip: "192.168.57.11"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe("mysql")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment