Skip to content

@avanwieringen /Vagrantfile
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
APC and XDebug not installing using Chef and Vagrant
include_recipe "web-app::webserver"
# XDebug installation error
[2013-01-09T09:24:28+00:00] INFO: Processing php_pear_channel[pear.php.net] action update (php::default line 25)
[2013-01-09T09:24:29+00:00] INFO: Processing php_pear_channel[pecl.php.net] action update (php::default line 29)
[2013-01-09T09:24:30+00:00] INFO: Processing php_pear_channel[pear.php.net] action update (web-app::webserver line 5)
[2013-01-09T09:24:30+00:00] INFO: Processing php_pear_channel[pecl.php.net] action update (web-app::webserver line 10)
[2013-01-09T09:24:30+00:00] INFO: Processing php_pear[xdebug] action install (web-app::webserver line 15)
[2013-01-09T09:24:38+00:00] INFO: Installing php_pear[xdebug] version 2.2.1
[2013-01-09T09:25:41+00:00] ERROR: Running exception handlers
[2013-01-09T09:25:41+00:00] ERROR: Exception handlers complete
[2013-01-09T09:25:41+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
# APC installation error
[2013-01-09T09:45:40+00:00] INFO: Processing php_pear[apc] action install (web-app::webserver line 11)
================================================================================
Error executing action `install` on resource 'php_pear[apc]'
================================================================================
RuntimeError
------------
Package apc not found in either PEAR or PECL.
Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/php/providers/pear.rb:259:in `pecl?'
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/php/providers/pear.rb:107:in `load_current_resource'
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/web-app/recipes/webserver.rb
10: package "libpcre3-dev"
11: php_pear "apc" do
12: action :install
13: end
14:
Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/web-app/recipes/webserver.rb:11:in `from_file'
php_pear("apc") do
retry_delay 2
preferred_state "stable"
retries 0
recipe_name "webserver"
action [:install]
cookbook_name :"web-app"
package_name "apc"
end
[2013-01-09T09:48:21+00:00] ERROR: Running exception handlers
[2013-01-09T09:48:21+00:00] ERROR: Exception handlers complete
[2013-01-09T09:48:21+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-01-09T09:48:21+00:00] FATAL: RuntimeError: php_pear[apc] (web-app::webserver line 11) had an error: RuntimeError:
Package apc not found in either PEAR or PECL.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "precise32"
config.vm.network :hostonly, "33.33.33.10"
config.vm.network :bridged
config.vm.forward_port 80, 8080
config.vm.share_folder "web-app", "/web-app", "web-app"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe("build-essential")
chef.add_recipe("apt")
chef.add_recipe("apache2")
chef.add_recipe("apache2::mod_php5")
chef.add_recipe("php")
chef.add_recipe("web-app")
end
end
app_name = 'web-app'
app_config = node[app_name]
# install the xdebug pecl
php_pear "xdebug" do
action :install
end
# install the apc pecl
package "libpcre3-dev" # is needed for APC
php_pear "apc" do
action :install
end
# Set up the Apache virtual host
web_app app_name do
server_name app_config['server_name']
docroot app_config['docroot']
template "#{app_name}.conf.erb"
log_dir node['apache']['log_dir']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.