summaryrefslogtreecommitdiffstats
path: root/ci/setup_vagrant.sh
diff options
context:
space:
mode:
authorRuijing Guo <ruijing.guo@intel.com>2017-11-30 05:18:11 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-30 05:18:11 +0000
commit63717400ae46c430b62c0f73c8ee7c5afa415213 (patch)
treeba986667d3e1606d2788c048624721e7a7a691df /ci/setup_vagrant.sh
parent85999db47c5f2292968c91184021bd220c7cd246 (diff)
parent26013163411b419fcf60866d61a028c62737e282 (diff)
Merge "build vagrant/libvirt box"
Diffstat (limited to 'ci/setup_vagrant.sh')
-rwxr-xr-xci/setup_vagrant.sh45
1 files changed, 0 insertions, 45 deletions
diff --git a/ci/setup_vagrant.sh b/ci/setup_vagrant.sh
deleted file mode 100755
index 1a09ffb..0000000
--- a/ci/setup_vagrant.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-set -ex
-
-install_packages()
-{
- 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 unzip
- 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
-}
-
-build_box() {
- rm -rf ~/'VirtualBox VMs'/ubuntu-16.04-amd64
- rm -rf bento
- # Thanks Bento's great effort
- # Bento project(https://github.com/chef/bento) is released by Apache 2.0 License
- git clone https://github.com/chef/bento
- cd bento; git checkout 05d98910d835b503e7be3d2e4071956f66fbbbc4
- cp ../update.sh ubuntu/scripts/
- wget https://releases.hashicorp.com/packer/1.1.2/packer_1.1.2_linux_amd64.zip
- unzip packer_1.1.2_linux_amd64.zip
- cd ubuntu
- sed -i 's/"disk_size": "40960"/"disk_size": "409600"/' ubuntu-16.04-amd64.json
- ../packer build -var 'headless=true' -only=virtualbox-iso ubuntu-16.04-amd64.json
- vagrant box remove -f opnfv/container4nfv --all || true
- vagrant box add opnfv/container4nfv ../builds/ubuntu-16.04.virtualbox.box
-}
-
-install_vagrant_libvirt() {
- #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
-}
-
-install_packages
-build_box