From 9c3a7f3188c3119791ab280458e19098e3225d2f Mon Sep 17 00:00:00 2001 From: Chris Long Date: Sun, 31 Mar 2019 12:00:31 -0700 Subject: [PATCH 1/5] Speed up logger provisioning by using apt-fast --- Vagrant/bootstrap.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Vagrant/bootstrap.sh b/Vagrant/bootstrap.sh index b6bd633..ca97054 100644 --- a/Vagrant/bootstrap.sh +++ b/Vagrant/bootstrap.sh @@ -1,7 +1,9 @@ #! /bin/bash export DEBIAN_FRONTEND=noninteractive -sed -i 's#http://archive.ubuntu.com#http://us.archive.ubuntu.com#g' /etc/apt/sources.list +echo "apt-fast apt-fast/maxdownloads string 10" | debconf-set-selections; +echo "apt-fast apt-fast/dlflag boolean true" | debconf-set-selections; +sed -i "2ideb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted universe multiverse" /etc/apt/sources.list install_mongo_db_apt_key() { # Install key and apt source for MongoDB @@ -12,12 +14,15 @@ install_mongo_db_apt_key() { install_python_apt_source() { # Install apt source for Python3.6 add-apt-repository -y ppa:jonathonf/python-3.6 + add-apt-repository -y ppa:apt-fast/stable } apt_install_prerequisites() { # Install prerequisites and useful tools apt-get update - apt-get install -y jq whois build-essential git docker docker-compose unzip mongodb-org python3.6 python3.6-dev + #apt-get install -y apt-fast + time apt-fast install -y jq whois build-essential git docker docker-compose unzip mongodb-org python3.6 python3.6-dev + exit 0 # Install pip for Python 3.6 curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6 } From bd2847603ee7466fff342aa3300b2eefce3992a0 Mon Sep 17 00:00:00 2001 From: Chris Long Date: Sun, 31 Mar 2019 12:02:13 -0700 Subject: [PATCH 2/5] Update bootstrap.sh --- Vagrant/bootstrap.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Vagrant/bootstrap.sh b/Vagrant/bootstrap.sh index ca97054..20110bd 100644 --- a/Vagrant/bootstrap.sh +++ b/Vagrant/bootstrap.sh @@ -21,8 +21,7 @@ apt_install_prerequisites() { # Install prerequisites and useful tools apt-get update #apt-get install -y apt-fast - time apt-fast install -y jq whois build-essential git docker docker-compose unzip mongodb-org python3.6 python3.6-dev - exit 0 + apt-fast install -y jq whois build-essential git docker docker-compose unzip mongodb-org python3.6 python3.6-dev # Install pip for Python 3.6 curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6 } From 53feb06c950e904a459c89168e48504461dd8d45 Mon Sep 17 00:00:00 2001 From: Chris Long Date: Sun, 31 Mar 2019 12:04:32 -0700 Subject: [PATCH 3/5] Fix typo --- Vagrant/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrant/bootstrap.sh b/Vagrant/bootstrap.sh index 20110bd..758fc29 100644 --- a/Vagrant/bootstrap.sh +++ b/Vagrant/bootstrap.sh @@ -20,7 +20,7 @@ install_python_apt_source() { apt_install_prerequisites() { # Install prerequisites and useful tools apt-get update - #apt-get install -y apt-fast + apt-get install -y apt-fast apt-fast install -y jq whois build-essential git docker docker-compose unzip mongodb-org python3.6 python3.6-dev # Install pip for Python 3.6 curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6 From 35ea96f715dd5a6d349f4dc72f813a1d67328b7b Mon Sep 17 00:00:00 2001 From: Chris Long Date: Tue, 2 Apr 2019 08:42:39 -0700 Subject: [PATCH 4/5] Update build_machine_bootstrap.sh --- ci/build_machine_bootstrap.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/ci/build_machine_bootstrap.sh b/ci/build_machine_bootstrap.sh index 77d6c4e..63b67b0 100755 --- a/ci/build_machine_bootstrap.sh +++ b/ci/build_machine_bootstrap.sh @@ -28,8 +28,6 @@ fi echo "Args: $ARGS" -sed -i 's/archive.ubuntu.com/us.archive.ubuntu.com/g' /etc/apt/sources.list - if [[ "$VAGRANT_ONLY" -eq 1 ]] && [[ "$PACKER_ONLY" -eq 1 ]]; then echo "Somehow this build is configured as both packer-only and vagrant-only. This means something has gone horribly wrong." exit 1 From e9c19857c0d463e80210ea61b44acd39c1ee0a6b Mon Sep 17 00:00:00 2001 From: Chris Long Date: Tue, 2 Apr 2019 11:45:50 -0700 Subject: [PATCH 5/5] Update build_machine_bootstrap.sh --- ci/build_machine_bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/build_machine_bootstrap.sh b/ci/build_machine_bootstrap.sh index 63b67b0..f31f6a0 100755 --- a/ci/build_machine_bootstrap.sh +++ b/ci/build_machine_bootstrap.sh @@ -35,6 +35,7 @@ fi # Install Virtualbox 5.2 echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list +sed -i "2ideb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted universe multiverse" /etc/apt/sources.list wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - apt-get update apt-get install -y linux-headers-"$(uname -r)" virtualbox-5.2 build-essential unzip git ufw apache2