chef 0.9.6 → 0.9.8.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. data/lib/chef/application.rb +19 -3
  2. data/lib/chef/application/client.rb +7 -8
  3. data/lib/chef/application/knife.rb +9 -3
  4. data/lib/chef/application/solo.rb +5 -5
  5. data/lib/chef/cache/checksum.rb +2 -2
  6. data/lib/chef/client.rb +30 -64
  7. data/lib/chef/config.rb +52 -30
  8. data/lib/chef/cookbook/metadata.rb +12 -1
  9. data/lib/chef/cookbook_site_streaming_uploader.rb +211 -0
  10. data/lib/chef/cookbook_uploader.rb +102 -0
  11. data/lib/chef/cookbook_version.rb +47 -30
  12. data/lib/chef/couchdb.rb +1 -11
  13. data/lib/chef/exceptions.rb +1 -0
  14. data/lib/chef/file_access_control.rb +1 -1
  15. data/lib/chef/index_queue/amqp_client.rb +10 -3
  16. data/lib/chef/knife.rb +154 -58
  17. data/lib/chef/knife/bootstrap.rb +84 -48
  18. data/lib/chef/knife/bootstrap/centos5-gems.erb +41 -0
  19. data/lib/chef/knife/bootstrap/fedora13-gems.erb +38 -0
  20. data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +44 -0
  21. data/lib/chef/knife/client_bulk_delete.rb +1 -1
  22. data/lib/chef/knife/client_create.rb +1 -1
  23. data/lib/chef/knife/client_delete.rb +1 -1
  24. data/lib/chef/knife/client_edit.rb +1 -1
  25. data/lib/chef/knife/client_list.rb +1 -1
  26. data/lib/chef/knife/client_reregister.rb +1 -1
  27. data/lib/chef/knife/client_show.rb +1 -1
  28. data/lib/chef/knife/configure.rb +1 -1
  29. data/lib/chef/knife/configure_client.rb +1 -1
  30. data/lib/chef/knife/cookbook_bulk_delete.rb +1 -1
  31. data/lib/chef/knife/cookbook_create.rb +159 -0
  32. data/lib/chef/knife/cookbook_delete.rb +6 -6
  33. data/lib/chef/knife/cookbook_download.rb +1 -1
  34. data/lib/chef/knife/cookbook_list.rb +1 -1
  35. data/lib/chef/knife/cookbook_metadata.rb +1 -1
  36. data/lib/chef/knife/cookbook_metadata_from_file.rb +1 -1
  37. data/lib/chef/knife/cookbook_show.rb +1 -1
  38. data/lib/chef/knife/cookbook_site_download.rb +2 -1
  39. data/lib/chef/knife/cookbook_site_list.rb +2 -1
  40. data/lib/chef/knife/cookbook_site_search.rb +2 -1
  41. data/lib/chef/knife/cookbook_site_share.rb +108 -0
  42. data/lib/chef/knife/cookbook_site_show.rb +2 -1
  43. data/lib/chef/knife/cookbook_site_unshare.rb +52 -0
  44. data/lib/chef/knife/cookbook_site_vendor.rb +3 -2
  45. data/lib/chef/knife/cookbook_test.rb +1 -1
  46. data/lib/chef/knife/cookbook_upload.rb +22 -155
  47. data/lib/chef/knife/data_bag_create.rb +2 -1
  48. data/lib/chef/knife/data_bag_delete.rb +2 -1
  49. data/lib/chef/knife/data_bag_edit.rb +2 -1
  50. data/lib/chef/knife/data_bag_from_file.rb +2 -1
  51. data/lib/chef/knife/data_bag_list.rb +2 -1
  52. data/lib/chef/knife/data_bag_show.rb +2 -1
  53. data/lib/chef/knife/ec2_instance_data.rb +1 -1
  54. data/lib/chef/knife/ec2_server_create.rb +16 -4
  55. data/lib/chef/knife/ec2_server_delete.rb +8 -2
  56. data/lib/chef/knife/ec2_server_list.rb +8 -2
  57. data/lib/chef/knife/index_rebuild.rb +1 -1
  58. data/lib/chef/knife/node_bulk_delete.rb +1 -1
  59. data/lib/chef/knife/node_create.rb +1 -1
  60. data/lib/chef/knife/node_delete.rb +1 -1
  61. data/lib/chef/knife/node_edit.rb +1 -1
  62. data/lib/chef/knife/node_from_file.rb +1 -1
  63. data/lib/chef/knife/node_list.rb +1 -1
  64. data/lib/chef/knife/node_run_list_add.rb +1 -1
  65. data/lib/chef/knife/node_run_list_remove.rb +1 -1
  66. data/lib/chef/knife/node_show.rb +1 -1
  67. data/lib/chef/knife/rackspace_server_create.rb +1 -1
  68. data/lib/chef/knife/rackspace_server_delete.rb +1 -1
  69. data/lib/chef/knife/rackspace_server_list.rb +1 -1
  70. data/lib/chef/knife/recipe_list.rb +1 -1
  71. data/lib/chef/knife/role_bulk_delete.rb +1 -1
  72. data/lib/chef/knife/role_create.rb +1 -1
  73. data/lib/chef/knife/role_delete.rb +1 -1
  74. data/lib/chef/knife/role_edit.rb +1 -1
  75. data/lib/chef/knife/role_from_file.rb +1 -1
  76. data/lib/chef/knife/role_list.rb +1 -1
  77. data/lib/chef/knife/role_show.rb +1 -1
  78. data/lib/chef/knife/search.rb +1 -1
  79. data/lib/chef/knife/slicehost_images_list.rb +1 -1
  80. data/lib/chef/knife/slicehost_server_create.rb +1 -1
  81. data/lib/chef/knife/slicehost_server_delete.rb +1 -1
  82. data/lib/chef/knife/slicehost_server_list.rb +1 -1
  83. data/lib/chef/knife/ssh.rb +49 -9
  84. data/lib/chef/knife/status.rb +2 -2
  85. data/lib/chef/knife/terremark_server_create.rb +1 -1
  86. data/lib/chef/knife/terremark_server_delete.rb +1 -1
  87. data/lib/chef/knife/terremark_server_list.rb +1 -1
  88. data/lib/chef/mixin/command.rb +17 -204
  89. data/lib/chef/mixin/command/unix.rb +215 -0
  90. data/lib/chef/mixin/command/windows.rb +72 -0
  91. data/lib/chef/mixin/find_preferred_file.rb +3 -3
  92. data/lib/chef/mixin/language.rb +64 -23
  93. data/lib/chef/node.rb +27 -3
  94. data/lib/chef/node/attribute.rb +20 -10
  95. data/lib/chef/platform.rb +3 -9
  96. data/lib/chef/provider/cron.rb +1 -1
  97. data/lib/chef/provider/deploy.rb +4 -1
  98. data/lib/chef/provider/group.rb +1 -1
  99. data/lib/chef/provider/group/dscl.rb +2 -2
  100. data/lib/chef/provider/mount/mount.rb +6 -6
  101. data/lib/chef/provider/package/easy_install.rb +8 -7
  102. data/lib/chef/provider/package/pacman.rb +1 -1
  103. data/lib/chef/provider/package/rpm.rb +4 -4
  104. data/lib/chef/provider/package/solaris.rb +127 -0
  105. data/lib/chef/provider/package/yum.rb +51 -28
  106. data/lib/chef/provider/remote_directory.rb +5 -2
  107. data/lib/chef/provider/remote_file.rb +1 -1
  108. data/lib/chef/provider/ruby_block.rb +1 -0
  109. data/lib/chef/provider/script.rb +2 -2
  110. data/lib/chef/provider/service/debian.rb +40 -4
  111. data/lib/chef/provider/service/freebsd.rb +1 -1
  112. data/lib/chef/provider/service/upstart.rb +3 -10
  113. data/lib/chef/provider/user/dscl.rb +2 -2
  114. data/lib/chef/providers.rb +1 -0
  115. data/lib/chef/resource.rb +7 -8
  116. data/lib/chef/resource/service.rb +17 -0
  117. data/lib/chef/resource/solaris_package.rb +36 -0
  118. data/lib/chef/resource/yum_package.rb +11 -4
  119. data/lib/chef/rest/rest_request.rb +18 -1
  120. data/lib/chef/run_list/run_list_expansion.rb +4 -0
  121. data/lib/chef/run_list/run_list_item.rb +8 -1
  122. data/lib/chef/shef/ext.rb +1 -1
  123. data/lib/chef/shef/shef_session.rb +7 -3
  124. data/lib/chef/tasks/chef_repo.rake +1 -0
  125. data/lib/chef/version.rb +2 -1
  126. metadata +23 -8
  127. data/lib/chef/cache/file_cache_by_checksum.rb +0 -52
