From 8f68f5c13b75badbe658057292f6d216b6b383f4 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Fri, 6 Sep 2019 14:27:26 -0400 Subject: [PATCH 1/3] vagrant: Export services without port mapping By having an ip address by default, developers can access any service on the Vagrant linux box without needing to setup port maps. --- Vagrantfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 8c5bb6518..5dc10c908 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,6 +5,8 @@ LINUX_BASE_BOX = "bento/ubuntu-16.04" FREEBSD_BASE_BOX = "freebsd/FreeBSD-11.2-STABLE" +LINUX_IP_ADDRESS = "10.199.0.200" + Vagrant.configure(2) do |config| # Compilation and development boxes config.vm.define "linux", autostart: true, primary: true do |vmCfg| @@ -21,6 +23,10 @@ Vagrant.configure(2) do |config| vmCfg.vm.provision "shell", privileged: false, path: './scripts/vagrant-linux-unpriv-bootstrap.sh' + + vmCfg.vm.provider "virtualbox" do |_| + vmCfg.vm.network :private_network, ip: LINUX_IP_ADDRESS + end end config.vm.define "linux-ui", autostart: false, primary: false do |vmCfg| From cbb624f3dec26e76bc9c1d5764870c6d3b54ca1a Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Fri, 6 Sep 2019 14:55:16 -0400 Subject: [PATCH 2/3] vagrant: Install dev tools in dev script only --- scripts/vagrant-linux-priv-config.sh | 11 ++--------- scripts/vagrant-linux-priv-dev.sh | 4 ---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/scripts/vagrant-linux-priv-config.sh b/scripts/vagrant-linux-priv-config.sh index b2400c5c0..df144e67f 100755 --- a/scripts/vagrant-linux-priv-config.sh +++ b/scripts/vagrant-linux-priv-config.sh @@ -20,19 +20,12 @@ apt-get install -y \ libpcre3-dev \ linux-libc-dev:i386 \ pkg-config \ - zip - -# Install Development utilities -apt-get install -y \ + zip \ curl \ - default-jre \ - htop \ jq \ - qemu \ - silversearcher-ag \ tree \ unzip \ - vim + wget # Install ARM build utilities apt-get install -y \ diff --git a/scripts/vagrant-linux-priv-dev.sh b/scripts/vagrant-linux-priv-dev.sh index 2b22a36a6..554746200 100755 --- a/scripts/vagrant-linux-priv-dev.sh +++ b/scripts/vagrant-linux-priv-dev.sh @@ -2,14 +2,10 @@ # Install Development utilities apt-get install -y \ - curl \ default-jre \ htop \ - jq \ qemu \ silversearcher-ag \ - tree \ - unzip \ vim From d8eda18373641c0a07a1d2c53ba2500fa671719b Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Fri, 6 Sep 2019 16:11:16 -0400 Subject: [PATCH 3/3] vagrant: install chrome in dev only --- scripts/vagrant-linux-priv-dev.sh | 5 +++++ scripts/vagrant-linux-unpriv-ui.sh | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/vagrant-linux-priv-dev.sh b/scripts/vagrant-linux-priv-dev.sh index 554746200..f8dce4c58 100755 --- a/scripts/vagrant-linux-priv-dev.sh +++ b/scripts/vagrant-linux-priv-dev.sh @@ -8,6 +8,11 @@ apt-get install -y \ silversearcher-ag \ vim +# Install Chrome for running tests (in headless mode) +wget -qO- - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - +echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list +apt-get update +apt-get install -y google-chrome-stable # Set hostname -> IP to make advertisement work as expected ip=$(ip route get 1 | awk '{print $NF; exit}') diff --git a/scripts/vagrant-linux-unpriv-ui.sh b/scripts/vagrant-linux-unpriv-ui.sh index e59692d39..97643759a 100755 --- a/scripts/vagrant-linux-unpriv-ui.sh +++ b/scripts/vagrant-linux-unpriv-ui.sh @@ -15,9 +15,3 @@ npm install -g ember-cli # Install Yarn for front-end dependency management curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2 - -# Install Chrome for running tests (in headless mode) -wget -qO- - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - -sudo sh -c 'echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' -sudo apt-get update -sudo apt-get install -y google-chrome-stable