From d1779cf0d9a8caca7a529c8cc4ba7e4509f56534 Mon Sep 17 00:00:00 2001 From: Bernhard Gschaider Date: Thu, 13 Nov 2014 15:00:28 +0100 Subject: [PATCH] CentOS 7.0 added to vagrant machines. Provisioning works --- vagrantSandbox/README | 2 ++ vagrantSandbox/Vagrantfile | 11 +++++++++++ vagrantSandbox/initCentOSRHELScript.sh | 17 ++++++++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/vagrantSandbox/README b/vagrantSandbox/README index 5040c0a3f..d631a58ea 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -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 diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index da7dcb844..cdfb8ac6f 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -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" diff --git a/vagrantSandbox/initCentOSRHELScript.sh b/vagrantSandbox/initCentOSRHELScript.sh index de0966b80..67144adc8 100755 --- a/vagrantSandbox/initCentOSRHELScript.sh +++ b/vagrantSandbox/initCentOSRHELScript.sh @@ -7,7 +7,15 @@ 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 @@ -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"