Skip to content

Instantly share code, notes, and snippets.

@hjr3
Created August 24, 2012 23:40
Show Gist options
  • Save hjr3/3457308 to your computer and use it in GitHub Desktop.
Save hjr3/3457308 to your computer and use it in GitHub Desktop.
Standard PHP vagrant setup
package { 'remi-release':
ensure => present,
provider => rpm,
source => 'http://rpms.famillecollet.com/enterprise/remi-release-6.rpm',
require => Package["epel-release"],
}
yumrepo { "remi":
enabled => 1,
require => Package["remi-release"],
}
$php = [
"php",
"php-cli",
"php-common",
"php-devel",
"php-pear",
"php-pecl-xdebug",
"php-phpunit-PHPUnit",
"php-xml",
]
package { $php:
ensure => installed,
provider => yum,
require => [Yumrepo["remi"]],
}
package { "git":
ensure => installed,
provider => yum
}
exec { "composer":
command => "/usr/bin/curl -s http://getcomposer.org/installer | php",
cwd => "/vagrant",
creates => "/vagrant/composer.phar",
require => [Package["php"], Package["git"]],
}
exec { "composer-install":
command => "/usr/bin/php composer.phar install",
cwd => "/vagrant",
require => [Exec["composer"]],
}
exec { "composer-self-update":
command => "/usr/bin/php composer.phar self-update",
cwd => "/vagrant",
require => [Exec["composer"]],
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "centos64-min"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://dl.dropbox.com/u/9227672/CentOS-6.0-x86_64-netboot-4.1.6.box"
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.manifest_file = "vagrant.pp"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment