chef 0.10.0.qs.1 → 0.10.0.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/distro/common/html/chef-client.8.html +1 -1
  2. data/distro/common/html/{chef-expander.8.html → chef-expander-cluster.8.html} +11 -11
  3. data/distro/common/html/chef-expanderctl.8.html +1 -1
  4. data/distro/common/html/chef-server-webui.8.html +1 -1
  5. data/distro/common/html/chef-server.8.html +1 -1
  6. data/distro/common/html/chef-solo.8.html +1 -1
  7. data/distro/common/html/chef-solr.8.html +1 -1
  8. data/distro/common/html/knife-bootstrap.1.html +1 -1
  9. data/distro/common/html/knife-client.1.html +1 -1
  10. data/distro/common/html/knife-configure.1.html +1 -1
  11. data/distro/common/html/knife-cookbook-site.1.html +1 -1
  12. data/distro/common/html/knife-cookbook.1.html +1 -1
  13. data/distro/common/html/knife-data-bag.1.html +1 -1
  14. data/distro/common/html/knife-environment.1.html +1 -1
  15. data/distro/common/html/knife-exec.1.html +1 -1
  16. data/distro/common/html/knife-index.1.html +1 -1
  17. data/distro/common/html/knife-node.1.html +1 -1
  18. data/distro/common/html/knife-recipe.1.html +1 -1
  19. data/distro/common/html/knife-role.1.html +1 -1
  20. data/distro/common/html/knife-search.1.html +1 -1
  21. data/distro/common/html/knife-ssh.1.html +1 -1
  22. data/distro/common/html/knife-status.1.html +1 -1
  23. data/distro/common/html/knife-tag.1.html +1 -1
  24. data/distro/common/html/knife.1.html +1 -1
  25. data/distro/common/html/shef.1.html +1 -1
  26. data/distro/common/man/man1/knife-bootstrap.1 +1 -1
  27. data/distro/common/man/man1/knife-client.1 +1 -1
  28. data/distro/common/man/man1/knife-configure.1 +1 -1
  29. data/distro/common/man/man1/knife-cookbook-site.1 +1 -1
  30. data/distro/common/man/man1/knife-cookbook.1 +1 -1
  31. data/distro/common/man/man1/knife-data-bag.1 +1 -1
  32. data/distro/common/man/man1/knife-environment.1 +1 -1
  33. data/distro/common/man/man1/knife-exec.1 +1 -1
  34. data/distro/common/man/man1/knife-index.1 +1 -1
  35. data/distro/common/man/man1/knife-node.1 +1 -1
  36. data/distro/common/man/man1/knife-role.1 +1 -1
  37. data/distro/common/man/man1/knife-search.1 +1 -1
  38. data/distro/common/man/man1/knife-ssh.1 +1 -1
  39. data/distro/common/man/man1/knife-status.1 +1 -1
  40. data/distro/common/man/man1/knife-tag.1 +1 -1
  41. data/distro/common/man/man1/knife.1 +1 -1
  42. data/distro/common/man/man1/shef.1 +1 -1
  43. data/distro/common/man/man8/chef-client.8 +1 -1
  44. data/distro/common/man/man8/{chef-expander.8 → chef-expander-cluster.8} +5 -5
  45. data/distro/common/man/man8/chef-expanderctl.8 +1 -1
  46. data/distro/common/man/man8/chef-server-webui.8 +1 -1
  47. data/distro/common/man/man8/chef-server.8 +1 -1
  48. data/distro/common/man/man8/chef-solo.8 +1 -1
  49. data/distro/common/man/man8/chef-solr.8 +1 -1
  50. data/distro/common/markdown/man8/{chef-expander.mkd → chef-expander-cluster.mkd} +4 -4
  51. data/distro/redhat/etc/init.d/chef-expander +1 -1
  52. data/distro/redhat/etc/init.d/chef-solr +1 -1
  53. data/lib/chef.rb +0 -1
  54. data/lib/chef/api_client.rb +0 -6
  55. data/lib/chef/application.rb +6 -5
  56. data/lib/chef/application/client.rb +0 -5
  57. data/lib/chef/cookbook_uploader.rb +1 -4
  58. data/lib/chef/cookbook_version.rb +15 -12
  59. data/lib/chef/data_bag_item.rb +3 -3
  60. data/lib/chef/handler/error_report.rb +9 -2
  61. data/lib/chef/knife.rb +0 -1
  62. data/lib/chef/knife/bootstrap.rb +35 -5
  63. data/lib/chef/knife/bootstrap/archlinux-gems.erb +1 -1
  64. data/lib/chef/knife/bootstrap/centos5-gems.erb +14 -6
  65. data/lib/chef/knife/bootstrap/fedora13-gems.erb +12 -4
  66. data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +15 -4
  67. data/lib/chef/knife/cookbook_list.rb +1 -0
  68. data/lib/chef/knife/data_bag_create.rb +12 -14
  69. data/lib/chef/knife/data_bag_edit.rb +2 -2
  70. data/lib/chef/knife/data_bag_from_file.rb +2 -2
  71. data/lib/chef/knife/data_bag_show.rb +2 -2
  72. data/lib/chef/knife/search.rb +0 -3
  73. data/lib/chef/knife/ssh.rb +0 -2
  74. data/lib/chef/mixin/language.rb +0 -1
  75. data/lib/chef/provider/deploy.rb +1 -1
  76. data/lib/chef/provider/git.rb +3 -26
  77. data/lib/chef/provider/subversion.rb +1 -1
  78. data/lib/chef/recipe.rb +0 -1
  79. data/lib/chef/resource.rb +8 -9
  80. data/lib/chef/rest.rb +6 -10
  81. data/lib/chef/shell_out.rb +1 -1
  82. data/lib/chef/solr_query.rb +1 -1
  83. data/lib/chef/version.rb +1 -1
  84. metadata +5 -98
  85. data/lib/chef/knife/core/bootstrap_context.rb +0 -81
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "KNIFE\-TAG" "1" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "KNIFE\-TAG" "1" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBknife\-tag\fR \- Apply tags to nodes on a Chef Server
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "KNIFE" "1" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "KNIFE" "1" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBknife\fR \- Chef Server API client utility
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "SHEF" "1" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "SHEF" "1" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBshef\fR \- Interactive Chef Console
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "CHEF\-CLIENT" "8" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "CHEF\-CLIENT" "8" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBchef\-client\fR \- Runs a client node connecting to a chef\-server\.
@@ -1,13 +1,13 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "CHEF\-EXPANDER" "8" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "CHEF\-EXPANDER\-CLUSTER" "8" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
- \fBchef\-expander\fR \- fetches messages from RabbitMQ, processes, and loads into chef\-solr
7
+ \fBchef\-expander\-cluster\fR \- fetches messages from RabbitMQ, processes, and loads into chef\-solr
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- \fBchef\-expander\fR \fI(options)\fR
10
+ \fBchef\-expander\-cluster\fR \fI(options)\fR
11
11
  .
