Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Commit

Permalink
Merge pull request #80 from blinkreaction/develop
Browse files Browse the repository at this point in the history
Release v1.6.1
  • Loading branch information
lmakarov committed Jun 3, 2016
2 parents 193a7fc + eeade7b commit 49b2248
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 70 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.6.1 (2016-06-03)

- Hotfix for downloading new docker binary versions
- Added B2D_INSTALL_MODE switch
- Updated docs


## 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)
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ For best result and a clean setup it is recommended to remove any previous versi
Automatic **installation** and **updates** of prerequisites is available via the one-liners below.
**Make sure to stop all VirtualBox VMs prior to performing updates.**

Note: If you already have brew/cask and necessary versions of VirtualBox and Vagrant installed,
prefer to install them manually or would like to not update these components automatically,
prefix the command with `B2D_INSTALL_MODE=docker `.

**Mac**

Prerequisites are installed using **brew/cask** (brew and cask will be installed if missing).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.6.1
75 changes: 43 additions & 32 deletions scripts/presetup-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,46 @@ echo-red () { echo -e "${red}$1${NC}"; }
echo-green () { echo -e "${green}$1${NC}"; }
echo-yellow () { echo -e "${yellow}$1${NC}"; }

# Homebrew installation
echo-green "Installing Homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Update brew formulae
echo-green "Updating brew formulae..."
brew update

# VirtualBox installation
echo-green "Installing virtualbox..."
brew cask install virtualbox
# Kill the default adapter and DHCP server to avoid network issues down the road
VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0 > /dev/null 2>&1
VBoxManage hostonlyif remove vboxnet0 > /dev/null 2>&1

# Vagrant installation
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}..."
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}..."
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
B2D_BRANCH="${B2D_BRANCH:-master}"
B2D_INSTALL_MODE="${B2D_INSTALL_MODE:-full}"

# VirtualBox and Vagrant dependencies
if [[ "$B2D_INSTALL_MODE" == "full" ]] || [[ "$B2D_INSTALL_MODE" == "vm" ]] ; then
# Homebrew installation
echo-green "Installing Homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Update brew formulae
echo-green "Updating brew formulae..."
brew update

# VirtualBox installation
echo-green "Installing virtualbox..."
brew cask install virtualbox
# Kill the default adapter and DHCP server to avoid network issues down the road
VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0 > /dev/null 2>&1
VBoxManage hostonlyif remove vboxnet0 > /dev/null 2>&1

# Vagrant installation
echo-green "Installing vagrant..."
brew cask install vagrant
fi

# Docker and other dependencies
if [[ "$B2D_INSTALL_MODE" == "full" ]] || [[ "$B2D_INSTALL_MODE" == "docker" ]] ; then
# 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}..."
curl -sSL -O "https://get.docker.com/builds/$(uname -s)/$(uname -m)/docker-$DOCKER_VERSION.tgz"
tar zxf docker-$DOCKER_VERSION.tgz
sudo mv docker/* /usr/local/bin
rm -rf docker-$DOCKER_VERSION*

# 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}..."
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
fi
78 changes: 41 additions & 37 deletions scripts/presetup-win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,46 @@ echo-red () { echo -e "${red}$1${NC}"; }
echo-green () { echo -e "${green}$1${NC}"; }
echo-yellow () { echo -e "${yellow}$1${NC}"; }

# For testing
if [ ! $B2D_BRANCH == "" ]; then
echo-red "[b2d-setup] testing mode: environment = ${B2D_BRANCH}"
else
B2D_BRANCH='master'
B2D_BRANCH="${B2D_BRANCH:-master}"
B2D_INSTALL_MODE="${B2D_INSTALL_MODE:-full}"

# VirtualBox and Vagrant dependencies
if [[ "$B2D_INSTALL_MODE" == "full" ]] || [[ "$B2D_INSTALL_MODE" == "vm" ]] ; then
# Install prerequisites via choco (virtualbox and vagrant)
echo-green "Installing virtualbox and vagrant via choco..."
curl -sSL https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/${B2D_BRANCH}/scripts/presetup-win.cmd -o $WINDIR/Temp/presetup-win.cmd
curl -sSL https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/${B2D_BRANCH}/scripts/presetup-win.vbs -o $WINDIR/Temp/presetup-win.vbs
echo-yellow "Setup needs administrator privileges to contiue..."
cscript $WINDIR/Temp/presetup-win.vbs
fi

# Install prerequisites via choco (virtualbox and vagrant)
echo-green "Installing virtualbox and vagrant via choco..."
curl -sSL https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/${B2D_BRANCH}/scripts/presetup-win.cmd -o $WINDIR/Temp/presetup-win.cmd
curl -sSL https://raw.githubusercontent.com/blinkreaction/boot2docker-vagrant/${B2D_BRANCH}/scripts/presetup-win.vbs -o $WINDIR/Temp/presetup-win.vbs
echo-yellow "Setup needs administrator privileges to contiue..."
cscript $WINDIR/Temp/presetup-win.vbs

# 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
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
chmod +x /usr/local/bin/docker-compose.exe

# Install winpty
echo-green "Installing winpty (console) v$WINPTY_VERSION..."
curl -sSL -O https://github.com/rprichard/winpty/releases/download/$WINPTY_VERSION/winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32.tar.gz
tar -xf winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32.tar.gz
mv winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32/bin/* /usr/local/bin
rm -rf winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32*

# Git settings
echo-green "Adjusting git defaults..."
git config --global core.autocrlf input
git config --system core.longpaths true
# Docker and other dependencies
if [[ "$B2D_INSTALL_MODE" == "full" ]] || [[ "$B2D_INSTALL_MODE" == "docker" ]] ; then
# 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 -O https://get.docker.com/builds/Windows/i386/docker-$DOCKER_VERSION.zip
unzip docker-$DOCKER_VERSION.zip
mv docker/* /usr/local/bin
rm -rf docker-$DOCKER_VERSION*

# 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}..."
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
chmod +x /usr/local/bin/docker-compose.exe

# Install winpty
echo-green "Installing winpty (console) v$WINPTY_VERSION..."
curl -sSL -O https://github.com/rprichard/winpty/releases/download/$WINPTY_VERSION/winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32.tar.gz
tar -xf winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32.tar.gz
mv winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32/bin/* /usr/local/bin
rm -rf winpty-$WINPTY_VERSION-cygwin-2.4.1-ia32*

# Git settings
echo-green "Adjusting git defaults..."
git config --global core.autocrlf input
git config --system core.longpaths true
fi

0 comments on commit 49b2248

Please sign in to comment.