2011年7月22日金曜日

centosのchefワークステーションのAMI更新

以前とったcentosのchefワークステーションのamiを更新したい。
・knife ec2コマンドを使えるようにして、ほかのchefクライアントを起動できるようにする。




以前のamazon linuxでやったのと同じように、knife ec2の前提条件パッケージをインストールします。

[root@ip-10-146-157-117 chef-repo]# sudo gem install net-ssh net-ssh-multi fog highline

Successfully installed net-ssh-2.1.4
Fetching: net-ssh-multi-1.1.gem (100%)
Successfully installed net-ssh-multi-1.1
Fetching: builder-3.0.0.gem (100%)
Fetching: excon-0.6.5.gem (100%)
Fetching: formatador-0.2.0.gem (100%)
Fetching: net-scp-1.0.4.gem (100%)
Fetching: nokogiri-1.5.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing fog:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby extconf.rb
checking for libxml/parser.h... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include
        --without-zlib-include=${zlib-dir}/include
        --with-zlib-lib
        --without-zlib-lib=${zlib-dir}/lib
        --with-iconv-dir
        --without-iconv-dir
        --with-iconv-include
        --without-iconv-include=${iconv-dir}/include
        --with-iconv-lib
        --without-iconv-lib=${iconv-dir}/lib
        --with-xml2-dir
        --without-xml2-dir
        --with-xml2-include
        --without-xml2-include=${xml2-dir}/include
        --with-xml2-lib
        --without-xml2-lib=${xml2-dir}/lib
        --with-xslt-dir
        --without-xslt-dir
        --with-xslt-include
        --without-xslt-include=${xslt-dir}/include
        --with-xslt-lib
        --without-xslt-lib=${xslt-dir}/lib


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0/ext/nokogiri/gem_make.out
Successfully installed highline-1.6.2
3 gems installed
Installing ri documentation for net-ssh-2.1.4...
Installing ri documentation for net-ssh-multi-1.1...
Installing ri documentation for highline-1.6.2...
Installing RDoc documentation for net-ssh-2.1.4...
Installing RDoc documentation for net-ssh-multi-1.1...
Installing RDoc documentation for highline-1.6.2...
[root@ip-10-146-157-117 chef-repo]#
[root@ip-10-146-157-117 chef-repo]# sudo yum install libxml-devel libxslt-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.netrino.co.uk
 * base: mirror.netrino.co.uk
 * epel: www.mirrorservice.org
 * extras: mirrors.supportex.net
 * updates: mirrors.supportex.net
Setting up Install Process
No package libxml-devel available.
Resolving Dependencies
--> Running transaction check
---> Package libxslt-devel.i386 0:1.1.17-2.el5_2.2 set to be updated
--> Processing Dependency: libxslt = 1.1.17 for package: libxslt-devel
--> Processing Dependency: libxml2-devel >= 2.5.6 for package: libxslt-devel
--> Processing Dependency: libgcrypt-devel for package: libxslt-devel
--> Processing Dependency: libexslt.so.0 for package: libxslt-devel
--> Processing Dependency: libxslt.so.1 for package: libxslt-devel
--> Running transaction check
---> Package libgcrypt-devel.i386 0:1.4.4-5.el5 set to be updated
--> Processing Dependency: libgpg-error-devel for package: libgcrypt-devel
---> Package libxml2-devel.i386 0:2.6.26-2.1.2.8.el5_5.1 set to be updated
---> Package libxslt.i386 0:1.1.17-2.el5_2.2 set to be updated
--> Running transaction check
---> Package libgpg-error-devel.i386 0:1.4-2 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch      Version                      Repository
                                                                           Size
================================================================================
Installing:
 libxslt-devel           i386      1.1.17-2.el5_2.2             base      295 k
Installing for dependencies:
 libgcrypt-devel         i386      1.4.4-5.el5                  base      396 k
 libgpg-error-devel      i386      1.4-2                        base       17 k
 libxml2-devel           i386      2.6.26-2.1.2.8.el5_5.1       base      2.1 M
 libxslt                 i386      1.1.17-2.el5_2.2             base      485 k

Transaction Summary
================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

Total download size: 3.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): libgpg-error-devel-1.4-2.i386.rpm                 |  17 kB     00:00
(2/5): libxslt-devel-1.1.17-2.el5_2.2.i386.rpm           | 295 kB     00:01
(3/5): libgcrypt-devel-1.4.4-5.el5.i386.rpm              | 396 kB     00:02
(4/5): libxslt-1.1.17-2.el5_2.2.i386.rpm                 | 485 kB     00:03
(5/5): libxml2-devel-2.6.26-2.1.2.8.el5_5.1.i386.rpm     | 2.1 MB     00:06
--------------------------------------------------------------------------------
Total                                           187 kB/s | 3.3 MB     00:17
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libxslt                                                  1/5
  Installing     : libxml2-devel                                            2/5
  Installing     : libgpg-error-devel                                       3/5
  Installing     : libgcrypt-devel                                          4/5
  Installing     : libxslt-devel                                            5/5

Installed:
  libxslt-devel.i386 0:1.1.17-2.el5_2.2

Dependency Installed:
  libgcrypt-devel.i386 0:1.4.4-5.el5           libgpg-error-devel.i386 0:1.4-2
  libxml2-devel.i386 0:2.6.26-2.1.2.8.el5_5.1  libxslt.i386 0:1.1.17-2.el5_2.2

Complete!
[root@ip-10-146-157-117 chef-repo]#

[root@ip-10-146-157-117 chef-repo]# sudo gem install fog
Building native extensions.  This could take a while...
Fetching: ruby-hmac-0.4.0.gem (100%)
Fetching: fog-0.9.0.gem (100%)
Successfully installed nokogiri-1.5.0
Successfully installed ruby-hmac-0.4.0
Successfully installed fog-0.9.0
3 gems installed
Installing ri documentation for nokogiri-1.5.0...

No definition for get_options

No definition for set_options

No definition for parse_memory

No definition for parse_file

No definition for parse_with
Installing ri documentation for ruby-hmac-0.4.0...
Installing ri documentation for fog-0.9.0...
sInstalling RDoc documentation for nokogiri-1.5.0...

No definition for get_options

No definition for set_options

No definition for parse_memory

No definition for parse_file

No definition for parse_with
Installing RDoc documentation for ruby-hmac-0.4.0...
Installing RDoc documentation for fog-0.9.0...
[root@ip-10-146-157-117 chef-repo]#


次にknife.rbに以下を追加した。


knife[:aws_access_key_id]     = "Your AWS Access Key"
knife[:aws_secret_access_key] = "Your AWS Secret Access Key"



このあと、knife ec2 server create

こまんどでcentosのインスタンスの起動ができた。

これでバックアップを取る。AMI NAMEはami-20d16421_chef_workstation_centosです。

2011年7月21日木曜日

weblogicとcoherenceのインストール

[root@ip-10-150-183-203 recipes]# knife cookbook list
WebLogic           0.0.1
chef-client        0.99.5
coherence          0.0.1
coherence_inst_1   0.0.1
[root@ip-10-150-183-203 recipes]# knife node list
  demo.example.net2
  ip-10-146-7-97.ap-northeast-1.compute.internal
[root@ip-10-150-183-203 recipes]#
[root@ip-10-150-183-203 recipes]# knife node run_list
FATAL: Cannot find sub command for: 'node run_list'
Available node subcommands: (for details, knife SUB-COMMAND --help)

** NODE COMMANDS **
knife node from file FILE (options)
knife node show NODE (options)
knife node create NODE (options)
knife node run_list add [NODE] [ENTRY] (options)
knife node bulk delete REGEX (options)
knife node list (options)
knife node edit NODE (options)
knife node run_list remove [NODE] [ENTRY] (options)
knife node delete NODE (options)

[root@ip-10-150-183-203 recipes]# knife node show  demo.example.net2
Node Name:   demo.example.net2
Environment: _default
FQDN:        ip-10-150-183-203.ap-northeast-1.compute.internal
IP:          10.150.183.203
Run List:    recipe[WebLogic::install_10.3.5], recipe[coherence]
Roles:
Recipes      coherence_inst_1
Platform:    centos 5.5
[root@ip-10-150-183-203 recipes]#











[root@ip-10-150-183-203 ~] chef-client

ラン後。各製品ごとのサブディレクトリを作成しないといけなかった。。。

[root@ip-10-150-183-203 ~]# ls -ltr
total 80
drwxr-xr-x  5 root root  4096 Apr  1 22:17 wlserver
-rw-r--r--  1 root root  1138 Apr  1 22:17 registry.template
-rw-r--r--  1 root root  3189 Apr  1 22:17 configure.xml
-rw-r--r--  1 root root  1421 Apr  1 22:17 configure.cmd
drwxr-xr-x  5 root root 36864 Apr  1 22:17 modules
drwxr-xr-x  3 root root  4096 Apr  1 22:17 utils
-rw-r--r--  1 root root   133 Apr  1 22:17 domain-registry.xml
-rwxr-x---  1 root root  1370 Apr  1 22:17 configure.sh
-rw-r--r--  1 root root    33 Apr  6 12:33 README.txt
drwxr-xr-x 10 root root  4096 Jul 19 02:17 chef-repo
drwxr-xr-x  2 root root  4096 Jul 19 07:10 aws
drwxr-xr-x  5 root root  4096 Jul 20 07:55 coherence
[root@ip-10-150-183-203 ~]#






サブディレクトリが作成されるようにcookbook修正。
また、unzip時に同じファイルがあると、上書きするか聞かれるので、-oオプションで強制上書きにする。

[root@ip-10-150-183-203 ~]# ls
README.txt  coherence      configure.xml        registry.template
aws         configure.cmd  domain-registry.xml  utils
chef-repo   configure.sh   modules              wlserver
[root@ip-10-150-183-203 ~]# cd chef-repo/cookbooks/coherence/recipes/
[root@ip-10-150-183-203 recipes]# ls
default.rb  install_3.7.0.rb
[root@ip-10-150-183-203 recipes]# vi install_3.7.0.rb
[root@ip-10-150-183-203 recipes]# cat install_3.7.0.rb
#
# Cookbook Name:: coherence_inst_1
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#

execute "download_coherence" do
  command "s3cmd get 1-1-16-1019:coherence-java-3.7.0.0b23397.zip coherence.zip"
  creates "/home/s3sync/coherence.zip"
  action :run
end

directory "/root/coherence" do
  owner "root"
  group "root"
  mode "0755"
  action :create
end

execute "unzip_coherence.zip" do
  command "unzip -o /home/s3sync/coherence.zip -d /root/coherence"
  creates "/root/coherence/README.txt"
  action :run
end



[root@ip-10-150-183-203 recipes]# cd ~/chef-repo/cookbooks/WebLogic/recipes/
[root@ip-10-150-183-203 recipes]# ls
default.rb  install_10.3.5.rb

[root@ip-10-150-183-203 recipes]# cat install_10.3.5.rb
#
# Cookbook Name:: WebLogic
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
execute "download_coherence" do
  command "s3cmd get 1-1-16-1019:wls1035_dev_linux_x86.zip weblogic.zip"
  creates "/home/s3sync/weblogic.zip"
  action :run
end

directory "/root/weblogic" do
  owner "root"
  group "root"
  mode "0755"
  action :create
end

execute "unzip_weblogic.zip" do
  command "unzip -o /home/s3sync/weblogic.zip -e /root/weblogic"
  action :run
end







