summaryrefslogtreecommitdiffstats
path: root/tests/vagrant/vagrant-template/roles/prepare-brick/tasks/main.yml
Commit message (Collapse)AuthorAgeFilesLines
* vagrant-test: added more options and centos6 base boxRaghavendra Talur2016-04-251-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: Introduce a Vagrant VM based test environmentRaghavendra Talur2015-12-281-0/+6
This introduces a mechanism using which a developer could easily test the Gluster code in a VM environment. Also, it will help bring uniformity in the environments used by various developers. How to use: 1. git checkout -b custom-branch-name 2. Make changes 3. Execute ./run-tests-in-vagrant.sh What happens in the background: 1. A new directory is created: tests/vagrant/vagrant-custom-branch-name It will serve as the Vagrant dir which has the Vagrantfile and related ansible playbooks. The VM is started using Vagrant and provisioned using ansible. 2. The source dir is recursively copied over to the VM under /home/vagrant/glusterfs. 3. Gluster is source installed in VM. What happens in the foreground: 1. run-tests.sh is executed in VM using ssh and output is displayed in the same terminal with option to use ctrl-c to interrupt the test midway. The VM would still persist and you could ssh into it. Also, you can checkout a different branch elsewhere and execute run-tests-in-vagrant.sh there to get another VM which would execute tests on that code. If you wish to make some changes in the code, you could: a. Change the code in host and run the script again to repeat the whole process. OR b. vagrant ssh into the VM and make the changes in the VM. Co-authored-by: Kaushal M <kaushal@redhat.com> Co-authored-by: Michael Adam <obnox@samba.org> Change-Id: Ic87801172c8b614cdecbdf2a765e1b3370a5faf7 BUG: 1291537 Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/12753 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>