summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-01-18 15:06:18 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-02-11 16:10:38 -0800
commite29bf0b1f102308f114e04421d80696eebfbf6e3 (patch)
tree77dbb41b700e4c0a0179af135736971e42e78781
parent55617ef037695f47ead1c1b753678402e1545f8c (diff)
vagrant-test: Use pre-baked box for better perf
Using Fedora cloud base leads to lot of downloading time for packages and also it is larger in disk size once imported into linux. Change-Id: I2e878e7cb29a79ade4d6e517075ab523062deb53 BUG: 1291537 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13251 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
-rw-r--r--tests/vagrant/vagrant-template/Vagrantfile11
-rw-r--r--tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml3
-rw-r--r--tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml4
-rw-r--r--tests/vagrant/vagrant-template/setup.yml7
4 files changed, 12 insertions, 13 deletions
diff --git a/tests/vagrant/vagrant-template/Vagrantfile b/tests/vagrant/vagrant-template/Vagrantfile
index fda113f..ccbbf60 100644
--- a/tests/vagrant/vagrant-template/Vagrantfile
+++ b/tests/vagrant/vagrant-template/Vagrantfile
@@ -3,7 +3,8 @@
Vagrant.configure("2") do |config|
config.vm.define "vagrant-testVM" do |testvm|
- testvm.vm.box = "fedora/23-cloud-base"
+ 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
@@ -32,14 +33,6 @@ Vagrant.configure("2") do |config|
end
# Let's provision
-
- # Some packages are required for ansible dnf module to work
- # so install them using shell inline
- testvm.vm.provision "shell", inline: "sudo dnf install -y python-dnf", run: "always"
- testvm.vm.provision "shell", inline: "sudo dnf install -y libselinux-python", run: "always"
- testvm.vm.provision "shell", inline: "sudo dnf install -y libsemanage-python", run: "always"
-
- # Now onto the main provisioning
testvm.vm.provision "ansible", run: "always" do |setup|
setup.verbose = "v"
setup.playbook = "setup.yml"
diff --git a/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
index 38cfd6a..ee209e8 100644
--- a/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
+++ b/tests/vagrant/vagrant-template/roles/install-pkgs/tasks/main.yml
@@ -69,6 +69,3 @@
- xfsprogs
- yajl-devel
-- 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/remove-gluster-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml
new file mode 100644
index 0000000..c91efa9
--- /dev/null
+++ b/tests/vagrant/vagrant-template/roles/remove-gluster-pkgs/tasks/main.yml
@@ -0,0 +1,4 @@
+---
+- 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/setup.yml b/tests/vagrant/vagrant-template/setup.yml
index 691c7af..454c171 100644
--- a/tests/vagrant/vagrant-template/setup.yml
+++ b/tests/vagrant/vagrant-template/setup.yml
@@ -2,7 +2,12 @@
- hosts: all
sudo: true
roles:
- - install-pkgs
+ #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