iron_chef 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_chef (0.0.10)
5
- capistrano (>= 2.15.4)
4
+ iron_chef (0.0.11)
5
+ capistrano (~> 2.15)
6
6
  json
7
7
 
8
8
  GEM
data/bin/ironchef CHANGED
@@ -75,13 +75,6 @@ files = {
75
75
 
76
76
  FILE
77
77
 
78
- "roles/base_server.rb" => unindent(<<-FILE),
79
- name "base_server"
80
- description "Base Server Role"
81
- # run_list
82
- # default_attributes
83
- FILE
84
-
85
78
  "roles/app_server.rb" => unindent(<<-FILE),
86
79
  name "app_server"
87
80
  description "Application Server Role"
@@ -89,13 +82,6 @@ files = {
89
82
  # default_attributes
90
83
  FILE
91
84
 
92
- "roles/db_server.rb" => unindent(<<-FILE),
93
- name "db_server"
94
- description "Database Server Role"
95
- # run_list
96
- # default_attributes
97
- FILE
98
-
99
85
  "roles/web_server.rb" => unindent(<<-FILE),
100
86
  name "web_server"
101
87
  description "Web Server Role"
@@ -105,6 +91,10 @@ files = {
105
91
 
106
92
  "cookbooks/.gitkeep" => '',
107
93
 
94
+ "tmp/.gitkeep" => '',
95
+
96
+ "site-cookbooks/.gitkeep" => '',
97
+
108
98
  "site-cookbooks/commons/recipes/default.rb" => unindent(<<-FILE),
109
99
  # retrieve environment specific data bag item
110
100
  env = Chef::DataBagItem.load('environments', node['chef_environment'])
data/iron_chef.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
23
23
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
24
24
  gem.require_paths = ["lib"]
25
25
 
26
- gem.add_dependency 'capistrano', '>= 2.15.4'
26
+ gem.add_dependency 'capistrano', '~> 2.15'
27
27
  gem.add_dependency 'json'
28
28
 
29
29
  end
@@ -121,7 +121,7 @@ module IronChef
121
121
  }.merge(node_config['json'])
122
122
 
123
123
  node_dna_json_file = "./tmp/#{nodes_location}/#{node_config['node_name']}.json"
124
- File.open(node_dna_json_file, "w") do |f|
124
+ File.open(node_dna_json_file, 'w') do |f|
125
125
  f.puts node_dna.to_json
126
126
  end
127
127
 
@@ -146,11 +146,11 @@ module IronChef
146
146
  solo_rb = <<-RUBY
147
147
  solo true
148
148
  chef_root = File.expand_path(File.dirname(__FILE__))
149
- file_cache_path chef_root
149
+ file_cache_path '#{chef_file_cache_dir}'
150
150
  cookbook_path [ #{cookbook_paths} ]
151
- role_path File.join(chef_root, "roles")
152
- data_bag_path File.join(chef_root, "data_bags")
153
- json_attribs File.join(chef_root, "node.json")
151
+ role_path File.join(chef_root, 'roles')
152
+ data_bag_path File.join(chef_root, 'data_bags')
153
+ json_attribs File.join(chef_root, 'node.json')
154
154
  log_level "#{chef_log_level}".to_sym
155
155
  RUBY
156
156
  put solo_rb, "#{chef_destination}/solo.rb", :via => :scp
@@ -199,6 +199,9 @@ module IronChef
199
199
  run "mkdir -p #{chef_destination}"
200
200
  release_chef_client_lock
201
201
  run "chown -R $USER: #{chef_destination}"
202
+ run "mkdir -p #{chef_file_cache_dir}"
203
+ rescue
204
+ puts cyan_text('Try running `cap node_name chef:clear` to clear chef folders for this node.')
202
205
  end
203
206
 
204
207
  def why_run
@@ -227,7 +230,7 @@ fi
227
230
  end
228
231
 
229
232
  def release_chef_client_lock
230
- run prepare_sudo_cmd("rm -f #{chef_destination}/chef-client-running.pid; true")
233
+ run prepare_sudo_cmd("rm -f #{chef_file_cache_dir}/chef-client-running.pid; true")
231
234
  end
232
235
 
233
236
  def prepare_sudo_cmd(cmd)
@@ -266,6 +269,10 @@ fi
266
269
  def red_text(text)
267
270
  "\033[0;31m#{text}\033[0m"
268
271
  end
272
+
273
+ def cyan_text(text)
274
+ "\033[0;36m#{text}\033[0m"
275
+ end
269
276
 
270
277
  end
271
278
  end
@@ -13,10 +13,9 @@ Capistrano::Configuration.instance.load do
13
13
  set :chef_stream_output, false
14
14
  set :chef_parallel_rsync, true
15
15
  set :chef_parallel_rsync_pool_size, 10
16
- set :chef_syntax_check, false
17
16
  set :chef_write_to_file, nil
18
- set :chef_runner, nil
19
17
  set :chef_lock_file, '/tmp/chef.lock'
18
+ set :chef_file_cache_dir, '/tmp/chef_cache'
20
19
  set :chef_nodes_dir, 'nodes'
21
20
  set :chef_data_bags_dir, 'data_bags'
22
21
  set :chef_environment_dir, 'environments'
@@ -60,6 +59,7 @@ Capistrano::Configuration.instance.load do
60
59
  desc "Clears the chef destination folder on the server."
61
60
  task :clear, :except => { :nochef => true } do
62
61
  run iron_chef.prepare_sudo_cmd("rm -rf #{chef_destination}/*")
62
+ run iron_chef.prepare_sudo_cmd("rm -rf #{chef_file_cache_dir}/*")
63
63
  iron_chef.unlock
64
64
  end
65
65
 
@@ -1,3 +1,3 @@
1
1
  module IronChef
2
- VERSION = "0.0.10"
2
+ VERSION = '0.0.11'
3
3
  end
metadata CHANGED
@@ -1,32 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Scott Rosenthal
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-07-01 00:00:00.000000000 Z
12
+ date: 2013-08-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: capistrano
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - ! '>='
19
+ - - ~>
18
20
  - !ruby/object:Gem::Version
19
- version: 2.15.4
21
+ version: '2.15'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - ! '>='
27
+ - - ~>
25
28
  - !ruby/object:Gem::Version
26
- version: 2.15.4
29
+ version: '2.15'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: json
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -66,25 +71,26 @@ files:
66
71
  homepage: https://github.com/scottvrosenthal/iron_chef
67
72
  licenses:
68
73
  - MIT
69
- metadata: {}
70
74
  post_install_message:
71
75
  rdoc_options: []
72
76
  require_paths:
73
77
  - lib
74
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
+ none: false
75
80
  requirements:
76
81
  - - ! '>='
77
82
  - !ruby/object:Gem::Version
78
83
  version: 1.9.3
79
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
+ none: false
80
86
  requirements:
81
87
  - - ! '>='
82
88
  - !ruby/object:Gem::Version
83
89
  version: 1.8.11
84
90
  requirements: []
85
91
  rubyforge_project:
86
- rubygems_version: 2.0.3
92
+ rubygems_version: 1.8.25
87
93
  signing_key:
88
- specification_version: 4
94
+ specification_version: 3
89
95
  summary: Iron Chef makes cloud server provisioning with Chef Solo powerful and easy.
90
96
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MzczZmZjMTgxNjNlMWQwOGViOGMzNjkxOWFmNmMyNTMyM2FiNTQ3Mw==
5
- data.tar.gz: !binary |-
6
- MmQ2MzQ0ZWIwMjE5YmE3MTYxY2YyMDVjYTQ5OTQ4NDk4Y2IwN2QzMw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YWUxNjA3OTUyYWI5NGZjYTc2ODhkMzJiZDQ3NDgwM2MyNDY5MDNkYWNmNTVl
10
- YzAyZTZmNmVkM2RkYmVhODc4NGEyZWVhOGM1NDRhODJlYTgxOWJlNjllYWYw
11
- OGUxZjQ5MTczOTU2ZTQ5NTBjMWRmM2ZhZTgwYTY0YWNiNWMyZjU=
12
- data.tar.gz: !binary |-
13
- ZmUxNzA0ZDdhNGMxODdmYWYzMjVlYTJmNzZjMDU5MWVhN2ZhZDI1MzA0ODAz
14
- YWZlOWI3YmE3OGI1ZTkwOGZiNjYyOGUzOTQ4ZjkxMmNkZTk0NmIzMzdiMDFl
15
- NmJiZWJiMjJhZDI4YTc0M2Y1Y2MxYTYxODI0MDAyMzU3ZThmYzU=