ironfan 5.0.11 → 6.0.0
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.
- data/.gitignore +4 -0
- data/.gitmodules +3 -0
- data/Gemfile +8 -26
- data/Gemfile.lock +38 -41
- data/NOTES-REALM.md +172 -0
- data/Rakefile +19 -77
- data/config/ubuntu12.04-ironfan.erb +7 -0
- data/ironfan.gemspec +28 -225
- data/lib/chef/cluster_knife.rb +26 -0
- data/lib/chef/knife/bootstrap/ubuntu12.04-ironfan.erb +7 -0
- data/lib/chef/knife/cluster_bootstrap.rb +1 -3
- data/lib/chef/knife/cluster_diff.rb +2 -8
- data/lib/chef/knife/cluster_kick.rb +1 -3
- data/lib/chef/knife/cluster_kill.rb +1 -2
- data/lib/chef/knife/cluster_launch.rb +17 -34
- data/lib/chef/knife/cluster_list.rb +6 -5
- data/lib/chef/knife/cluster_proxy.rb +1 -3
- data/lib/chef/knife/cluster_pry.rb +1 -2
- data/lib/chef/knife/cluster_show.rb +6 -7
- data/lib/chef/knife/cluster_ssh.rb +10 -8
- data/lib/chef/knife/cluster_start.rb +1 -2
- data/lib/chef/knife/cluster_stop.rb +1 -2
- data/lib/chef/knife/cluster_sync.rb +2 -3
- data/lib/chef/knife/ironfan_knife_common.rb +58 -18
- data/lib/chef/knife/ironfan_script.rb +0 -3
- data/lib/ironfan/broker/computer.rb +14 -11
- data/lib/ironfan/broker.rb +17 -12
- data/lib/ironfan/cookbook_requirements.rb +155 -0
- data/lib/ironfan/dsl/cloud.rb +2 -0
- data/lib/ironfan/dsl/cluster.rb +25 -15
- data/lib/ironfan/dsl/component.rb +12 -15
- data/lib/ironfan/dsl/compute.rb +10 -8
- data/lib/ironfan/dsl/ec2.rb +2 -26
- data/lib/ironfan/dsl/facet.rb +16 -14
- data/lib/ironfan/dsl/openstack.rb +147 -0
- data/lib/ironfan/dsl/realm.rb +23 -16
- data/lib/ironfan/dsl/security_group.rb +29 -0
- data/lib/ironfan/dsl/server.rb +14 -5
- data/lib/ironfan/dsl/static.rb +63 -0
- data/lib/ironfan/dsl/vsphere.rb +1 -0
- data/lib/ironfan/dsl.rb +1 -134
- data/lib/ironfan/headers.rb +19 -0
- data/lib/ironfan/provider/chef/node.rb +3 -2
- data/lib/ironfan/provider/ec2/machine.rb +10 -14
- data/lib/ironfan/provider/ec2/security_group.rb +58 -43
- data/lib/ironfan/provider/openstack/elastic_ip.rb +96 -0
- data/lib/ironfan/provider/openstack/keypair.rb +78 -0
- data/lib/ironfan/provider/openstack/machine.rb +371 -0
- data/lib/ironfan/provider/openstack/security_group.rb +224 -0
- data/lib/ironfan/provider/openstack.rb +69 -0
- data/lib/ironfan/provider/static/machine.rb +192 -0
- data/lib/ironfan/provider/static.rb +23 -0
- data/lib/ironfan/provider.rb +58 -1
- data/lib/ironfan/requirements.rb +17 -1
- data/lib/ironfan/version.rb +3 -0
- data/lib/ironfan.rb +107 -172
- data/spec/chef/cluster_bootstrap_spec.rb +2 -7
- data/spec/chef/cluster_launch_spec.rb +1 -2
- data/spec/fixtures/realms/samurai.rb +26 -0
- data/spec/integration/minimal-chef-repo/clusters/.gitkeep +0 -0
- data/spec/integration/minimal-chef-repo/config/.gitkeep +0 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/.gitignore +1 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/certificates/.gitkeep +0 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/client_keys/.gitkeep +0 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/data_bag_keys/.gitkeep +0 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/ec2_certs/.gitkeep +0 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/ec2_keys/.gitkeep +0 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/ironfantest-validator.pem +27 -0
- data/spec/integration/minimal-chef-repo/knife/credentials/ironfantester.pem +27 -0
- data/spec/integration/minimal-chef-repo/tasks/.gitkeep +0 -0
- data/spec/ironfan/cluster_spec.rb +1 -2
- data/spec/ironfan/diff_spec.rb +0 -2
- data/spec/ironfan/dsl_spec.rb +6 -3
- data/spec/ironfan/ec2/cloud_provider_spec.rb +17 -18
- data/spec/ironfan/ec2/elb_spec.rb +44 -41
- data/spec/ironfan/ec2/security_group_spec.rb +45 -47
- data/spec/ironfan/manifest_spec.rb +0 -1
- data/spec/ironfan/plugin_spec.rb +55 -40
- data/spec/ironfan/realm_spec.rb +42 -30
- data/spec/spec_helper.rb +17 -31
- data/spec/{spec_helper → support}/dummy_chef.rb +0 -0
- data/spec/{spec_helper → support}/dummy_diff_drawer.rb +0 -0
- metadata +78 -155
- data/.rspec +0 -2
- data/.yardopts +0 -19
- data/VERSION +0 -2
- data/chefignore +0 -41
- data/notes/Future-development-proposals.md +0 -266
- data/notes/Home.md +0 -55
- data/notes/INSTALL-cloud_setup.md +0 -103
- data/notes/INSTALL.md +0 -134
- data/notes/Ironfan-Roadmap.md +0 -70
- data/notes/Upgrading-to-v4.md +0 -66
- data/notes/advanced-superpowers.md +0 -16
- data/notes/aws_servers.jpg +0 -0
- data/notes/aws_user_key.png +0 -0
- data/notes/cookbook-versioning.md +0 -11
- data/notes/core_concepts.md +0 -200
- data/notes/declaring_volumes.md +0 -3
- data/notes/design_notes-aspect_oriented_devops.md +0 -36
- data/notes/design_notes-ci_testing.md +0 -169
- data/notes/design_notes-cookbook_event_ordering.md +0 -249
- data/notes/design_notes-meta_discovery.md +0 -59
- data/notes/ec2-pricing_and_capacity.md +0 -75
- data/notes/ec2-pricing_and_capacity.numbers +0 -0
- data/notes/homebase-layout.txt +0 -102
- data/notes/knife-cluster-commands.md +0 -21
- data/notes/named-cloud-objects.md +0 -11
- data/notes/opscode_org_key.png +0 -0
- data/notes/opscode_user_key.png +0 -0
- data/notes/philosophy.md +0 -13
- data/notes/rake_tasks.md +0 -24
- data/notes/renamed-recipes.txt +0 -142
- data/notes/silverware.md +0 -85
- data/notes/style_guide.md +0 -300
- data/notes/tips_and_troubleshooting.md +0 -92
- data/notes/walkthrough-hadoop.md +0 -168
- data/notes/walkthrough-web.md +0 -166
- data/spec/fixtures/gunbai.rb +0 -24
- data/spec/test_config.rb +0 -20
- data/tasks/chef_config.rake +0 -38
data/.gitignore
CHANGED
data/.gitmodules
ADDED
data/Gemfile
CHANGED
|
@@ -1,40 +1,22 @@
|
|
|
1
|
-
source
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
|
-
gem 'chef', "~> 10.16"
|
|
4
|
-
gem 'fog', "~> 1.2"
|
|
5
|
-
gem 'excon', "~> 0.21.0" # v0.22 breaks EC2 calls
|
|
6
|
-
gem 'formatador', "~> 0.2"
|
|
7
|
-
gem 'gorillib', "~> 0.5.0"
|
|
8
|
-
gem 'rbvmomi'
|
|
9
|
-
gem 'diff-lcs', "~> 1.2.5"
|
|
10
3
|
|
|
11
|
-
|
|
12
|
-
# to the one that doesn't seem to angrify everyone.
|
|
13
|
-
gem 'json', "= 1.5.4"
|
|
4
|
+
gemspec
|
|
14
5
|
|
|
15
6
|
group :development do
|
|
16
|
-
gem 'bundler', "~> 1.0"
|
|
17
7
|
gem 'rake'
|
|
18
|
-
gem 'rspec',
|
|
19
|
-
gem 'yard',
|
|
20
|
-
|
|
21
|
-
gem '
|
|
22
|
-
gem 'oj', ">= 1.2"
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
group :support do
|
|
26
|
-
gem 'jeweler', ">= 1.6"
|
|
27
|
-
gem 'pry'
|
|
8
|
+
gem 'rspec', '~> 2.8'
|
|
9
|
+
gem 'yard', '>= 0.7'
|
|
10
|
+
gem 'redcarpet', '>= 2.1'
|
|
11
|
+
gem 'oj', '>= 1.2'
|
|
28
12
|
end
|
|
29
13
|
|
|
30
14
|
group :test do
|
|
31
|
-
gem 'simplecov',
|
|
32
|
-
|
|
33
|
-
gem 'guard', "~> 1"
|
|
15
|
+
gem 'simplecov', '>= 0.5'
|
|
16
|
+
gem 'guard', '~> 1'
|
|
34
17
|
gem 'guard-rspec'
|
|
35
18
|
gem 'guard-yard'
|
|
36
19
|
gem 'ruby_gntp'
|
|
37
20
|
gem 'ruby-debug19'
|
|
38
|
-
#
|
|
39
21
|
gem 'chef-zero'
|
|
40
22
|
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,23 +1,37 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
ironfan (6.0.0)
|
|
5
|
+
chef (= 10.30.4)
|
|
6
|
+
diff-lcs (= 1.2.5)
|
|
7
|
+
excon (= 0.21.0)
|
|
8
|
+
fog (= 1.10.1)
|
|
9
|
+
formatador (= 0.2.4)
|
|
10
|
+
gorillib (= 0.5.0)
|
|
11
|
+
json (= 1.5.4)
|
|
12
|
+
rbvmomi (= 1.8.1)
|
|
13
|
+
|
|
1
14
|
GEM
|
|
2
|
-
remote:
|
|
15
|
+
remote: https://rubygems.org/
|
|
3
16
|
specs:
|
|
4
17
|
archive-tar-minitar (0.5.2)
|
|
5
18
|
builder (3.2.2)
|
|
6
19
|
bunny (0.7.9)
|
|
7
|
-
chef (10.
|
|
20
|
+
chef (10.30.4)
|
|
8
21
|
bunny (>= 0.6.0, < 0.8.0)
|
|
9
22
|
erubis
|
|
10
|
-
highline (>= 1.6.9)
|
|
23
|
+
highline (~> 1.6, >= 1.6.9)
|
|
11
24
|
json (>= 1.4.4, <= 1.7.7)
|
|
12
|
-
|
|
13
|
-
mixlib-
|
|
14
|
-
mixlib-
|
|
15
|
-
mixlib-
|
|
16
|
-
mixlib-
|
|
25
|
+
mime-types (~> 1.16)
|
|
26
|
+
mixlib-authentication (~> 1.3)
|
|
27
|
+
mixlib-cli (~> 1.1)
|
|
28
|
+
mixlib-config (~> 1.1, >= 1.1.2)
|
|
29
|
+
mixlib-log (~> 1.3)
|
|
30
|
+
mixlib-shellout (~> 1.3)
|
|
17
31
|
moneta (< 0.7.0)
|
|
18
32
|
net-ssh (~> 2.6)
|
|
19
33
|
net-ssh-multi (~> 1.1.0)
|
|
20
|
-
ohai (>= 0.6.0)
|
|
34
|
+
ohai (>= 0.6.0, < 7.0.0)
|
|
21
35
|
rest-client (>= 1.0.4, < 1.7.0)
|
|
22
36
|
treetop (~> 1.4.9)
|
|
23
37
|
uuidtools
|
|
@@ -48,7 +62,6 @@ GEM
|
|
|
48
62
|
nokogiri (~> 1.5.0)
|
|
49
63
|
ruby-hmac
|
|
50
64
|
formatador (0.2.4)
|
|
51
|
-
git (1.2.5)
|
|
52
65
|
gorillib (0.5.0)
|
|
53
66
|
configliere (>= 0.4.13)
|
|
54
67
|
json
|
|
@@ -66,13 +79,8 @@ GEM
|
|
|
66
79
|
guard (>= 1.1.0)
|
|
67
80
|
yard (>= 0.7.0)
|
|
68
81
|
hashie (2.0.5)
|
|
69
|
-
highline (1.6.
|
|
82
|
+
highline (1.6.21)
|
|
70
83
|
ipaddress (0.8.0)
|
|
71
|
-
jeweler (1.8.4)
|
|
72
|
-
bundler (~> 1.0)
|
|
73
|
-
git (>= 1.2.5)
|
|
74
|
-
rake
|
|
75
|
-
rdoc
|
|
76
84
|
json (1.5.4)
|
|
77
85
|
linecache19 (0.5.12)
|
|
78
86
|
ruby_core_source (>= 0.1.4)
|
|
@@ -82,34 +90,34 @@ GEM
|
|
|
82
90
|
rb-kqueue (>= 0.2)
|
|
83
91
|
lumberjack (1.0.3)
|
|
84
92
|
method_source (0.8.1)
|
|
85
|
-
mime-types (1.
|
|
93
|
+
mime-types (1.25.1)
|
|
86
94
|
mixlib-authentication (1.3.0)
|
|
87
95
|
mixlib-log
|
|
88
|
-
mixlib-cli (1.
|
|
96
|
+
mixlib-cli (1.4.0)
|
|
89
97
|
mixlib-config (1.1.2)
|
|
90
98
|
mixlib-log (1.6.0)
|
|
91
|
-
mixlib-shellout (1.
|
|
99
|
+
mixlib-shellout (1.3.0)
|
|
92
100
|
moneta (0.6.0)
|
|
93
|
-
multi_json (1.
|
|
94
|
-
net-scp (1.1.
|
|
101
|
+
multi_json (1.8.2)
|
|
102
|
+
net-scp (1.1.2)
|
|
95
103
|
net-ssh (>= 2.6.5)
|
|
96
|
-
net-ssh (2.
|
|
104
|
+
net-ssh (2.7.0)
|
|
97
105
|
net-ssh-gateway (1.2.0)
|
|
98
106
|
net-ssh (>= 2.6.5)
|
|
99
107
|
net-ssh-multi (1.1)
|
|
100
108
|
net-ssh (>= 2.1.4)
|
|
101
109
|
net-ssh-gateway (>= 0.99.0)
|
|
102
|
-
nokogiri (1.5.
|
|
103
|
-
ohai (6.
|
|
110
|
+
nokogiri (1.5.11)
|
|
111
|
+
ohai (6.20.0)
|
|
104
112
|
ipaddress
|
|
105
113
|
mixlib-cli
|
|
106
114
|
mixlib-config
|
|
107
115
|
mixlib-log
|
|
108
116
|
mixlib-shellout
|
|
109
|
-
systemu
|
|
117
|
+
systemu (~> 2.5.2)
|
|
110
118
|
yajl-ruby
|
|
111
119
|
oj (2.1.2)
|
|
112
|
-
polyglot (0.3.
|
|
120
|
+
polyglot (0.3.4)
|
|
113
121
|
pry (0.9.12.2)
|
|
114
122
|
coderay (~> 1.0.5)
|
|
115
123
|
method_source (~> 0.8)
|
|
@@ -123,12 +131,10 @@ GEM
|
|
|
123
131
|
ffi (>= 0.5.0)
|
|
124
132
|
rb-kqueue (0.2.0)
|
|
125
133
|
ffi (>= 0.5.0)
|
|
126
|
-
rbvmomi (1.
|
|
134
|
+
rbvmomi (1.8.1)
|
|
127
135
|
builder
|
|
128
136
|
nokogiri (>= 1.4.1)
|
|
129
137
|
trollop
|
|
130
|
-
rdoc (4.0.1)
|
|
131
|
-
json (~> 1.4)
|
|
132
138
|
redcarpet (2.3.0)
|
|
133
139
|
rest-client (1.6.7)
|
|
134
140
|
mime-types (>= 1.16)
|
|
@@ -159,12 +165,12 @@ GEM
|
|
|
159
165
|
slop (3.4.5)
|
|
160
166
|
systemu (2.5.2)
|
|
161
167
|
thor (0.18.1)
|
|
162
|
-
treetop (1.4.
|
|
168
|
+
treetop (1.4.15)
|
|
163
169
|
polyglot
|
|
164
170
|
polyglot (>= 0.3.1)
|
|
165
171
|
trollop (2.0)
|
|
166
172
|
uuidtools (2.1.4)
|
|
167
|
-
yajl-ruby (1.
|
|
173
|
+
yajl-ruby (1.2.0)
|
|
168
174
|
yard (0.8.6.1)
|
|
169
175
|
|
|
170
176
|
PLATFORMS
|
|
@@ -172,22 +178,13 @@ PLATFORMS
|
|
|
172
178
|
|
|
173
179
|
DEPENDENCIES
|
|
174
180
|
bundler (~> 1.0)
|
|
175
|
-
chef (~> 10.16)
|
|
176
181
|
chef-zero
|
|
177
|
-
diff-lcs (~> 1.2.5)
|
|
178
|
-
excon (~> 0.21.0)
|
|
179
|
-
fog (~> 1.2)
|
|
180
|
-
formatador (~> 0.2)
|
|
181
|
-
gorillib (~> 0.5.0)
|
|
182
182
|
guard (~> 1)
|
|
183
183
|
guard-rspec
|
|
184
184
|
guard-yard
|
|
185
|
-
|
|
186
|
-
json (= 1.5.4)
|
|
185
|
+
ironfan!
|
|
187
186
|
oj (>= 1.2)
|
|
188
|
-
pry
|
|
189
187
|
rake
|
|
190
|
-
rbvmomi
|
|
191
188
|
redcarpet (>= 2.1)
|
|
192
189
|
rspec (~> 2.8)
|
|
193
190
|
ruby-debug19
|
data/NOTES-REALM.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Ironfan Realms
|
|
2
|
+
|
|
3
|
+
Realms in Ironfan are designed to provide us with a logical grouping for clusters (in a similar way
|
|
4
|
+
that clusters provide a logical grouping of facets).
|
|
5
|
+
|
|
6
|
+
## Scope
|
|
7
|
+
|
|
8
|
+
Following the Principle of Least Surprise, it would make sense that attributes declared in the realm scope,
|
|
9
|
+
apply to all clusters unless overridden. The same should go for roles, environment, cloud, and plugins.
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
Ironfan.realm(:foo) do
|
|
13
|
+
environment :dev
|
|
14
|
+
|
|
15
|
+
role :rick
|
|
16
|
+
|
|
17
|
+
cluster(:bar) do
|
|
18
|
+
|
|
19
|
+
role :over
|
|
20
|
+
|
|
21
|
+
facet(:baz) do
|
|
22
|
+
environment :prod
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
facet(:qix) do
|
|
26
|
+
role :out
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
baz_facet = Ironfan.realm(:foo).cluster(:bar).facet(:baz)
|
|
32
|
+
baz_facet.environment.should eq(:prod)
|
|
33
|
+
baz_facet.run_list.should include_roles(:rick, :over)
|
|
34
|
+
|
|
35
|
+
qix_facet = Ironfan.realm(:foo).cluster(:bar).facet(:qix)
|
|
36
|
+
qix_facet.environment.should eq(:dev)
|
|
37
|
+
qix_facet.run_list.should include_roles(:rick, :over, :out)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
You can also assign realms from within a cluster definition using the method `:realm_name`.
|
|
41
|
+
This value defaults to the environment.
|
|
42
|
+
|
|
43
|
+
```ruby
|
|
44
|
+
Ironfan.cluster(:jib) do
|
|
45
|
+
|
|
46
|
+
environment :dev
|
|
47
|
+
|
|
48
|
+
realm_name :yo
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
Ironfan.cluster(:jab) do
|
|
53
|
+
|
|
54
|
+
environment :dev
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
jib_cluster = Ironfan.cluster(:jib)
|
|
59
|
+
jib_cluster.realm_name.should eq(:yo)
|
|
60
|
+
|
|
61
|
+
jab_cluster = Ironfan.cluster(:jab)
|
|
62
|
+
jab_cluster.realm_name.should eq(:dev)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Security Groups
|
|
66
|
+
|
|
67
|
+
Currently, Ironfan creates default security groups for clusters and cluster-facets and authorizes clusters
|
|
68
|
+
to allow communication within itself. Because there may be cases where a particular cluster definition may
|
|
69
|
+
show up in more than one realm, this behavior will have to be extended to include the realm name as well.
|
|
70
|
+
Something that *wont'* be necessary is creating a realm only security group. This is partly because the need
|
|
71
|
+
to open access to entire realms *seems* unlikely, and partly because there is a VPC security group limitation
|
|
72
|
+
of five per machine.
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Ironfan.realm(:cybertron) do
|
|
76
|
+
|
|
77
|
+
cluster(:autobot) do
|
|
78
|
+
facet(:ratchet) do
|
|
79
|
+
instances 1
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
facet(:bumblebee) do
|
|
83
|
+
instances 1
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
cluster(:decepticon) do
|
|
88
|
+
facet(:shockwave) do
|
|
89
|
+
instances 1
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
facet(:starscream) do
|
|
93
|
+
instances 1
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
bumblebee_facet = Ironfan.realm(:cybertron).cluster(:autobot).facet(:bumblebee)
|
|
99
|
+
bumblebee_facet.security_groups should eq(%w[ systemwide cybertron-autobot cybertron-autobot-bumblebee ])
|
|
100
|
+
|
|
101
|
+
shockwave_facet = Ironfan.realm(:cybertron).cluster(:decepticon).facet(:shockwave)
|
|
102
|
+
starscream_facet = Ironfan.realm(:cybertron).cluster(:decepticon).facet(:starscream)
|
|
103
|
+
|
|
104
|
+
shockwave_facet.machine.should have_access_to(starscream_facet.machine)
|
|
105
|
+
shockwave_facet.machine.should_not have_access_to(bumblebee_facet.machine)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Knife Commands
|
|
109
|
+
|
|
110
|
+
Because of the possibility of cluster names not being unique across realms, the cluster commands will now have to be scoped
|
|
111
|
+
by realm as well. This does have a nice side effect of allowing realms to be issued commands as a collective.
|
|
112
|
+
|
|
113
|
+
By making the knife command explicitly call out the realm, only that realm file will be loaded (again to mitigate
|
|
114
|
+
potential collisions in cluster definitions shared across realms), then all cluster files will be loaded.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
knife cluster show p1-control-vcd
|
|
118
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
119
|
+
| Name | Chef? | State | Flavor | AZ | Env | MachineID | Public IP | Private IP | Created On |
|
|
120
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
121
|
+
| p1-control-vcd-0 | yes | running | m1.large | us-east-1d | development | i-1ba48935 | 23.20.69.99 | 10.137.18.89 | 2014-02-26 |
|
|
122
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
123
|
+
|
|
124
|
+
knife cluster show p1-control
|
|
125
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
126
|
+
| Name | Chef? | State | Flavor | AZ | Env | MachineID | Public IP | Private IP | Created On |
|
|
127
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
128
|
+
| p1-control-vcd-0 | yes | running | m1.large | us-east-1d | development | i-1cd09387 | 69.14.23.44 | 10.114.10.12 | 2014-02-26 |
|
|
129
|
+
| p1-control-zbx-0 | yes | running | m1.large | us-east-1d | development | i-1ba48935 | 23.20.69.99 | 10.137.18.89 | 2014-02-26 |
|
|
130
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
131
|
+
|
|
132
|
+
knife cluster show p1
|
|
133
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
134
|
+
| Name | Chef? | State | Flavor | AZ | Env | MachineID | Public IP | Private IP | Created On |
|
|
135
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
136
|
+
| p1-kfk-broker-0 | yes | running | m1.large | us-east-1d | development | i-1io37214 | 52.31.45.9 | 10.88.54.36 | 2014-02-26 |
|
|
137
|
+
| p1-kfk-broker-0 | yes | running | m1.large | us-east-1d | development | i-1ws75110 | 56.90.76.10 | 10.121.27.64 | 2014-02-26 |
|
|
138
|
+
| p1-control-vcd-0 | yes | running | m1.large | us-east-1d | development | i-1cd09387 | 69.14.23.44 | 10.114.10.12 | 2014-02-26 |
|
|
139
|
+
| p1-control-zbx-0 | yes | running | m1.large | us-east-1d | development | i-1ba48935 | 23.20.69.99 | 10.137.18.89 | 2014-02-26 |
|
|
140
|
+
+------------------+-------+---------+----------+------------+-------------+------------+-------------+--------------+------------+
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Announce/Discovery
|
|
144
|
+
|
|
145
|
+
When announcing and discovering using silverware, realms will need to be properly taken into account.
|
|
146
|
+
Nothing much should change for announcements; you will still announce the system-subsystem pair and the realm
|
|
147
|
+
will be provided from the node itself. You will not be able to announce outside of your realm or cluster. Discovery remains
|
|
148
|
+
unchanged for the most part as well. Discover with system-subsystem pairs, and it will, by default look in your cluster first,
|
|
149
|
+
then in your realm. This behavior can be overridden with options.
|
|
150
|
+
|
|
151
|
+
```ruby
|
|
152
|
+
node['new-phyrexia-sphere-0'].announce(:storm, :master)
|
|
153
|
+
# {
|
|
154
|
+
# announces: {
|
|
155
|
+
# storm: {
|
|
156
|
+
# master: {
|
|
157
|
+
# cluster: 'phyrexia',
|
|
158
|
+
# realm: 'new'
|
|
159
|
+
# }
|
|
160
|
+
# }
|
|
161
|
+
# }
|
|
162
|
+
# }
|
|
163
|
+
|
|
164
|
+
storm_master = node['new-benalia-clan-0'].discover(:storm, :master)
|
|
165
|
+
storm_master.name.should eq('new-phyrexia-sphere-0')
|
|
166
|
+
|
|
167
|
+
storm_master = node['alara-bant-sigil-0'].discover(:storm, :master)
|
|
168
|
+
storm_master.should be_nil
|
|
169
|
+
|
|
170
|
+
storm_master = node['alara-bant-sigil-0'].discover(:storm, :master, realm: 'new')
|
|
171
|
+
storm_master.name.should eq('new-phyrexia-sphere-0')
|
|
172
|
+
```
|
data/Rakefile
CHANGED
|
@@ -1,91 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
# Rakefile for Cluster Chef Knife plugins
|
|
3
|
-
#
|
|
4
|
-
# Author:: Adam Jacob (<adam@opscode.com>)
|
|
5
|
-
# Copyright:: Copyright (c) 2008 Opscode, Inc.
|
|
6
|
-
# License:: Apache License, Version 2.0
|
|
7
|
-
#
|
|
8
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
# you may not use this file except in compliance with the License.
|
|
10
|
-
# You may obtain a copy of the License at
|
|
11
|
-
#
|
|
12
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
#
|
|
14
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
# See the License for the specific language governing permissions and
|
|
18
|
-
# limitations under the License.
|
|
19
|
-
#
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
20
2
|
|
|
21
|
-
require 'rubygems' unless defined?(Gem)
|
|
22
|
-
require 'bundler'
|
|
23
|
-
begin
|
|
24
|
-
Bundler.setup(:default, :development, :support)
|
|
25
|
-
rescue Bundler::BundlerError => e
|
|
26
|
-
$stderr.puts e.message
|
|
27
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
|
28
|
-
exit e.status_code
|
|
29
|
-
end
|
|
30
|
-
require 'json'
|
|
31
|
-
require 'jeweler'
|
|
32
3
|
require 'rspec/core/rake_task'
|
|
33
|
-
require 'yard'
|
|
34
|
-
|
|
35
|
-
# Load constants from rake config file.
|
|
36
|
-
$LOAD_PATH.unshift('tasks')
|
|
37
|
-
Dir[File.join('tasks', '*.rake')].sort.each{|f| load(f) }
|
|
38
|
-
|
|
39
|
-
# ---------------------------------------------------------------------------
|
|
40
|
-
#
|
|
41
|
-
# Jeweler -- release ironfan as a gem
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
Jeweler::Tasks.new do |gem|
|
|
45
|
-
gem.name = 'ironfan'
|
|
46
|
-
gem.homepage = "http://infochimps.com/labs"
|
|
47
|
-
gem.license = NEW_COOKBOOK_LICENSE.to_s
|
|
48
|
-
gem.summary = %Q{Infochimps' lightweight cloud orchestration toolkit, built on top of Chef.}
|
|
49
|
-
gem.description = %Q{Ironfan allows you to orchestrate not just systems but clusters of machines. It includes a powerful layer on top of knife and a collection of cloud cookbooks.}
|
|
50
|
-
gem.email = SSL_EMAIL_ADDRESS
|
|
51
|
-
gem.authors = ["Infochimps"]
|
|
52
|
-
|
|
53
|
-
ignores = File.readlines(".gitignore").grep(/^[^#]\S+/).map{|s| s.chomp }
|
|
54
|
-
dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
|
|
55
|
-
gem.files = dotfiles + Dir["**/*"].
|
|
56
|
-
reject{|f| File.directory?(f) }.
|
|
57
|
-
reject{|f| ignores.any?{|i| File.fnmatch(i, f) || File.fnmatch(i+'/*', f) || File.fnmatch(i+'/**/*', f) } }
|
|
58
|
-
gem.test_files = gem.files.grep(/^spec\//)
|
|
59
|
-
gem.require_paths = ['lib']
|
|
60
|
-
end
|
|
61
|
-
Jeweler::RubygemsDotOrgTasks.new
|
|
62
|
-
|
|
63
|
-
# ---------------------------------------------------------------------------
|
|
64
|
-
#
|
|
65
|
-
# RSpec -- testing
|
|
66
|
-
#
|
|
67
4
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
68
5
|
spec.pattern = 'spec/{ironfan,chef,ironfan/*}/*_spec.rb'
|
|
69
6
|
end
|
|
70
7
|
|
|
71
|
-
RSpec
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
spec.
|
|
8
|
+
desc 'Run RSpec code examples with SimpleCov'
|
|
9
|
+
task :coverage do
|
|
10
|
+
ENV['IRONFAN_COV'] = 'true'
|
|
11
|
+
Rake::Task[:spec].invoke
|
|
75
12
|
end
|
|
76
13
|
|
|
14
|
+
desc 'Run RSpec integration code examples'
|
|
77
15
|
RSpec::Core::RakeTask.new(:integration) do |spec|
|
|
78
16
|
spec.pattern = 'spec/integration/**/*_spec.rb'
|
|
79
17
|
end
|
|
80
18
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
19
|
+
require 'yard'
|
|
20
|
+
YARD::Rake::YardocTask.new do |t|
|
|
21
|
+
additional_docs = %w[ CHANGELOG.md LICENSE.md README.md notes/INSTALL.md
|
|
22
|
+
notes/core_concepts.md notes/knife-cluster-commands.md
|
|
23
|
+
notes/philosophy.md notes/silverware.md notes/style_guide.md
|
|
24
|
+
notes/tips_and_troubleshooting.md notes/walkthrough-hadoop.md
|
|
25
|
+
notes/homebase-layout.txt notes/*.md notes/*.txt ]
|
|
26
|
+
t.files = ['lib/**/*.rb', '-'] + additional_docs
|
|
27
|
+
t.options = ['--readme=README.md', '--markup=markdown', '--verbose']
|
|
28
|
+
end
|
|
88
29
|
|
|
89
|
-
|
|
30
|
+
desc 'Generate YARD Documentation'
|
|
31
|
+
task doc: [:yard]
|
|
90
32
|
|
|
91
|
-
task :
|
|
33
|
+
task default: [:spec]
|
|
@@ -14,6 +14,13 @@ set -e
|
|
|
14
14
|
|
|
15
15
|
<%= (@config[:verbosity].to_i > 1 ? 'set -v' : '') %>
|
|
16
16
|
|
|
17
|
+
echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list
|
|
18
|
+
|
|
19
|
+
# Make sure that opscode chef is on the apt repo list.
|
|
20
|
+
sudo mkdir -p /etc/apt/trusted.gpg.d
|
|
21
|
+
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A
|
|
22
|
+
gpg --export packages@opscode.com | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null
|
|
23
|
+
|
|
17
24
|
date > /etc/box_build_time
|
|
18
25
|
|
|
19
26
|
echo -e "`date` \n\n**** \n**** apt update:\n****\n"
|