12
12
  .TP
13
13
  \fB\-c\fR, \fB\-\-config CONFIG_FILE\fR
@@ -52,7 +52,7 @@ Chef Expander fetches messages from RabbitMQ, processes them into the correct fo
52
52
  \fBRunning Chef Expander\fR
53
53
  .
54
54
  .P
55
- Chef Expander is designed for clustered operation, though small installations will only need one worker process\. To run Chef Expander with one worker process, run chef\-expander \-n 1\. You will then have a master and worker process, which looks like this in ps:
55
+ Chef Expander is designed for clustered operation, though small installations will only need one worker process\. To run Chef Expander with one worker process, run chef\-expander\-cluster \-n 1\. You will then have a master and worker process, which looks like this in ps:
56
56
  .
57
57
  .IP "" 4
58
58
  .
@@ -60,7 +60,7 @@ Chef Expander is designed for clustered operation, though small installations wi
60
60
 
61
61
  your\-shell> ps aux|grep expander
62
62
  you 52110 0\.1 0\.7 2515476 62748 s003 S+ 3:49PM 0:00\.80 chef\-expander worker #1 (vnodes 0\-1023)
63
- you 52108 0\.1 0\.5 2492880 41696 s003 S+ 3:49PM 0:00\.91 ruby bin/chef\-expander \-n 1
63
+ you 52108 0\.1 0\.5 2492880 41696 s003 S+ 3:49PM 0:00\.91 ruby bin/chef\-expander\-cluster \-n 1
64
64
  .
