- From: AJ Christensen <
>
- To:
- Subject: [chef] Re: Re: Re: How to install PHPUnit using Chef?
- Date: Tue, 4 Oct 2011 10:53:18 +1300
Yo,
Maybe learn something about the tool(s) in the toolchain you're using
instead of just blindly running stuff.
On 4 October 2011 10:46, Andrew Havens
<
>
wrote:
>
Sounds great! Except...I don't understand anything you just said, lol.
>
>
>
>fix the php_pear LWRP/definition to actually work,
http://wiki.opscode.com/display/chef/Definitions
http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+%28LWRP%29
>
>
What do you mean by this?
>
>
>run with -l debug and provide output
When you run chef there is a --log-level (-l) option, to specify the
log level. Passing the 'debug' value gives you the most, enough to put
into a gist or pastie to supply with a post like this.
>
Chef is being run automatically when I do "vagrant up". How do I enable
>
Chef debugging in Vagrant?
In your Vagrantfile, in the chef provision section, like:
Vagrant::Config.run do |config|
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.log_level = :debug
end
end
>
>
>hell, you could even use the "execute" resource
http://wiki.opscode.com/display/chef/Resources#Resources-Execute
>
>
How do I do that? What does that code look like?
>
>
>
Thanks!
>
Andrew
Many companies (including mine) offer Chef consultancy services.
–AJ
>
>
>
>On 4 October 2011 10:31, Andrew Havens
>
><
>
>
> wrote:
>
>> Hello,
>
>> I am using Chef via Vagrant and am trying to install PHPUnit. I am able
>
>>to
>
>> install PHP and PEAR, but when it comes to installing PHPUnit, it does
>
>>not
>
>> work. I'm using a recipe that I found online, but it doesn't seem to
>
>>work:
>
>>
>
>> channels = %w{pear.phpunit.de components.ez.no pear.symfony-project.com}
>
>>
>
>> channels.each do |chan|
>
>>
>
>> php_pear_channel chan do
>
>>
>
>> action [:discover, :update]
>
>>
>
>> end
>
>>
>
>> end
>
>>
>
>> php_pear "HTTP_Request2" do
>
>>
>
>> preferred_state "beta"
>
>>
>
>> action :install
>
>>
>
>> end
>
>>
>
>> php_pear "XML_RPC2" do
>
>>
>
>> action :install
>
>>
>
>> end
>
>>
>
>> php_pear "PHPUnit" do
>
>>
>
>> channel "phpunit"
>
>>
>
>> action :install
>
>>
>
>> end
>
>>
>
>> All of the commands seem to execute just fine, but when I ssh into the
>
>> virtual machine, PHPUnit is not installed. I can install it (including
>
>>all
>
>> dependencies) from the command line with this command:
>
>>
>
>> sudo pear install a phpunit/PHPUnit
>
>>
>
>> How can I run this command using Chef?
>
>>
>
>> Thanks for your help,
>
>>
>
>> --Andrew
>
>
Archive powered by MHonArc 2.6.16.