[chef] Re: stompserver not installed by running bootstrap-0.7.8


Chronological Thread 
  • From: Stephen Bannasch < >
  • To:
  • Subject: [chef] Re: stompserver not installed by running bootstrap-0.7.8
  • Date: Sat, 22 Aug 2009 00:56:20 -0400

At 6:53 PM -0400 8/21/09, Stephen Bannasch wrote:
I'm installing chef on a centos 5.3 system but I am NOT using packages for anything ruby related.

When I got to this step:

sudo chef-solo -c solo.rb -j chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-0.7.8.tar.gz

it made it through installing and starting couchdb but dies here:

[Fri, 21 Aug 2009 13:20:42 -0400] ERROR: gem_package[stompserver] (/usr/local/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb line 191) had an error:
No such file or directory - gem list --local stompserver

Turns out dist_only? was false when running the stompserver recipe so ... that recipe at least was trying to install using rubygems.

The problem was the root user as accessed through sudo doesn't have access to the Ruby I installed here: /usr/local/bin/ruby

After installing g++, modifying /etc/profile and getting a root shell with sudo -i then running this got a bunch further:

  # sudo chef-solo -c solo.rb -j chef.json

(using the cookbook already downloaded into /tmp)

But ... more problems

Later on the passenger_apache2 recipe installed the package versions of ruby and friends instead of with rubygems:

[Fri, 21 Aug 2009 18:11:54 -0400] INFO: Installing package[ruby] version 1.8.6.287-2.el5
[Fri, 21 Aug 2009 18:12:06 -0400] INFO: Installing package[ruby-devel] version 1.8.6.287-2.el5
[Fri, 21 Aug 2009 18:12:12 -0400] INFO: Installing package[ruby-docs] version 1.8.6.287-2.el5
[Fri, 21 Aug 2009 18:12:20 -0400] INFO: Installing package[ruby-ri] version 1.8.6.287-2.el5
[Fri, 21 Aug 2009 18:12:35 -0400] INFO: Installing package[ruby-mode] version 1.8.6.287-2.el5
[Fri, 21 Aug 2009 18:12:40 -0400] INFO: Installing gem_package[passenger] version 2.2.4

So I'll need to modify that recipe to install from gems because having two system Ruby's doesn't make sense.

The next problem was presented by the passenger gem -- there were missing apache2 dependencies:

  Some required software is not installed.
  But don't worry, this installer will tell you how to install them.

  Press Enter to continue, or Ctrl-C to abort.
  --------------------------------------------

  Installation instructions for required software

   * To install Apache 2 development headers:
     Please run yum install httpd-devel as root.

   * To install Apache Portable Runtime (APR) development headers:
     Please run yum install apr-devel as root.

   * To install Apache Portable Runtime Utility (APU) development headers:
     Please download it from http://httpd.apache.org/
     (APR Utility is an integrated part of Apache.)

I'd assume that the apache2 recipe would have installed (or delegated) those tasks.

This is a bit confusing because on this page:


http://wiki.opscode.com/display/chef/Installation+on+RHEL+and+CentOS+5+with+RPMs step #4

states: "Uninstall the httpd package if it exists"

But now passenger is telling me I need to: "yum install httpd-devel apr-devel"

OK: sudo yum install httpd-dev

And try his again:

  chef-solo -c solo.rb -j chef.json

Now rubygems can't find the chef-server gem

ERROR: gem_package[chef-server] (/usr/local/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb line 191) had an error:
  gem install chef-server -q --no-rdoc --no-ri -v 0.7.8 returned 2, expected 0
---- Begin output of gem install chef-server -q --no-rdoc --no-ri -v 0.7.8 ----
STDOUT: STDERR: ERROR: could not find gem chef-server locally or in a repository

I had already added both github and opscode as gem repos with sudo ... but they aren't there when logged in with sudo -i on centos:

  Fri Aug 21 - 07:44 PM # gem env
  RubyGems Environment:
    - RUBYGEMS VERSION: 1.3.5
    - RUBY VERSION: 1.8.6 (2009-08-05 patchlevel 384) [i686-linux]
    - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
    - RUBY EXECUTABLE: /usr/local/bin/ruby
    - EXECUTABLE DIRECTORY: /usr/local/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86-linux
    - GEM PATHS:
       - /usr/local/lib/ruby/gems/1.8
       - /root/.gem/ruby/1.8
    - GEM CONFIGURATION:
       - :update_sources => true
       - :verbose => true
       - :benchmark => false
       - :backtrace => false
       - :bulk_threshold => 1000
    - REMOTE SOURCES:
       - http://gems.rubyforge.org/

This makes the gems available:

  gem sources -a http://gems.github.com
  gem source -a http://gems.opscode.com/

Now rubygems can find the other chef gems:

  Fri Aug 21 - 07:47 PM # gem list chef-server -r

  *** REMOTE GEMS ***

  chef-server (0.7.8)
  chef-server-slice (0.7.8)

Hey!!!!

[Fri, 21 Aug 2009 19:52:23 -0400] INFO: Chef Run complete in 38.561518 seconds

Well, that took a while ;-)



Archive powered by MHonArc 2.6.16.

§