summaryrefslogtreecommitdiffstats
path: root/tests/vagrant/vagrant-template
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-04-20 15:02:16 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-04-25 07:28:39 -0700
commitef3d6fd06cf0712774e721eaf1d0b072f54e0b8a (patch)
tree802fc16778961c5c2149c496074101769c426ef3 /tests/vagrant/vagrant-template
parent19fd9a371fff4ece2c617f1e7194ffcee039f21e (diff)
vagrant-test: added more options and centos6 base box
Options added are 1. destroy-now option Now you can call run-tests-in-vagrant.sh with --destroy-now option to destroy the VM corresponding to the git branch and delete the corresponding vagrant dir. Usage: run-tests-in-vagrant.sh --destroy-now 2. os option With --os option you can specify the os to be used for VM. Default is fedora and this patch adds support for centos6. Usage: run-tests-in-vagrant.sh --os="centos6" 3. destroy-after-test option When specified the VM is deleted right after the tests are executed. If the script exited before running tests then the VM is left as is for further debugging. 4. verbose option Many log messages which were mainly added for initial debugging have been removed now. All vagrant and compilation outputs have been redirected to /dev/null. To enable these logs please use --verbose option. 5. ssh option --ssh option now allows one to ssh into the VM from topdir of source code thereby avoiding the hassle of cd'ing into the vagrant dir. Box added 1. This patch adds a centos6 base box which is currently made available at atlas.hashicorp.com. Template files for this box are available under tests/vagrant/vagrant-template-centos6 directory. The default box is moved under vagrant-template-fedora directory to keep up with the naming convention. Enhancements This patch also modifies the cpu and memory allocation mechanism for the VMs. All the cpus on the host are used and 1/4 of the memory available on host is used. Bug Fixes 1. Fix CFLAGS not passed to configure error If CFLAGS is assigned and then configure is called under sudo, the cflags are not passed onto configure. Change-Id: Iee1811a7d2b77785f6167f4706135a8f584a6bbd BUG: 1291537 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/14046 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'tests/vagrant/vagrant-template')
-rw-r--r--tests/vagrant/vagrant-template/Vagrantfile43
-rw-r--r--tests/vagrant/vagrant-template/roles/daemon-services/tasks/main.yml3
-rw-r--r--tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml6
-rw-r--r--tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml84
-rw-r--r--tests/vagrant/vagrant-template/roles/iptables/tasks/main.yml3
-rw-r--r--tests/vagrant/vagrant-template/roles/mock-user/tasks/main.yml3
-rw-r--r--tests/vagrant/vagrant-template/roles/prepare-brick/tasks/main.yml6
-rw-r--r--tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml4
-rw-r--r--tests/vagrant/vagrant-template/roles/selinux/tasks/main.yml3
-rw-r--r--tests/vagrant/vagrant-template/setup.yml17
10 files changed, 0 insertions, 172 deletions
diff --git a/tests/vagrant/vagrant-template/Vagrantfile b/tests/vagrant/vagrant-template/Vagrantfile
deleted file mode 100644
index ccbbf60575d..00000000000
--- a/tests/vagrant/vagrant-template/Vagrantfile
+++ /dev/null
@@ -1,43 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-Vagrant.configure("2") do |config|
- config.vm.define "vagrant-testVM" do |testvm|
- testvm.vm.box = "gluster-dev-fedora"
- testvm.vm.box_url = "http://download.gluster.org/pub/gluster/glusterfs/vagrant/gluster-dev-fedora/boxes/gluster-dev-fedora.json"
- testvm.vm.hostname = "vagrant-testVM"
- #testvm.ssh.insert_key = false
- testvm.vm.synced_folder ".", "/vagrant", disabled: true
-
-
- # Define basic config for VM, memory, cpu, storage pool
- testvm.vm.provider "libvirt" do |lv|
- lv.storage_pool_name = "default"
- lv.memory = 1024
- lv.cpus = 1
-
-
- # We need a brick partition, lets have a 5G disk for that.
- # If you need more bricks, just add more letters to the
- # string below.
- "b".split("").each do |i|
- lv.storage :file,
- #:path => "",
- #:allow_existing => "",
- :device => "vd#{i}",
- :size => "5G",
- :type => "qcow2",
- :bus => "virtio",
- :cache => "default"
- end
- end
-
- # Let's provision
- testvm.vm.provision "ansible", run: "always" do |setup|
- setup.verbose = "v"
- setup.playbook = "setup.yml"
- end
-
- end
-end
-
diff --git a/tests/vagrant/vagrant-template/roles/daemon-services/tasks/main.yml b/tests/vagrant/vagrant-template/roles/daemon-services/tasks/main.yml
deleted file mode 100644
index 98d077b1f2e..00000000000
--- a/tests/vagrant/vagrant-template/roles/daemon-services/tasks/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: stop and disable kernel nfs
- service: name=nfs-server state=stopped enabled=no
diff --git a/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml b/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml
deleted file mode 100644
index 84dd252b65b..00000000000
--- a/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: remove IPv6 address for localhost
- shell: sed -i '/::1/s/localhost //' /etc/hosts
-
-- name: add IPv4 address for localhost
- shell: sed -i '/127.0.0.1/s/$/ localhost/' /etc/hosts
diff --git a/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
deleted file mode 100644
index 4e7d8d0d7b8..00000000000
--- a/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
+++ /dev/null
@@ -1,84 +0,0 @@
----
-- name: install deltarpm
- dnf: name=deltarpm state=present
-
-- name: update system
- shell: dnf update -y
-
-- name: install other packages
- dnf: name={{ item }} state=present
- with_items:
- - attr
- - autoconf
- - automake
- - bison
- - libcmocka-devel
- - cifs-utils
- - dbench
- - dos2unix
- - e2fsprogs
- - findutils
- - flex
- - fuse-devel
- - fuse-libs
- - gcc
- - gdb
- - git
- - glib2-devel
- - hostname
- - libacl-devel
- - libaio-devel
- - libattr-devel
- - libibverbs-devel
- - librdmacm-devel
- - libtool
- - libxml2-devel
- - lvm2-devel
- - make
- - man-db
- - mock
- - net-tools
- - nfs-ganesha-gluster
- - nfs-utils
- - openssh-server
- - openssl-devel
- - perl-Test-Harness
- - pkgconfig
- - procps-ng
- - psmisc
- - python-devel
- - python-eventlet
- - python-netifaces
- - python-paste-deploy
- - python-setuptools
- - python-simplejson
- - python-sphinx
- - python-webob
- - pyxattr
- - readline-devel
- - rpm-build
- - screen
- - strace
- - supervisor
- - systemtap-sdt-devel
- - sqlite-devel
- - samba*
- - userspace-rcu-devel
- - vim
- - wget
- - which
- - xfsprogs
- - yajl-devel
-
-- name: install dev help packages, not required by Gluster
- dnf: name={{ item }} state=present
- with_items:
- - cgdb
- - clang
- - lsof
- - perf
- - sysstat
- - systemtap
- - systemtap-runtime
- - tcpdump
- - valgrind
diff --git a/tests/vagrant/vagrant-template/roles/iptables/tasks/main.yml b/tests/vagrant/vagrant-template/roles/iptables/tasks/main.yml
deleted file mode 100644
index 768cb0e8668..00000000000
--- a/tests/vagrant/vagrant-template/roles/iptables/tasks/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: disable iptables, need to add specific rules later
- shell: iptables -F
diff --git a/tests/vagrant/vagrant-template/roles/mock-user/tasks/main.yml b/tests/vagrant/vagrant-template/roles/mock-user/tasks/main.yml
deleted file mode 100644
index c8e1209937e..00000000000
--- a/tests/vagrant/vagrant-template/roles/mock-user/tasks/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: Add mock user; required for rpm.t
- user: name=mock group=mock
diff --git a/tests/vagrant/vagrant-template/roles/prepare-brick/tasks/main.yml b/tests/vagrant/vagrant-template/roles/prepare-brick/tasks/main.yml
deleted file mode 100644
index 6b3f6b8d3ea..00000000000
--- a/tests/vagrant/vagrant-template/roles/prepare-brick/tasks/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: Format backend
- filesystem: fstype=xfs dev=/dev/vdb
-
-- name: Add entry to fstab and mount
- mount: name=/d src=/dev/vdb fstype=xfs state=mounted
diff --git a/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml
deleted file mode 100644
index c91efa9ba7c..00000000000
--- a/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml
+++ /dev/null
@@ -1,4 +0,0 @@
----
-- name: Erase gluster packages, keep dependencies; we will source install
- shell: rpm -ev --nodeps `rpm -qa | grep ^gluster`
- ignore_errors: True
diff --git a/tests/vagrant/vagrant-template/roles/selinux/tasks/main.yml b/tests/vagrant/vagrant-template/roles/selinux/tasks/main.yml
deleted file mode 100644
index c9ba9618428..00000000000
--- a/tests/vagrant/vagrant-template/roles/selinux/tasks/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: Allow gfapi in Samba to bind to other ports than well known smb ports
- seboolean: name=samba_load_libgfapi state=yes persistent=yes
diff --git a/tests/vagrant/vagrant-template/setup.yml b/tests/vagrant/vagrant-template/setup.yml
deleted file mode 100644
index a9e798da3f4..00000000000
--- a/tests/vagrant/vagrant-template/setup.yml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- hosts: all
- sudo: true
- roles:
- #Installing packages invoke dnf and metadata download takes a long time.
- #The box used in Vagrantfile has all the packages installed.
- #Refer to main.yml file in install-pkgs role to get list of packages.
- #install-pkgs role is hence disabled by default.
- #- install-pkgs
- - remove-gluster-pkgs
- - prepare-brick
- - mock-user
- - selinux
- - iptables
- - fix-localhost
- - daemon-services
-