2aa4faca0f
Add two changes from the main Vagrantfile also to the Vagrantfiles in ds-build and split. * Id3aeaa16e062f764412bd6c5fd9460b5867333a9 (vagrant-cachier) * Ie615cf81be40b8395d8e7672e59407cc4925b410 (vagrant-berkshelf) Change-Id: I2309db433c547736732217ffcd1e1f440d1684ab
133 lines
3.9 KiB
Ruby
133 lines
3.9 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
# Set working dir to root of repo
|
|
Dir.chdir ".."
|
|
|
|
VAGRANTFILE_API_VERSION = "2" # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
|
|
|
unless Vagrant.has_plugin?("vagrant-berkshelf")
|
|
raise "The needed plugin vagrant-berkshelf is not available.
|
|
Install it by calling 'vagrant plugin install vagrant-berkshelf'."
|
|
end
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
# Settings for all vms
|
|
config.berkshelf.enabled = true
|
|
|
|
if Vagrant.has_plugin?("vagrant-cachier")
|
|
config.cache.scope = :box
|
|
end
|
|
|
|
# Handle local proxy settings
|
|
if Vagrant.has_plugin?("vagrant-proxyconf")
|
|
if ENV["http_proxy"]
|
|
config.proxy.http = ENV["http_proxy"]
|
|
end
|
|
if ENV["https_proxy"]
|
|
config.proxy.https = ENV["https_proxy"]
|
|
end
|
|
if ENV["no_proxy"]
|
|
config.proxy.no_proxy = ENV["no_proxy"]
|
|
end
|
|
end
|
|
|
|
config.vm.synced_folder "~/", "/vagrant_home"
|
|
config.vm.provider "virtualbox" do |vb|
|
|
vb.customize ["modifyvm", :id, "--memory", "768"]
|
|
end
|
|
|
|
# VM specific settings, these machines come up in order they are specified.
|
|
config.vm.define "mysql" do |mysql|
|
|
mysql.vm.hostname = 'mysql'
|
|
mysql.vm.box = "kuhlmant/precise64_chef11"
|
|
mysql.vm.network :private_network, ip: "192.168.10.6"
|
|
mysql.vm.provision :chef_solo do |chef|
|
|
chef.roles_path = "roles"
|
|
chef.data_bags_path = "data_bags"
|
|
chef.add_role "MySQL"
|
|
end
|
|
end
|
|
|
|
config.vm.define "devstack" do |devstack|
|
|
devstack.vm.hostname = 'devstack'
|
|
devstack.vm.box = "monasca/devstack"
|
|
devstack.vm.network :private_network, ip: "192.168.10.5"
|
|
devstack.vm.provider "virtualbox" do |vb|
|
|
vb.memory = 5280
|
|
vb.cpus = 4
|
|
end
|
|
devstack.vm.provision :chef_solo do |chef|
|
|
chef.roles_path = "roles"
|
|
chef.data_bags_path = "data_bags"
|
|
chef.add_role "Devstack"
|
|
chef.arguments = '--force-formatter'
|
|
end
|
|
end
|
|
|
|
config.vm.define "kafka" do |kafka|
|
|
kafka.vm.hostname = 'kafka'
|
|
kafka.vm.box = "kuhlmant/precise64_chef11"
|
|
kafka.vm.network :private_network, ip: "192.168.10.10"
|
|
kafka.vm.provision :chef_solo do |chef|
|
|
chef.roles_path = "roles"
|
|
chef.data_bags_path = "data_bags"
|
|
chef.add_role "Kafka"
|
|
end
|
|
kafka.vm.provider "virtualbox" do |vb|
|
|
vb.memory = 1024
|
|
end
|
|
end
|
|
|
|
config.vm.define "vertica" do |vertica|
|
|
vertica.vm.hostname = 'vertica'
|
|
vertica.vm.box = "kuhlmant/precise64_chef11"
|
|
vertica.vm.network :private_network, ip: "192.168.10.8"
|
|
vertica.vm.provision :chef_solo do |chef|
|
|
chef.roles_path = "roles"
|
|
chef.data_bags_path = "data_bags"
|
|
chef.add_role "Vertica"
|
|
end
|
|
vertica.vm.provider "virtualbox" do |vb|
|
|
vb.memory = 2048 # Vertica is pretty strict about its minimum
|
|
end
|
|
end
|
|
|
|
config.vm.define "api" do |api|
|
|
api.vm.hostname = 'api'
|
|
api.vm.box = "kuhlmant/precise64_chef11"
|
|
api.vm.network :private_network, ip: "192.168.10.4"
|
|
api.vm.provision :chef_solo do |chef|
|
|
chef.roles_path = "roles"
|
|
chef.data_bags_path = "data_bags"
|
|
chef.add_role "Api"
|
|
end
|
|
end
|
|
|
|
config.vm.define "persister" do |persister|
|
|
persister.vm.hostname = 'persister'
|
|
persister.vm.box = "kuhlmant/precise64_chef11"
|
|
persister.vm.network :private_network, ip: "192.168.10.12"
|
|
persister.vm.provision :chef_solo do |chef|
|
|
chef.roles_path = "roles"
|
|
chef.data_bags_path = "data_bags"
|
|
chef.add_role "Persister"
|
|
end
|
|
persister.vm.provider "virtualbox" do |vb|
|
|
vb.memory = 1024
|
|
end
|
|
end
|
|
|
|
config.vm.define "thresh" do |thresh|
|
|
thresh.vm.hostname = 'thresh'
|
|
thresh.vm.box = "kuhlmant/precise64_chef11"
|
|
thresh.vm.network :private_network, ip: "192.168.10.14"
|
|
thresh.vm.provision :chef_solo do |chef|
|
|
chef.roles_path = "roles"
|
|
chef.data_bags_path = "data_bags"
|
|
chef.add_role "Thresh"
|
|
end
|
|
end
|
|
|
|
end
|