65
65
  .fi
66
66
  .
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "CHEF\-EXPANDERCTL" "8" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "CHEF\-EXPANDERCTL" "8" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBchef\-expanderctl\fR \- management program for chef\-expander
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "CHEF\-SERVER\-WEBUI" "8" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "CHEF\-SERVER\-WEBUI" "8" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBchef\-server\-webui\fR \- Start the Chef Server merb application slice providing Web User Interface (Management Console)\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "CHEF\-SERVER" "8" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "CHEF\-SERVER" "8" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBchef\-server\fR \- Start the Chef Server merb application slice\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "CHEF\-SOLO" "8" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "CHEF\-SOLO" "8" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBchef\-solo\fR \- Runs chef in solo mode against a specified cookbook location\.
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "CHEF\-SOLR" "8" "April 2011" "Chef 0.10.0" "Chef Manual"
4
+ .TH "CHEF\-SOLR" "8" "April 2011" "Chef 0.10.0.rc.0" "Chef Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBchef\-solr\fR \- Runs as Chef\'s search server
@@ -1,9 +1,9 @@
1
- chef-expander(8) -- fetches messages from RabbitMQ, processes, and loads into chef-solr
1
+ chef-expander-cluster(8) -- fetches messages from RabbitMQ, processes, and loads into chef-solr
2
2
  ========================================
3
3
 
4
4
  ## SYNOPSIS
5
5
 
6
- __chef-expander__ _(options)_
6
+ __chef-expander-cluster__ _(options)_
7
7
 
8
8
  * `-c`, `--config CONFIG_FILE`:
9
9
  a configuration file to use
@@ -33,13 +33,13 @@ __Running Chef Expander__
33
33
 
34
34
  Chef Expander is designed for clustered operation, though small
35
35
  installations will only need one worker process. To run Chef
36
- Expander with one worker process, run chef-expander -n 1.
36
+ Expander with one worker process, run chef-expander-cluster -n 1.
37
37
  You will then have a master and worker process, which looks like
38
38
  this in ps:
39
39
 
40
40
  your-shell> ps aux|grep expander
41
41
  you 52110 0.1 0.7 2515476 62748 s003 S+ 3:49PM 0:00.80 chef-expander worker #1 (vnodes 0-1023)
42
- you 52108 0.1 0.5 2492880 41696 s003 S+ 3:49PM 0:00.91 ruby bin/chef-expander -n 1
42
+ you 52108 0.1 0.5 2492880 41696 s003 S+ 3:49PM 0:00.91 ruby bin/chef-expander-cluster -n 1
43
43
 
44
44
  Workers are single threaded and therefore cannot use more than 100%
45
45
  of a single CPU. If you find that your queues are getting backlogged,
@@ -33,7 +33,7 @@ start() {
33
33
  [ -x $exec ] || exit 5
34
34
  [ -f $config ] || exit 6
35
35
  echo -n $"Starting $prog: "
36
- daemon $prog -d -c "$config" -L "$logfile" -P "$pidfile" "$options"
36
+ daemon $prog -d -c "$config" -L "$logfile" "$options"
37
37
  retval=$?
38
38
  echo
39
39
  [ $retval -eq 0 ] && touch $lockfile
@@ -33,7 +33,7 @@ start() {
33
33
  [ -x $exec ] || exit 5
34
34
  [ -f $config ] || exit 6
35
35
  echo -n $"Starting $prog: "
36
- daemon $prog -d -c "$config" -L "$logfile" -P "$pidfile" "$options"
36
+ daemon $prog -d -c "$config" -L "$logfile" "$options"
37
37
  retval=$?
38
38
  echo
39
39
  [ $retval -eq 0 ] && touch $lockfile
@@ -38,4 +38,3 @@ require 'chef/monkey_patches/tempfile'
38
38
  require 'chef/monkey_patches/dir'
39
39
  require 'chef/monkey_patches/string'
40
40
  require 'chef/monkey_patches/numeric'
41
- require 'chef/monkey_patches/object'
@@ -60,12 +60,6 @@ class Chef
60
60
  }
61
61
  }