[root@ip-10-150-183-203 ~]# ls
README.txt  coherence      configure.xml        registry.template
aws         configure.cmd  domain-registry.xml  utils
chef-repo   configure.sh   modules              wlserver
[root@ip-10-150-183-203 ~]# rm README.txt
[root@ip-10-150-183-203 ~]# rm -r coherence/
[root@ip-10-150-183-203 ~]# rm -r configure.cmd
[root@ip-10-150-183-203 ~]# rm configure.sh
[root@ip-10-150-183-203 ~]# rm -r modules/
[root@ip-10-150-183-203 ~]# rm configure.xml
[root@ip-10-150-183-203 ~]# rm domain-registry.xml
[root@ip-10-150-183-203 ~]# rm registry.template
[root@ip-10-150-183-203 ~]# rm -r utils/
[root@ip-10-150-183-203 ~]# rm -r wlserver/
[root@ip-10-150-183-203 ~]# ls
aws  chef-repo
[root@ip-10-150-183-203 ~]# chef-
chef-client  chef-solo
[root@ip-10-150-183-203 ~]# chef-client > chef-client.log 2>&1

 [root@ip-10-150-183-203 ~]# ls
README.txt       chef-repo      configure.xml        registry.template
aws              configure.cmd  domain-registry.xml  utils
chef-client.log  configure.sh   modules              wlserver
[root@ip-10-150-183-203 ~]#

アップロードし忘れた!

[root@ip-10-150-183-203 ~]# cd chef-repo/

[root@ip-10-150-183-203 chef-repo]# knife cookbook upload coherence
Uploading coherence             [0.0.1]
upload complete


[root@ip-10-150-183-203 chef-repo]# knife cookbook upload WebLogic
Uploading WebLogic             [0.0.1]
upload complete