@@ -66,14 +66,22 @@ class Chef::Application
66
66
  def configure_chef
67
67
  parse_options
68
68
 
69
- unless config[:config_file] && File.file?(config[:config_file])
69
+ begin
70
+ case config[:config_file]
71
+ when /^(http|https):\/\//
72
+ Chef::REST.new("", nil, nil).fetch(config[:config_file]) { |f| apply_config(f.path) }
73
+ else
74
+ ::File::open(config[:config_file]) { |f| apply_config(f.path) }
75
+ end
76
+ rescue SocketError => error
77
+ Chef::Application.fatal!("Error getting config file #{Chef::Config[:config_file]}", 2)
78
+ rescue Exception => error
70
79
  Chef::Log.warn("*****************************************")
71
80
  Chef::Log.warn("Can not find config file: #{config[:config_file]}, using defaults.")
81
+ Chef::Log.warn("#{error.message}")
72
82
  Chef::Log.warn("*****************************************")
73
83
  end
74
84
 
75
- Chef::Config.from_file(config[:config_file]) if !config[:config_file].nil? && File.exists?(config[:config_file]) && File.readable?(config[:config_file])
76
- Chef::Config.merge!(config)
77
85
  end
78
86
 
79
87
  # Initialize and configure the logger
@@ -92,6 +100,14 @@ class Chef::Application
92
100
  raise Chef::Exceptions::Application, "#{self.to_s}: you must override run_application"