62
62
 
63
- INDEX_OBJECT_TYPE = 'client'.freeze
64
-
65
- def self.index_object_type
66
- INDEX_OBJECT_TYPE
67
- end
68
-
69
63
  attr_accessor :couchdb_rev, :couchdb_id, :couchdb
70
64
 
71
65
  # Create a new Chef::ApiClient object.
@@ -127,12 +127,13 @@ class Chef::Application
127
127
  class << self
128
128
  def debug_stacktrace(e)
129
129
  message = "#{e.class}: #{e}\n#{e.backtrace.join("\n")}"
130
- chef_stacktrace_out = "Generated at #{Time.now.to_s}\n"
131
- chef_stacktrace_out += message
132
-
133
- Chef::FileCache.store("chef-stacktrace.out", chef_stacktrace_out)
134
- Chef::Log.fatal("Stacktrace dumped to #{Chef::FileCache.load("chef-stacktrace.out", false)}")
130
+ filename = File.join(Chef::Config[:file_cache_path], "chef-stacktrace.out")
131
+ Chef::Log.fatal("Stacktrace dumped to #{filename}")
135
132
  Chef::Log.debug(message)
133
+ chef_stacktrace_out = File.open(filename, "w")
134
+ chef_stacktrace_out.puts "Generated at #{Time.now.to_s}"
135
+ chef_stacktrace_out.puts message
136
+ chef_stacktrace_out.close
136
137
  true
137
138
  end
138
139
 
@@ -128,11 +128,6 @@ class Chef::Application::Client < Chef::Application
128
128
  :description => "Set the client key file location",
129
129
  :proc => nil
130
130
 
131
- option :environment,
132
- :short => '-E ENVIRONMENT',
133
- :long => '--environment ENVIRONMENT',
134
- :description => 'Set the Chef Environment on the node'
135
-
136
131
  option :version,
137
132
  :short => "-v",
138
133
  :long => "--version",
@@ -100,11 +100,8 @@ class Chef
100
100
  raise
101
101
  end
102
102
  end
103
-
104
103
  # files are uploaded, so save the manifest
105
- save_url = opts[:force] ? cookbook.force_save_url : cookbook.save_url
106
- rest.put_rest(save_url, cookbook)
107
-
104
+ opts[:force] ? cookbook.force_save : cookbook.save
108
105
  Chef::Log.info("Upload complete!")
109
106
  end
110
107
 
@@ -823,18 +823,21 @@ class Chef
823
823
  self.class.chef_server_rest
824
824
  end
825
825
 
826
- # Return the URL to save (PUT) this object to the server via the
827
- # REST api. If there is an existing document on the server and it
828
- # is marked frozen, a PUT will result in a 409 Conflict.
829
- def save_url
830
- "cookbooks/#{name}/#{version}"
831
- end
832
-
833
- # Adds the `force=true` parameter to the upload URL. This allows
834
- # the user to overwrite a frozen cookbook (a PUT against the
835
- # normal #save_url raises a 409 Conflict in this case).
836
- def force_save_url
837
- "cookbooks/#{name}/#{version}?force=true"
826
+ # Save this object to the server via the REST api. If there is an existing
827
+ # document on the server and it is marked frozen, a
828
+ # Net::HTTPServerException will be raised for 409 Conflict.
829
+ def save
830
+ chef_server_rest.put_rest("cookbooks/#{name}/#{version}", self)
831
+ self
832
+ end
833
+ alias :create :save
834
+
835
+ # Adds the `force=true` parameter to the upload. This allows the user to
836
+ # overwrite a frozen cookbook (normal #save raises a
837
+ # Net::HTTPServerException for 409 Conflict in this case).
838
+ def force_save
839
+ chef_server_rest.put_rest("cookbooks/#{name}/#{version}?force=true", self)
840
+ self
838
841
  end
