CentOS 7.0 added to vagrant machines. Provisioning works

This commit is contained in:
Bernhard Gschaider 2014-11-13 15:00:28 +01:00 committed by Dominik Christ
parent 3e254949cb
commit d1779cf0d9
3 changed files with 27 additions and 3 deletions

View file

@ -60,6 +60,8 @@
- 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

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"

View file

@ -7,7 +7,15 @@ echo "Init script for $boxName"
echo
echo "Install the EPEL-repository for additional software"
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
@ -22,8 +30,11 @@ for p in ${bonusPackages[@]}; do
yum install -y $p
done
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"