93
101
  end
94
102
 
103
+ private
104
+
105
+ def apply_config(config_file_path)
106
+ Chef::Config.from_file(config_file_path)
107
+ Chef::Config.merge!(config)
108
+ end
109
+
110
+
95
111
  class << self
96
112
  # Log a fatal error message to both STDERR and the Logger, exit the application
97
113
  def fatal!(msg, err = -1)
@@ -181,17 +181,12 @@ class Chef::Application::Client < Chef::Application
181
181
 
182
182
  def configure_logging
183
183
  super
184
- Mixlib::Authentication::Log.logger = Chef::Log.logger
184
+ Chef::Log.verbose = Chef::Config[:verbose_logging]
185
+ Mixlib::Authentication::Log.logger = Ohai::Log.logger = Chef::Log.logger
185
186
  end
186
187
 
187
- # Setup an instance of the chef client
188
- # Why is this so ugly? surely the client should just read out of chef::config instead of needing the values to be assigned like this..
189
188
  def setup_application
190
189
  Chef::Daemon.change_privilege
191
-
192
- @chef_client = Chef::Client.new
193
- @chef_client.json_attribs = @chef_client_json
194
- @chef_client.node_name = Chef::Config[:node_name]
195
190
  end
196
191
 
197
192
  # Run the chef client, optionally daemonizing or looping at intervals.
@@ -211,9 +206,11 @@ class Chef::Application::Client < Chef::Application
211
206
  Chef::Log.debug("Splay sleep #{splay} seconds")
212
207
  sleep splay
213
208
  end
209
+ @chef_client = Chef::Client.new(@chef_client_json)
210
+ @chef_client_json = nil
214
211
 
215
212
  @chef_client.run
216
-
213
+ @chef_client = nil
217
214
  if Chef::Config[:interval]