839
842
 
840
843
  def destroy
@@ -218,17 +218,17 @@ class Chef
218
218
  def save(item_id=@raw_data['id'])
219
219
  r = chef_server_rest
220
220
  begin
221
- r.put_rest("data/#{data_bag}/#{item_id}", self)
221
+ r.put_rest("data/#{data_bag}/#{item_id}", @raw_data)
222
222
  rescue Net::HTTPServerException => e
223
223
  raise e unless e.response.code == "404"
224
- r.post_rest("data/#{data_bag}", self)
224
+ r.post_rest("data/#{data_bag}", @raw_data)
225
225
  end
226
226
  self
227
227
  end
228
228
 
229
229
  # Create this Data Bag Item via RESTful API
230
230
  def create
231
- chef_server_rest.post_rest("data/#{data_bag}", self)
231
+ chef_server_rest.post_rest("data/#{data_bag}", @raw_data)
232
232
  self
233
233
  end
234
234
 
@@ -24,8 +24,15 @@ class Chef
24
24
  class ErrorReport < ::Chef::Handler
25
25
 
26
26
  def report
27
- Chef::FileCache.store("failed-run-data.json", Chef::JSONCompat.to_json_pretty(data))
28
- Chef::Log.fatal("Saving node information to #{Chef::FileCache.load("failed-run-data.json", false)}")
27
+ Chef::Log.fatal("Saving node information to #{report_path}")
28
+
29
+ File.open(report_path, "w") do |file|
30
+ file.puts Chef::JSONCompat.to_json_pretty(data)
31
+ end
32
+ end
33
+
34
+ def report_path
35
+ File.join(Chef::Config[:file_cache_path], "failed-run-data.json")
29
36
  end
30
37
 
31
38
  end
@@ -407,7 +407,6 @@ class Chef
407
407
  when NameError, NoMethodError
408
408
  ui.error "knife encountered an unexpected error"
409
409
  ui.info "This may be a bug in the '#{self.class.common_name}' knife command or plugin"
410
- ui.info "Please collect the output of this command with the `-VV` option before filing a bug report."
411
410
  ui.info "Exception: #{e.class.name}: #{e.message}"
412
411
  when Chef::Exceptions::PrivateKeyMissing
413
412
  ui.error "Your private key could not be loaded from #{api_key}"
@@ -24,13 +24,11 @@ class Chef
24
24
  class Bootstrap < Knife
25
25
 
26
26
  deps do
27
- require 'chef/knife/core/bootstrap_context'
28
27
  require 'chef/json_compat'
29
28
  require 'tempfile'
30
29
  require 'highline'
31
30
  require 'net/ssh'
32
31
  require 'net/ssh/multi'
33
- Chef::Knife::Ssh.load_deps
34
32
  end
35
33
 
36
34
  banner "knife bootstrap FQDN (options)"
@@ -68,9 +66,9 @@ class Chef
68
66
  :description => "Install the pre-release chef gems"
69
67
 
70
68
  option :bootstrap_version,
71
- :long => "--bootstrap-version VERSION",
69
+ :long => "--bootstrap-version",
72
70
  :description => "The version of Chef to install",
73
- :proc => lambda { |v| Chef::Config[:knife][:bootstrap_version] = v }
71
+ :proc => lambda { |v| Chef::Config[:bootstrap_version] = v }
74
72
 
75
73
  option :distro,
76
74
  :short => "-d DISTRO",
@@ -128,7 +126,9 @@ class Chef
128
126
  end
129
127
 
130
128
  def render_template(template=nil)
