Libvirt support
This commit is contained in:
parent
ae77c0a5a4
commit
1c2130d84f
14
Vagrantfile
vendored
14
Vagrantfile
vendored
@ -34,9 +34,6 @@ slave_celery = ansible_playbook_command("celery.yml", ["--skip-tags", "master"])
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
||||
config.vm.define "solar-dev", primary: true do |config|
|
||||
#config.vm.box = "deb/jessie-amd64"
|
||||
#config.vm.box = "rustyrobot/deb-jessie-amd64"
|
||||
#config.vm.box = "ubuntu/trusty64"
|
||||
config.vm.box = "cgenie/solar-master"
|
||||
|
||||
config.vm.provision "shell", inline: solar_script, privileged: true
|
||||
@ -54,6 +51,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
]
|
||||
v.name = "solar-dev"
|
||||
end
|
||||
|
||||
config.vm.provider:libvirt do |libvirt|
|
||||
config.vm.synced_folder ".", "/vagrant", type: "9p", disabled: false, accessmode: "mapped"
|
||||
libvirt.driver = 'kvm'
|
||||
libvirt.memory = MASTER_RAM
|
||||
end
|
||||
end
|
||||
|
||||
SLAVES_COUNT.times do |i|
|
||||
@ -78,6 +81,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
]
|
||||
v.name = "solar-dev#{index}"
|
||||
end
|
||||
config.vm.provider:libvirt do |libvirt|
|
||||
config.vm.synced_folder ".", "/vagrant", type: "9p", disabled: false, accessmode: "mapped"
|
||||
libvirt.driver = 'kvm'
|
||||
libvirt.memory = SLAVES_RAM
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
26
docs/libvirt.md
Normal file
26
docs/libvirt.md
Normal file
@ -0,0 +1,26 @@
|
||||
# Using Vagrant with livbirt
|
||||
|
||||
First install libvirt plugin
|
||||
|
||||
```bash
|
||||
vagrant plugin install vagrant-libvirt
|
||||
```
|
||||
|
||||
If you do not have already vagrant box for VirtualBox, install it:
|
||||
|
||||
```bash
|
||||
vagrant box add cgenie/solar-master
|
||||
```
|
||||
|
||||
To use this box in libvirt you need to convert it using `vagrant-mutate` plugin:
|
||||
|
||||
```bash
|
||||
vagrant plugin install vagrant-mutate
|
||||
vagrant mutate cgenie/solar-master libvirt
|
||||
```
|
||||
|
||||
# Use solar
|
||||
|
||||
``` bash
|
||||
vagrant up --provider libvirt
|
||||
```
|
Loading…
Reference in New Issue
Block a user