218
215
  Chef::Log.debug("Sleeping for #{Chef::Config[:interval]} seconds")
219
216
  sleep Chef::Config[:interval]
@@ -232,6 +229,8 @@ class Chef::Application::Client < Chef::Application
232
229
  else
233
230
  raise
234
231
  end
232
+ ensure
233
+ GC.start
235
234
  end
236
235
  end
237
236
  end
@@ -111,8 +111,7 @@ class Chef::Application::Knife < Chef::Application
111
111
  # Run knife
112
112
  def run
113
113
  validate_and_parse_options
114
- knife = Chef::Knife.find_command(ARGV, self.class.options)
115
- knife.run
114
+ Chef::Knife.run(ARGV, options)
116
115
  exit 0
117
116
  end
118
117
 
@@ -121,7 +120,10 @@ class Chef::Application::Knife < Chef::Application
121
120
  def validate_and_parse_options
122
121
  # Checking ARGV validity *before* parse_options because parse_options
123
122
  # mangles ARGV in some situations
124
- print_help_and_exit(2, "Sorry, you need to pass a sub-command first!") if no_subcommand_given?
123
+ if no_subcommand_given?
124
+ print_help_and_exit if want_help?
125
+ print_help_and_exit(2, "Sorry, you need to pass a sub-command first!")
126
+ end
125
127
  print_help_and_exit if no_command_given?
126
128
  end
127
129
 
@@ -132,6 +134,10 @@ class Chef::Application::Knife < Chef::Application
132
134
  def no_command_given?
133
135
  ARGV.empty?
134
136
  end
137
+
138
+ def want_help?
139
+ ARGV[0] =~ /^(--help|-h)$/
140
+ end
135
141
 
136
142
  def print_help_and_exit(exitcode=1, fatal_message=nil)
137
143
  Chef::Log.fatal(fatal_message) if fatal_message
@@ -171,10 +171,6 @@ class Chef::Application::Solo < Chef::Application
171
171
 
172
172
  def setup_application
173
173
  Chef::Daemon.change_privilege
174
-
175
- @chef_solo = Chef::Client.new
176
- @chef_solo.json_attribs = @chef_solo_json
177
- @chef_solo.node_name = Chef::Config[:node_name]
178
174
  end
179
175
 
180
176
  def run_application
@@ -190,8 +186,10 @@ class Chef::Application::Solo < Chef::Application
190
186
  sleep splay
191
187
  end
192
188
 
189
+ @chef_solo = Chef::Client.new(@chef_solo_json)
190
+ @chef_solo_json = nil
193
191
  @chef_solo.run
194
-
192
+ @chef_solo = nil
195
193
  if Chef::Config[:interval]
196
194
  Chef::Log.debug("Sleeping for #{Chef::Config[:interval]} seconds")
197
195
  sleep Chef::Config[:interval]
@@ -210,6 +208,8 @@ class Chef::Application::Solo < Chef::Application
210
208
  else
211
209
  raise
212
210
  end
211
+ ensure
212
+ GC.start
213
213
  end
214
214
  end
215
215
  end
@@ -26,7 +26,7 @@ class Chef
26
26
  class Checksum < Chef::Cache
27
27
  # singleton is inherited from Chef::Cache, but we like to be explicit.
28
28
  include ::Singleton
29
-
29
+
30
30
  def self.checksum_for_file(*args)
31
31
  instance.checksum_for_file(*args)
32
32
  end
@@ -36,7 +36,7 @@ class Chef
36
36
  fstat = File.stat(file)
37
37
  lookup_checksum(key, fstat) || generate_checksum(key, file, fstat)
38
38
  end
39
-
39
+
40
40
  def lookup_checksum(key, fstat)
41
41
  cached = @moneta.fetch(key)
42
42
  if cached && file_unchanged?(cached, fstat)
@@ -32,26 +32,25 @@ require 'chef/cookbook/cookbook_collection'
32
32
  require 'chef/cookbook/file_vendor'
33
33
  require 'chef/cookbook/file_system_file_vendor'
34
34
  require 'chef/cookbook/remote_file_vendor'