131
- context = Knife::Core::BootstrapContext.new(config, config[:run_list], Chef::Config)
129
+ context = {}
130
+ context[:run_list] = config[:run_list]
131
+ context[:config] = config
132
132
  Erubis::Eruby.new(template).evaluate(context)
133
133
  end
134
134
 
@@ -193,6 +193,36 @@ class Chef
193
193
  command
194
194
  end
195
195
 
196
+ module TemplateHelper
197
+
198
+ #
199
+ # == Chef::Knife::Bootstrap::TemplateHelper
200
+ #
201
+ # The methods in the TemplateHelper module expect to have access to
202
+ # the instance varialbles set above as part of the context in the
203
+ # Chef::Knife::Bootstrap#render_context method. Those instance
204
+ # variables are:
205
+ #
206
+ # * @config - a hash of knife's config values
207
+ # * @run_list - the run list for the node to boostrap
208
+ #
209
+
210
+ ::Erubis::Context.send(:include, Chef::Knife::Bootstrap::TemplateHelper)
211
+
212
+ def bootstrap_version_string(type=nil)
213
+ version = Chef::Config[:bootstrap_version] || Chef::VERSION
214
+ case type
215
+ when :gems
216
+ if @config[:prerelease]
217
+ "--prerelease"
218
+ else
219
+ "--version #{version}"
220
+ end
221
+ else
222
+ version
223
+ end
224
+ end
225
+ end
196
226
  end
197
227
  end
198
228
  end
@@ -4,7 +4,7 @@ if [ ! -f /usr/bin/chef-client ]; then
4
4
  pacman -S --noconfirm ruby ntp base-devel
5
5
  ntpdate -u pool.ntp.org
6
6
  gem install ohai --no-rdoc --no-ri --verbose
7
- gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
7
+ gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string(:gems) %>
8
8
  fi
9
9
 
10
10
  mkdir -p /etc/chef
@@ -1,9 +1,9 @@
1
1
  bash -c '
2
2
  if [ ! -f /usr/bin/chef-client ]; then
3
3
  rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
4
- wget -O /etc/yum.repos.d/aegis.repo http://rpm.aegisco.com/aegisco/el5/aegisco.repo
4
+ rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
5
5
 
6
- yum install -y ruby-1.8.7.334-2.el5 ruby-devel-1.8.7.334-2.el5 gcc gcc-c++ automake autoconf make
6
+ yum install -y ruby ruby-devel gcc gcc-c++ automake autoconf make
7
7
 
8
8
  cd /tmp
9
9
  wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
@@ -15,13 +15,13 @@ fi
15
15
  gem update --system
16
16
  gem update
17
17
  gem install ohai --no-rdoc --no-ri --verbose
18
- gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %>
18
+ gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string(:gems) %>
19
19
 
20
20
  mkdir -p /etc/chef
21
21
 
22
22
  (
23
23
  cat <<'EOP'
24
- <%= validation_key %>
24
+ <%= IO.read(Chef::Config[:validation_key]) %>
25
25
  EOP
26
26
  ) > /tmp/validation.pem
27
27
  awk NF /tmp/validation.pem > /etc/chef/validation.pem
@@ -29,7 +29,15 @@ rm /tmp/validation.pem
29
29
 
30
30
  (
31
31
  cat <<'EOP'
32
- <%= config_content %>
32
+ log_level :info
33
+ log_location STDOUT
34
+ chef_server_url "<%= Chef::Config[:chef_server_url] %>"
35
+ validation_client_name "<%= Chef::Config[:validation_client_name] %>"
36
+ <% if @config[:chef_node_name] == nil %>
37
+ # Using default node name (fqdn)
38
+ <% else %>
39
+ node_name "<%= @config[:chef_node_name] %>"
40
+ <% end %>
33
41
  EOP
34
42
  ) > /etc/chef/client.rb
35
43
 
@@ -39,4 +47,4 @@ cat <<'EOP'
39
47
  EOP
40
48
  ) > /etc/chef/first-boot.json
41
49
 
42
- <%= start_chef %>'
50
+ /usr/bin/chef-client -j /etc/chef/first-boot.json'