summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2019-08-21 14:50:56 +0530
committerMichael Adam <obnox@samba.org>2020-02-28 14:00:24 +0100
commitbcdfd558f751303a5342a05ec08d45bc46a97316 (patch)
treec805438f45ac923d88b35fd7e044953e5db0df00
parent2a3ef721c109ed359d2edb59db1beb43179dbeaa (diff)
downloadsamba-integration-bcdfd558f751303a5342a05ec08d45bc46a97316.tar.gz
samba-integration-bcdfd558f751303a5342a05ec08d45bc46a97316.tar.xz
samba-integration-bcdfd558f751303a5342a05ec08d45bc46a97316.zip
Add Vagrantfile
Signed-off-by: Anoop C S <anoopcs@redhat.com>
-rw-r--r--vagrant/Vagrantfile38
1 files changed, 38 insertions, 0 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
new file mode 100644
index 0000000..c8852cd
--- /dev/null
+++ b/vagrant/Vagrantfile
@@ -0,0 +1,38 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+#
+
+NODES = 2
+DISKS = 2
+
+Vagrant.configure("2") do |config|
+ config.ssh.insert_key = false
+ config.vm.provider :libvirt do |v,override|
+ override.vm.box = "centos/7"
+ override.vm.synced_folder '.', '/vagrant', disabled: true
+ v.qemu_use_session = false
+ end
+
+ (0..NODES-1).each do |i|
+ config.vm.define "storage#{i}" do |storage|
+ storage.vm.hostname = "storage#{i}"
+ storage.vm.network :private_network, ip: "192.168.122.10#{i}"
+ (0..DISKS-1).each do |d|
+ storage.vm.provider :virtualbox do |vb|
+ vb.customize [ "createhd", "--filename", "disk-#{i}#{d}.vdi", "--size", 10*1024 ]
+ vb.customize [ "storageattach", :id, "--storagectl", "SATA Controller", "--port", 3+d, "--device", 0, "--type", "hdd", "--medium", "disk-#{i}#{d}.vdi" ]
+ vb.memory = 1024
+ vb.cpus = 2
+ end
+
+ driverletters = ('b'..'z').to_a
+ storage.vm.provider :libvirt do |lv|
+ lv.storage_pool_name = "home-libvirt"
+ lv.storage :file, :device => "vd#{driverletters[d]}", :path => "disk-#{i}#{d}.disk", :size => '10G'
+ lv.memory = 1024
+ lv.cpus = 2
+ end
+ end
+ end
+ end
+end