[root@ip-10-150-183-203 ~]# chef-client | tee chef-client.log
[Wed, 20 Jul 2011 22:29:37 -0400] INFO: *** Chef 0.10.2 ***
[Wed, 20 Jul 2011 22:29:38 -0400] INFO: Run List is [recipe[WebLogic::install_10              .3.5], recipe[coherence]]
[Wed, 20 Jul 2011 22:29:38 -0400] INFO: Run List expands to [WebLogic::install_1              0.3.5, coherence]
[Wed, 20 Jul 2011 22:29:38 -0400] INFO: Starting Chef Run for demo.example.net2
[Wed, 20 Jul 2011 22:29:40 -0400] INFO: Loading cookbooks [WebLogic, coherence]
[Wed, 20 Jul 2011 22:29:41 -0400] INFO: Storing updated cookbooks/coherence/reci              pes/install_3.7.0.rb in the cache.
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: Storing updated cookbooks/WebLogic/recip              es/install_10.3.5.rb in the cache.
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: Processing execute[download_coherence] a              ction run (WebLogic::install_10.3.5 line 9)
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: Processing directory[/root/weblogic] act              ion create (WebLogic::install_10.3.5 line 15)
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: directory[/root/weblogic] created direct              ory /root/weblogic
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: directory[/root/weblogic] owner changed               to 0
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: directory[/root/weblogic] group changed               to 0
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: directory[/root/weblogic] mode changed t              o 755
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: Processing execute[unzip_weblogic.zip] a              ction run (WebLogic::install_10.3.5 line 22)
[Wed, 20 Jul 2011 22:29:42 -0400] INFO: execute[unzip_weblogic.zip] sh(unzip -o               /home/s3sync/weblogic.zip -e /root/weblogic)
[Wed, 20 Jul 2011 22:29:42 -0400] ERROR: execute[unzip_weblogic.zip] (WebLogic::              install_10.3.5 line 22) has had an error
[Wed, 20 Jul 2011 22:29:42 -0400] ERROR: Running exception handlers
[Wed, 20 Jul 2011 22:29:42 -0400] FATAL: Saving node information to /var/chef/ca              che/failed-run-data.json
[Wed, 20 Jul 2011 22:29:42 -0400] ERROR: Exception handlers complete
[Wed, 20 Jul 2011 22:29:42 -0400] FATAL: Stacktrace dumped to /var/chef/cache/ch              ef-stacktrace.out
[Wed, 20 Jul 2011 22:29:42 -0400] FATAL: Chef::Exceptions::ShellCommandFailed: e              xecute[unzip_weblogic.zip] (WebLogic::install_10.3.5 line 22) had an error: Expe              cted process to exit 0, but it exited with 11
---- Begin output of unzip -o /home/s3sync/weblogic.zip -e /root/weblogic ----
STDOUT: Archive:  /home/s3sync/weblogic.zip
STDERR: caution: filename not matched:  -e
caution: filename not matched:  /root/weblogic
---- End output of unzip -o /home/s3sync/weblogic.zip -e /root/weblogic ----
Ran unzip -o /home/s3sync/weblogic.zip -e /root/weblogic returned 11
[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]# ;s
-bash: syntax error near unexpected token `;'
[root@ip-10-150-183-203 ~]# ls
aws  chef-client.log  chef-repo  weblogic
[root@ip-10-150-183-203 ~]# unzip -o /home/s3sync/weblogic.zip -e /root/weblogic
Archive:  /home/s3sync/weblogic.zip
caution: filename not matched:  -e
caution: filename not matched:  /root/weblogic
[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]# unzip
UnZip 5.52 of 28 February 2005, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
  Default action is to extract files in list, except those in xlist, to exdir;
  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment
  -x  exclude files that follow (in xlist)   -d  extract files into exdir

modifiers:                                   -q  quiet mode (-qq => quieter)
  -n  never overwrite existing files         -a  auto-convert any text files
  -o  overwrite files WITHOUT prompting      -aa treat ALL files as text
  -j  junk paths (do not make directories)   -v  be verbose/print version info
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
Examples (see unzip.txt for more info):
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]#


unzipコマンドのオプションを間違えました。-dであるべき
 [root@ip-10-150-183-203 recipes]# cat install_10.3.5.rb
#
# Cookbook Name:: WebLogic
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
execute "download_coherence" do
  command "s3cmd get 1-1-16-1019:wls1035_dev_linux_x86.zip weblogic.zip"
  creates "/home/s3sync/weblogic.zip"
  action :run
end

directory "/root/weblogic" do
  owner "root"
  group "root"
  mode "0755"
  action :create
end

execute "unzip_weblogic.zip" do
  command "unzip -o /home/s3sync/weblogic.zip -d /root/weblogic"
  action :run
end

[root@ip-10-150-183-203 recipes]# knife cookbook upload WebLogic
Uploading WebLogic             [0.0.1]
upload complete
[root@ip-10-150-183-203 recipes]#


[root@ip-10-150-183-203 recipes]# chef-client | tee chef-client.log
[Wed, 20 Jul 2011 22:34:52 -0400] INFO: *** Chef 0.10.2 ***
[Wed, 20 Jul 2011 22:34:53 -0400] INFO: Run List is [recipe[WebLogic::install_10.3.5], recipe[coherence]]
[Wed, 20 Jul 2011 22:34:53 -0400] INFO: Run List expands to [WebLogic::install_10.3.5, coherence]
[Wed, 20 Jul 2011 22:34:53 -0400] INFO: Starting Chef Run for demo.example.net2
[Wed, 20 Jul 2011 22:34:55 -0400] INFO: Loading cookbooks [WebLogic, coherence]
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: Storing updated cookbooks/WebLogic/recipes/install_10.3.5.rb in the cache.
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: Processing execute[download_coherence] action run (WebLogic::install_10.3.5 line 9)
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: Processing directory[/root/weblogic] action create (WebLogic::install_10.3.5 line 15)
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: directory[/root/weblogic] created directory /root/weblogic
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: directory[/root/weblogic] owner changed to 0
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: directory[/root/weblogic] group changed to 0
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: directory[/root/weblogic] mode changed to 755
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: Processing execute[unzip_weblogic.zip] action run (WebLogic::install_10.3.5 line 22)
[Wed, 20 Jul 2011 22:34:56 -0400] INFO: execute[unzip_weblogic.zip] sh(unzip -o /home/s3sync/weblogic.zip -d /root/weblogic)
[Wed, 20 Jul 2011 22:35:19 -0400] INFO: execute[unzip_weblogic.zip] ran successfully
[Wed, 20 Jul 2011 22:35:23 -0400] INFO: Chef Run complete in 29.90074 seconds
[Wed, 20 Jul 2011 22:35:23 -0400] INFO: Running report handlers
[Wed, 20 Jul 2011 22:35:23 -0400] INFO: Report handlers complete
[root@ip-10-150-183-203 recipes]#

あーーー、coherenceで適用されたのがdefault.rbだ。
install_3.7.0レシピをrun_listに変更しないと。
weblogicはうまくいったようだ。ただ、recipeの名前がdownload_coherenceのままだ。


今までnodeのrun_listにrecipeを直接指定していたが、roleを作成してroleを指定するようにする。
[root@ip-10-150-183-203 recipes]# knife role create coherenceWeb
Created role[coherenceWeb]
[root@ip-10-150-183-203 recipes]# knife role show coherenceWeb
chef_type:            role
default_attributes:
description:
env_run_lists:
json_class:           Chef::Role
name:                 coherenceWeb
override_attributes:
run_list:             recipe[coherence::install_3.7.0], recipe[WebLogic::install_10.3.5]
[root@ip-10-150-183-203 recipes]#


[root@ip-10-150-183-203 recipes]# knife node run_list add demo.example.net2 role[coherenceWeb]
run_list:  role[coherenceWeb]







[root@ip-10-150-183-203 ~]# chef-client | tee chef-client.log
[Wed, 20 Jul 2011 23:00:00 -0400] INFO: *** Chef 0.10.2 ***
[Wed, 20 Jul 2011 23:00:04 -0400] INFO: Run List is [role[coherenceWeb]]
[Wed, 20 Jul 2011 23:00:04 -0400] INFO: Run List expands to [coherence::install_3.7.0, WebLogic::install_10.3.5]
[Wed, 20 Jul 2011 23:00:04 -0400] INFO: Starting Chef Run for demo.example.net2
[Wed, 20 Jul 2011 23:00:07 -0400] INFO: Loading cookbooks [WebLogic, coherence]
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: Storing updated cookbooks/WebLogic/recipes/install_10.3.5.rb in the cache.
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: Processing execute[download_coherence] action run (coherence::install_3.7.0 line 10)
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: Processing directory[/root/coherence] action create (coherence::install_3.7.0 line 16)
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: directory[/root/coherence] created directory /root/coherence
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: directory[/root/coherence] owner changed to 0
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: directory[/root/coherence] group changed to 0
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: directory[/root/coherence] mode changed to 755
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: Processing execute[unzip_coherence.zip] action run (coherence::install_3.7.0 line 23)
[Wed, 20 Jul 2011 23:00:08 -0400] INFO: execute[unzip_coherence.zip] sh(unzip -o /home/s3sync/coherence.zip -d /root/coherence)
[Wed, 20 Jul 2011 23:00:11 -0400] INFO: execute[unzip_coherence.zip] ran successfully
[Wed, 20 Jul 2011 23:00:11 -0400] INFO: Processing execute[download install zip file] action run (WebLogic::install_10.3.5 line 9)
[Wed, 20 Jul 2011 23:00:11 -0400] INFO: Processing directory[/root/weblogic] action create (WebLogic::install_10.3.5 line 15)
[Wed, 20 Jul 2011 23:00:11 -0400] INFO: Processing execute[unzip_weblogic.zip] action run (WebLogic::install_10.3.5 line 22)
[Wed, 20 Jul 2011 23:00:11 -0400] INFO: execute[unzip_weblogic.zip] sh(unzip -o /home/s3sync/weblogic.zip -d /root/weblogic)
[Wed, 20 Jul 2011 23:01:08 -0400] INFO: execute[unzip_weblogic.zip] ran successfully
[Wed, 20 Jul 2011 23:01:11 -0400] INFO: Chef Run complete in 66.688934 seconds
[Wed, 20 Jul 2011 23:01:11 -0400] INFO: Running report handlers
[Wed, 20 Jul 2011 23:01:11 -0400] INFO: Report handlers complete
[root@ip-10-150-183-203 ~]# ls
aws  chef-client.log  chef-repo  coherence  weblogic
[root@ip-10-150-183-203 ~]# ls coherence/
README.txt  coherence
[root@ip-10-150-183-203 ~]# ls weblogic/
README.txt     configure.sh   domain-registry.xml  registry.template  wlserver
configure.cmd  configure.xml  modules              utils
[root@ip-10-150-183-203 ~]#


うまくいった!


もういっかいchef runするとどうかなるか試す。
[root@ip-10-150-183-203 ~]# chef-client | tee chef-client.log
[Wed, 20 Jul 2011 23:03:53 -0400] INFO: *** Chef 0.10.2 ***
[Wed, 20 Jul 2011 23:03:57 -0400] INFO: Run List is [role[coherenceWeb]]
[Wed, 20 Jul 2011 23:03:57 -0400] INFO: Run List expands to [coherence::install_3.7.0, WebLogic::install_10.3.5]
[Wed, 20 Jul 2011 23:03:57 -0400] INFO: Starting Chef Run for demo.example.net2
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: Loading cookbooks [WebLogic, coherence]
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: Processing execute[download_coherence] action run (coherence::install_3.7.0 line 10)
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: Processing directory[/root/coherence] action create (coherence::install_3.7.0 line 16)
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: Processing execute[unzip_coherence.zip] action run (coherence::install_3.7.0 line 23)
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: Processing execute[download install zip file] action run (WebLogic::install_10.3.5 line 9)
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: Processing directory[/root/weblogic] action create (WebLogic::install_10.3.5 line 15)
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: Processing execute[unzip_weblogic.zip] action run (WebLogic::install_10.3.5 line 22)
[Wed, 20 Jul 2011 23:03:58 -0400] INFO: execute[unzip_weblogic.zip] sh(unzip -o /home/s3sync/weblogic.zip -d /root/weblogic)
[Wed, 20 Jul 2011 23:04:18 -0400] INFO: execute[unzip_weblogic.zip] ran successfully
[Wed, 20 Jul 2011 23:04:20 -0400] INFO: Chef Run complete in 22.964632 seconds
[Wed, 20 Jul 2011 23:04:20 -0400] INFO: Running report handlers
[Wed, 20 Jul 2011 23:04:20 -0400] INFO: Report handlers complete

既にあるファイルがスキップされたとは書いていないが、実行時間が1/3になっている。

coherence cookbookの作成②

今回やること
・cookbookの名前変更
・recipeはdefault.rbを使用していたがインストール専用のrecipeを作成する。
・既にcoherenceがインストールされている場合に、chef runしたときに再度インストールしないようにする。

cookbookの名前変更


[root@ip-10-150-183-203 cookbooks]# ls
README.md  WebLogic  coherence_inst_1
[root@ip-10-150-183-203 cookbooks]# mv coherence_inst_1 coherence
[root@ip-10-150-183-203 cookbooks]#
[root@ip-10-150-183-203 cookbooks]# cd coherence/
[root@ip-10-150-183-203 coherence]# ls
README.rdoc  definitions  libraries    providers  resources
attributes   files        metadata.rb  recipes    templates
[root@ip-10-150-183-203 coherence]# cd ..
[root@ip-10-150-183-203 cookbooks]# knife cookbook upload coherence
Uploading coherence             [0.0.1]
upload complete
[root@ip-10-150-183-203 cookbooks]# knife node list
  demo.example.net2
  ip-10-146-7-97.ap-northeast-1.compute.internal
[root@ip-10-150-183-203 cookbooks]# knife node show demo.example.net2
Node Name:   demo.example.net2
Environment: _default
FQDN:       
IP:         
Run List:    recipe[coherence_inst_1], recipe[WebLogic::install_10.3.5]
Roles:
Recipes      coherence_inst_1
Platform:    centos 5.5
[root@ip-10-150-183-203 cookbooks]#

[root@ip-10-150-183-203 cookbooks]# knife node run_list remove demo.example.net2 recipe[coherence_inst_1]
run_list:  recipe[WebLogic::install_10.3.5]
[root@ip-10-150-183-203 cookbooks]#
[root@ip-10-150-183-203 cookbooks]# knife node run_list add demo.example.net2 recipe[coherence]
run_list:
    recipe[WebLogic::install_10.3.5]
    recipe[coherence]
[root@ip-10-150-183-203 cookbooks]#



recipeはdefault.rbを使用していたがインストール専用のrecipeを作成する。

[root@ip-10-150-183-203 cookbooks]# ls
README.md  WebLogic  coherence
[root@ip-10-150-183-203 cookbooks]# cd coherence/
[root@ip-10-150-183-203 coherence]# ls
README.rdoc  definitions  libraries    providers  resources
attributes   files        metadata.rb  recipes    templates
[root@ip-10-150-183-203 coherence]# cd recipes/
[root@ip-10-150-183-203 recipes]# ls
default.rb
[root@ip-10-150-183-203 recipes]# cp default.rb install_3.7.0.rb
[root@ip-10-150-183-203 recipes]# ls
default.rb  install_3.7.0.rb
[root@ip-10-150-183-203 recipes]# vi default.rb
[root@ip-10-150-183-203 recipes]# cat default.rb
#
# Cookbook Name:: coherence_inst_1
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#


[root@ip-10-150-183-203 recipes]# cat install_3.7.0.rb
#
# Cookbook Name:: coherence_inst_1
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#

execute "download_coherence" do
  command "s3cmd get 1-1-16-1019:coherence-java-3.7.0.0b23397.zip coherence.zip"
  creates "/home/s3sync/coherence.zip"
  action :run
end

execute "unzip_coherence.zip" do
  command "unzip /home/s3sync/coherence.zip"
  cwd "/root"
  action :run
end

[root@ip-10-150-183-203 recipes]#


既にcoherenceがインストールされている場合に、chef runしたときに再度インストールしないようにする。
下のように、executeリソースのcreatesに、ファイルを指定した場合、そのファイルが存在すれば、executeがスキップされる仕組みを利用する。

[root@ip-10-150-183-203 recipes]# vi default.rb
[root@ip-10-150-183-203 recipes]# cat default.rb
#
# Cookbook Name:: coherence_inst_1
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#


[root@ip-10-150-183-203 recipes]# cat install_3.7.0.rb
#
# Cookbook Name:: coherence_inst_1
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#

execute "download_coherence" do
  command "s3cmd get 1-1-16-1019:coherence-java-3.7.0.0b23397.zip coherence.zip"
  creates "/home/s3sync/coherence.zip"
  action :run
end

execute "unzip_coherence.zip" do
  command "unzip /home/s3sync/coherence.zip"
  cwd "/root"
  action :run
end



最後にuploadするのを忘れずに。
[root@ip-10-150-183-203 recipes]# knife cookbook upload coherence
Uploading coherence             [0.0.1]
upload complete

weblogic cookbookの作成

[root@ip-10-150-183-203 ~]# ls
README.txt  aws  chef-repo  coherence
[root@ip-10-150-183-203 ~]# cd chef-repo/
[root@ip-10-150-183-203 chef-repo]# ls
README.md  certificates  config     data_bags     roles
Rakefile   chefignore    cookbooks  environments
[root@ip-10-150-183-203 chef-repo]# cd cookbooks/
[root@ip-10-150-183-203 cookbooks]# ls
README.md  coherence_inst_1
[root@ip-10-150-183-203 cookbooks]# cd coherence_inst_1/
[root@ip-10-150-183-203 coherence_inst_1]# ls
README.rdoc  definitions  libraries    providers  resources
attributes   files        metadata.rb  recipes    templates
[root@ip-10-150-183-203 coherence_inst_1]# cd files/
[root@ip-10-150-183-203 files]# ls
default
[root@ip-10-150-183-203 files]#
[root@ip-10-150-183-203 files]#
[root@ip-10-150-183-203 files]#
[root@ip-10-150-183-203 files]# pwd
/root/chef-repo/cookbooks/coherence_inst_1/files
[root@ip-10-150-183-203 files]# cd ..
[root@ip-10-150-183-203 coherence_inst_1]# cd ..
[root@ip-10-150-183-203 cookbooks]# dir
README.md  coherence_inst_1
[root@ip-10-150-183-203 cookbooks]# knife cookbook
FATAL: Cannot find sub command for: 'cookbook'
Available cookbook subcommands: (for details, knife SUB-COMMAND --help)

** COOKBOOK COMMANDS **
knife cookbook metadata COOKBOOK (options)
knife cookbook list (options)
knife cookbook create COOKBOOK (options)
knife cookbook bulk delete REGEX (options)
knife cookbook test [COOKBOOKS...] (options)
knife cookbook show COOKBOOK [VERSION] [PART] [FILENAME] (options)
knife cookbook download COOKBOOK [VERSION] (options)
knife cookbook upload [COOKBOOKS...] (options)
knife cookbook delete COOKBOOK VERSION (options)
knife cookbook metadata from FILE (options)

[root@ip-10-150-183-203 cookbooks]# knife cookbook create WebLogic
** Creating cookbook WebLogic
** Creating README for cookbook: WebLogic
** Creating metadata for cookbook: WebLogic
[root@ip-10-150-183-203 cookbooks]#
[root@ip-10-150-183-203 cookbooks]# ls
README.md  WebLogic  coherence_inst_1
[root@ip-10-150-183-203 cookbooks]# cd WebLogic/
[root@ip-10-150-183-203 WebLogic]# ls
README.rdoc  definitions  libraries    providers  resources
attributes   files        metadata.rb  recipes    templates
[root@ip-10-150-183-203 WebLogic]#
[root@ip-10-150-183-203 WebLogic]# cd recipes/
[root@ip-10-150-183-203 recipes]# ls
default.rb
[root@ip-10-150-183-203 recipes]# cp default.rb install_10.3.5.rb
[root@ip-10-150-183-203 recipes]# ls
default.rb  install_10.3.5.rb
[root@ip-10-150-183-203 recipes]# vi install_10.3.5.rb
[root@ip-10-150-183-203 recipes]# vi install_10.3.5.rb
[root@ip-10-150-183-203 recipes]#
[root@ip-10-150-183-203 recipes]# ls
default.rb  install_10.3.5.rb
[root@ip-10-150-183-203 recipes]# cat install_10.3.5.rb
#
# Cookbook Name:: WebLogic
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
execute "download_coherence" do
  command "s3cmd get 1-1-16-1019:wls1035_dev_linux_x86.zip weblogic.zip"
  creates "/home/s3sync/weblogic.zip"
  action :run
end

execute "unzip_weblogic.zip" do
  command "unzip /home/s3sync/weblogic.zip"
  cwd "/root"
  action :run
end


[root@ip-10-150-183-203 recipes]# knife cookbook upload WebLogic
Uploading WebLogic             [0.0.1]
upload complete
[root@ip-10-150-183-203 recipes]#


run listに追加する

[root@ip-10-150-183-203 recipes]# knife node run_list add  demo.example.net2 recipe[WebLogic:: install_10.3.5]
run_list:
    recipe[coherence_inst_1]
    recipe[recipe[WebLogic::]
[root@ip-10-150-183-203 recipes]# knife node run_list add  demo.example.net2 recipe[WebLogic::install_10.3.5]
run_list:
    recipe[coherence_inst_1]
    recipe[recipe[WebLogic::]
    recipe[WebLogic::install_10.3.5]
[root@ip-10-150-183-203 recipes]#
[root@ip-10-150-183-203 recipes]# knife node run_list remove  demo.example.net2 recipe[WebLogic::]
run_list:
    recipe[coherence_inst_1]
    recipe[recipe[WebLogic::]
    recipe[WebLogic::install_10.3.5]
[root@ip-10-150-183-203 recipes]# knife node run_list remove  demo.example.net2 recipe[WebLogic:: ]
run_list:
    recipe[coherence_inst_1]
    recipe[recipe[WebLogic::]
    recipe[WebLogic::install_10.3.5]
[root@ip-10-150-183-203 recipes]# knife node run_list remove  demo.example.net2 recipe[recipe[WebLogic::]
run_list:
    recipe[coherence_inst_1]
    recipe[WebLogic::install_10.3.5]
[root@ip-10-150-183-203 recipes]#

chef概念整理

・cookbookの単位は、基本的に製品やモジュールごと。たとえばmysql、ntpなど。
・cookbookの中にrecipeを作成する。mysqlという大きい括りの中で設定を分けるには、run listで指定するrecipeを使い分ける。
・次のようなrecipe構成の場合、run listへの指定としてrecipe[apache2::mod_ssl]とやると、mod_ssl.rbが使われる。ただのrecipe[apache2]だと、default.rbが使われる。
cookbooks/
cookbooks/apache2/
cookbooks/apache2/recipes/
cookbooks/apache2/recipes/default.rb
cookbooks/apache2/recipes/mod_ssl.rb
 

・nodeのrun listにrecipeを指定することも、cookbookを指定することも可能。
% knife node run list add NODENAME "recipe[apache2]"

・roleにはrecipeを指定する。

・recipeの中では変数を用いて、databagの文字列を入れることができる。


・attributeはnodeごとに異なる環境情報。たとえばip-address, hostnameなど。
・attributeはcookbook , environment, role, nodeに対して設定できる。

・cookbook_fileをcookbookに入れてアップすれば、そのファイルを展開に利用できる。ファイルにはアクセス権など設定できる。
・cookbook/filesのディレクトリに入れる。filesディレクトリの下にOSタイプのサブディレクトリを作成すれば、OSごとにファイル展開場所を分けられる。
・展開ファイルに変更させたい文字列がある場合、filesではなくtemplateを使用する。fileは全てのnodeに対して同じファイル内容を展開するときに使う。

tmplate
http://wiki.opscode.com/display/chef/Templates
・templateはfileと同じようにOSごとに配布場所を変更するには、templateディレクトリの下にOSディレクトリを作成する。
・templateの拡張子は.erb

2011年7月20日水曜日

coherence cookbookの作成

参考
http://wiki.opscode.com/display/chef/Cookbooks

[root@ip-10-150-183-203 s3sync]# cd ~
[root@ip-10-150-183-203 ~]# ls
aws  chef-repo
[root@ip-10-150-183-203 ~]# cd chef-repo/
[root@ip-10-150-183-203 chef-repo]# ls
README.md  certificates  config     data_bags     roles
Rakefile   chefignore    cookbooks  environments
[root@ip-10-150-183-203 chef-repo]# knife cookbook create coherence_inst_1
** Creating cookbook coherence_inst_1
** Creating README for cookbook: coherence_inst_1
** Creating metadata for cookbook: coherence_inst_1
[root@ip-10-150-183-203 chef-repo]# ls
README.md  certificates  config     data_bags     roles
Rakefile   chefignore    cookbooks  environments
[root@ip-10-150-183-203 chef-repo]# cd cookbooks/
[root@ip-10-150-183-203 cookbooks]# ls
README.md  coherence_inst_1
[root@ip-10-150-183-203 cookbooks]# cd coherence_inst_1/
[root@ip-10-150-183-203 coherence_inst_1]# ls
README.rdoc  definitions  libraries    providers  resources
attributes   files        metadata.rb  recipes    templates
[root@ip-10-150-183-203 coherence_inst_1]#



[root@ip-10-150-183-203 cookbooks]# ls
README.md  coherence_inst_1
[root@ip-10-150-183-203 cookbooks]# cd coherence_inst_1/
[root@ip-10-150-183-203 coherence_inst_1]# ls
README.rdoc  definitions  libraries    providers  resources
attributes   files        metadata.rb  recipes    templates
[root@ip-10-150-183-203 coherence_inst_1]# cd recipes/
[root@ip-10-150-183-203 recipes]# ls
default.rb
[root@ip-10-150-183-203 recipes]#


[root@ip-10-150-183-203 cookbooks]# knife cookbook upload coherence_inst_1
Uploading coherence_inst_1             [0.0.1]
upload complete
[root@ip-10-150-183-203 cookbooks]#


[root@ip-10-150-183-203 recipes]# knife cookbook list
chef-client        0.99.5
coherence_inst_1   0.0.1


[root@ip-10-150-183-203 recipes]# knife node list
  demo.example.net2
  ip-10-146-7-97.ap-northeast-1.compute.internal
[root@ip-10-150-183-203 recipes]# knife node run_list add  demo.example.net2 coherence_install_1
run_list:  recipe[coherence_install_1]
[root@ip-10-150-183-203 recipes]#


[root@ip-10-150-183-203 recipes]# knife node show demo.example.net2
Node Name:   demo.example.net2
Environment: _default
FQDN:        ip-10-150-183-203.ap-northeast-1.compute.internal
IP:          10.150.183.203
Run List:    recipe[coherence_install_1]
Roles:
Recipes
Platform:    centos 5.5


[root@ip-10-150-183-203 recipes]# chef-client
[Wed, 20 Jul 2011 07:44:52 -0400] INFO: *** Chef 0.10.2 ***
[Wed, 20 Jul 2011 07:44:53 -0400] INFO: Run List is [recipe[coherence_install_1]]
[Wed, 20 Jul 2011 07:44:53 -0400] INFO: Run List expands to [coherence_install_1]
[Wed, 20 Jul 2011 07:44:53 -0400] INFO: Starting Chef Run for demo.example.net2
[Wed, 20 Jul 2011 07:44:54 -0400] INFO: HTTP Request Returned 412 Precondition Failed: {"non_existent_cookbooks":["coherence_install_1"],"cookbooks_with_no_versions":[],"message":"Run list contains invalid items: no such cookbook coherence_install_1."}
[Wed, 20 Jul 2011 07:44:54 -0400] ERROR: Running exception handlers
[Wed, 20 Jul 2011 07:44:54 -0400] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[Wed, 20 Jul 2011 07:44:54 -0400] ERROR: Exception handlers complete
[Wed, 20 Jul 2011 07:44:54 -0400] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[Wed, 20 Jul 2011 07:44:54 -0400] FATAL: Net::HTTPServerException: 412 "Precondition Failed"
[root@ip-10-150-183-203 recipes]#




[root@ip-10-150-183-203 recipes]# knife node run_list remove  demo.example.net2 coherence_install_1
run_list:  recipe[coherence_install_1]
[root@ip-10-150-183-203 recipes]# knife node run_list add  demo.example.net2 coherence_inst_1
run_list:
    recipe[coherence_install_1]
    recipe[coherence_inst_1]
[root@ip-10-150-183-203 recipes]#
[root@ip-10-150-183-203 recipes]# knife node show demo.example.net2
Node Name:   demo.example.net2
Environment: _default
FQDN:        ip-10-150-183-203.ap-northeast-1.compute.internal
IP:          10.150.183.203
Run List:    recipe[coherence_install_1], recipe[coherence_inst_1]
Roles:
Recipes
Platform:    centos 5.5
[root@ip-10-150-183-203 recipes]# knife node run_list remove  demo.example.net2 coherence_install_1
run_list:
    recipe[coherence_install_1]
    recipe[coherence_inst_1]
[root@ip-10-150-183-203 recipes]# knife node run_list remove  demo.example.net2 coherence_inst_1
run_list:
    recipe[coherence_install_1]
    recipe[coherence_inst_1]
[root@ip-10-150-183-203 recipes]# knife node run_list remove  demo.example.net2
run_list:
    recipe[coherence_install_1]
    recipe[coherence_inst_1]
[root@ip-10-150-183-203 recipes]# knife node run_list remove demo.example.net
ERROR: The object you are looking for could not be found
Response: Cannot load node demo.example.net
[root@ip-10-150-183-203 recipes]# knife node run_list remove demo.example.net2  recipe[coherence_install_1]

run_list:  recipe[coherence_inst_1]
[root@ip-10-150-183-203 recipes]#




[root@ip-10-150-183-203 recipes]# chef-client
[Wed, 20 Jul 2011 07:55:44 -0400] INFO: *** Chef 0.10.2 ***
[Wed, 20 Jul 2011 07:55:46 -0400] INFO: Run List is [recipe[coherence_inst_1]]
[Wed, 20 Jul 2011 07:55:46 -0400] INFO: Run List expands to [coherence_inst_1]
[Wed, 20 Jul 2011 07:55:46 -0400] INFO: Starting Chef Run for demo.example.net2
[Wed, 20 Jul 2011 07:55:47 -0400] INFO: Loading cookbooks [coherence_inst_1]
[Wed, 20 Jul 2011 07:55:47 -0400] INFO: Processing execute[download_coherence] action run (coherence_inst_1
::default line 10)
[Wed, 20 Jul 2011 07:55:47 -0400] INFO: execute[download_coherence] sh(s3cmd get 1-1-16-1019:coherence-java
-3.7.0.0b23397.zip coherence.zip)
[Wed, 20 Jul 2011 07:55:48 -0400] INFO: execute[download_coherence] ran successfully
[Wed, 20 Jul 2011 07:55:48 -0400] INFO: Processing execute[unzip_coherence.zip] action run (coherence_inst_
1::default line 16)
[Wed, 20 Jul 2011 07:55:48 -0400] INFO: execute[unzip_coherence.zip] sh(unzip /home/s3sync/coherence.zip)
[Wed, 20 Jul 2011 07:55:49 -0400] INFO: execute[unzip_coherence.zip] ran successfully
[Wed, 20 Jul 2011 07:55:50 -0400] INFO: Chef Run complete in 4.597066 seconds
[Wed, 20 Jul 2011 07:55:50 -0400] INFO: Running report handlers
[Wed, 20 Jul 2011 07:55:50 -0400] INFO: Report handlers complete


[root@ip-10-150-183-203 s3sync]# cd /root
[root@ip-10-150-183-203 ~]# ls
README.txt  aws  chef-repo  coherence
[root@ip-10-150-183-203 ~]# cd coherence/
[root@ip-10-150-183-203 coherence]# ls
bin  doc  lib  product.xml
[root@ip-10-150-183-203 coherence]# ls -ltr
total 16
-rw-r--r-- 1 root root  100 Apr  6 12:31 product.xml
drwxr-xr-x 3 root root 4096 Jul 20 07:55 doc
drwxr-xr-x 2 root root 4096 Jul 20 07:55 bin
drwxr-xr-x 3 root root 4096 Jul 20 07:55 lib
[root@ip-10-150-183-203 coherence]#


OK!

s3のファイルをダウンロードする方法

s3cmd.rbというrubyツールが入っている。のでこれを使う方法。


[root@ip-10-150-183-203 s3sync]# mkdir /etc/s3conf
[root@ip-10-150-183-203 s3sync]# cp -p s3config.yml.example /etc/s3conf/s3config.yml
[root@ip-10-150-183-203 s3sync]# pwd
/home/s3sync

[root@ip-10-150-183-203 s3sync]# vi /etc/s3conf/s3config.yml
aws_access_key_id: 11111111111111111111111
aws_secret_access_key: 222222222222222222222
ssl_cert_dir: /home/user/s3sync/certs





[root@ip-10-150-183-203 s3sync]# s3cmd list
Need a bucket
s3cmd [options] <command> [arg(s)]              version 1.2.6
  --help    -h        --verbose     -v     --dryrun    -n
  --ssl     -s        --debug       -d     --progress
  --expires-in=( <# of seconds> | [#d|#h|#m|#s] )

Commands:
s3cmd  listbuckets  [headers]
s3cmd  createbucket  <bucket>  [constraint (i.e. EU)]
s3cmd  deletebucket  <bucket>  [headers]
s3cmd  list  <bucket>[:prefix]  [max/page]  [delimiter]  [headers]
s3cmd  location  <bucket> [headers]
s3cmd  delete  <bucket>:key  [headers]
s3cmd  deleteall  <bucket>[:prefix]  [headers]
s3cmd  get|put  <bucket>:key  <file>  [headers]
[root@ip-10-150-183-203 s3sync]# s3cmd listbuckets
1-1-16


[root@ip-10-150-183-203 ~]# s3cmd get 1-1-16-1019:coherence-java-3.7.0.0b23397.zip coherence.zip
Permanent redirect received. Try setting AWS_CALLING_FORMAT to SUBDOMAIN
[root@ip-10-150-183-203 ~]#


[root@ip-10-150-183-203 ~]# export AWS_CALLING_FORMAT="SUBDOMAIN"
[root@ip-10-150-183-203 ~]# pwd
/root

[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]#  s3cmd get 1-1-16-1019:coherence-java-3.7.0.0b23397.zip coherence.zip
[root@ip-10-150-183-203 ~]# ls
aws  chef-repo
[root@ip-10-150-183-203 ~]# cd /home/s3sync/
[root@ip-10-150-183-203 s3sync]# ls -ltr
total 24536
-rwxrwxrwx 1 root root     7603 Mar 12  2008 thread_generator.rb
-rwxrwxrwx 1 root root      129 Mar 12  2008 s3config.yml.example
-rwxrwxrwx 1 root root     1002 Mar 12  2008 s3config.rb
-rwxrwxrwx 1 root root     1849 Mar 12  2008 S3encoder.rb
-rwxrwxrwx 1 root root     5699 Mar 12  2008 S3_s3sync_mod.rb
-rwxrwxrwx 1 root root    22263 Mar 12  2008 S3.rb
-rwxrwxrwx 1 root root     5275 Mar 12  2008 README_s3cmd.txt
-rwxrwxrwx 1 root root     3591 Jun 16  2008 HTTPStreaming.rb
-rwxrwxrwx 1 root root     7103 Jun 16  2008 s3try.rb
-rwxrwxrwx 1 root root    15968 Jun 16  2008 README.txt
-rwxrwxrwx 1 root root    28294 Aug 28  2009 s3sync.rb
-rwxrwxrwx 1 root root     9988 Aug 28  2009 s3cmd.rb
-rw-r--r-- 1 root root 12476831 Jul 20 06:50 coherence-jaav-3.7.0.0b23397.zip
-rw-r--r-- 1 root root 12476831 Jul 20 06:53 coherence.zip
[root@ip-10-150-183-203 s3sync]#

s3からダウンロードできた!



あるいは
/etc/s3conf/s3config.yml

AWS_CALLING_FORMAT: SUBDOMAIN
とやってもよい。

2011年7月19日火曜日

ec2作成by chef リトライ

今度はi386のcentosのイメージで再度リトライしてみる。

knife ec2 server create -N "demo.example.net2" -I ami-2006ad21 -f t1.micro --region ap-northeast-1 --ssh-key nobubu3 --identity-file /tmp/nobubu3.pem --groups quick-start-1 --ssh-user root --server-url "https://api.opscode.com/organizations/nobu" -d centos5-gems

。。。。

ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com Successfully installed uuidtools-2.1.2
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com Successfully installed chef-0.10.2
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com 14 gems installed
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:37:34 -0400] INFO: *** Chef 0.10.2 ***
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:37:54 -0400] INFO: Client key /etc/chef/client.pem is not present - registering
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:37:55 -0400] INFO: HTTP Request Returned 409 Conflict: Client already exists.
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:37:58 -0400] INFO: HTTP Request Returned 404 Not Found: Cannot load node demo.example.net2
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:03 -0400] INFO: Setting the run_list to [] from JSON
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:03 -0400] INFO: Run List is []
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:03 -0400] INFO: Run List expands to []
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:03 -0400] INFO: Starting Chef Run for demo.example.net2
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:05 -0400] INFO: Loading cookbooks []
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:05 -0400] WARN: Node demo.example.net2 has an empty run list.
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:06 -0400] INFO: Chef Run complete in 3.446312 seconds
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:06 -0400] INFO: Running report handlers
ec2-46-51-236-93.ap-northeast-1.compute.amazonaws.com [Mon, 18 Jul 2011 12:38:06 -0400] INFO: Report handlers complete

Instance ID: i-9a410c9b
Flavor: t1.micro
Image: ami-2006ad21
Availability Zone: ap-northeast-1b
Security Groups:
Public DNS Name: xxxxxxxxxxx
Public IP Address: xxxxxxxxxxxxxxx
Private DNS Name:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SSH Key: xxxx
Private IP Address: xxxxx
Root Device Type: ebs
Root Volume ID: vol-7c1d9216
Root Device Name: /dev/sda1
Root Device Delete on Terminate: true
Environment: _default
Run List:
[ec2-user@ip-10-150-174-103 chef-repo]$

chefクライアントが登録されています!

ec2ワークステーションから確認。
[ec2-user@ip-10-150-174-103 chef-repo]$ knife node list
  demo.example.net2
  ip-10-146-7-97.ap-northeast-1.compute.internal


*** ec2 server createによってインストールされたものの確認 ***

以下のようにchefとknifeはインストールされています。

[root@ip-10-150-183-203 ~]# chef-client -v
Chef: 0.10.2
[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]# knife
ERROR: You need to pass a sub-command (e.g., knife SUB-COMMAND)

knife環境はセットアップが必要なよう。
[root@ip-10-150-183-203 ~]# knife node list
WARNING: No knife configuration file found
ERROR: ArgumentError: Cannot sign the request without a client name, check that :node_name is assigned

gitがec2 server createでインストールされたのかは不明だが、入っています。
[root@ip-10-150-183-203 ~]# git --version
git version 1.5.5.6







gitリポジトリを落としてみます。
[root@ip-10-150-183-203 ~]# cd ~
[root@ip-10-150-183-203 ~]# git clone http://github.com/opscode/chef-repo.git
Initialized empty Git repository in /root/chef-repo/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
[root@ip-10-150-183-203 ~]#  git-update-server-info
fatal: Not a git repository
[root@ip-10-150-183-203 ~]# git update-server-info
fatal: Not a git repository
[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]# ls
[root@ip-10-150-183-203 ~]# pwd
/root
[root@ip-10-150-183-203 ~]# mkdir chef-repo
[root@ip-10-150-183-203 ~]# git clone http://github.com/opscode/chef-repo.git
destination directory 'chef-repo' already exists.
[root@ip-10-150-183-203 ~]# rmdir chef-repo
[root@ip-10-150-183-203 ~]#
[root@ip-10-150-183-203 ~]#


gitバージョンアップしてみる

[root@ip-10-150-183-203 ~]# yum upgrade git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.netrino.co.uk
 * base: www.mirrorservice.org
 * epel: www.mirrorservice.org
 * extras: www.mirrorservice.org
 * updates: mirrors.supportex.net
addons                                                   |  951 B     00:00
aegisco                                                  |  951 B     00:00
http://www.mirrorservice.org/sites/mirror.centos.org/5.6/os/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
base                                                     | 1.1 kB     00:00
http://www.mirrorservice.org/sites/download.fedora.redhat.com/pub/epel/5/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
epel                                                     | 3.7 kB     00:00
epel/primary_db                                          | 3.1 MB     00:24
http://www.mirrorservice.org/sites/mirror.centos.org/5.6/extras/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
extras                                                   | 2.1 kB     00:00
scalr                                                    |  951 B     00:00
updates                                                  | 1.9 kB     00:00
Setting up Upgrade Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: git = 1.5.5.6-4.el5 for package: perl-Git
---> Package git.i386 0:1.7.4.1-1.el5 set to be updated
--> Running transaction check
---> Package perl-Git.i386 0:1.7.4.1-1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch           Version                 Repository      Size
================================================================================
Updating:
 git                i386           1.7.4.1-1.el5           epel           4.5 M
Updating for dependencies:
 perl-Git           i386           1.7.4.1-1.el5           epel            28 k

Transaction Summary
================================================================================
Install       0 Package(s)
Upgrade       2 Package(s)

Total download size: 4.5 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): perl-Git-1.7.4.1-1.el5.i386.rpm                   |  28 kB     00:00
(2/2): git-1.7.4.1-1.el5.i386.rpm                        | 4.5 MB     00:09
--------------------------------------------------------------------------------
Total                                           404 kB/s | 4.5 MB     00:11
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : perl-Git                                                 1/4
  Updating       : git                                                      2/4
  Cleanup        : perl-Git                                                 3/4
  Cleanup        : git                                                      4/4

Updated:
  git.i386 0:1.7.4.1-1.el5

Dependency Updated:
  perl-Git.i386 0:1.7.4.1-1.el5

Complete!
[root@ip-10-150-183-203 ~]# git --version
git version 1.7.4.1
[root@ip-10-150-183-203 ~]#

 できた!
[root@ip-10-150-183-203 ~]# git clone http://github.com/opscode/chef-repo.git
Cloning into chef-repo...
remote: Counting objects: 199, done.
remote: Compressing objects: 100% (119/119), done.
remote: Total 199 (delta 72), reused 160 (delta 47)
Receiving objects: 100% (199/199), 30.16 KiB, done.
Resolving deltas: 100% (72/72), done.
[root@ip-10-150-183-203 ~]# ls
chef-repo
[root@ip-10-150-183-203 ~]#

 mkdir chef-repo/.chef

.chef配下にxxx.pem, xxx-validator.pem, knife.rbを置く。(hosted chefから取得できるファイル)
[root@ip-10-150-183-203 chef-repo]# cd .chef
[root@ip-10-150-183-203 .chef]# ls
knife.rb  xxx-validator.pem  xxx.pem
[root@ip-10-150-183-203 .chef]# cd ..
[root@ip-10-150-183-203 chef-repo]# knife node list
  demo.examle.net
  ip-10-146-.ap-northeast-1.compute.internal
[root@ip-10-150-183-203 chef-repo]#

2011年7月17日日曜日

chefでcentosのec2インスタンスを作成し、chef-clientにする

knifeを実行できるワークステーションを前回作成しました。
今回は、ec2インスタンスを作成できるようにknifeに追加モジュールを入れます。

1. 事前に必要なライブラリのインストール
参考
http://wiki.opscode.com/display/chef/Knife
http://wiki.opscode.com/display/chef/Launch+Cloud+Instances+with+Knife





[ec2-user@ip-10-150-174-103 chef-repo]$ sudo gem install net-ssh net-ssh-multi fog highline
Successfully installed net-ssh-2.1.4
Successfully installed net-ssh-multi-1.1
Building native extensions.  This could take a while...
ERROR:  Error installing fog:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for libxml/parser.h... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include
        --without-zlib-include=${zlib-dir}/include
        --with-zlib-lib
        --without-zlib-lib=${zlib-dir}/lib
        --with-iconv-dir
        --without-iconv-dir
        --with-iconv-include
        --without-iconv-include=${iconv-dir}/include
        --with-iconv-lib
        --without-iconv-lib=${iconv-dir}/lib
        --with-xml2-dir
        --without-xml2-dir
        --with-xml2-include
        --without-xml2-include=${xml2-dir}/include
        --with-xml2-lib
        --without-xml2-lib=${xml2-dir}/lib
        --with-xslt-dir
        --without-xslt-dir
        --with-xslt-include
        --without-xslt-include=${xslt-dir}/include
        --with-xslt-lib
        --without-xslt-lib=${xslt-dir}/lib


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0/ext/nokogiri/gem_make.out
Successfully installed highline-1.6.2
3 gems installed
Installing ri documentation for net-ssh-2.1.4...
Installing ri documentation for net-ssh-multi-1.1...
Installing ri documentation for highline-1.6.2...
Installing RDoc documentation for net-ssh-2.1.4...
Installing RDoc documentation for net-ssh-multi-1.1...
Installing RDoc documentation for highline-1.6.2...
[ec2-user@ip-10-150-174-103 chef-repo]$



fogがインストールできていないようだ。
参考リンク通りlibxslt-dev libxml2-devをインストールする。


[ec2-user@ip-10-150-174-103 chef-repo]$ sudo yum install libxml-devel libxslt-devel
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
amzn-main                                                | 2.1 kB     00:00
amzn-updates                                             | 2.1 kB     00:00
s3tools                                                  | 1.3 kB     00:00
s3tools/primary                                          | 1.0 kB     00:00
s3tools                                                                     3/3
0 packages excluded due to repository priority protections
Setting up Install Process
No package libxml-devel available.
Resolving Dependencies
--> Running transaction check
---> Package libxslt-devel.i686 0:1.1.26-2.6.amzn1 set to be updated
--> Processing Dependency: libxslt = 1.1.26-2.6.amzn1 for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Processing Dependency: libxml2-devel >= 2.6.27 for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Processing Dependency: pkgconfig for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Processing Dependency: libgcrypt-devel for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Processing Dependency: libexslt.so.0 for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Processing Dependency: /usr/bin/pkg-config for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Processing Dependency: pkgconfig(libxml-2.0) for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Processing Dependency: libxslt.so.1 for package: libxslt-devel-1.1.26-2.6.amzn1.i686
--> Running transaction check
---> Package libgcrypt-devel.i686 0:1.4.5-3.7.amzn1 set to be updated
--> Processing Dependency: libgpg-error-devel for package: libgcrypt-devel-1.4.5-3.7.amzn1.i686
---> Package libxml2-devel.i686 0:2.7.6-1.9.amzn1 set to be updated
--> Processing Dependency: zlib-devel for package: libxml2-devel-2.7.6-1.9.amzn1.i686
---> Package libxslt.i686 0:1.1.26-2.6.amzn1 set to be updated
---> Package pkgconfig.i686 1:0.23-9.1.6.amzn1 set to be updated
--> Running transaction check
---> Package libgpg-error-devel.i686 0:1.7-3.7.amzn1 set to be updated
---> Package zlib-devel.i686 0:1.2.3-24.7.amzn1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch      Version                 Repository      Size
================================================================================
Installing:
 libxslt-devel           i686      1.1.26-2.6.amzn1        amzn-main      661 k
Installing for dependencies:
 libgcrypt-devel         i686      1.4.5-3.7.amzn1         amzn-main      115 k
 libgpg-error-devel      i686      1.7-3.7.amzn1           amzn-main       11 k
 libxml2-devel           i686      2.7.6-1.9.amzn1         amzn-main      1.3 M
 libxslt                 i686      1.1.26-2.6.amzn1        amzn-main      539 k
 pkgconfig               i686      1:0.23-9.1.6.amzn1      amzn-main       64 k
 zlib-devel              i686      1.2.3-24.7.amzn1        amzn-main       38 k

Transaction Summary
================================================================================
Install       7 Package(s)
Upgrade       0 Package(s)

Total download size: 2.7 M
Installed size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): libgcrypt-devel-1.4.5-3.7.amzn1.i686.rpm          | 115 kB     00:00
(2/7): libgpg-error-devel-1.7-3.7.amzn1.i686.rpm         |  11 kB     00:00
(3/7): libxml2-devel-2.7.6-1.9.amzn1.i686.rpm            | 1.3 MB     00:00
(4/7): libxslt-1.1.26-2.6.amzn1.i686.rpm                 | 539 kB     00:00
(5/7): libxslt-devel-1.1.26-2.6.amzn1.i686.rpm           | 661 kB     00:00
(6/7): pkgconfig-0.23-9.1.6.amzn1.i686.rpm               |  64 kB     00:00
(7/7): zlib-devel-1.2.3-24.7.amzn1.i686.rpm              |  38 kB     00:00
--------------------------------------------------------------------------------
Total                                           6.9 MB/s | 2.7 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : 1:pkgconfig-0.23-9.1.6.amzn1.i686                        1/7
  Installing     : libgpg-error-devel-1.7-3.7.amzn1.i686                    2/7
  Installing     : zlib-devel-1.2.3-24.7.amzn1.i686                         3/7
  Installing     : libgcrypt-devel-1.4.5-3.7.amzn1.i686                     4/7
  Installing     : libxslt-1.1.26-2.6.amzn1.i686                            5/7
  Installing     : libxml2-devel-2.7.6-1.9.amzn1.i686                       6/7
  Installing     : libxslt-devel-1.1.26-2.6.amzn1.i686                      7/7

Installed:
  libxslt-devel.i686 0:1.1.26-2.6.amzn1

Dependency Installed:
  libgcrypt-devel.i686 0:1.4.5-3.7.amzn1
  libgpg-error-devel.i686 0:1.7-3.7.amzn1
  libxml2-devel.i686 0:2.7.6-1.9.amzn1
  libxslt.i686 0:1.1.26-2.6.amzn1
  pkgconfig.i686 1:0.23-9.1.6.amzn1
  zlib-devel.i686 0:1.2.3-24.7.amzn1

Complete!
[ec2-user@ip-10-150-174-103 chef-repo]$

再びfogだけインストール

[ec2-user@ip-10-150-174-103 chef-repo]$ sudo gem install fog                    Building native extensions.  This could take a while...
Successfully installed nokogiri-1.5.0
Successfully installed ruby-hmac-0.4.0
Successfully installed fog-0.9.0
3 gems installed
Installing ri documentation for nokogiri-1.5.0...

No definition for get_options

No definition for set_options

No definition for parse_memory

No definition for parse_file

No definition for parse_with
Installing ri documentation for ruby-hmac-0.4.0...
Installing ri documentation for fog-0.9.0...
Installing RDoc documentation for nokogiri-1.5.0...






No definition for get_options

No definition for set_options

No definition for parse_memory

No definition for parse_file

No definition for parse_with
Installing RDoc documentation for ruby-hmac-0.4.0...
Installing RDoc documentation for fog-0.9.0...


[ec2-user@ip-10-150-174-103 chef-repo]$
けっこうRDocのインストールに時間かかりました。

- 「Cloud Credentials」
knife.rbにec2のプライベート情報を入れます。

[ec2-user@ip-10-150-174-103 ~]$ cd chef-repo/
[ec2-user@ip-10-150-174-103 chef-repo]$ cd .chef/
[ec2-user@ip-10-150-174-103 .chef]$ ls
knife.rb  nob.pem  nob-validator.pem
[ec2-user@ip-10-150-174-103 .chef]$ cp -p knife.rb knife.rb.org
[ec2-user@ip-10-150-174-103 .chef]$ vi knife.rb


以下を追加。=の右は実際にkey文字列を入れる。
knife[:aws_access_key_id]     = "Your AWS Access Key"
knife[:aws_secret_access_key] = "Your AWS Secret Access Key"

-「Cloud Sub-commands」

[ec2-user@ip-10-150-174-103 ~]sudo gem install knife-ec2 --no-rdoc --no-ri --verbose
 /usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/delete_internet_service_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/delete_node_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/delete_vapp_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_catalog_item_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_catalog_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_customization_options_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_internet_services_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_network_ip_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_network_ips_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_network_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_node_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_nodes_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_organization_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_public_ip_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_public_ips_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_vapp_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_vdc_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/get_versions_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/instantiate_vapp_template_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/login_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/power_off_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/requests/power_on_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/spec_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/ecloud/vcloud_spec.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/spec/spec_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/cloud_formation/stack_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/iam/access_key_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/iam/group_policy_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/iam/group_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/iam/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/iam/login_profile_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/iam/user_policy_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/iam/user_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/rds/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/rds/instance_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/rds/model_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/rds/parameter_group_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/rds/parameter_request_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/ses/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/ses/verified_email_address_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/simpledb/attributes_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/simpledb/domain_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/aws/requests/simpledb/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/address_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/addresses_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/key_pair_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/key_pairs_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/security_group_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/security_groups.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/server_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/snapshot_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/snapshots_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/volume_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/aws/volumes_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/flavors_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/server_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/models/servers_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/parsers/aws/monitor_unmonitor_instances_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/address_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/availability_zone_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/image_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/instance_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/key_pair_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/region_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/security_group_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/snapshot_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/tag_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/aws/volume_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/bluebox/block_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/bluebox/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/bluebox/product_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/bluebox/template_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/account_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/api_client_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/cloud_ip_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/image_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/interface_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/load_balancer_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/server_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/server_type_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/user_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/brightbox/zone_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/go_grid/image_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/linode/datacenter_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/linode/distribution_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/linode/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/linode/linode_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/linode/linodeplans_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/rackspace/address_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/rackspace/flavor_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/rackspace/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/rackspace/image_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/rackspace/resize_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/rackspace/server_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/slicehost/backup_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/slicehost/flavor_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/slicehost/image_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/slicehost/slice_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/voxel/image_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/compute/requests/voxel/server_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/core/attribute_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/core/credential_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/models/record_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/models/records_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/models/zone_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/models/zones_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/requests/aws/dns_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/requests/bluebox/dns_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/requests/dnsimple/dns_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/requests/linode/dns_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/requests/slicehost/dns_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/dns/requests/zerigo/dns_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/collection_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/compute/flavors_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/compute/server_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/compute/servers_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/formats_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/formats_helper_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/mock_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/model_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/responds_to_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/helpers/succeeds_helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/lorem.txt
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/helper.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/models/directories_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/models/directory_test.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/models/file_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/models/files_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/requests/aws/bucket_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/requests/aws/multipart_upload_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/requests/aws/object_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/requests/google/bucket_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/requests/google/object_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/requests/rackspace/container_tests.rb
/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/tests/storage/requests/rackspace/object_tests.rb
/usr/bin/fog
Installing gem knife-ec2-0.5.6
Downloading gem knife-ec2-0.5.6.gem
GET http://rubygems.org/gems/knife-ec2-0.5.6.gem
302 Found
GET http://production.cf.rubygems.org/gems/knife-ec2-0.5.6.gem
200 OK
/usr/lib/ruby/gems/1.8/gems/knife-ec2-0.5.6/LICENSE
/usr/lib/ruby/gems/1.8/gems/knife-ec2-0.5.6/README.rdoc
/usr/lib/ruby/gems/1.8/gems/knife-ec2-0.5.6/lib/chef/knife/ec2_instance_data.rb
/usr/lib/ruby/gems/1.8/gems/knife-ec2-0.5.6/lib/chef/knife/ec2_server_create.rb
/usr/lib/ruby/gems/1.8/gems/knife-ec2-0.5.6/lib/chef/knife/ec2_server_delete.rb
/usr/lib/ruby/gems/1.8/gems/knife-ec2-0.5.6/lib/chef/knife/ec2_server_list.rb
/usr/lib/ruby/gems/1.8/gems/knife-ec2-0.5.6/lib/knife-ec2/version.rb
Successfully installed fog-0.7.2
Successfully installed knife-ec2-0.5.6
2 gems installed
[ec2-user@ip-10-150-174-103 .chef]$
[ec2-user@ip-10-150-174-103 .chef]$


********* chefでec2作成! をするところ*******

いよいよ作成します。参考リンクには、例しか載っていないので、いろいろ調べた結果のコマンドをここに書きます。
まず、ec2にアクセスすることになるプライベートkeyをAWSから取得して、chefワークステーションのどこかに置きます。

1./tmp/nobubu3.pemに置きます。
2.作成するamiをあらかじめ決めます。適当にこれにしました。

これで実行します。 --server-urlを入れておかないと、chef hostとの通信が失敗してしまいます。
centosなので-d cento5-gemsを指定しないといけないです。
knife ec2 server create -N "demo.example.net2" -I ami-3607ac37 -f t1.micro --region ap-northeast-1 --ssh-key nobubu3 --identity-file /tmp/nobubu3.pem --groups quick-start-1 --ssh-user root --server-url "https://api.opscode.com/organizations/nobu" -d centos5-gems

終わったらログインしてみる
ssh -i /tmp/nobubu3.pem root@[ip]

参考リンクの「Instance Bootstrap」からbootstrapした内容がちゃんとされているか確認する。

・rubyの確認
[root@ip-10-150-191-147 ~]# ruby -v
ruby 1.8.5 (2006-08-25) [x86_64-linux]

・rubygemsの確認
[root@ip-10-150-191-147 ~]# gem -v
1.3.3

・chefの確認
[root@ip-10-150-191-147 ~]# chef-client -v
/usr/lib64/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/rest/rest_request.rb:44: uninitialized constant Chef::REST::RESTRequest::RUBY_PATCHLEVEL (NameError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/rest.rb:28
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.2/bin/../lib/chef/search/query.rb:21
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
         ... 20 levels...
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib64/ruby/gems/1.8/gems/chef-0.10.2/bin/chef-client:23
        from /usr/bin/chef-client:19:in `load'
        from /usr/bin/chef-client:19
