1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 09:19:31 +00:00

Merge pull request #201 from ThomasWaldmann/vagrant

Vagrant updates
This commit is contained in:
TW 2015-09-13 23:56:44 +02:00
commit 4030b4d9ea

56
Vagrantfile vendored
View file

@ -15,6 +15,22 @@ def packages_prepare_precise
EOF EOF
end end
def packages_centos
return <<-EOF
yum install -y epel-release
yum update -y
yum install -y python34 python34-devel
ln -s /usr/bin/python3.4 /usr/bin/python3
yum install -y openssl-devel openssl
yum install -y libacl-devel libacl
yum install -y lz4-devel
yum install -y fuse-devel fuse pkgconfig
yum install -y fakeroot gcc git
yum install -y python-pip
pip install virtualenv
EOF
end
def packages_debianoid def packages_debianoid
return <<-EOF return <<-EOF
apt-get update apt-get update
@ -49,11 +65,26 @@ end
def packages_darwin def packages_darwin
return <<-EOF return <<-EOF
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update || brew update brew update
brew outdated openssl || brew upgrade openssl # this installs osxfuse 2.8.0 (which is based on libfuse 2.7.3).
brew outdated pyenv || brew upgrade pyenv # llfuse later complains about needing (libfuse) 2.8.0 at least.
#brew install caskroom/cask/brew-cask
#brew cask install osxfuse # needs cask install because of apple's unsigned kext ban
# get osxfuse 3.0.x pre-release code from github:
curl https://github.com/osxfuse/osxfuse/releases/download/osxfuse-3.0.5/osxfuse-3.0.5.dmg -L >osxfuse.dmg
MOUNTDIR=$(echo `hdiutil mount osxfuse.dmg | tail -1 | awk '{$1="" ; print $0}'` | xargs -0 echo) \
&& sudo installer -pkg "${MOUNTDIR}/Extras/FUSE for OS X 3.0.5.pkg" -target /
brew install openssl
brew install lz4 brew install lz4
brew install osxfuse # looks dirty, is there a better way without root?:
mkdir -p /usr/local/opt/lz4
ln -s /usr/local/Cellar/lz4/r*/include /usr/local/opt/lz4/
ln -s /usr/local/Cellar/lz4/r*/lib /usr/local/opt/lz4/
brew install fakeroot
brew install pyenv
if which pyenv > /dev/null; then
eval "$(pyenv init -)"
fi
pyenv install 3.4.3 pyenv install 3.4.3
pyenv global 3.4.3 pyenv global 3.4.3
pyenv rehash pyenv rehash
@ -66,8 +97,13 @@ def prepare_user(boxname)
echo export 'PATH=/usr/local/bin:$PATH' >> ~/.profile echo export 'PATH=/usr/local/bin:$PATH' >> ~/.profile
. ~/.profile . ~/.profile
# initialize python on darwin
if which pyenv > /dev/null; then
eval "$(pyenv init -)"
fi
cd /vagrant/borg cd /vagrant/borg
virtualenv --python=python3 borg-env python -m virtualenv --python=python3 borg-env
. borg-env/bin/activate . borg-env/bin/activate
cd borg cd borg
@ -99,10 +135,16 @@ Vagrant.configure(2) do |config|
config.vm.provision "fix perms", :type => :shell, :inline => fix_perms config.vm.provision "fix perms", :type => :shell, :inline => fix_perms
config.vm.provider :virtualbox do |v| config.vm.provider :virtualbox do |v|
v.gui = false #v.gui = true
v.cpus = 2 v.cpus = 2
end end
config.vm.define "centos7" do |b|
b.vm.box = "centos/7"
b.vm.provision "packages centos7 64", :type => :shell, :inline => packages_centos
b.vm.provision "prepare user", :type => :shell, :privileged => false, :inline => prepare_user("centos7_64")
end
config.vm.define "trusty64" do |b| config.vm.define "trusty64" do |b|
b.vm.box = "ubuntu/trusty64" b.vm.box = "ubuntu/trusty64"
b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid b.vm.provision "packages debianoid", :type => :shell, :inline => packages_debianoid
@ -136,7 +178,7 @@ Vagrant.configure(2) do |config|
b.vm.provision "prepare user", :type => :shell, :privileged => false, :inline => prepare_user("freebsd") b.vm.provision "prepare user", :type => :shell, :privileged => false, :inline => prepare_user("freebsd")
end end
# OS X - TODO: make rsync/ssh work # OS X
config.vm.define "darwin" do |b| config.vm.define "darwin" do |b|
b.vm.box = "jhcook/yosemite-clitools" b.vm.box = "jhcook/yosemite-clitools"
b.vm.provision "packages darwin", :type => :shell, :privileged => false, :inline => packages_darwin b.vm.provision "packages darwin", :type => :shell, :privileged => false, :inline => packages_darwin