summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/setup_vagrant.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/ci/setup_vagrant.sh b/ci/setup_vagrant.sh
new file mode 100755
index 0000000..cd334d5
--- /dev/null
+++ b/ci/setup_vagrant.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -ex
+
+cat << EOF | sudo tee /etc/sudoers.d/${USER}
+${USER} ALL = (root) NOPASSWD:ALL
+EOF
+
+sudo apt-get update -y
+sudo apt-get install -y openssh-server git virtualbox
+wget https://releases.hashicorp.com/vagrant/1.8.7/vagrant_1.8.7_x86_64.deb
+sudo dpkg -i vagrant_1.8.7_x86_64.deb
+rm -rf vagrant_1.8.7_x86_64.deb
+
+#refer to https://github.com/vagrant-libvirt/vagrant-libvirt
+#sudo apt-get build-dep vagrant ruby-libvirt -y
+sudo apt-get install -y qemu libvirt-bin ebtables dnsmasq
+sudo apt-get install -y libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev
+vagrant plugin install vagrant-libvirt
+sudo adduser ${USER} libvirtd
+sudo service libvirtd restart