[root@ip-10-150-191-147 ~]#
[root@ip-10-150-191-147 ~]# ls /usr/bin/ch
chacl        chattr       chef-client  chfn         chsh
chage        chcon        chef-solo    chrt         chvt
[root@ip-10-150-191-147 ~]# ls /usr/bin/knife .
./             .bash_history  .bash_profile  .gem/          .ssh/
../            .bash_logout   .bashrc        .lesshst

うまくいっていないようだ。

・/etc/chef
[root@ip-10-150-191-147 ~]# ls /etc/chef
client.rb  first-boot.json  validation.pem
[root@ip-10-150-191-147 ~]#

・/etc/chef/validation.pem
前にダウンロードしたvalidationファイルと同じ中身になってたので、正しい。

・/etc/chef/client.rb
server-urlやorganizationなどが正しく入っていた。


rubyとrubygemのバージョンがec2ワークステーションで入れたときのよりも古いバージョンになっているので、更新してみる。


[root@ip-10-150-191-147 ~]# sudo yum update ruby
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * addons: mirrors.coreix.net
 * base: mirrors.coreix.net
 * epel: mirrors.coreix.net
 * extras: mirrors.coreix.net
 * updates: mirrors.coreix.net
addons                                                                            |  951 B     00:00
aegisco                                                                           |  951 B     00:00
base                                                                              | 2.1 kB     00:00
epel                                                                              | 3.7 kB     00:00
extras                                                                            | 2.1 kB     00:00
scalr                                                                             |  951 B     00:00
updates                                                                           | 1.9 kB     00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: ruby = 1.8.5-5.el5_4.8 for package: ruby-rdoc
--> Processing Dependency: ruby = 1.8.5-5.el5_4.8 for package: ruby-ri
--> Processing Dependency: ruby = 1.8.5-5.el5_4.8 for package: ruby-irb
---> Package ruby.x86_64 0:1.8.7.334-2.el5 set to be updated
--> Processing Dependency: ruby-libs = 1.8.7.334-2.el5 for package: ruby
--> Running transaction check
---> Package ruby-irb.x86_64 0:1.8.7.334-2.el5 set to be updated
---> Package ruby-libs.x86_64 0:1.8.7.334-2.el5 set to be updated
---> Package ruby-rdoc.x86_64 0:1.8.7.334-2.el5 set to be updated
---> Package ruby-ri.x86_64 0:1.8.7.334-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package                 Arch                 Version                        Repository             Size
=========================================================================================================
Installing:
 ruby                    x86_64               1.8.7.334-2.el5                aegisco               377 k
     replacing  ruby-mode.x86_64 1.8.5-5.el5_4.8

