Fix libvirt integration for multi-nets
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
41a15eff09
commit
14f04937a5
21
README.md
21
README.md
@ -26,27 +26,6 @@ For details see Customizing `vagrant-settings.yaml` section.
|
||||
Setup environment:
|
||||
```bash
|
||||
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
|
||||
slaves_ips:
|
||||
- 10.0.0.
|
||||
- 10.1.0.
|
||||
- 192.168.121.
|
||||
master_ram: 2048
|
||||
master_cpu: 2
|
||||
master_ips:
|
||||
- 10.0.0.2
|
||||
- 10.1.0.2
|
||||
- 192.168.121.12
|
||||
```
|
||||
* 2. Provision the env
|
||||
```
|
||||
vagrant up
|
||||
```
|
||||
|
||||
|
6
Vagrantfile
vendored
6
Vagrantfile
vendored
@ -82,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|
|
||||
@ -156,10 +156,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|
|
||||
@ -182,7 +182,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
end
|
||||
|
||||
index = 0
|
||||
SLAVE_IPS.each do |ip|
|
||||
SLAVES_IPS.each do |ip|
|
||||
begin
|
||||
# try to configure libvirt network
|
||||
config.vm.network :private_network, ip: "#{ip}#{ip_index}", :dev => "solbr#{index}", :mode => 'nat'
|
||||
|
@ -1,17 +1,5 @@
|
||||
# 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
|
||||
slaves_ips:
|
||||
- 10.0.0.
|
||||
- 10.1.0.
|
||||
- 192.168.121.
|
||||
master_ram: 1024
|
||||
master_cpu: 1
|
||||
master_ips:
|
||||
- 10.0.0.2
|
||||
- 10.1.0.2
|
||||
- 192.168.121.12
|
||||
|
||||
slaves_count: 3
|
||||
slaves_image: ubuntu/trusty64
|
||||
|
@ -7,7 +7,15 @@ master_image: solar-project/solar-master
|
||||
slaves_image: solar-project/solar-master
|
||||
master_ram: 1024
|
||||
master_cpus: 1
|
||||
master_ips:
|
||||
- 10.0.0.2
|
||||
- 10.1.0.2
|
||||
- 10.2.0.2
|
||||
slaves_cpus: 1
|
||||
slaves_ips:
|
||||
- 10.0.0.
|
||||
- 10.1.0.
|
||||
- 10.2.0.
|
||||
|
||||
# if you have virtualbox 5.x then enable it
|
||||
# if will speedup things a lot
|
||||
|
Loading…
x
Reference in New Issue
Block a user