35
+ require 'chef/version'
35
36
  require 'ohai'
36
37
 
37
38
  class Chef
38
39
  class Client
40
+ attr_accessor :node
41
+ attr_accessor :ohai
42
+ attr_accessor :rest
43
+ attr_accessor :runner
44
+
39
45
  # TODO: timh/cw: 5-19-2010: json_attribs should be moved to RunContext?
40
- attr_accessor :node, :registration, :json_attribs, :node_name, :ohai, :rest, :runner
41
- attr_reader :node_exists
42
-
46
+ attr_reader :json_attribs
47
+
43
48
  # Creates a new Chef::Client.
44
- def initialize()
49
+ def initialize(json_attribs=nil)
50
+ @json_attribs = json_attribs
45
51
  @node = nil
46
- @registration = nil
47
- @json_attribs = nil
48
- @node_name = nil
49
- @node_exists = true
50
52
  @runner = nil
51
53
  @ohai = Ohai::System.new
52
- Chef::Log.verbose = Chef::Config[:verbose_logging]
53
- Mixlib::Authentication::Log.logger = Ohai::Log.logger = Chef::Log.logger
54
- @ohai_has_run = false
55
54
  end
56
55
 
57
56
  # Do a full run for this Chef::Client. Calls:
@@ -65,18 +64,16 @@ class Chef
65
64
  # === Returns
66
65
  # true:: Always returns true.
67
66
  def run
68
- self.runner = nil
69
67
  run_context = nil
70
68
 
71
69
  run_ohai
72
- determine_node_name
73
70
  register unless Chef::Config[:solo]
74
71
  build_node
75
72
 
76
73
  begin
77
74
  run_status = Chef::RunStatus.new(node)
78
75
  run_status.start_clock
79
- Chef::Log.info("Starting Chef Run")
76
+ Chef::Log.info("Starting Chef Run (Version #{Chef::VERSION})")
80
77
 
81
78
  if Chef::Config[:solo]
82
79
  Chef::Cookbook::FileVendor.on_create { |manifest| Chef::Cookbook::FileSystemFileVendor.new(manifest) }
@@ -91,8 +88,6 @@ class Chef
91
88
  # cache.
92
89
  valid_cache_entries = Hash.new
93
90
 
94
- save_node
95
-
96
91
  # Sync_cookbooks eagerly loads all files except files and templates.
97
92
  # It returns the cookbook_hash -- the return result from
98
93
  # /nodes/#{nodename}/cookbooks -- which we will use for our
@@ -103,10 +98,10 @@ class Chef
103
98
  run_status.run_context = run_context
104
99
 
105
100
  assert_cookbook_path_not_empty(run_context)
106
- save_node
107
101
 
108
102
  converge(run_context)
109
- save_node
103
+ Chef::Log.debug("Saving the current state of node #{node_name}")
104
+ @node.save
110
105
 
111
106
  cleanup_file_cache(valid_cache_entries)
112
107
  end
@@ -143,25 +138,19 @@ class Chef
143
138
  end
144
139
 
145
140
  def run_ohai
146
- if ohai.keys
147
- ohai.refresh_plugins
148
- else
149
- ohai.all_plugins
150
- end
141
+ ohai.all_plugins
151
142
  end
152
143
 
153
- def determine_node_name
154
- unless node_name
155
- if Chef::Config[:node_name]
156
- @node_name = Chef::Config[:node_name]
157
- else
158
- @node_name = ohai[:fqdn] ? ohai[:fqdn] : ohai[:hostname]
159
- Chef::Config[:node_name] = node_name
160
- end
144
+ def node_name
145
+ name = Chef::Config[:node_name] || ohai[:fqdn] || ohai[:hostname]
146
+ Chef::Config[:node_name] = name
161
147
 
162
- raise RuntimeError, "Unable to determine node name from ohai" unless node_name
148
+ unless name
149
+ msg = "Unable to determine node name: configure node_name or configure the system's hostname and fqdn"
150
+ raise Chef::Exceptions::CannotDetermineNodeName, msg
163
151
  end
