From ab2238ab8323fec14fcc27b433776376b715db87 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Mon, 25 Apr 2016 11:18:21 -0400 Subject: [PATCH 01/20] v.memory: 1024 Setting VM memory to 1GB by default to make it easier for those with only 4GB of RAM. 1GB is what docker-machine is using by default when creating a VM anyway. --- vagrant.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vagrant.yml b/vagrant.yml index 9efdd97..2f268f2 100644 --- a/vagrant.yml +++ b/vagrant.yml @@ -50,7 +50,7 @@ synced_folders: # VirtualBox VM settings v.gui: false # Set to true for debugging. Will unhide VM's primary console screen. -v.memory: 2048 # Memory settings. +v.memory: 1024 # Memory settings. v.cpus: 1 # CPU settings. VirtualBox works much better with a single CPU. # Network settings From e59dc6153ddd45dfa0bf0769546a05e87f9c60bf Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Thu, 5 May 2016 11:05:01 -0400 Subject: [PATCH 02/20] docker v1.11.1, docker-compose v1.7.1 --- scripts/presetup-mac.sh | 4 ++-- scripts/presetup-ubuntu.sh | 4 ++-- scripts/presetup-win.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/presetup-mac.sh b/scripts/presetup-mac.sh index b113943..f23dcef 100755 --- a/scripts/presetup-mac.sh +++ b/scripts/presetup-mac.sh @@ -1,7 +1,7 @@ #!/bin/bash -DOCKER_VERSION=1.10.3 -DOCKER_COMPOSE_VERSION=1.6.2 +DOCKER_VERSION=1.11.1 +DOCKER_COMPOSE_VERSION=1.7.1 # Console colors red='\033[0;31m' diff --git a/scripts/presetup-ubuntu.sh b/scripts/presetup-ubuntu.sh index 39f21ef..437680d 100644 --- a/scripts/presetup-ubuntu.sh +++ b/scripts/presetup-ubuntu.sh @@ -1,7 +1,7 @@ #!/bin/bash -DOCKER_VERSION=1.9.1 -DOCKER_COMPOSE_VERSION=1.5.2 +DOCKER_VERSION=1.11.1 +DOCKER_COMPOSE_VERSION=1.7.1 #-------------------------- Helper functions -------------------------------- diff --git a/scripts/presetup-win.sh b/scripts/presetup-win.sh index 51e8d1a..47d0850 100644 --- a/scripts/presetup-win.sh +++ b/scripts/presetup-win.sh @@ -1,7 +1,7 @@ #!/bin/bash -DOCKER_VERSION=1.10.3 -DOCKER_COMPOSE_VERSION=1.6.2 +DOCKER_VERSION=1.11.1 +DOCKER_COMPOSE_VERSION=1.7.1 WINPTY_VERSION=0.2.2 # Console colors From c5092577df76b70224c9fbc0ab381f0a5c0671b6 Mon Sep 17 00:00:00 2001 From: Vasyl Grygoryev Date: Mon, 23 May 2016 15:09:10 +0300 Subject: [PATCH 03/20] Start ssh-agent on boot --- scripts/presetup-ubuntu.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/presetup-ubuntu.sh b/scripts/presetup-ubuntu.sh index 437680d..3c677bd 100644 --- a/scripts/presetup-ubuntu.sh +++ b/scripts/presetup-ubuntu.sh @@ -68,6 +68,12 @@ sudo docker run -d --name vhost-proxy -p 192.168.10.10:80:80 -p 192.168.10.10:44 -v /var/run/docker.sock:/tmp/docker.sock blinkreaction/nginx-proxy:stable if_failed "DockerBox HTTP/HTTPS reverse proxy setup failed." +echo-green "Creating Drude SSH-agent service..." +sudo docker rm -f ssh-agent || true +sudo docker run -d --name ssh-agent --restart=always \ +-v /var/run/docker.sock:/var/run/docker.sock blinkreaction/docker-ssh-agent:latest +if_failed "Drude SSH-agent service setup failed." + echo-green "Creating DockerBox DNS service..." sudo docker rm -f dns || true sudo docker run -d --name dns -p 192.168.10.10:53:53/udp --cap-add=NET_ADMIN --dns 8.8.8.8 --restart=always \ From ec94fc15a893872b7c6f507611dc40749662f084 Mon Sep 17 00:00:00 2001 From: Vasyl Grygoryev Date: Mon, 23 May 2016 15:30:26 +0300 Subject: [PATCH 04/20] Start ssh-agent on boot --- Vagrantfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 69903c7..33004f2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -317,6 +317,19 @@ Vagrant.configure("2") do |config| s.args = "#{box_ip}" end + # System-wide ssh-agent service. + # Image: blinkreaction/dns-discovery v1.0.0 + config.vm.provision "shell", run: "always", privileged: false do |s| + s.inline = <<-SCRIPT + echo "Creating Drude SSH-agent service..." + docker rm -f ssh-agent > /dev/null 2>&1 || true + docker run -d --name ssh-agent --label "group=system" \ + -v /var/run/docker.sock:/var/run/docker.sock \ + blinkreaction/docker-ssh-agent@sha256:57939f8cbd08bf9fb0451fb7444bc6837f4ef4ce6b5a82e530b20407b10ce29f > /dev/null 2>&1 + SCRIPT + s.args = "#{box_ip}" + end + # System-wide vhost-proxy service. # Containers must define a "VIRTUAL_HOST" environment variable to be recognized and routed by the vhost-proxy. # Image: blinkreaction/nginx-proxy v1.1.0 From e662e083688ed4138e9e1a14b8d408b284b1e849 Mon Sep 17 00:00:00 2001 From: Vasyl Grygoryev Date: Tue, 24 May 2016 16:12:41 +0300 Subject: [PATCH 05/20] Use image without sha256 --- Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 33004f2..4fd1262 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -318,14 +318,14 @@ Vagrant.configure("2") do |config| end # System-wide ssh-agent service. - # Image: blinkreaction/dns-discovery v1.0.0 + # Image: blinkreaction/docker-ssh-agent v1.0.0 config.vm.provision "shell", run: "always", privileged: false do |s| s.inline = <<-SCRIPT echo "Creating Drude SSH-agent service..." docker rm -f ssh-agent > /dev/null 2>&1 || true docker run -d --name ssh-agent --label "group=system" \ -v /var/run/docker.sock:/var/run/docker.sock \ - blinkreaction/docker-ssh-agent@sha256:57939f8cbd08bf9fb0451fb7444bc6837f4ef4ce6b5a82e530b20407b10ce29f > /dev/null 2>&1 + blinkreaction/docker-ssh-agent > /dev/null 2>&1 SCRIPT s.args = "#{box_ip}" end From 059cea73290ebf85d1958a7dae93b0c4894dd035 Mon Sep 17 00:00:00 2001 From: Vasyl Grygoryev Date: Wed, 25 May 2016 08:51:02 +0300 Subject: [PATCH 06/20] Use blinkreaction/ssh-agent:stable image --- Vagrantfile | 4 ++-- scripts/presetup-ubuntu.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 4fd1262..57e9b17 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -318,14 +318,14 @@ Vagrant.configure("2") do |config| end # System-wide ssh-agent service. - # Image: blinkreaction/docker-ssh-agent v1.0.0 + # Image: blinkreaction/ssh-agent v1.0.0 config.vm.provision "shell", run: "always", privileged: false do |s| s.inline = <<-SCRIPT echo "Creating Drude SSH-agent service..." docker rm -f ssh-agent > /dev/null 2>&1 || true docker run -d --name ssh-agent --label "group=system" \ -v /var/run/docker.sock:/var/run/docker.sock \ - blinkreaction/docker-ssh-agent > /dev/null 2>&1 + blinkreaction/ssh-agent > /dev/null 2>&1 SCRIPT s.args = "#{box_ip}" end diff --git a/scripts/presetup-ubuntu.sh b/scripts/presetup-ubuntu.sh index 3c677bd..f93e3f8 100644 --- a/scripts/presetup-ubuntu.sh +++ b/scripts/presetup-ubuntu.sh @@ -71,7 +71,7 @@ if_failed "DockerBox HTTP/HTTPS reverse proxy setup failed." echo-green "Creating Drude SSH-agent service..." sudo docker rm -f ssh-agent || true sudo docker run -d --name ssh-agent --restart=always \ --v /var/run/docker.sock:/var/run/docker.sock blinkreaction/docker-ssh-agent:latest +-v /var/run/docker.sock:/var/run/docker.sock blinkreaction/ssh-agent:stable if_failed "Drude SSH-agent service setup failed." echo-green "Creating DockerBox DNS service..." From 78f2fccebbe3444121352b6560b98aec99eceb4d Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 25 May 2016 17:59:55 -0400 Subject: [PATCH 07/20] User the "stable" release tag for dns, vhost-proxy and ssh-agent --- Vagrantfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 57e9b17..381d39a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -304,7 +304,6 @@ Vagrant.configure("2") do |config| end # System-wide dnsmasq service for DNS discovery and name resolution - # Image: blinkreaction/dns-discovery v1.0.0 config.vm.provision "shell", run: "always", privileged: false do |s| s.inline = <<-SCRIPT echo "Starting system-wide DNS service... " @@ -312,27 +311,25 @@ Vagrant.configure("2") do |config| docker run -d --name dns --label "group=system" \ -p $1:53:53/udp -p 172.17.42.1:53:53/udp --cap-add=NET_ADMIN --dns 10.0.2.3 \ -v /var/run/docker.sock:/var/run/docker.sock \ - blinkreaction/dns-discovery@sha256:f1322ab6d5496c8587e59e47b0a8b1479a444098b40ddd598e85e9ab4ce146d8 > /dev/null 2>&1 + blinkreaction/dns-discovery:stable > /dev/null 2>&1 SCRIPT s.args = "#{box_ip}" end # System-wide ssh-agent service. - # Image: blinkreaction/ssh-agent v1.0.0 config.vm.provision "shell", run: "always", privileged: false do |s| s.inline = <<-SCRIPT - echo "Creating Drude SSH-agent service..." + echo "Creating Drude ssh-agent service..." docker rm -f ssh-agent > /dev/null 2>&1 || true docker run -d --name ssh-agent --label "group=system" \ -v /var/run/docker.sock:/var/run/docker.sock \ - blinkreaction/ssh-agent > /dev/null 2>&1 + blinkreaction/ssh-agent:stable > /dev/null 2>&1 SCRIPT s.args = "#{box_ip}" end # System-wide vhost-proxy service. # Containers must define a "VIRTUAL_HOST" environment variable to be recognized and routed by the vhost-proxy. - # Image: blinkreaction/nginx-proxy v1.1.0 if $vconfig['vhost_proxy'] config.vm.provision "shell", run: "always", privileged: false do |s| s.inline = <<-SCRIPT @@ -340,7 +337,7 @@ Vagrant.configure("2") do |config| docker rm -f vhost-proxy > /dev/null 2>&1 || true docker run -d --name vhost-proxy --label "group=system" -p $1:80:80 -p $1:443:443 \ -v /var/run/docker.sock:/tmp/docker.sock \ - blinkreaction/nginx-proxy@sha256:1707c0fd2fa4f0e98a656f748a4edb8a04578e9dc63115acc23a05225f151e04 > /dev/null 2>&1 + blinkreaction/nginx-proxy:stable > /dev/null 2>&1 SCRIPT s.args = "#{box_ip}" end From a742cb565a0192a83eec606ccdce303b4969c5ea Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Wed, 25 May 2016 18:01:33 -0400 Subject: [PATCH 08/20] Ubuntu pre-setup: added label "group=system" to service containers. --- scripts/presetup-ubuntu.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/scripts/presetup-ubuntu.sh b/scripts/presetup-ubuntu.sh index f93e3f8..3dca5c6 100644 --- a/scripts/presetup-ubuntu.sh +++ b/scripts/presetup-ubuntu.sh @@ -63,21 +63,26 @@ EOF fi echo-green "Creating DockerBox HTTP/HTTPS reverse proxy..." -sudo docker rm -f vhost-proxy || true -sudo docker run -d --name vhost-proxy -p 192.168.10.10:80:80 -p 192.168.10.10:443:443 --restart=always \ --v /var/run/docker.sock:/tmp/docker.sock blinkreaction/nginx-proxy:stable +sudo docker rm -vf vhost-proxy || true +sudo docker run -d --name vhost-proxy --label "group=system" --restart=always \ + -p 192.168.10.10:80:80 -p 192.168.10.10:443:443 \ + -v /var/run/docker.sock:/tmp/docker.sock \ + blinkreaction/nginx-proxy:stable if_failed "DockerBox HTTP/HTTPS reverse proxy setup failed." -echo-green "Creating Drude SSH-agent service..." +echo-green "Creating Drude ssh-agent service..." sudo docker rm -f ssh-agent || true -sudo docker run -d --name ssh-agent --restart=always \ --v /var/run/docker.sock:/var/run/docker.sock blinkreaction/ssh-agent:stable -if_failed "Drude SSH-agent service setup failed." +sudo docker run -vd --name ssh-agent --label "group=system" --restart=always \ + -v /var/run/docker.sock:/var/run/docker.sock \ + blinkreaction/ssh-agent:stable +if_failed "Drude ssh-agent service setup failed." echo-green "Creating DockerBox DNS service..." -sudo docker rm -f dns || true -sudo docker run -d --name dns -p 192.168.10.10:53:53/udp --cap-add=NET_ADMIN --dns 8.8.8.8 --restart=always \ --v /var/run/docker.sock:/var/run/docker.sock blinkreaction/dns-discovery:stable +sudo docker rm -vf dns || true +sudo docker run -d --name dns --label "group=system" --restart=always \ + -p 192.168.10.10:53:53/udp --cap-add=NET_ADMIN --dns 8.8.8.8 \ + -v /var/run/docker.sock:/var/run/docker.sock \ + blinkreaction/dns-discovery:stable if [[ $? == 0 ]]; then echo-green "Configuring host DNS resolver for .drude domain..." echo -e "\n# .drude domain resolution\nnameserver 192.168.10.10" | sudo tee -a /etc/resolvconf/resolv.conf.d/head From ad0f5ffae8db2f2256f9dd26dd86523e7bb62bd1 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Thu, 26 May 2016 11:05:13 -0400 Subject: [PATCH 09/20] Minor text change --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 381d39a..e5e8897 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -319,7 +319,7 @@ Vagrant.configure("2") do |config| # System-wide ssh-agent service. config.vm.provision "shell", run: "always", privileged: false do |s| s.inline = <<-SCRIPT - echo "Creating Drude ssh-agent service..." + echo "Creating system-wide ssh-agent service..." docker rm -f ssh-agent > /dev/null 2>&1 || true docker run -d --name ssh-agent --label "group=system" \ -v /var/run/docker.sock:/var/run/docker.sock \ From 4906599a85b21c8c23f6d75750e47a8ffc0503d3 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Thu, 26 May 2016 13:22:53 -0400 Subject: [PATCH 10/20] Bind system-wide services to 0.0.0.0 Soon going to retire multi-IP support and IP-based port mapping. vhost-proxy should be used instead. --- Vagrantfile | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index e5e8897..bafe4de 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -304,42 +304,37 @@ Vagrant.configure("2") do |config| end # System-wide dnsmasq service for DNS discovery and name resolution - config.vm.provision "shell", run: "always", privileged: false do |s| + config.vm.provision "shell", privileged: false do |s| s.inline = <<-SCRIPT - echo "Starting system-wide DNS service... " - docker rm -f dns > /dev/null 2>&1 || true - docker run -d --name dns --label "group=system" \ - -p $1:53:53/udp -p 172.17.42.1:53:53/udp --cap-add=NET_ADMIN --dns 10.0.2.3 \ + echo "Setting up system-wide DNS service... " + docker run -d --name dns --label "group=system" --restart=always \ + -p 53:53/udp --cap-add=NET_ADMIN --dns 10.0.2.3 \ -v /var/run/docker.sock:/var/run/docker.sock \ blinkreaction/dns-discovery:stable > /dev/null 2>&1 SCRIPT - s.args = "#{box_ip}" end # System-wide ssh-agent service. - config.vm.provision "shell", run: "always", privileged: false do |s| + config.vm.provision "shell", privileged: false do |s| s.inline = <<-SCRIPT - echo "Creating system-wide ssh-agent service..." - docker rm -f ssh-agent > /dev/null 2>&1 || true - docker run -d --name ssh-agent --label "group=system" \ + echo "Setting up system-wide ssh-agent service..." + docker run -d --name ssh-agent --label "group=system" --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ blinkreaction/ssh-agent:stable > /dev/null 2>&1 SCRIPT - s.args = "#{box_ip}" end # System-wide vhost-proxy service. # Containers must define a "VIRTUAL_HOST" environment variable to be recognized and routed by the vhost-proxy. if $vconfig['vhost_proxy'] - config.vm.provision "shell", run: "always", privileged: false do |s| + config.vm.provision "shell", privileged: false do |s| s.inline = <<-SCRIPT - echo "Starting system-wide HTTP/HTTPS reverse proxy on $1... " - docker rm -f vhost-proxy > /dev/null 2>&1 || true - docker run -d --name vhost-proxy --label "group=system" -p $1:80:80 -p $1:443:443 \ + echo "Setting up system-wide HTTP/HTTPS reverse proxy... " + docker run -d --name vhost-proxy --label "group=system" --restart=always \ + -p 80:80 -p 443:443 \ -v /var/run/docker.sock:/tmp/docker.sock \ blinkreaction/nginx-proxy:stable > /dev/null 2>&1 SCRIPT - s.args = "#{box_ip}" end end From 014c0fbfa99baaf4bba695f2db2dedcb04f02d9c Mon Sep 17 00:00:00 2001 From: Alexei Chekulaev Date: Thu, 26 May 2016 22:29:02 -0400 Subject: [PATCH 11/20] Improve presetup-mac.sh --- scripts/presetup-mac.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/presetup-mac.sh b/scripts/presetup-mac.sh index f23dcef..60e088c 100755 --- a/scripts/presetup-mac.sh +++ b/scripts/presetup-mac.sh @@ -15,6 +15,7 @@ echo-yellow () { echo -e "${yellow}$1${NC}"; } # Homebrew installation echo-green "Installing Homebrew..." +sudo chown -R $USER /usr/local/ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Update brew formulae @@ -34,10 +35,12 @@ brew cask install vagrant # Install docker echo-green "Installing docker cli v${DOCKER_VERSION}..." +[ -f "/usr/local/bin/docker" ] && sudo rm /usr/local/bin/docker sudo curl -sSL "https://get.docker.com/builds/$(uname -s)/$(uname -m)/docker-$DOCKER_VERSION" -o /usr/local/bin/docker sudo chmod +x /usr/local/bin/docker # Install docker-compose echo-green "Installing docker-compose v${DOCKER_COMPOSE_VERSION}..." +[ -f "/usr/local/bin/docker-compose" ] && sudo rm /usr/local/bin/docker-compose sudo curl -sSL "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose From 8463dc70b14d91c78b6c618c76f66114d2b844b2 Mon Sep 17 00:00:00 2001 From: Alexei Chekulaev Date: Fri, 27 May 2016 16:25:13 -0400 Subject: [PATCH 12/20] Remove sudo chown --- scripts/presetup-mac.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/presetup-mac.sh b/scripts/presetup-mac.sh index 60e088c..b69ac40 100755 --- a/scripts/presetup-mac.sh +++ b/scripts/presetup-mac.sh @@ -15,7 +15,6 @@ echo-yellow () { echo -e "${yellow}$1${NC}"; } # Homebrew installation echo-green "Installing Homebrew..." -sudo chown -R $USER /usr/local/ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" # Update brew formulae From 40dca9b53f40412910f55a4b09884266fffee962 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Thu, 2 Jun 2016 15:01:33 -0400 Subject: [PATCH 13/20] Fix for proper v1.5.1 update Remove old copies of docker and docker-compose: - /usr/local/bin/docker - /usr/local/bin/docker-compose --- scripts/presetup-win.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/presetup-win.sh b/scripts/presetup-win.sh index 47d0850..72e21ae 100644 --- a/scripts/presetup-win.sh +++ b/scripts/presetup-win.sh @@ -28,11 +28,15 @@ curl -sSL https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/${ echo-yellow "Setup needs administrator privileges to contiue..." cscript $WINDIR/Temp/presetup-win.vbs +# Remove old docker version (prior to boot2docker-vagrant v1.5.1) +rm -f /usr/local/bin/docker # Install Docker echo-green "Installing docker cli v${DOCKER_VERSION}..." curl -sSL https://get.docker.com/builds/Windows/i386/docker-$DOCKER_VERSION.exe -o /usr/local/bin/docker.exe chmod +x /usr/local/bin/docker.exe +# Remove old docker-compose version (prior to boot2docker-vagrant v1.5.1) +rm -f /usr/local/bin/docker-compose # Install Docker Compose echo-green "Installing docker-compose v${DOCKER_COMPOSE_VERSION}..." curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-Windows-x86_64.exe -o /usr/local/bin/docker-compose.exe From 88bac9f4a33d0a3eefe166051975a020ff74faca Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 3 Jun 2016 11:15:52 -0400 Subject: [PATCH 14/20] Silent rm Make sure rm does not throw errors --- scripts/presetup-win.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/presetup-win.sh b/scripts/presetup-win.sh index 72e21ae..6c804c0 100644 --- a/scripts/presetup-win.sh +++ b/scripts/presetup-win.sh @@ -29,14 +29,14 @@ echo-yellow "Setup needs administrator privileges to contiue..." cscript $WINDIR/Temp/presetup-win.vbs # Remove old docker version (prior to boot2docker-vagrant v1.5.1) -rm -f /usr/local/bin/docker +rm -f /usr/local/bin/docker >/dev/null 2>&1 || true # Install Docker echo-green "Installing docker cli v${DOCKER_VERSION}..." curl -sSL https://get.docker.com/builds/Windows/i386/docker-$DOCKER_VERSION.exe -o /usr/local/bin/docker.exe chmod +x /usr/local/bin/docker.exe # Remove old docker-compose version (prior to boot2docker-vagrant v1.5.1) -rm -f /usr/local/bin/docker-compose +rm -f /usr/local/bin/docker-compose >/dev/null 2>&1 || true # Install Docker Compose echo-green "Installing docker-compose v${DOCKER_COMPOSE_VERSION}..." curl -sSL https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-Windows-x86_64.exe -o /usr/local/bin/docker-compose.exe From b09d9e46af6e0e24f540de7e5fd9bc9fb02602fc Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 3 Jun 2016 11:36:45 -0400 Subject: [PATCH 15/20] Switch to base box version 1.11.2 --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index bafe4de..1ab1a8c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -99,7 +99,7 @@ Vagrant.configure("2") do |config| config.vm.define "boot2docker" config.vm.box = "blinkreaction/boot2docker" - config.vm.box_version = "1.10.3" + config.vm.box_version = "1.11.2" config.vm.box_check_update = true ## Network ## From e7f44c067d2b5206d4d2dc6fa8e02e8c8e6cb8e0 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 3 Jun 2016 11:37:29 -0400 Subject: [PATCH 16/20] Update dependency version: docker v1.11.2 winpty v0.3.1 --- scripts/presetup-mac.sh | 2 +- scripts/presetup-ubuntu.sh | 2 +- scripts/presetup-win.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/presetup-mac.sh b/scripts/presetup-mac.sh index b69ac40..23b949e 100755 --- a/scripts/presetup-mac.sh +++ b/scripts/presetup-mac.sh @@ -1,6 +1,6 @@ #!/bin/bash -DOCKER_VERSION=1.11.1 +DOCKER_VERSION=1.11.2 DOCKER_COMPOSE_VERSION=1.7.1 # Console colors diff --git a/scripts/presetup-ubuntu.sh b/scripts/presetup-ubuntu.sh index 3dca5c6..9b5fb43 100644 --- a/scripts/presetup-ubuntu.sh +++ b/scripts/presetup-ubuntu.sh @@ -1,6 +1,6 @@ #!/bin/bash -DOCKER_VERSION=1.11.1 +DOCKER_VERSION=1.11.2 DOCKER_COMPOSE_VERSION=1.7.1 #-------------------------- Helper functions -------------------------------- diff --git a/scripts/presetup-win.sh b/scripts/presetup-win.sh index 6c804c0..24aa79e 100644 --- a/scripts/presetup-win.sh +++ b/scripts/presetup-win.sh @@ -1,8 +1,8 @@ #!/bin/bash -DOCKER_VERSION=1.11.1 +DOCKER_VERSION=1.11.2 DOCKER_COMPOSE_VERSION=1.7.1 -WINPTY_VERSION=0.2.2 +WINPTY_VERSION=0.3.1 # Console colors red='\033[0;31m' From 8e260e5c3f3c88ae7fc6e3173a13577d9e1a85a5 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 3 Jun 2016 11:38:32 -0400 Subject: [PATCH 17/20] Run system services with --privileged --userns=host --- Vagrantfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 1ab1a8c..e7ba124 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -307,7 +307,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", privileged: false do |s| s.inline = <<-SCRIPT echo "Setting up system-wide DNS service... " - docker run -d --name dns --label "group=system" --restart=always \ + docker run -d --name dns --label "group=system" --restart=always --privileged --userns=host \ -p 53:53/udp --cap-add=NET_ADMIN --dns 10.0.2.3 \ -v /var/run/docker.sock:/var/run/docker.sock \ blinkreaction/dns-discovery:stable > /dev/null 2>&1 @@ -318,7 +318,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", privileged: false do |s| s.inline = <<-SCRIPT echo "Setting up system-wide ssh-agent service..." - docker run -d --name ssh-agent --label "group=system" --restart=always \ + docker run -d --name ssh-agent --label "group=system" --restart=always --privileged --userns=host \ -v /var/run/docker.sock:/var/run/docker.sock \ blinkreaction/ssh-agent:stable > /dev/null 2>&1 SCRIPT @@ -330,7 +330,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", privileged: false do |s| s.inline = <<-SCRIPT echo "Setting up system-wide HTTP/HTTPS reverse proxy... " - docker run -d --name vhost-proxy --label "group=system" --restart=always \ + docker run -d --name vhost-proxy --label "group=system" --restart=always --privileged --userns=host \ -p 80:80 -p 443:443 \ -v /var/run/docker.sock:/tmp/docker.sock \ blinkreaction/nginx-proxy:stable > /dev/null 2>&1 From 74a684f3e7437eaa3b6bcac95215fd20fcea07bf Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 3 Jun 2016 13:16:02 -0400 Subject: [PATCH 18/20] Remove scripts/presetup-ubuntu.sh --- scripts/presetup-ubuntu.sh | 94 -------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 scripts/presetup-ubuntu.sh diff --git a/scripts/presetup-ubuntu.sh b/scripts/presetup-ubuntu.sh deleted file mode 100644 index 9b5fb43..0000000 --- a/scripts/presetup-ubuntu.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -DOCKER_VERSION=1.11.2 -DOCKER_COMPOSE_VERSION=1.7.1 - -#-------------------------- Helper functions -------------------------------- - -# Console colors -red='\033[0;31m' -green='\033[0;32m' -yellow='\033[1;33m' -NC='\033[0m' - -echo-red () { echo -e "${red}$1${NC}"; } -echo-green () { echo -e "${green}$1${NC}"; } -echo-yellow () { echo -e "${yellow}$1${NC}"; } - -if_failed () -{ - if [ ! $? -eq 0 ]; then - if [[ "$1" == "" ]]; then msg="dsh: error"; else msg="$1"; fi - echo-red "dsh: $msg" - exit 1 - fi -} - -#-------------------------- Installation -------------------------------- - -if [ -r /etc/lsb-release ]; then - lsb_dist="$(. /etc/lsb-release && echo "$DISTRIB_ID")" - lsb_release="$(. /etc/lsb-release && echo "$DISTRIB_RELEASE")" -fi - -if [[ $lsb_dist != 'Ubuntu' || $lsb_release < '14.04' ]]; then - echo-red "Sorry, this script only supports Ubuntu 14.04+" - exit 1 -fi - -echo-green "Installing Docker v${DOCKER_VERSION}..." -curl -sSL https://get.docker.com/ | sh && \ -sudo usermod -aG docker $(whoami) && \ -sudo docker version -if_failed "Docker installation/upgrade failed." - -echo-green "Installing Docker Compose v{DOCKER_COMPOSE_VERSION}..." -sudo curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \ -sudo chmod +x /usr/local/bin/docker-compose && \ -docker-compose --version -if_failed "Docker Compose installation/upgrade failed." - -echo-green "Adding a subnet for DockerBox..." -ip_mask="192.168.10.1/24" -# Make sure we don't do this twice -if ! grep -q $ip_mask /etc/network/interfaces; then - cat > /tmp/dockerbox.ip.addr < Date: Fri, 3 Jun 2016 13:22:46 -0400 Subject: [PATCH 19/20] Remove old docker/docker-compose version on Mac and Win --- scripts/presetup-mac.sh | 6 ++++-- scripts/presetup-win.sh | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/presetup-mac.sh b/scripts/presetup-mac.sh index 23b949e..fbecd8d 100755 --- a/scripts/presetup-mac.sh +++ b/scripts/presetup-mac.sh @@ -32,14 +32,16 @@ VBoxManage hostonlyif remove vboxnet0 > /dev/null 2>&1 echo-green "Installing vagrant..." brew cask install vagrant +# Remove old docker version +sudo rm -f /usr/local/bin/docker >/dev/null 2>&1 || true # Install docker echo-green "Installing docker cli v${DOCKER_VERSION}..." -[ -f "/usr/local/bin/docker" ] && sudo rm /usr/local/bin/docker sudo curl -sSL "https://get.docker.com/builds/$(uname -s)/$(uname -m)/docker-$DOCKER_VERSION" -o /usr/local/bin/docker sudo chmod +x /usr/local/bin/docker +# Remove old docker-compose version +sudo rm -f /usr/local/bin/docker-compose >/dev/null 2>&1 || true # Install docker-compose echo-green "Installing docker-compose v${DOCKER_COMPOSE_VERSION}..." -[ -f "/usr/local/bin/docker-compose" ] && sudo rm /usr/local/bin/docker-compose sudo curl -sSL "https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose diff --git a/scripts/presetup-win.sh b/scripts/presetup-win.sh index 24aa79e..de4c372 100644 --- a/scripts/presetup-win.sh +++ b/scripts/presetup-win.sh @@ -28,14 +28,14 @@ curl -sSL https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/${ echo-yellow "Setup needs administrator privileges to contiue..." cscript $WINDIR/Temp/presetup-win.vbs -# Remove old docker version (prior to boot2docker-vagrant v1.5.1) +# Remove old docker version rm -f /usr/local/bin/docker >/dev/null 2>&1 || true # Install Docker echo-green "Installing docker cli v${DOCKER_VERSION}..." curl -sSL https://get.docker.com/builds/Windows/i386/docker-$DOCKER_VERSION.exe -o /usr/local/bin/docker.exe chmod +x /usr/local/bin/docker.exe -# Remove old docker-compose version (prior to boot2docker-vagrant v1.5.1) +# Remove old docker-compose version rm -f /usr/local/bin/docker-compose >/dev/null 2>&1 || true # Install Docker Compose echo-green "Installing docker-compose v${DOCKER_COMPOSE_VERSION}..." From d9d28ef509065f106b4f81d55544bd6ceb1b3595 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 3 Jun 2016 13:35:37 -0400 Subject: [PATCH 20/20] Version bump, changelog update --- CHANGELOG.md | 13 +++++++++++++ VERSION | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36c8187..ab1ee2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.6.0 (2016-06-03) + +- Switched to blinkreaction/boot2docker base box [v1.11.2](https://atlas.hashicorp.com/blinkreaction/boxes/boot2docker/versions/1.11.2) + - boot2docker/docker 1.11.2, docker-compose 1.7.1 +- Set `v.memory: 1024` by default +- System services + - New ssh-agent service + - Use the `stable` tag for vhost-proxy, dns, ssh-agent + - Bind all system services to `0.0.0.0` + - Run services with `--privileged --userns=host` (to give propper access to `docker.sock`) +- Remove `scripts/presetup-ubuntu.sh` +- Misc. imporvements in `presetup-mac.sh` and `presetup-win.sh` + ## 1.5.1 (2016-04-18) diff --git a/VERSION b/VERSION index 8e03717..ce6a70b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.1 \ No newline at end of file +1.6.0 \ No newline at end of file