Updating for dependencies:
 ruby-irb                x86_64               1.8.7.334-2.el5                aegisco               334 k
 ruby-libs               x86_64               1.8.7.334-2.el5                aegisco               2.1 M
 ruby-rdoc               x86_64               1.8.7.334-2.el5                aegisco               406 k
 ruby-ri                 x86_64               1.8.7.334-2.el5                aegisco               2.5 M

Transaction Summary
=========================================================================================================
Install       1 Package(s)
Upgrade       4 Package(s)

Total size: 5.7 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
  file /usr/lib/ruby/1.8/abbrev.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/base64.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/benchmark.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/cgi.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/cgi/session.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/cgi/session/pstore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/complex.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/csv.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/date.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/date/format.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/delegate.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/dl/import.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/dl/win32.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/acl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/drb.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/extservm.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/unix.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/erb.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/expect.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/fileutils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/forwardable.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/generator.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/getopts.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/ipaddr.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/jcode.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/kconv.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/logger.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/matrix.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/md5.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/mkmf.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/monitor.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/ftp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/ftptls.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/http.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/https.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/imap.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/pop.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/protocol.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/smtp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/telnet.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/telnets.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/open-uri.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/open3.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/bn.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/buffering.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/cipher.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/digest.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/ssl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/x509.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/optparse.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/ostruct.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/parsearg.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/parsedate.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/pathname.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/ping.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/pp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/prettyprint.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/pstore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rational.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/resolv.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/attlistdecl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/attribute.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/cdata.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/comment.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/doctype.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/document.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/dtd/dtd.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/element.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encoding.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/CP-1252.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/ISO-8859-15.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/SHIFT-JIS.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/UNILE.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/UTF-16.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/entity.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/functions.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/instruction.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/node.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/sax2parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/treeparser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/xpathparser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/rexml.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/sax2listener.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/source.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/text.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/xmldecl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/xpath.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/xpath_parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rinda/ring.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rinda/tuplespace.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/0.9.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/1.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/2.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/content.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/converter.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/dublincore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/image.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/0.9.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/1.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/2.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/base.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/content.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/dublincore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/image.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/syndication.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/taxonomy.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/trackback.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/rss.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/syndication.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/taxonomy.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/utils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/xml-stylesheet.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/scanf.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/set.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/sha1.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/builtin-command.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/command-processor.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/error.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/filter.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/process-controller.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/system-command.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/version.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shellwords.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/singleton.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/soap/mimemessage.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/sync.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/tempfile.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit/autorunner.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit/collector/dir.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit/testcase.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/thread.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/thwait.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/time.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/timeout.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/tmpdir.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/tsort.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/common.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/ftp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/generic.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/http.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/https.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/ldap.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/mailto.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/weakref.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/accesslog.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/cgi.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/cookie.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpproxy.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httprequest.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpresponse.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/https.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/cgi_runner.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/cgihandler.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/filehandler.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpstatus.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httputils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/ssl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/base64.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/client.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/config.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/create.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/datetime.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/httpserver.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/marshal.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/server.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/utils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/baseemitter.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/basenode.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/encoding.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/rubytypes.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/store.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/tag.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/types.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386

