iron_chef 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile.lock +7 -7
- data/bin/ironchef +10 -9
- data/iron_chef.gemspec +8 -8
- data/lib/iron_chef/tasks.rb +39 -1
- data/lib/iron_chef/version.rb +1 -1
- metadata +13 -19
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cc756c2867b6eea40fc9a7dffc809aa64d536de1
|
4
|
+
data.tar.gz: 0bd0ee4d5d575a7542c4efef8d626aa2cc70e651
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 730a488fe9b370f892ed73f4421846585bc9b4d3ef28de4e47e9d7c73b6a59c4413cbb0adced0035dfbab6e2ba0136d904e999f2c5c77874c6ebdea63626323e
|
7
|
+
data.tar.gz: f87e5cf99b11844684e3375b36e33c5b2e3513db6a14c9939e606d1e231f9aa7fadf6477bf61e5a4e0ce5821fc3c635a5d7f6064fa2ec0be7061bb2584332884
|
data/Gemfile.lock
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
iron_chef (0.0.
|
4
|
+
iron_chef (0.0.12)
|
5
5
|
capistrano (~> 2.15)
|
6
|
-
json
|
6
|
+
json (~> 1.8)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
capistrano (2.15.
|
11
|
+
capistrano (2.15.5)
|
12
12
|
highline
|
13
13
|
net-scp (>= 1.0.0)
|
14
14
|
net-sftp (>= 2.0.0)
|
15
15
|
net-ssh (>= 2.0.14)
|
16
16
|
net-ssh-gateway (>= 1.1.0)
|
17
|
-
highline (1.6.
|
18
|
-
json (1.8.
|
19
|
-
net-scp (1.
|
17
|
+
highline (1.6.21)
|
18
|
+
json (1.8.1)
|
19
|
+
net-scp (1.2.1)
|
20
20
|
net-ssh (>= 2.6.5)
|
21
21
|
net-sftp (2.1.2)
|
22
22
|
net-ssh (>= 2.6.5)
|
23
|
-
net-ssh (2.
|
23
|
+
net-ssh (2.9.1)
|
24
24
|
net-ssh-gateway (1.2.0)
|
25
25
|
net-ssh (>= 2.6.5)
|
26
26
|
rake (10.1.0)
|
data/bin/ironchef
CHANGED
@@ -70,30 +70,31 @@ files = {
|
|
70
70
|
ssh_options[:keys] = File.expand_path('~/your-local-path-to-ssh-key/xxxxx_keypair_ec2.pem')
|
71
71
|
default_run_options[:pty] = true
|
72
72
|
|
73
|
+
# set :user, 'root'
|
73
74
|
set :user, 'ec2-user'
|
74
75
|
set :use_sudo, false
|
75
76
|
|
76
77
|
FILE
|
77
78
|
|
78
|
-
"roles/
|
79
|
-
name "
|
80
|
-
description "
|
79
|
+
"roles/install_server.rb" => unindent(<<-FILE),
|
80
|
+
name "install_server"
|
81
|
+
description "Install Server Role"
|
81
82
|
# run_list
|
82
83
|
# default_attributes
|
83
84
|
FILE
|
84
85
|
|
85
|
-
"roles/
|
86
|
-
name "
|
87
|
-
description "
|
86
|
+
"roles/setup_server.rb" => unindent(<<-FILE),
|
87
|
+
name "setup_server"
|
88
|
+
description "Setup Server Role"
|
88
89
|
# run_list
|
89
90
|
# default_attributes
|
90
91
|
FILE
|
91
92
|
|
92
|
-
"cookbooks/.
|
93
|
+
"cookbooks/.keep" => '',
|
93
94
|
|
94
|
-
"tmp/.
|
95
|
+
"tmp/.keep" => '',
|
95
96
|
|
96
|
-
"site-cookbooks/.
|
97
|
+
"site-cookbooks/.keep" => '',
|
97
98
|
|
98
99
|
"site-cookbooks/commons/recipes/default.rb" => unindent(<<-FILE),
|
99
100
|
# retrieve environment specific data bag item
|
data/iron_chef.gemspec
CHANGED
@@ -4,26 +4,26 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'iron_chef/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
|
-
gem.name =
|
7
|
+
gem.name = 'iron_chef'
|
8
8
|
gem.platform = Gem::Platform::RUBY
|
9
9
|
gem.version = IronChef::VERSION
|
10
|
-
gem.license =
|
10
|
+
gem.license = 'MIT'
|
11
11
|
|
12
12
|
gem.required_ruby_version = '>= 1.9.3'
|
13
13
|
gem.required_rubygems_version = '>= 1.8.11'
|
14
14
|
|
15
|
-
gem.authors = [
|
16
|
-
gem.email = [
|
15
|
+
gem.authors = ['Scott Rosenthal']
|
16
|
+
gem.email = ['sr7575@gmail.com']
|
17
17
|
gem.description = %q{Iron Chef is a lightweight Chef Solo wrapper built as a capistrano plugin}
|
18
18
|
gem.summary = %q{Iron Chef makes cloud server provisioning with Chef Solo powerful and easy.}
|
19
|
-
gem.homepage =
|
20
|
-
gem.license =
|
19
|
+
gem.homepage = 'https://github.com/scottvrosenthal/iron_chef'
|
20
|
+
gem.license = 'MIT'
|
21
21
|
gem.files = `git ls-files | grep -vE '(jenkins|.travis.yml|.gitmodules|.gitignore|.ruby-version|.ruby-gemset|README.md)'`.split("\n")
|
22
22
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
23
23
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
24
|
-
gem.require_paths = [
|
24
|
+
gem.require_paths = ['lib']
|
25
25
|
|
26
26
|
gem.add_dependency 'capistrano', '~> 2.15'
|
27
|
-
gem.add_dependency 'json'
|
27
|
+
gem.add_dependency 'json', '~> 1.8'
|
28
28
|
|
29
29
|
end
|
data/lib/iron_chef/tasks.rb
CHANGED
@@ -19,6 +19,7 @@ Capistrano::Configuration.instance.load do
|
|
19
19
|
set :chef_nodes_dir, 'nodes'
|
20
20
|
set :chef_data_bags_dir, 'data_bags'
|
21
21
|
set :chef_environment_dir, 'environments'
|
22
|
+
set :chef_site_cookbook_dir, 'site-cookbooks'
|
22
23
|
|
23
24
|
namespace :chef do
|
24
25
|
|
@@ -128,7 +129,7 @@ Capistrano::Configuration.instance.load do
|
|
128
129
|
yml_env_node_file = File.join(chef_nodes_dir, "#{name}-server1.yml")
|
129
130
|
unless File.exists?(yml_env_node_file)
|
130
131
|
File.open(yml_env_node_file, "w") do |f|
|
131
|
-
f.puts "json:\n chef_environment: #{name}\n\nroles:\n -
|
132
|
+
f.puts "json:\n chef_environment: #{name}\n\nroles:\n - install_server\n\nrecipes:\n - commons\n\nserver:\n host: ec2-xxx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com"
|
132
133
|
end
|
133
134
|
end
|
134
135
|
json_env_data_bag_file = File.join("#{chef_data_bags_dir}/environments", "#{name}.json")
|
@@ -178,4 +179,41 @@ BASH
|
|
178
179
|
end
|
179
180
|
|
180
181
|
end ## end bootstrap namespace ##
|
182
|
+
|
183
|
+
## begin cookbook namespace ##
|
184
|
+
|
185
|
+
namespace :site_cookbook do
|
186
|
+
|
187
|
+
def create_site_cookbook_stub_dir(site_cookbook_stub_dir)
|
188
|
+
if Dir.exists?(site_cookbook_stub_dir)
|
189
|
+
site_cookbook_stub_dir = site_cookbook_stub_dir.succ
|
190
|
+
create_site_cookbook_stub_dir(site_cookbook_stub_dir)
|
191
|
+
else
|
192
|
+
FileUtils.mkdir_p(site_cookbook_stub_dir)
|
193
|
+
return site_cookbook_stub_dir
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
desc "Stub a new chef cookbook in the site-cookbooks folder."
|
198
|
+
task :stub, :except => { :nochef => true } do
|
199
|
+
site_cookbook_name = 'cookbook_stub001'
|
200
|
+
site_cookbook_stub_dir = "#{File.join(chef_site_cookbook_dir, site_cookbook_name)}"
|
201
|
+
site_cookbook_stub_dir = create_site_cookbook_stub_dir(site_cookbook_stub_dir)
|
202
|
+
|
203
|
+
default_site_cookbook_folders = %w(attributes recipes templates/default files/default)
|
204
|
+
|
205
|
+
default_site_cookbook_folders.each do |folder|
|
206
|
+
FileUtils.mkdir_p(File.join(site_cookbook_stub_dir, folder))
|
207
|
+
end
|
208
|
+
|
209
|
+
default_site_cookbook_files = %w(metadata.rb attributes/default.rb recipes/default.rb templates/default/.keep files/default/.keep)
|
210
|
+
|
211
|
+
default_site_cookbook_files.each do |file|
|
212
|
+
FileUtils.touch(File.join(site_cookbook_stub_dir, file))
|
213
|
+
end
|
214
|
+
|
215
|
+
puts "Created new cookbook stub '#{site_cookbook_stub_dir}' in the site-cookbooks folder."
|
216
|
+
end
|
217
|
+
|
218
|
+
end ## end cookbook namespace ##
|
181
219
|
end
|
data/lib/iron_chef/version.rb
CHANGED
metadata
CHANGED
@@ -1,48 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.12
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Scott Rosenthal
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-08-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: capistrano
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '2.15'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '2.15'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: json
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
33
|
+
version: '1.8'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
40
|
+
version: '1.8'
|
46
41
|
description: Iron Chef is a lightweight Chef Solo wrapper built as a capistrano plugin
|
47
42
|
email:
|
48
43
|
- sr7575@gmail.com
|
@@ -71,26 +66,25 @@ files:
|
|
71
66
|
homepage: https://github.com/scottvrosenthal/iron_chef
|
72
67
|
licenses:
|
73
68
|
- MIT
|
69
|
+
metadata: {}
|
74
70
|
post_install_message:
|
75
71
|
rdoc_options: []
|
76
72
|
require_paths:
|
77
73
|
- lib
|
78
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
75
|
requirements:
|
81
|
-
- -
|
76
|
+
- - ">="
|
82
77
|
- !ruby/object:Gem::Version
|
83
78
|
version: 1.9.3
|
84
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
80
|
requirements:
|
87
|
-
- -
|
81
|
+
- - ">="
|
88
82
|
- !ruby/object:Gem::Version
|
89
83
|
version: 1.8.11
|
90
84
|
requirements: []
|
91
85
|
rubyforge_project:
|
92
|
-
rubygems_version:
|
86
|
+
rubygems_version: 2.2.2
|
93
87
|
signing_key:
|
94
|
-
specification_version:
|
88
|
+
specification_version: 4
|
95
89
|
summary: Iron Chef makes cloud server provisioning with Chef Solo powerful and easy.
|
96
90
|
test_files: []
|