mirror of
https://github.com/clearlinux/rkt.git
synced 2026-11-27 06:27:06 +00:00
Vagrant: Build checked out Rocket
Previously the vagrant configuration would grab the last release of Rocket to build. Now Rocket will be built on whatever is in the checked out git repository (/vagrant inside the VM) This will allow testing of changes to Rocket using the "vagrant provision" command. It will also automatically use the latest rocket version. Assumes ./build script handles cleanup. Go and APPC versions still manually configured in provisioning scripts
This commit is contained in:
Vendored
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user