Error Summary
-------------

[root@ip-10-150-191-147 ~]#

なんかconflictしているというログがある

[root@ip-10-150-191-147 ~]# ruby -v
ruby 1.8.5 (2006-08-25) [x86_64-linux]

やっぱりアップデートされていない。
ec2ワークステーションでのコマンド結果は下の通りだった。
[ec2-user@ip-10-150-174-103 chef-repo]$ ruby -v
ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-linux]
[ec2-user@ip-10-150-174-103 chef-repo]$




今回使ったcentosがx86-64

gemもアップデートしてみる
[root@ip-10-150-191-147 ~]#
[root@ip-10-150-191-147 ~]# sudo gem update
Updating installed gems
Updating bunny
[Version 0.7] Encoding of source files is set to UTF-8 on Ruby 1.9.
[Version 0.7] Queue#publish deprecated.
Successfully installed bunny-0.7
Updating json
Building native extensions.  This could take a while...
Successfully installed json-1.5.3
Updating net-ssh-multi
Successfully installed net-ssh-multi-1.1
Gems updated: bunny, json, net-ssh-multi
Installing ri documentation for bunny-0.7...
Installing ri documentation for json-1.5.3...
Installing ri documentation for net-ssh-multi-1.1...
Installing RDoc documentation for bunny-0.7...
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Installing RDoc documentation for json-1.5.3...
Installing RDoc documentation for net-ssh-multi-1.1...
[root@ip-10-150-191-147 ~]#
[root@ip-10-150-191-147 ~]# gem -v
1.3.3
[root@ip-10-150-191-147 ~]#


