FEATURE: Added new vagrant machines for ArchLinux, CentOS 7, FreeBSD 10. Author: Bernhard Gschaider. Merge: Dominik Christ.

This commit is contained in:
Dominik Christ 2015-04-27 10:27:38 +01:00
commit 6723ca471b
8 changed files with 120 additions and 14 deletions

View file

@ -21,12 +21,12 @@ setDestination()
fi
# remove installation to general binaries
find $pkg -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_LIBBIN/FOAM_${dst}_LIBBIN/g
find $pkg -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_APPBIN/FOAM_${dst}_APPBIN/g
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_LIBBIN/FOAM_${dst}_LIBBIN/g
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_APPBIN/FOAM_${dst}_APPBIN/g
# revert installation to the "other" destination
find $pkg -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_${wrong}_LIBBIN/FOAM_${dst}_LIBBIN/g
find $pkg -type f | grep "Make/files" | xargs sed -i "" -e s/FOAM_${wrong}_APPBIN/FOAM_${dst}_APPBIN/g
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_${wrong}_LIBBIN/FOAM_${dst}_LIBBIN/g
find $pkg -type f | grep "Make/files" | grep -v bak | xargs sed -i.bak -e s/FOAM_${wrong}_APPBIN/FOAM_${dst}_APPBIN/g
}

View file

@ -60,16 +60,24 @@
- freebsd92 :: FreeBSD 9.2 64-bit machine. Currently this machine
does not provision automatically. After the first
failure log in and do
- centos70 :: A CentOS 7.0 machine with preinstalled development
tools
: sudo pkg_add -r rsync
: sudo pkg_add -r bash
then halt the machine and bring it up again (with the
=--provision=-option)
- freebsd10 :: FreeBSD 10.0 32-big machine. Tries to set up shared
folders via NFS. Currently not working
folders via NFS. Needs user interaction during
creation (password to get root privileges to
manipulate the =/etc/exports=-file to allow the
NFS-sharing)
- opensuse12 :: OpenSUSE 12.3 machine. Currently not completely
compiling Foam
- opensuse13 :: OpenSUSE 13.1 machine. The current LTS-version of
OpenSUSE
- archlinux :: An ArchLinux-machine. Might take a long time during
provisioning as the script updated the full
OS.
Some machines (read: the BSD-boxes) need the =VirtualBox Extension
Pack= installed (because they have USB 2.0)
* Scripts in the machine

View file

@ -27,6 +27,7 @@ Vagrant.configure("2") do |config|
vb.cpus=nrCPU
# make sure each CPU has enough memory (at least .5 Gig per CPU. 2.5 Gig Minimum to run the testHarness)
vb.memory=512*[(1+nrCPU),5].max
vb.gui=false
end
config.vm.define :trusty do |trusty|
@ -62,6 +63,16 @@ Vagrant.configure("2") do |config|
centos65.vm.hostname="centos65."+config.vm.hostname
end
config.vm.define :centos70 do |centos70|
centos70.vm.box = "matyunin/centos7"
centos70.vm.box_check_update = true
centos70.vm.provision :shell do |s|
s.args = "centos70"
s.path = "initCentOSRHELScript.sh"
end
centos70.vm.hostname="centos70."+config.vm.hostname
end
# legacy
config.vm.define :lucid do |lucid|
lucid.vm.box = "lucid64"
@ -101,13 +112,17 @@ Vagrant.configure("2") do |config|
# legacy/experimental
config.vm.define :freebsd10 do |freebsd10|
freebsd10.vm.box = "freebsd10"
freebsd10.vm.box = "chef/freebsd-10.0"
# freebsd10.vm.box = "arkadi/freebsd-10.0-i386"
freebsd10.vm.box_check_update = true
# freebsd10.vm.box = "freebsd10"
# freebsd10.vm.box_url = "https://wunki.org/files/freebsd-10.0-amd64-wunki.box"
freebsd10.vm.box_url = "http://iris.hosting.lv/freebsd-10.0-i386.box"
# freebsd10.vm.box_url = "http://iris.hosting.lv/freebsd-10.0-i386.box"
freebsd10.vm.provision :shell do |s|
s.args = "freebsd10"
s.path = "initFreeBSDScript.sh"
end
freebsd10.vm.network :private_network, ip: "10.0.0.2"
# configure the NICs
@ -118,6 +133,7 @@ Vagrant.configure("2") do |config|
# use NFS for the synced folder
freebsd10.vm.synced_folder "..", "/FOAM-sources", :nfs => true
freebsd10.vm.synced_folder '.', '/vagrant', :nfs => true
freebsd10.vm.hostname="freebsd10."+config.vm.hostname
end
@ -143,4 +159,14 @@ Vagrant.configure("2") do |config|
opensuse13.vm.hostname="opensuse13."+config.vm.hostname
end
config.vm.define :archlinux do |archlinux|
archlinux.vm.box = "terrywang/archlinux"
archlinux.vm.box_check_update = true
archlinux.vm.provision :shell do |s|
s.args = "archlinux"
s.path = "initArchlinuxScript.sh"
end
archlinux.vm.hostname="archlinux."+config.vm.hostname
end
end

