Chef on CloudFoundry


#1

Hi all,

we are making progress running Chef Server on private CloudFoundry clouds.

http://blog.zephirworks.com/couchdb-service-for-cloudfoundry

Not all of the work we did is published yet, but we do have it running
successfully in our staging cloud.
I have started opening issues as needed, and I’ll send push requests.

I’m sure I’m making some assumptions based on our needs, so if anybody
is interested in “Chef in the cloud”, get in touch with me.

Andrea


#2

Are you talking about running Che Server as a CF service? I
would definitely interested in learning more.

John Willis
a.k.a @botchagalupe

On Mon, Oct 3, 2011 at 8:26 AM, Andrea Campi
andrea.campi@zephirworks.comwrote:

Hi all,

we are making progress running Chef Server on private CloudFoundry clouds.

http://blog.zephirworks.com/couchdb-service-for-cloudfoundry

Not all of the work we did is published yet, but we do have it running
successfully in our staging cloud.
I have started opening issues as needed, and I’ll send push requests.

I’m sure I’m making some assumptions based on our needs, so if anybody
is interested in “Chef in the cloud”, get in touch with me.

Andrea


John Willis
[ DTO Solutions, Inc. http://www.dtosolutions.com/* * | 1840 Gateway
Drive - Suite #200, San Mateo CA 94404
| o: *1.6**50.292.9660 x705 *| m: *
1.**919.244.9680 *| f: *1.**415.358.8435 *]


#3

On Mon, Oct 3, 2011 at 10:53 PM, John Willis john@dtosolutions.com wrote:

Are you talking about running Che Server as a CF service? I
would definitely interested in learning more.

Interesting. Right now we are running Chef Server as an application on
CF, not a service.
I hadn’t really thought of turning it into a service. Do you see any
specific advantage? What kind of applications would bind to such a
service, and to do what?

Andrea


#4

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


#5

fix the php_pear LWRP/definition to actually work, run with -l debug
and provide output, hell, you could even use the “execute” resource
and just chuck that shit straight into bash.

Good luck!

–AJ

On 4 October 2011 10:31, Andrew Havens Andrew.Havens@evanta.com 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


#6

Sounds great! Except…I don’t understand anything you just said, lol.

fix the php_pear LWRP/definition to actually work,

What do you mean by this?

run with -l debug and provide output

Chef is being run automatically when I do “vagrant up”. How do I enable
Chef debugging in Vagrant?

hell, you could even use the “execute” resource

How do I do that? What does that code look like?

Thanks!
Andrew

On 4 October 2011 10:31, Andrew Havens Andrew.Havens@evanta.com 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


#7

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 Andrew.Havens@evanta.com 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+(LWRP)

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 Andrew.Havens@evanta.com 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