一度rubyをeraseして、再度installしてみる
[root@ip-10-150-191-147 ~]# yum erase ruby
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package ruby.x86_64 0:1.8.5-5.el5_4.8 set to be erased
--> Processing Dependency: ruby = 1.8.5-5.el5_4.8 for package: ruby-rdoc
--> Processing Dependency: ruby = 1.8.5-5.el5_4.8 for package: ruby-ri
--> Processing Dependency: ruby = 1.8.5-5.el5_4.8 for package: ruby-irb
--> Running transaction check
---> Package ruby-irb.x86_64 0:1.8.5-5.el5_4.8 set to be erased
---> Package ruby-rdoc.x86_64 0:1.8.5-5.el5_4.8 set to be erased
---> Package ruby-ri.x86_64 0:1.8.5-5.el5_4.8 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package                Arch                Version                         Repository              Size
=========================================================================================================
Removing:
 ruby                   x86_64              1.8.5-5.el5_4.8                 installed              790 k
Removing for dependencies:
 ruby-irb               x86_64              1.8.5-5.el5_4.8                 installed              138 k
 ruby-rdoc              x86_64              1.8.5-5.el5_4.8                 installed              448 k
 ruby-ri                x86_64              1.8.5-5.el5_4.8                 installed              3.7 M

Transaction Summary
=========================================================================================================
Remove        4 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : ruby                                                                              1/4
  Erasing        : ruby-irb                                                                          2/4
  Erasing        : ruby-ri                                                                           3/4
  Erasing        : ruby-rdoc                                                                         4/4

Removed:
  ruby.x86_64 0:1.8.5-5.el5_4.8

Dependency Removed:
  ruby-irb.x86_64 0:1.8.5-5.el5_4.8 ruby-rdoc.x86_64 0:1.8.5-5.el5_4.8 ruby-ri.x86_64 0:1.8.5-5.el5_4.8

