Skip to content

Instantly share code, notes, and snippets.

@techzhou
Last active August 29, 2015 13:56
Show Gist options
  • Save techzhou/9158329 to your computer and use it in GitHub Desktop.
Save techzhou/9158329 to your computer and use it in GitHub Desktop.
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "db" do |db|
db.vm.box = "precise"
db.vm.hostname = "db"
db.vm.network "private_network", ip: "192.168.50.20"
db.vm.network :forwarded_port, guest: 22, host: 3333
db.vm.network :forwarded_port, guest: 3306, host: 3306
db.vm.provider "virtualbox" do |v|
v.memory = 1024
end
db.vm.synced_folder "salt/roots/", "/srv/salt/"
db.vm.provision :shell, :inline => 'cp /vagrant/sources_precise.list /etc/apt/sources.list'
db.vm.provision :salt do |salt|
salt.minion_config = "salt/minion"
salt.run_highstate = true
salt.verbose = true
salt.pillar({
"codename" => "precise",
})
end
end
config.vm.define "redis" do |redis|
redis.vm.box = "precise"
redis.vm.hostname = "redis"
redis.vm.network "private_network", ip: "192.168.50.30"
redis.vm.network :forwarded_port, guest: 22, host: 4444
redis.vm.network :forwarded_port, guest: 6379, host: 6379
redis.vm.synced_folder "salt/roots/", "/srv/salt/"
redis.vm.provision :shell, :inline => 'cp /vagrant/sources_precise.list /etc/apt/sources.list'
redis.vm.provision :salt do |salt|
salt.minion_config = "salt/minion"
salt.run_highstate = true
salt.verbose = true
salt.pillar({
"codename" => "precise",
})
end
end
config.vm.define "fdfs" do |fdfs|
fdfs.vm.box = "precise"
fdfs.vm.hostname = "fdfs"
fdfs.vm.network "private_network", ip: "192.168.50.40"
fdfs.vm.network :forwarded_port, guest: 22, host: 5555
fdfs.vm.synced_folder "salt/roots/", "/srv/salt/"
fdfs.vm.provision :shell, :inline => 'cp /vagrant/sources_precise.list /etc/apt/sources.list'
fdfs.vm.provision :salt do |salt|
salt.minion_config = "salt/minion"
salt.run_highstate = true
salt.verbose = true
salt.pillar({
"codename" => "precise",
})
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment