Parametrize networks, box and provider

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
Bogdan Dobrelya 2015-09-02 11:13:36 +02:00
parent a3db59cdb8
commit b5f999c1ce
3 changed files with 6 additions and 6 deletions

View File

@ -29,6 +29,8 @@ cd solar
```
* 1. Configure vagrant-settings.yml, for example:
```
vagrant_provider: virtualbox
vagrant_box: cgenie/solar-master
slaves_count: 2
slaves_ram: 2048
slaves_cpu: 2

7
Vagrantfile vendored
View File

@ -71,9 +71,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "shell", inline: master_pxe, privileged: true unless PREPROVISIONED
config.vm.provision "file", source: "~/.vagrant.d/insecure_private_key", destination: "/vagrant/tmp/keys/ssh_private"
config.vm.provision "file", source: "bootstrap/ansible.cfg", destination: "/home/vagrant/.ansible.cfg"
MASTER_IPS.each do |ip|
config.vm.network "private_network", ip: "#{ip}"
end
config.vm.host_name = "solar-dev"
config.vm.provider :virtualbox do |v|
@ -85,10 +82,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"--cpus", MASTER_CPUS,
"--ioapic", "on",
]
if PARAVIRT_PROVIDER
v.customize ['modifyvm', :id, "--paravirtprovider", PARAVIRT_PROVIDER] # for linux guest
end
v.name = "solar-dev"
end
config.vm.provider :libvirt do |libvirt|
@ -147,10 +144,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"--cpus", SLAVES_CPUS,
"--ioapic", "on",
]
if PARAVIRT_PROVIDER
v.customize ['modifyvm', :id, "--paravirtprovider", PARAVIRT_PROVIDER] # for linux guest
end
v.name = "solar-dev#{index}"
end
config.vm.provider :libvirt do |libvirt|

View File

@ -1,6 +1,7 @@
# rename it to vagrant-settings.yml then Vagrantfile
# will use values from this file
vagrant_provider: virtualbox
vagrant_box: cgenie/solar-master
slaves_count: 2
slaves_ram: 1024
slaves_cpu: 1