Complete!
[root@ip-10-150-191-147 ~]#
[root@ip-10-150-191-147 ~]# yum install ruby
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * addons: mirrors.coreix.net
 * base: mirrors.coreix.net
 * epel: mirrors.coreix.net
 * extras: mirrors.coreix.net
 * updates: mirrors.coreix.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby.x86_64 0:1.8.7.334-2.el5 set to be updated
--> Processing Dependency: ruby-libs = 1.8.7.334-2.el5 for package: ruby
--> Running transaction check
---> Package ruby-libs.x86_64 0:1.8.7.334-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package                 Arch                 Version                        Repository             Size
=========================================================================================================
Installing:
 ruby                    x86_64               1.8.7.334-2.el5                aegisco               377 k
     replacing  ruby-docs.x86_64 1.8.5-5.el5_4.8

Updating for dependencies:
 ruby-libs               x86_64               1.8.7.334-2.el5                aegisco               2.1 M

Transaction Summary
=========================================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total size: 2.5 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
  file /usr/lib/ruby/1.8/abbrev.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/base64.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/benchmark.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/cgi.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/cgi/session.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/cgi/session/pstore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/complex.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/csv.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/date.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/date/format.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/delegate.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/dl/import.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/dl/win32.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/acl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/drb.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/extservm.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/drb/unix.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/erb.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/expect.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/fileutils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/forwardable.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/generator.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/getopts.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/ipaddr.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/jcode.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/kconv.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/logger.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/matrix.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/md5.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/mkmf.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/monitor.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/ftp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/ftptls.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/http.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/https.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/imap.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/pop.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/protocol.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/smtp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/telnet.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/net/telnets.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/open-uri.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/open3.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/bn.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/buffering.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/cipher.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/digest.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/ssl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/openssl/x509.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/optparse.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/ostruct.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/parsearg.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/parsedate.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/pathname.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/ping.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/pp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/prettyprint.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/pstore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rational.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/resolv.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/attlistdecl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/attribute.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/cdata.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/comment.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/doctype.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/document.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/dtd/dtd.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/element.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encoding.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/CP-1252.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/ISO-8859-15.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/SHIFT-JIS.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/UNILE.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/encodings/UTF-16.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/entity.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/functions.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/instruction.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/node.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/sax2parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/treeparser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/parsers/xpathparser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/rexml.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/sax2listener.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/source.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/text.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/xmldecl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/xpath.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rexml/xpath_parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rinda/ring.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rinda/tuplespace.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/0.9.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/1.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/2.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/content.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/converter.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/dublincore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/image.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/0.9.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/1.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/2.0.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/base.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/content.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/dublincore.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/image.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/syndication.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/taxonomy.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/maker/trackback.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/rss.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/syndication.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/taxonomy.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/utils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/rss/xml-stylesheet.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/scanf.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/set.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/sha1.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/builtin-command.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/command-processor.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/error.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/filter.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/process-controller.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/system-command.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shell/version.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/shellwords.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/singleton.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/soap/mimemessage.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/sync.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/tempfile.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit/autorunner.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit/collector/dir.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/test/unit/testcase.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/thread.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/thwait.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/time.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/timeout.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/tmpdir.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/tsort.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/common.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/ftp.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/generic.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/http.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/https.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/ldap.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/uri/mailto.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/weakref.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/accesslog.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/cgi.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/cookie.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpproxy.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httprequest.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpresponse.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/https.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/cgi_runner.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/cgihandler.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpservlet/filehandler.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httpstatus.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/httputils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/webrick/ssl.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/base64.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/client.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/config.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/create.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/datetime.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/httpserver.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/marshal.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/parser.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/server.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/xmlrpc/utils.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/baseemitter.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/basenode.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/encoding.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/rubytypes.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/store.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/tag.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386
  file /usr/lib/ruby/1.8/yaml/types.rb from install of ruby-libs-1.8.7.334-2.el5.x86_64 conflicts with file from package ruby-libs-1.8.5-5.el5_4.8.i386

Error Summary
-------------


ruby-libsが邪魔しているので、これもerase


[root@ip-10-150-191-147 ~]# yum erase ruby
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Setting up Remove Process
No Match for argument: ruby
Loading mirror speeds from cached hostfile
 * addons: mirrors.coreix.net
 * base: mirrors.coreix.net
 * epel: mirrors.coreix.net
 * extras: mirrors.coreix.net
 * updates: mirrors.coreix.net
Package(s) ruby available, but not installed.
No Packages marked for removal
[root@ip-10-150-191-147 ~]#
[root@ip-10-150-191-147 ~]# yum erase ruby-lib
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Setting up Remove Process
No Match for argument: ruby-lib
Loading mirror speeds from cached hostfile
 * addons: mirrors.coreix.net
 * base: mirrors.coreix.net
 * epel: mirrors.coreix.net
 * extras: mirrors.coreix.net
 * updates: mirrors.coreix.net
No Packages marked for removal
[root@ip-10-150-191-147 ~]# yum erase ruby-libs
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package ruby-libs.i386 0:1.8.5-5.el5_4.8 set to be erased
--> Processing Dependency: libruby.so.1.8 for package: ruby-devel
--> Processing Dependency: ruby(abi) = 1.8 for package: rrdtool-ruby
--> Processing Dependency: ruby-libs = 1.8.5-5.el5_4.8 for package: ruby-tcltk
--> Processing Dependency: ruby-libs = 1.8.5-5.el5_4.8 for package: ruby-devel
--> Processing Dependency: ruby-libs = 1.8.5-5.el5_4.8 for package: ruby-devel
---> Package ruby-libs.x86_64 0:1.8.5-5.el5_4.8 set to be erased
--> Running transaction check
---> Package rrdtool-ruby.x86_64 0:1.2.27-4 set to be erased
---> Package ruby-devel.i386 0:1.8.5-5.el5_4.8 set to be erased
---> Package ruby-devel.x86_64 0:1.8.5-5.el5_4.8 set to be erased
---> Package ruby-tcltk.x86_64 0:1.8.5-5.el5_4.8 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package                   Arch                Version                      Repository              Size
=========================================================================================================
Removing:
 ruby-libs                 i386                1.8.5-5.el5_4.8              installed              5.0 M
 ruby-libs                 x86_64              1.8.5-5.el5_4.8              installed              5.0 M
Removing for dependencies:
 rrdtool-ruby              x86_64              1.2.27-4                     installed               12 k
 ruby-devel                i386                1.8.5-5.el5_4.8              installed              1.5 M
 ruby-devel                x86_64              1.8.5-5.el5_4.8              installed              1.8 M
 ruby-tcltk                x86_64              1.8.5-5.el5_4.8              installed              5.6 M

Transaction Summary
=========================================================================================================
Remove        6 Package(s)
Reinstall     0 Package(s)
Downgrade     0 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : ruby-libs                                                                         1/6
  Erasing        : ruby-tcltk                                                                        2/6
  Erasing        : ruby-libs                                                                         3/6
  Erasing        : rrdtool-ruby                                                                      4/6
  Erasing        : ruby-devel                                                                        5/6
  Erasing        : ruby-devel                                                                        6/6

Removed:
  ruby-libs.i386 0:1.8.5-5.el5_4.8                   ruby-libs.x86_64 0:1.8.5-5.el5_4.8

Dependency Removed:
  rrdtool-ruby.x86_64 0:1.2.27-4                      ruby-devel.i386 0:1.8.5-5.el5_4.8
  ruby-devel.x86_64 0:1.8.5-5.el5_4.8                 ruby-tcltk.x86_64 0:1.8.5-5.el5_4.8

Complete!
[root@ip-10-150-191-147 ~]#

[root@ip-10-150-191-147 ~]# yum install ruby
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * addons: mirrors.coreix.net
 * base: mirrors.coreix.net
 * epel: mirrors.coreix.net
 * extras: mirrors.coreix.net
 * updates: mirrors.coreix.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ruby.x86_64 0:1.8.7.334-2.el5 set to be updated
--> Processing Dependency: ruby-libs = 1.8.7.334-2.el5 for package: ruby
--> Processing Dependency: libruby.so.1.8()(64bit) for package: ruby
--> Running transaction check
---> Package ruby-libs.x86_64 0:1.8.7.334-2.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================
 Package                 Arch                 Version                        Repository             Size
=========================================================================================================
Installing:
 ruby                    x86_64               1.8.7.334-2.el5                aegisco               377 k
     replacing  ruby-docs.x86_64 1.8.5-5.el5_4.8

Installing for dependencies:
 ruby-libs               x86_64               1.8.7.334-2.el5                aegisco               2.1 M

Transaction Summary
=========================================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total size: 2.5 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : ruby-libs                                                                         1/4
  Installing     : ruby                                                                              2/4
  Erasing        : ruby-mode                                                                         3/4
  Erasing        : ruby-docs                                                                         4/4

Installed:
  ruby.x86_64 0:1.8.7.334-2.el5

Dependency Installed:
  ruby-libs.x86_64 0:1.8.7.334-2.el5

Replaced:
  ruby-docs.x86_64 0:1.8.5-5.el5_4.8                  ruby-mode.x86_64 0:1.8.5-5.el5_4.8

Complete!
[root@ip-10-150-191-147 ~]#

やりました。rubyのバージョンアップ成功。
[root@ip-10-150-191-147 ~]# ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
[root@ip-10-150-191-147 ~]#


gemアップデートを再び実施してみる[root@ip-10-150-191-147 ~]# ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
[root@ip-10-150-191-147 ~]#
[root@ip-10-150-191-147 ~]# gem -v
1.3.3
[root@ip-10-150-191-147 ~]#
[root@ip-10-150-191-147 ~]# sudo gem update --system
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.8.5
/usr/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:103:Warning: Gem::SourceIndex#search support for String patterns is deprecated
Updating RubyGems to 1.8.5
Installing RubyGems 1.8.5
RubyGems 1.8.5 installed
./lib/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError)
        from ./lib/rubygems/custom_require.rb:36:in `require'
        from ./lib/rubygems/commands/setup_command.rb:330:in `run_rdoc'
        from ./lib/rubygems/commands/setup_command.rb:240:in `install_rdoc'
        from ./lib/rubygems/commands/setup_command.rb:113:in `execute'
        from ./lib/rubygems/command.rb:278:in `invoke'
        from ./lib/rubygems/command_manager.rb:147:in `process_args'
        from ./lib/rubygems/command_manager.rb:117:in `run'
        from ./lib/rubygems/gem_runner.rb:65:in `run'
        from setup.rb:38
[root@ip-10-150-191-147 ~]# sudo gem update
Updating installed gems
Nothing to update
[root@ip-10-150-191-147 ~]# gem -v
1.8.5
[root@ip-10-150-191-147 ~]#

なんかうまくいっていないような。。。 chef-clientたたいてみる

[root@ip-10-150-191-147 ~]# chef-client -v
Chef: 0.10.2
[root@ip-10-150-191-147 ~]#


お! エラーでないぞ。
とりあえずこれでいこう。

[root@ip-10-150-191-147 ~]# chef-client
[Mon, 18 Jul 2011 11:46:55 -0400] INFO: *** Chef 0.10.2 ***
[Mon, 18 Jul 2011 11:46:57 -0400] INFO: Client key /etc/chef/client.pem is not present - registering
/usr/bin/ruby: symbol lookup error: /usr/lib64/ruby/gems/1.8/gems/json-1.5.2/ext/json/ext/json/ext/parser.so: undefined symbol: RSTRING_PTR
[root@ip-10-150-191-147 ~]#

うーん断念。