ironfan 5.0.11 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -1,249 +0,0 @@
|
|
1
|
-
# Cookbook event ordering
|
2
|
-
|
3
|
-
|
4
|
-
Most cookbooks have some set of the following
|
5
|
-
|
6
|
-
* base configuration
|
7
|
-
* announce component
|
8
|
-
- before discovery so it can be found
|
9
|
-
- currently done in converge stage -- some aspects might be incompletely defined?
|
10
|
-
|
11
|
-
* register apt repository if any
|
12
|
-
* create daemon user
|
13
|
-
- before directories so we can set permissions
|
14
|
-
- before package install so uid is stable
|
15
|
-
* install, as package, git deploy or install from release
|
16
|
-
- often have to halt legacy services -- config files don't exist
|
17
|
-
* create any remaining directories
|
18
|
-
- after package install so it has final say
|
19
|
-
* install plugins
|
20
|
-
- after directories, before config files
|
21
|
-
* define service
|
22
|
-
- before config file creation so we can notify
|
23
|
-
- can't start it yet because no config files
|
24
|
-
* discover component (own or other, same or other machines)
|
25
|
-
* write config files (notify service of changes)
|
26
|
-
- must follow everything so info is current
|
27
|
-
* register a minidash dashboard
|
28
|
-
* trigger start (or restart) of service
|
29
|
-
|
30
|
-
## Proposal:
|
31
|
-
|
32
|
-
kill `role`s, in favor of `stack`s.
|
33
|
-
|
34
|
-
A runlist is assembled in the following phases:
|
35
|
-
|
36
|
-
* `initial` configuration
|
37
|
-
* `before_install`
|
38
|
-
- `account`
|
39
|
-
* `install`
|
40
|
-
- `plugin` install
|
41
|
-
- `directories`
|
42
|
-
* `announcement`
|
43
|
-
- `service` definition
|
44
|
-
- `discovery`
|
45
|
-
* `commit`
|
46
|
-
- `config_files`: write config files to disk
|
47
|
-
* `finalize`
|
48
|
-
* `launch`
|
49
|
-
|
50
|
-
As you can see, most layers have semantic names (`plugin`, `user`, etc); if you name your recipe correctly, they will be assigned to the correct phase. Otherwise, you can attach them explicitly to a semantic or non-semantic phase.
|
51
|
-
|
52
|
-
elasticsearch_datanode component:
|
53
|
-
|
54
|
-
elasticsearch::default # initial
|
55
|
-
elasticsearch::install_from_release #install phase
|
56
|
-
elasticsearch::plugins # plugin phase
|
57
|
-
|
58
|
-
elasticsearch::server # service definition; includes announcement
|
59
|
-
elasticsearch::config_files # config_files; includes discovery
|
60
|
-
|
61
|
-
I'm not clear on how much the phases should be strictly broken out into one-recipe-per-phase.
|
62
|
-
|
63
|
-
It's also possible to instead define a chef resource that let you defer a block to a given phase from within a callback. It would be similar to a ruby block, but have more explicit timing. This may involve jacking around inside Chef, something we've avoided to now.
|
64
|
-
|
65
|
-
__________________________________________________________________________
|
66
|
-
|
67
|
-
Run List is
|
68
|
-
|
69
|
-
[role[systemwide], role[chef_client], role[ssh], role[nfs_client],
|
70
|
-
role[volumes], role[package_set], role[org_base], role[org_users],
|
71
|
-
|
72
|
-
role[hadoop],
|
73
|
-
role[hadoop_s3_keys],
|
74
|
-
role[cassandra_server], role[zookeeper_server],
|
75
|
-
role[flume_master], role[flume_agent],
|
76
|
-
role[ganglia_master],
|
77
|
-
role[ganglia_agent], role[hadoop_namenode], role[hadoop_datanode],
|
78
|
-
role[hadoop_jobtracker], role[hadoop_secondarynn], role[hadoop_tasktracker],
|
79
|
-
role[hbase_master], role[hbase_regionserver], role[hbase_stargate],
|
80
|
-
role[redis_server], role[mysql_client], role[redis_client],
|
81
|
-
role[cassandra_client], role[elasticsearch_client], role[jruby], role[pig],
|
82
|
-
recipe[ant], recipe[bluepill], recipe[boost], recipe[build-essential],
|
83
|
-
recipe[cron], recipe[git], recipe[hive], recipe[java::sun], recipe[jpackage],
|
84
|
-
recipe[jruby], recipe[nodejs], recipe[ntp], recipe[openssh], recipe[openssl],
|
85
|
-
recipe[rstats], recipe[runit], recipe[thrift], recipe[xfs], recipe[xml],
|
86
|
-
recipe[zabbix], recipe[zlib], recipe[apache2], recipe[nginx],
|
87
|
-
role[el_ridiculoso_cluster], role[el_ridiculoso_gordo], role[minidash],
|
88
|
-
role[org_final], recipe[hadoop_cluster::config_files], role[tuning]]
|
89
|
-
|
90
|
-
Run List expands to
|
91
|
-
|
92
|
-
build-essential, motd, zsh, emacs, ntp, nfs, nfs::client, xfs,
|
93
|
-
volumes::mount, volumes::resize, package_set,
|
94
|
-
|
95
|
-
hadoop_cluster,
|
96
|
-
hadoop_cluster::minidash,
|
97
|
-
|
98
|
-
cassandra, cassandra::install_from_release,
|
99
|
-
cassandra::autoconf, cassandra::server, cassandra::jna_support,
|
100
|
-
cassandra::config_files, zookeeper::default, zookeeper::server,
|
101
|
-
zookeeper::config_files, flume, flume::master, flume::agent,
|
102
|
-
flume::jruby_plugin, flume::hbase_sink_plugin, ganglia, ganglia::server,
|
103
|
-
ganglia::monitor,
|
104
|
-
|
105
|
-
hadoop_cluster::namenode,
|
106
|
-
hadoop_cluster::datanode,
|
107
|
-
hadoop_cluster::jobtracker,
|
108
|
-
hadoop_cluster::secondarynn,
|
109
|
-
hadoop_cluster::tasktracker,
|
110
|
-
|
111
|
-
zookeeper::client,
|
112
|
-
hbase::master,
|
113
|
-
hbase::minidash,
|
114
|
-
|
115
|
-
minidash::server,
|
116
|
-
hbase::regionserver,
|
117
|
-
hbase::stargate,
|
118
|
-
redis, redis::install_from_release, redis::server,
|
119
|
-
mysql, mysql::client,
|
120
|
-
cassandra::client, elasticsearch::default,
|
121
|
-
|
122
|
-
elasticsearch::install_from_release,
|
123
|
-
elasticsearch::plugins,
|
124
|
-
elasticsearch::client,
|
125
|
-
|
126
|
-
jruby, jruby::gems,
|
127
|
-
|
128
|
-
pig,
|
129
|
-
pig::install_from_package,
|
130
|
-
pig::piggybank,
|
131
|
-
pig::integration,
|
132
|
-
|
133
|
-
zookeeper,
|
134
|
-
ant, bluepill, boost, cron,
|
135
|
-
git, hive,
|
136
|
-
java::sun, jpackage, nodejs, openssh, openssl, rstats, runit,
|
137
|
-
thrift, xml, zabbix, zlib, apache2, nginx, hadoop_cluster::config_files,
|
138
|
-
tuning::default
|
139
|
-
|
140
|
-
|
141
|
-
From an actual run of el_ridiculoso-gordo:
|
142
|
-
|
143
|
-
2 nfs::client
|
144
|
-
1 java::sun
|
145
|
-
1 aws::default
|
146
|
-
5 build-essential::default
|
147
|
-
3 motd::default
|
148
|
-
2 zsh::default
|
149
|
-
1 emacs::default
|
150
|
-
8 ntp::default
|
151
|
-
1 nfs::default
|
152
|
-
2 nfs::client
|
153
|
-
3 xfs::default
|
154
|
-
46 package_set::default
|
155
|
-
4 java::sun
|
156
|
-
8 tuning::ubuntu
|
157
|
-
6 apt::default
|
158
|
-
1 hadoop_cluster::add_cloudera_repo
|
159
|
-
44 hadoop_cluster::default
|
160
|
-
4 minidash::default
|
161
|
-
2 /srv/chef/file_store/cookbooks/minidash/providers/dashboard.rb
|
162
|
-
1 hadoop_cluster::minidash
|
163
|
-
2 /srv/chef/file_store/cookbooks/minidash/providers/dashboard.rb
|
164
|
-
1 boost::default
|
165
|
-
2 python::package
|
166
|
-
2 python::pip
|
167
|
-
1 python::virtualenv
|
168
|
-
2 install_from::default
|
169
|
-
7 thrift::default
|
170
|
-
9 cassandra::default
|
171
|
-
1 cassandra::install_from_release
|
172
|
-
6 /srv/chef/file_store/cookbooks/install_from/providers/release.rb
|
173
|
-
3 cassandra::install_from_release
|
174
|
-
1 cassandra::bintools
|
175
|
-
3 runit::default
|
176
|
-
11 cassandra::server
|
177
|
-
2 cassandra::jna_support
|
178
|
-
2 cassandra::config_files
|
179
|
-
6 zookeeper::default
|
180
|
-
15 zookeeper::server
|
181
|
-
3 zookeeper::config_files
|
182
|
-
18 flume::default
|
183
|
-
2 flume::master
|
184
|
-
3 flume::agent
|
185
|
-
2 flume::jruby_plugin
|
186
|
-
1 flume::hbase_sink_plugin
|
187
|
-
21 ganglia::server
|
188
|
-
20 ganglia::monitor
|
189
|
-
13 hadoop_cluster::namenode
|
190
|
-
11 hadoop_cluster::datanode
|
191
|
-
11 hadoop_cluster::jobtracker
|
192
|
-
11 hadoop_cluster::secondarynn
|
193
|
-
11 hadoop_cluster::tasktracker
|
194
|
-
14 hbase::default
|
195
|
-
11 hbase::master
|
196
|
-
1 hbase::minidash
|
197
|
-
2 /srv/chef/file_store/cookbooks/minidash/providers/dashboard.rb
|
198
|
-
13 minidash::server
|
199
|
-
11 hbase::regionserver
|
200
|
-
10 hbase::stargate
|
201
|
-
2 redis::default
|
202
|
-
2 redis::install_from_release
|
203
|
-
2 redis::default
|
204
|
-
16 redis::server
|
205
|
-
3 mysql::client
|
206
|
-
1 aws::default
|
207
|
-
7 elasticsearch::default
|
208
|
-
1 elasticsearch::install_from_release
|
209
|
-
6 /srv/chef/file_store/cookbooks/install_from/providers/release.rb
|
210
|
-
2 elasticsearch::plugins
|
211
|
-
3 elasticsearch::client
|
212
|
-
3 elasticsearch::config
|
213
|
-
1 jruby::default
|
214
|
-
9 /srv/chef/file_store/cookbooks/install_from/providers/release.rb
|
215
|
-
7 jruby::default
|
216
|
-
18 jruby::gems
|
217
|
-
2 pig::install_from_package
|
218
|
-
5 pig::piggybank
|
219
|
-
8 pig::integration
|
220
|
-
6 zookeeper::default
|
221
|
-
3 ant::default
|
222
|
-
5 bluepill::default
|
223
|
-
2 cron::default
|
224
|
-
1 git::default
|
225
|
-
1 hive::default
|
226
|
-
2 nodejs::default
|
227
|
-
4 openssh::default
|
228
|
-
7 rstats::default
|
229
|
-
1 xml::default
|
230
|
-
11 zabbix::default
|
231
|
-
1 zlib::default
|
232
|
-
10 apache2::default
|
233
|
-
2 apache2::mod_status
|
234
|
-
2 apache2::mod_alias
|
235
|
-
1 apache2::mod_auth_basic
|
236
|
-
1 apache2::mod_authn_file
|
237
|
-
1 apache2::mod_authz_default
|
238
|
-
1 apache2::mod_authz_groupfile
|
239
|
-
1 apache2::mod_authz_host
|
240
|
-
1 apache2::mod_authz_user
|
241
|
-
2 apache2::mod_autoindex
|
242
|
-
2 apache2::mod_dir
|
243
|
-
1 apache2::mod_env
|
244
|
-
2 apache2::mod_mime
|
245
|
-
2 apache2::mod_negotiation
|
246
|
-
2 apache2::mod_setenvif
|
247
|
-
1 apache2::default
|
248
|
-
8 nginx::default
|
249
|
-
9 hadoop_cluster::config_files
|
@@ -1,59 +0,0 @@
|
|
1
|
-
@temujin9 has proposed, and it's a good propose, that there should exist such a thing as an 'integration cookbook'.
|
2
|
-
|
3
|
-
The hadoop_cluster cookbook should describe the hadoop_cluster, the ganglia cookbook ganglia, and the zookeeper cookbook zookeeper. Each should provide hooks that are neighborly but not exhibitionist, but should mind its own business.
|
4
|
-
|
5
|
-
The job of tying those components together should belong to a separate concern. It should know how and when to copy hbase jars into the pig home dir, or what cluster service_provide'r a redis client should reference.
|
6
|
-
|
7
|
-
## Practical implications
|
8
|
-
|
9
|
-
* I'm going to revert out the `node[:zookeeper][:cluster_name]` attributes -- services should always announce under their cluster.
|
10
|
-
|
11
|
-
* Until we figure out how and when to separate integrations, I'm going to isolate entanglements into their own recipes within cookbooks: so, the ganglia part of hadoop will become `ganglia_integration` or somesuch.
|
12
|
-
|
13
|
-
## Example integrations
|
14
|
-
|
15
|
-
### Copying jars
|
16
|
-
|
17
|
-
Pig needs jars from hbase and zookeeper. They should announce they have jars; pig should announce its home directory; the integration should decide how and where to copy the jars.
|
18
|
-
|
19
|
-
### Reference a service
|
20
|
-
|
21
|
-
Right now in several places we have attributes like `node[:zookeeper][:cluster_name]`, used to specify the cluster that provides_service zookeeper.
|
22
|
-
|
23
|
-
* Server recipes should never use `node[:zookeeper][:cluster_name]` -- they should always announce under their native cluster. (I'd kinda like to give `provides_service` some sugar to assume the cluster name, but need to find something backwards-compatible to use)
|
24
|
-
|
25
|
-
* Need to take a better survey of usage among clients to determine how to do this.
|
26
|
-
|
27
|
-
* cases:
|
28
|
-
- hbase cookbook refs: hadoop, zookeeper, ganglia
|
29
|
-
- flume cookbook refs: zookeeper, ganglia.
|
30
|
-
- flume agents may reference several different flume provides_service'rs
|
31
|
-
- API using two different elasticsearch clusters
|
32
|
-
|
33
|
-
### Logging, monitoring
|
34
|
-
|
35
|
-
* tell flume you have logs to pick up
|
36
|
-
* tell ganglia to monitor you
|
37
|
-
|
38
|
-
### Service Dashboard
|
39
|
-
|
40
|
-
Let everything with a dashboard say so, and then let one resource create a page that links to each.
|
41
|
-
|
42
|
-
|
43
|
-
________________________
|
44
|
-
|
45
|
-
These are still forming, ideas welcome.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
Sometimes we want
|
51
|
-
|
52
|
-
* if there are volumes marked for 'mysql-table_data', use that; otherwise, the 'persistent' datastore, if any; else the 'bulk' datastore, if any; else the 'fallback' datastore (which is guaranteed to exist).
|
53
|
-
|
54
|
-
* IP addresses (or hostnames):
|
55
|
-
- `[:private_ip, :public_ip]`
|
56
|
-
- `[:private_ip]`
|
57
|
-
- `:primary_ip`
|
58
|
-
|
59
|
-
* .
|
@@ -1,75 +0,0 @@
|
|
1
|
-
## Compute Costs
|
2
|
-
|
3
|
-
|
4
|
-
code $/mo $/day $/hr Mem/$ CPU/$ mem cpu cores cpcore storage disks ebs-opt IO
|
5
|
-
t1.micro 15 0.48 .02 31 13 .61 0.25 1 0.25 - 0 Lo
|
6
|
-
m1.small 44 1.44 .06 28 17 1.7 1 1 1 160 1 Med
|
7
|
-
m1.medium 88 2.88 .12 31 17 3.75 2 2 1 410 1 Med
|
8
|
-
c1.medium 106 3.48 .15 12 34 1.7 5 2 2.5 350 1 Med
|
9
|
-
m1.large 175 5.76 .24 31 17 7.5 4 2 2 850 2 Hi
|
10
|
-
m1.lg+ebs 194 6.36 .27 28 15 7.5 4 2 2 850 2 500 Hi+EBS
|
11
|
-
m2.xlarge 300 9.84 .41 42 16 17.1 6.5 2 3.25 420 1 Med
|
12
|
-
m1.xlarge 351 11.52 .48 31 17 15. 8 4 2 1690 4 Hi
|
13
|
-
m3.xlarge 365 12.00 .50 30 26 15. 13 4 3.25 - 0 Med
|
14
|
-
m1.xl+ebs 387 12.72 .53 28 15 15. 8 4 2 1690 4 1000 Hi+EBS
|
15
|
-
c1.xlarge 424 13.92 .58 12 34 7. 20 8 2.5 1690 4 Hi
|
16
|
-
m2.2xlarge 599 19.68 .82 42 16 34.2 13 4 3.25 850 2 Hi
|
17
|
-
m3.2xlarge 731 24.00 1.00 30 26 30. 26 8 3.25 - 0 Hi
|
18
|
-
cc1.4xlarge 950 31.20 1.30 18 26 23. 33.5 8 4.2 1690 4 10gb
|
19
|
-
m2.4xlarge 1198 39.36 1.64 42 16 68.4 26 8 3.25 1690 2 Hi
|
20
|
-
m2.4xl+ebs 1235 40.56 1.69 40 15 68.4 26 8 3.25 1690 2 1000 Hi+EBS
|
21
|
-
cg1.4xlarge 1534 50.40 2.10 10 16 22. 33.5 8 4.2 1690 4 10gb
|
22
|
-
cc2.8xlarge 1753 57.60 2.40 25 37 60.5 88 16 5.5 3370 2 10gb
|
23
|
-
hi1.4xlarge 2265 74.40 3.10 20 11 60.5 35.2 16 2.2 2048 ssd 2 10gb
|
24
|
-
cr1.8xlarge 2557 84.00 3.50 70 25 244. 88 16 5.5 240 ssd 2 10gb
|
25
|
-
hs1.8xlarge 3361 110.40 4.60 25 8 117. 35 16 2.2 49152 24 10gb
|
26
|
-
|
27
|
-
Prices are for standard (non-reserved) instances. EBS-optimized instances are listed on their own line.
|
28
|
-
|
29
|
-
|
30
|
-
## Storage Costs
|
31
|
-
|
32
|
-
$/GB..mo $/GB.mo $/Mio
|
33
|
-
EBS Volume $0.10
|
34
|
-
EBS I/O $0.10
|
35
|
-
EBS Snapshot S3 $0.083
|
36
|
-
|
37
|
-
Std $/GB.mo Red.Red. $/GB.mo
|
38
|
-
S3 1st tb $0.125 $0.093
|
39
|
-
S3 next 49tb $0.110 $0.083
|
40
|
-
S3 next 450tb $0.095 $0.073
|
41
|
-
|
42
|
-
### Storing 1TB data
|
43
|
-
|
44
|
-
(Cost of storage, neglecting I/O costs, and assuming the ratio of EBS volume size to snapshot size is as given)
|
45
|
-
|
46
|
-
* http://aws.amazon.com/ec2/instance-types/
|
47
|
-
* http://aws.amazon.com/ec2/#pricing
|
48
|
-
|
49
|
-
### How much does EBS cost?
|
50
|
-
|
51
|
-
The costs of EBS will be similar to the pricing structure of data storage on S3. There are three types of costs associated with EBS.
|
52
|
-
|
53
|
-
Storage Cost + Transaction Cost + S3 Snapshot Cost = Total Cost of EBS
|
54
|
-
|
55
|
-
NOTE: For current pricing information, be sure to check Amazon EC2 Pricing.
|
56
|
-
|
57
|
-
#### Storage Costs
|
58
|
-
|
59
|
-
The cost of an EBS Volume is $0.10/GB per month. You are responsible for paying for the amount of disk space that you reserve, not for the amount of the disk space that you actually use. If you reserve a 1TB volume, but only use 1GB, you will be paying for 1TB.
|
60
|
-
* $0.10/GB per month of provisioned storage
|
61
|
-
* $0.10/GB per 1 million I/O requests
|
62
|
-
|
63
|
-
#### Transaction Costs
|
64
|
-
|
65
|
-
In addition to the storage cost for EBS Volumes, you will also be charged for I/O transactions. The cost is $0.10 per million I/O transactions, where one transaction is equivalent to one read or write. This number may be smaller than the actual number of transactions performed by your application because of the Linux cache for all file systems.
|
66
|
-
$0.10 per 1 million I/O requests
|
67
|
-
|
68
|
-
#### S3 Snapshot Costs
|
69
|
-
|
70
|
-
Snapshot costs are compressed and based on altered blocks from the previous snapshot backup. Files that have altered blocks on the disk and then been deleted will add cost to the Snapshots for example. Remember, snapshots are at the data block level.
|
71
|
-
$0.15 per GB-month of data stored
|
72
|
-
$0.01 per 1,000 PUT requests (when saving a snapshot)
|
73
|
-
$0.01 per 10,000 GET requests (when loading a snapshot)
|
74
|
-
|
75
|
-
NOTE: Payment charges stop the moment you delete a volume. If you delete a volume and the status appears as "deleting" for an extended period of time, you will not be charged for the time needed to complete the deletion.
|
Binary file
|
data/notes/homebase-layout.txt
DELETED
@@ -1,102 +0,0 @@
|
|
1
|
-
Ironfan Homebase Layout
|
2
|
-
=======================
|
3
|
-
|
4
|
-
Your Chef Homebase contains several directories, and each contains a README.md file describing its purpose and use in greater detail.
|
5
|
-
|
6
|
-
This directory structure came out of a *lot* of trial and error, and is working very well where many others didn't. This homebase makes it easy to pull in third-party pantries (cookbook collections) and track upstream changes without being locked in.
|
7
|
-
|
8
|
-
## Main Directories
|
9
|
-
|
10
|
-
The main assets you'll use are:
|
11
|
-
|
12
|
-
* `clusters/` - Clusters fully describe your machines, from its construction ('an 8-core machine on the Amazon EC2 cloud') to its roles ('install Cassandra, Ganglia for monitoring, and silverware to manage its logs and firewall').
|
13
|
-
* `cookbooks/` - Cookbooks you download or create. Cookbooks install components, for example `cassandra` or `java`.
|
14
|
-
* `roles/` - Roles organize cookbooks and attribute overrides to describe the specific composition of your system. For example, you install Cassandra attaching the `cassandra_server` role to your machine. (.rb or .json files)
|
15
|
-
|
16
|
-
These folders hold supporting files. You're less likely to visit here regularly.
|
17
|
-
|
18
|
-
* `knife/` - Chef and cloud configuration, and their myriad attendant credentials.
|
19
|
-
* `environments/` - Organization-wide attribute values. (.json or .rb files)
|
20
|
-
* `data_bags/` - Data bags are an occasionally-useful alternative to node metadata for distributing information to your machines. (.json files)
|
21
|
-
* `certificates/` - SSL certificates generated by `rake ssl_cert` live here.
|
22
|
-
* `tasks/` - Rake tasks for common administrative tasks.
|
23
|
-
* `vendor/` - cookbooks are checked out to `vendor`; symlinks in the `cookbooks/` directory select which ones will be deployed to chef server. The vendor directory comes with the Ironfan, Opscode and (should you be a lucky customer) Ironfan Enterprise chef pantries.
|
24
|
-
* `notes/` - a submoduled copy of the [ironfan wiki](http://github.com/infochimps-labs/ironfan/wiki`
|
25
|
-
|
26
|
-
## Directory setup
|
27
|
-
|
28
|
-
The core structure of the homebase is as follows ("├─*" means "git submodule'd"):
|
29
|
-
|
30
|
-
homebase
|
31
|
-
├── clusters - cluster definition files
|
32
|
-
│ └── ( clusters )
|
33
|
-
├── cookbooks - symlinks to cookbooks
|
34
|
-
│ ├── @vendor/ironfan-pantry/cookbooks/...
|
35
|
-
│ ├── @vendor/opscode/cookbooks/...
|
36
|
-
│ └── @vendor/org-pantry/cookbooks/...
|
37
|
-
├── environments - environment definition files
|
38
|
-
│ └── ( environments )
|
39
|
-
├── data_bags - symlinks to data_bags
|
40
|
-
│ ├── @vendor/ironfan-pantry/roles/...
|
41
|
-
│ └── @vendor/org-pantry/roles/...
|
42
|
-
├── roles - symlinks to roles
|
43
|
-
│ ├── @vendor/ironfan-pantry/roles/...
|
44
|
-
│ └── @vendor/org-pantry/roles/...
|
45
|
-
├── vendor
|
46
|
-
│ ├─* ironfan-pantry - git submodule of https://github.com/infochimps-labs/ironfan-pantry
|
47
|
-
│ │ ├── cookbooks
|
48
|
-
│ │ ├── data_bags
|
49
|
-
│ │ ├── roles
|
50
|
-
│ │ └── tasks
|
51
|
-
│ ├─* ironfan-enterprise - git submodule of ironfan-enterprise, if you're a lucky customer
|
52
|
-
│ │ ├── cookbooks
|
53
|
-
│ │ ├── data_bags
|
54
|
-
│ │ ├── roles
|
55
|
-
│ │ └── tasks
|
56
|
-
│ ├── opscode
|
57
|
-
│ │ └─* cookbooks - git submodule of https://github.com/infochimps-labs/opscode_cookbooks; itself a closely-tracked fork of https://github.com/opscode/cookbooks
|
58
|
-
│ └── org-pantry - organization specific roles, cookbooks, etc.
|
59
|
-
│ ├── cookbooks
|
60
|
-
│ ├── data_bags
|
61
|
-
│ ├── roles
|
62
|
-
│ └── tasks
|
63
|
-
├── knife - credentials (see below)
|
64
|
-
├── certificates
|
65
|
-
├── config
|
66
|
-
├─* notes
|
67
|
-
├── tasks
|
68
|
-
└── vagrants - vagrant files (when using ironfan-ci)
|
69
|
-
|
70
|
-
The `vendor/opscode/cookbooks` and `vendor/ironfan-pantry` directories are actually [git submodules](http://help.github.com/submodules/). This makes it easy to track upstream changes in each collection while still maintaining your own modifications.
|
71
|
-
|
72
|
-
We recommend you place your cookbooks in `vendor/org-pantry`. If you have cookbooks &c from other pantries that have significant changes, you can duplicate it into this `vendor/org-pantry` and simply change the symlink in homebase/cookbooks/.
|
73
|
-
|
74
|
-
## Knife dir setup
|
75
|
-
|
76
|
-
We recommend you version your credentials directory separately from your homebase. You will want to place it under version control, but you should not place it into a central git repository -- this holds the keys to the kingdom.
|
77
|
-
|
78
|
-
We exclude the chef user key (`(user).pem`) and user-specific knife settings (`knife-user-(user).rb`) from the repo as well. Each user has their own revokable client key, and their own cloud credentials set, and those live nowhere but their own computers.
|
79
|
-
|
80
|
-
knife/
|
81
|
-
├── knife.rb
|
82
|
-
├── credentials -> (organization)-credentials
|
83
|
-
├── (organization)-credentials
|
84
|
-
│ ├── knife-org.rb - org-specific stuff, and cloud assets (elastic IPs, AMI image ids, etc)
|
85
|
-
│ ├── (user).pem - your chef client key *GITIGNORED*
|
86
|
-
│ ├── knife-user-(user).rb - your user-specific knife customizations *GITIGNORED*
|
87
|
-
│ ├── (organization)-validator.pem- chef validator key, used to create client keys
|
88
|
-
│ ├── client_keys
|
89
|
-
│ │ └── (transient client keys) - you can delete these at will; only useful if you're debugging a bad bootstrap
|
90
|
-
│ ├── ec2_keys
|
91
|
-
│ │ └── (transient client keys) - ssh keys for cloud machines (in EC2 parlance, the private half of your keypair)
|
92
|
-
│ ├── certificates
|
93
|
-
│ ├── data_bag_keys
|
94
|
-
│ └── ec2_certs
|
95
|
-
├── bootstrap - knife cluster bootstrap scripts
|
96
|
-
├── plugins
|
97
|
-
│ └── knife
|
98
|
-
│ └── (knife plugins) - knife plugins
|
99
|
-
└── .gitignore - make sure not to version the secret/user-specific stuff (*-keypairs, *-credentials.rb, knife-user-*.rb)
|
100
|
-
|
101
|
-
|
102
|
-
(You can safely ignore the directories above that aren't annotated; they're useful in certain advanced contexts but not immediately)
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# Ironfan Knife Commands
|
2
|
-
|
3
|
-
## Available Commands
|
4
|
-
|
5
|
-
Available cluster subcommands: (for details, `knife SUB-COMMAND --help`)
|
6
|
-
|
7
|
-
knife cluster list (options) - show available clusters
|
8
|
-
knife cluster bootstrap CLUSTER-[FACET-[INDEXES]] (options) - bootstrap all servers described by given cluster slice
|
9
|
-
knife cluster kick CLUSTER-[FACET-[INDEXES]] (options) - start a run of chef-client on each server, tailing the logs and exiting when the run completes.
|
10
|
-
knife cluster kill CLUSTER-[FACET-[INDEXES]] (options) - kill all servers described by given cluster slice
|
11
|
-
knife cluster launch CLUSTER-[FACET-[INDEXES]] (options) - Creates chef node and chef apiclient, pre-populates chef node, and instantiates in parallel their cloud machines. With --bootstrap flag, will ssh in to machines as they become ready and launch the bootstrap process
|
12
|
-
knife cluster proxy CLUSTER-[FACET-[INDEXES]] (options) - Runs the ssh command to open a SOCKS proxy to the given host, and writes a PAC (automatic proxy config) file to /tmp/ironfan_proxy-YOURNAME.pac. Only the first host is used, even if multiple match.
|
13
|
-
knife cluster show CLUSTER-[FACET-[INDEXES]] (options) - a helpful display of cluster's cloud and chef state
|
14
|
-
knife cluster ssh CLUSTER-[FACET-[INDEXES]] COMMAND (options) - run an interactive ssh session, or execuse the given command, across a cluster slice
|
15
|
-
knife cluster start CLUSTER-[FACET-[INDEXES]] (options) - start all servers described by given cluster slice
|
16
|
-
knife cluster stop CLUSTER-[FACET-[INDEXES]] (options) - stop all servers described by given cluster slice
|
17
|
-
knife cluster sync CLUSTER-[FACET-[INDEXES]] (options) - Update chef server and cloud machines with current cluster definition
|
18
|
-
knife cluster vagrant CMD CLUSTER-[FACET-[INDEXES]] (options) - runs the given command against a vagrant environment created from your cluster definition. EARLY, use at your own risk
|
19
|
-
|
20
|
-
## Examples
|
21
|
-
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# Named Cloud Objects
|
2
|
-
|
3
|
-
To add a new machine image, place this snippet:
|
4
|
-
|
5
|
-
Chef::Config[:ec2_image_info] ||= {}
|
6
|
-
Chef::Config[:ec2_image_info].merge!({
|
7
|
-
# ... lines like this:
|
8
|
-
# %w[ us-west-1 64-bit ebs natty ] => { :image_id => 'ami-4d580408' },
|
9
|
-
})
|
10
|
-
|
11
|
-
in your knife.rb or whereever. ironfan will notice that it exists and add to it, rather than clobbering it.
|
data/notes/opscode_org_key.png
DELETED
Binary file
|
data/notes/opscode_user_key.png
DELETED
Binary file
|
data/notes/philosophy.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
## Philosophy
|
2
|
-
|
3
|
-
Some general principles of how we use Chef.
|
4
|
-
|
5
|
-
* *Chef server is never the repository of truth* -- it only mirrors the truth. A file is tangible and immediate to access.
|
6
|
-
* Specifically, we want truth to live in the git repo, and be enforced by the Chef server. This means that everything is versioned, documented and exchangeable. *There is no truth but git, and Chef is its messenger*.
|
7
|
-
* *Systems, services and significant modifications cluster should be obvious from the `clusters` file*. I don't want to have to bounce around nine different files to find out which thing installed a redis:server. The existence of anything that opens a port should be obvious when I look at the cluster file.
|
8
|
-
* *Roles define systems, clusters assemble systems into a machine*.
|
9
|
-
- For example, a resque worker queue has a redis, a webserver and some config files -- your cluster should invoke a @whatever_queue@ role, and the @whatever_queue@ role should include recipes for the component services.
|
10
|
-
- the existence of anything that opens a port _or_ runs as a service should be obvious when I look at the roles file.
|
11
|
-
* *include_recipe considered harmful* Do NOT use include_recipe for anything that a) provides a service, b) launches a daemon or c) is interesting in any way. (so: @include_recipe java@ yes; @include_recipe iptables@ no.) You should note the dependency in the metadata.rb. This seems weird, but the breaking behavior is purposeful: it makes you explicitly state all dependencies.
|
12
|
-
* It's nice when *machines are in full control of their destiny*. Their initial setup (elastic IP, attaching a drive) is often best enforced externally. However, machines should be able independently assert things like load balancer registration which may change at any point in their lifetime.
|
13
|
-
* It's even nicer, though, to have *full idempotency from the command line*: I can at any time push truth from the git repo to the Chef server and know that it will take hold.
|
data/notes/rake_tasks.md
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
|
2
|
-
Rake Tasks
|
3
|
-
==========
|
4
|
-
|
5
|
-
The homebase contains a `Rakefile` that includes tasks that are installed with the Chef libraries. To view the tasks available with in the homebase with a brief description, run `rake -T`.
|
6
|
-
|
7
|
-
Besides your `~/.chef/knife.rb` file, the Rakefile loads `config/rake.rb`, which sets:
|
8
|
-
|
9
|
-
* Constants used in the `ssl_cert` task for creating the certificates.
|
10
|
-
* Constants that set the directory locations used in various tasks.
|
11
|
-
|
12
|
-
If you use the `ssl_cert` task, change the values in the `config/rake.rb` file appropriately. These values were also used in the `new_cookbook` task, but that task is replaced by the `knife cookbook create` command which can be configured below.
|
13
|
-
|
14
|
-
The default task (`default`) is run when executing `rake` with no arguments. It will call the task `test_cookbooks`.
|
15
|
-
|
16
|
-
The following standard Chef tasks are typically accomplished using the rake file:
|
17
|
-
|
18
|
-
* `bundle_cookbook[cookbook]` - Creates cookbook tarballs in the `pkgs/` dir.
|
19
|
-
* `install` - Calls `update`, `roles` and `upload_cookbooks` Rake tasks.
|
20
|
-
* `ssl_cert` - Create self-signed SSL certificates in `certificates/` dir.
|
21
|
-
* `update` - Update the homebase from source control server, understands git and svn.
|
22
|
-
* `roles` - iterates over the roles and uploads with `knife role from file`.
|
23
|
-
|
24
|
-
Most other tasks use knife: run a bare `knife cluster`, `knife cookbook` (etc) to find out more.
|