164
- node_name
152
+
153
+ name
165
154
  end
166
155
 
167
156
  # Builds a new node object for this client. Starts with querying for the FQDN of the current
@@ -171,24 +160,16 @@ class Chef
171
160
  # node<Chef::Node>:: Returns the created node object, also stored in @node
172
161
  def build_node
173
162
  Chef::Log.debug("Building node object for #{@node_name}")
174
-
175
- unless Chef::Config[:solo]
176
- begin
177
- @node = rest.get_rest("nodes/#{@node_name}")
178
- rescue Net::HTTPServerException => e
179
- raise unless e.message =~ /^404/
180
- end
181
- end
182
-
183
- unless node
184
- @node_exists = false
185
- @node = Chef::Node.new
186
- @node.name(node_name)
163
+
164
+ if Chef::Config[:solo]
165
+ @node = Chef::Node.build(node_name)
166
+ else
167
+ @node = Chef::Node.find_or_create(node_name)
187
168
  end
188
169
 
189
- @node.prepare_for_run(ohai.data, @json_attribs)
190
- # Need to nil-ify the json attribs so they are not applied on subsequent runs
191
- @json_attribs = nil
170
+ @node.process_external_attrs(ohai.data, @json_attribs)
171
+ @node.save unless Chef::Config[:solo]
172
+ @node.reset_defaults_and_overrides
192
173
 
193
174
  @node
194
175
  end
@@ -309,21 +290,6 @@ class Chef
309
290
  end
310
291
  end
311
292
 
312
- # Updates the current node configuration on the server.
313
- #
314
- # === Returns
315
- # Chef::Node - the current node
316
- def save_node
317
- Chef::Log.debug("Saving the current state of node #{node_name}")
318
- if node_exists
319
- @node = @node.save
320
- else
321
- result = rest.post_rest("nodes", node)
322
- @node_exists = true
323
- @node = rest.get_rest(result['uri'])
324
- end
325
- end
326
-
327
293
  # Converges the node.
328
294
  #
329
295
  # === Returns
@@ -47,28 +47,27 @@ class Chef
47
47
  end
48
48
 
49
49
  # Override the config dispatch to set the value of multiple server options simultaneously
50
- #
50
+ #
51
51
  # === Parameters
52
52
  # url<String>:: String to be set for all of the chef-server-api URL's
53
53
  #
54
54
  config_attr_writer :chef_server_url do |url|
55
55
  configure do |c|
56
56
  [ :registration_url,
57
- :openid_url,
58
57
  :template_url,
59
58
  :remotefile_url,
60
59
  :search_url,
61
60
  :chef_server_url,
62
- :role_url ].each do |u|
61
+ :role_url ].each do |u|
63
62
  c[u] = url
64
63
  end
65
64
  end
66
65
  url
67
66
  end
68
67
 
69
- # When you are using ActiveSupport, they monkey-patch 'daemonize' into Kernel.
68
+ # When you are using ActiveSupport, they monkey-patch 'daemonize' into Kernel.
70
69
  # So while this is basically identical to what method_missing would do, we pull
71
- # it up here and get a real method written so that things get dispatched
70
+ # it up here and get a real method written so that things get dispatched
72
71
  # properly.
73
72
  config_attr_writer :daemonize do |v|
74
73
  configure do |c|
@@ -101,21 +100,43 @@ class Chef
101
100
  providers
102
101
  end
103
102
 
103
+ # Used when OpenID authentication is enabled in the Web UI
104
104
  authorized_openid_identifiers nil
105
105
  authorized_openid_providers nil
106
+ openid_cstore_couchdb false
107
+ openid_cstore_path "/var/chef/openid/cstore"
108
+
109
+ # The number of times the client should retry when registering with the server
106
110
  client_registration_retries 5
111
+
112
+ # Where the cookbooks are located. Meaning is somewhat context dependent between
113
+ # knife, chef-client, and chef-solo.
107
114
  cookbook_path [ "/var/chef/cookbooks", "/var/chef/site-cookbooks" ]
