[chef] Re: Re: How to write the cookbook for third party ubuntu ppa?


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To:
  • Subject: [chef] Re: Re: How to write the cookbook for third party ubuntu ppa?
  • Date: Tue, 21 Aug 2012 20:59:33 +0545

I've changed the uri as you suggested, but still it blows up:
Following is the recipe:

include_recipe "apt"

apt_repository "brightbox-ruby-ng" do
  uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
  distribution node['lsb']['codename']
  components ["main"]
  keyserver "keyserver.ubuntu.com"
  key "C300EE8C"
end

package "ruby" do
  action :install
end

package "rubygems" do
  action :install
end

I've even tried with:
package "ruby1.9.3"

And this is the debug output:

ec2-107-20-189-224.compute-1.amazonaws.com [Tue, 21 Aug 2012 14:33:42 +0000] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/bin/chef-client:26:in `<top (required)>'
ec2-107-20-189-224.compute-1.amazonaws.com [Tue, 21 Aug 2012 14:33:42 +0000] ERROR: /usr/bin/chef-client:19:in `load'
ec2-107-20-189-224.compute-1.amazonaws.com [Tue, 21 Aug 2012 14:33:42 +0000] ERROR: /usr/bin/chef-client:19:in `<main>'
ec2-107-20-189-224.compute-1.amazonaws.com [Tue, 21 Aug 2012 14:33:42 +0000] ERROR: Exception handlers complete
ec2-107-20-189-224.compute-1.amazonaws.com [Tue, 21 Aug 2012 14:33:42 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
ec2-107-20-189-224.compute-1.amazonaws.com [Tue, 21 Aug 2012 14:33:42 +0000] FATAL: Chef::Exceptions::Exec: package[ruby] (base::install_ruby line 22) had an error: Chef::Exceptions::Exec: apt-get -q -y install ruby=4.8-0bbox1 returned 100, expected 0

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow

On Tuesday, August 21, 2012 at 1:17 AM, Kevin Nuckolls wrote:

The URL you're looking for is the full one to the actual ppa that gets dropped in sources.conf.

I looked it up here for your case. Click on the technical details part.
https://launchpad.net/~brightbox/+archive/ruby-ng

http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu

Hope that helps.
-Kevin

On Mon, Aug 20, 2012 at 2:09 PM, Sachin Sagar Rai < " target="_blank"> > wrote:
Ohai!

I'm trying to write this ppa to install ruby 1.9.3.p-294 from the brightbox ppa at:

ppa:brightbox/ruby-ng

with both way, LWRP and template/execute resource one, neither works.
When I run from the terminal on my ec2 server, it gets installed graciously.
But why the chef-recipe way blows up every time.


# LWRP way
include_recipe "apt"
apt_repository "brightbox-ruby-ng" do
  uri 'ppa:brightbox/ruby-ng'
  distribution node['lsb']['codename']
  components ["main"]
  keyserver "keyserver.ubuntu.com"
  key "C300EE8C"
end
package "ruby" do
  action :install
end

# Template/Execute resource way
template "/etc/apt/sources.list.d/brightbox-ruby-ng-source.list" do
  source "brightbox-ruby-ng-source.list.erb"
  notifies :run, resources(:execute => "apt-get update"), :immediately
end

package "ruby" do
  action :install
end

package "rubygems" do
  action :install
end
# And this is the content of the template file:
deb ppa:brightbox/ruby-ng precise main


Either way shows the same error:

  


-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow






Archive powered by MHonArc 2.6.16.

§