Merge pull request #652 from jb11211/Vagrant

Vagrant build rocket from downloaded git
This commit is contained in:
Brandon Philips
2015-03-22 21:38:53 -07:00
3 changed files with 7 additions and 21 deletions
Vendored
-2
View File
@@ -11,7 +11,5 @@ Vagrant.configure('2') do |config|
config.vm.provision :shell, :privileged => false, :path => "scripts/vagrant/install-go.sh"
# Install Rocket
# FIXME: changing the versions recorded in this file and re-run "vagrant provision" wont
# upgrade your VM instance. you need to destroy and start from scratch
config.vm.provision :shell, :privileged => false, :path => "scripts/vagrant/install-rocket.sh"
end
+1 -1
View File
@@ -17,7 +17,7 @@ if ! [ -e $prefix/go ]; then
fi
# setup user environment variables
echo "export GOROOT=$prefix/go" |sudo tee /etc/profile.d/go.sh
echo "export GOROOT=$prefix/go" |sudo tee /etc/profile.d/01go.sh
cat << 'EOF' |sudo tee -a /etc/profile.d/go.sh
export GOPATH=$HOME/.gopath
+6 -18
View File
@@ -3,7 +3,6 @@
set -xe
export DEBIAN_FRONTEND=noninteractive
ROCKET_VERSION=0.4.2
APP_SPEC_VERSION=0.4.1
if ! [ -d app-spec ]; then
@@ -17,21 +16,10 @@ if ! [ -d app-spec ]; then
popd
fi
if ! [ -d rocket ]; then
echo "Install rocket ${ROCKET_VERSION}"
mkdir rocket
# install deps
which unsquashfs || sudo apt-get install -y squashfs-tools
# grab rocket
wget -q -O rocket.tar.gz https://github.com/coreos/rocket/archive/v${ROCKET_VERSION}.tar.gz
tar xzvf rocket.tar.gz -C rocket --strip-components=1
# build/install rocket
pushd rocket
./build
sudo cp -v bin/* /usr/local/bin
popd
fi
pushd /vagrant
./build
cat << EOF | sudo tee /etc/profile.d/99rkt.sh
export PATH=$PWD/bin:\$PATH
export GOPATH=$PWD/gopath:\$GOPATH
EOF