108
- cookbook_tarball_path "/var/chef/cookbook-tarballs"
115
+
116
+ # Where files are stored temporarily during uploads
109
117
  sandbox_path "/var/chef/sandboxes"
118
+
119
+ # Where cookbook files are stored on the server (by content checksum)
110
120
  checksum_path "/var/chef/checksums"
121
+
122
+ # CouchDB database name to use
111
123
  couchdb_database "chef"
124
+
112
125
  couchdb_url "http://localhost:5984"
113
- couchdb_version nil
114
- delay 0
115
- executable_path ENV['PATH'] ? ENV['PATH'].split(File::PATH_SEPARATOR) : []
126
+
127
+ # Where chef's cache files should be stored
116
128
  file_cache_path "/var/chef/cache"
129
+
130
+ # Where backups of chef-managed files should go
117
131
  file_backup_path "/var/chef/backup"
132
+
133
+ ## Daemonization Settings ##
134
+ # What user should Chef run as?
135
+ user nil
136
+ # What group should the chef-server, -solr, -solr-indexer run as
118
137
  group nil
138
+ umask 0022
139
+
119
140
  http_retry_count 5
120
141
  http_retry_delay 5
121
142
  interval nil
@@ -125,52 +146,53 @@ class Chef
125
146
  verbose_logging nil
126
147
  node_name nil
127
148
  node_path "/var/chef/node"
128
- openid_cstore_couchdb false
129
- openid_cstore_path "/var/chef/openid/cstore"
130
- openid_providers nil
131
- openid_store_couchdb false
132
- openid_store_path "/var/chef/openid/db"
133
- openid_url "http://localhost:4001"
149
+
134
150
  pid_file nil
135
- queue_host "localhost"
136
- queue_password ""
137
- queue_port 61613
138
- queue_retry_count 5
139
- queue_retry_delay 5
140
- queue_user ""
141
- chef_server_url "http://localhost:4000"
142
- registration_url "http://localhost:4000"
151
+
152
+ chef_server_url "http://localhost:4000"
153
+ registration_url "http://localhost:4000"
154
+ template_url "http://localhost:4000"
155
+ role_url "http://localhost:4000"
156
+ remotefile_url "http://localhost:4000"
157
+ search_url "http://localhost:4000"
158
+
143
159
  client_url "http://localhost:4042"
144
- remotefile_url "http://localhost:4000"
160
+
145
161
  rest_timeout 300
146
162
  run_command_stderr_timeout 120
147
163
  run_command_stdout_timeout 120
148
- search_url "http://localhost:4000"
149
164
  solo false
150
165
  splay nil
166
+
167
+ # Set these to enable SSL authentication / mutual-authentication
168
+ # with the server
151
169
  ssl_client_cert nil
152
170
  ssl_client_key nil
153
171
  ssl_verify_mode :verify_none
154
172
  ssl_ca_path nil
155
173
  ssl_ca_file nil
156
- template_url "http://localhost:4000"
157
- umask 0022
158
- user nil
174
+
175
+
176
+ # Where should chef-solo look for role files?
159
177
  role_path "/var/chef/roles"
160
- role_url "http://localhost:4000"
178
+
179
+ # Where should chef-solo download recipes from?
161
180
  recipe_url nil
181
+
162
182
  solr_url "http://localhost:8983"
163
183
  solr_jetty_path "/var/chef/solr-jetty"
164
184
  solr_data_path "/var/chef/solr/data"
165
185
  solr_home_path "/var/chef/solr"
166
186
  solr_heap_size "256M"
167
187
  solr_java_opts nil
188
+
189
+ # Parameters for connecting to RabbitMQ
168
190
  amqp_host '0.0.0.0'
169
191
  amqp_port '5672'
170
192
  amqp_user 'chef'
171
193
  amqp_pass 'testing'
172
194
  amqp_vhost '/chef'
173
- # Setting this to a UUID string also makes the queue durable
195
+ # Setting this to a UUID string also makes the queue durable
174
196
  # (persist across rabbitmq restarts)
175
197
  amqp_consumer_id "default"
176
198