View file

@ -0,0 +1,46 @@
#! /bin/bash
boxName=$1
echo
echo "Init script for $boxName"
echo
echo
echo "Full update of the system"
echo
pacman -Syu
yaourt --noconfirm -S rpm-org
neededPackages=(gcc-fortran ccache mercurial bison flex git svn)
bonusPackages=(emacs tcsh)
thirdpartyPackages=(openmpi cmake hwloc)
for p in ${neededPackages[@]}; do
pacman --noconfirm -S $p
done
for p in ${bonusPackages[@]}; do
pacman --noconfirm -S $p
done
for p in ${thirdpartyPackages[@]}; do
pacman --noconfirm -S $p
done
# for the used archlinux-Box the /home is too small but / is big enough
mkdir /Foam
ln -s /Foam/ /home/vagrant/foam
chown vagrant:vagrant /Foam
echo
echo "Archlinux-specific ended. Now doing general stuff"
echo
/vagrant/initGeneralScript.sh
echo
echo "Ended"

View file

@ -7,11 +7,19 @@ echo "Init script for $boxName"
echo
echo "Install the EPEL-repository for additional software"
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
if [ "$boxName" == "centos70" ]
then
echo "Centos 7"
rpm -Uhv http://mirror.digitalnova.at/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
else
echo "Centos 6"
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
fi
# some of these packages are already installed. But lets be sure
neededPackages=(gcc-c++ gcc-gfortran mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel libXt-devel)
neededPackages=(gcc-c++ gcc-gfortran mercurial git flex bison make ccache rpm-build wget zlib-devel binutils-devel libXt-devel cmake)
bonusPackages=(emacs csh tcsh zsh)
for p in ${neededPackages[@]}; do
@ -22,8 +30,11 @@ for p in ${bonusPackages[@]}; do
yum install -y $p
done
echo "Update mercurial to a more recent version"
rpm -Uhv http://pkgs.repoforge.org/mercurial/mercurial-2.2.2-1.el6.rfx.x86_64.rpm
if [ "$boxName" == "centos65" ]
then
echo "Update mercurial to a more recent version"
rpm -Uhv http://pkgs.repoforge.org/mercurial/mercurial-2.2.2-1.el6.rfx.x86_64.rpm
fi
echo
echo "RHEL/CentOS-specific ended. Now doing general stuff"

View file

@ -19,6 +19,11 @@ for p in ${bonusPackages[@]}; do
pkg install -y $p
done
echo
echo "Upgrading all to get working packages"
echo
pkg upgrade -y
echo
echo "FreeBSD-specific ended. Now doing general stuff"
echo

View file

@ -12,12 +12,18 @@ do
else
echo "Copying $target from skeleton"
cp -r "/vagrant/skel/$f" $target
chown -R vagrant:vagrant $target
fi
done
OFDIR=/home/vagrant/foam/
mkdir -vp $OFDIR
# make sure that a symbolic link is not erased
if [ ! -e $OFDIR ]; then
echo "Making directory $OFDIR"
mkdir -vp $OFDIR
fi
chown -R vagrant:vagrant $OFDIR
# for distros that don't have group vagrant
@ -41,7 +47,7 @@ then
echo
# su -c not correctly working on FreeBSD
su vagrant - -c "git clone $OFParent $OFClone"
su - vagrant -c "git clone $OFParent $OFClone"
echo
echo "Git cloned: TODO: set same branch as parent"
@ -57,7 +63,7 @@ then
echo "Parent is on id $idName"
echo "Cloning. This may take some time"
su vagrant - -c "hg clone -u $idName $OFParent $OFClone"
su - vagrant -c "hg clone -u $idName $OFParent $OFClone"
echo
else
echo

View file

@ -32,3 +32,7 @@ source etc/bashrc
# compile swak4Foam
cd $WM_THIRD_PARTY_DIR
./AllMake.stage5 2>&1 | tee --append $BOOTSTRAPLOG
# compile the Bazaar
cd $WM_PROJECT_DIR/extend-bazaar
./Allwmake 2>&1 | tee --append $BOOTSTRAPLOG