commit
c3278c7cf2
14
Vagrantfile
vendored
14
Vagrantfile
vendored
@ -47,9 +47,6 @@ slave_celery = ansible_playbook_command("celery.yaml", ["--skip-tags", "master"]
|
|||||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
config.vm.define "solar-dev", primary: true 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.box = "cgenie/solar-master"
|
||||||
|
|
||||||
config.vm.provision "shell", inline: solar_script, privileged: true
|
config.vm.provision "shell", inline: solar_script, privileged: true
|
||||||
@ -68,6 +65,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
]
|
]
|
||||||
v.name = "solar-dev"
|
v.name = "solar-dev"
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
SLAVES_COUNT.times do |i|
|
SLAVES_COUNT.times do |i|
|
||||||
@ -92,6 +95,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
]
|
]
|
||||||
v.name = "solar-dev#{index}"
|
v.name = "solar-dev#{index}"
|
||||||
end
|
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
|
||||||
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…
x
Reference in New Issue
Block a user