summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2017-10-26 14:09:04 -0400
committerGuo Ruijing <ruijing.guo@intel.com>2017-10-26 16:44:12 -0400
commitad71e9b4f2a6de28b24536a894aa7b263ca5b06d (patch)
tree8c932aa89a27cba3356dcb1fc5d6446e0549853e /ci
parenta7ad050f4500863a4e74dda821d5176478add401 (diff)
setup virtual pod for container4nfv
Change-Id: Ib09a554cce21aa3cf99f7e9d02089c5fa7415f02 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Diffstat (limited to 'ci')
-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