MathYourLife/storm-cookbook — pull request #1 by MathYourLife (2014-08-21 17:17:06+00:00)
Title: Install storm via attributes

* Overriding install configuration is easier for wrapper cookbooks if the parameters are stored in the recipe attributes.
* `bash` install resource block broken out into separate chef resources with use of notifies

Default install directory looks like:
```bash
$ ls -l /opt/storm/
drwxrwxrwx 7 root root 4096 Feb 9 2014 apache-storm-0.9.1-incubating
drwxrwxrwx 9 root root 4096 Jun 16 12:22 apache-storm-0.9.2-incubating
lrwxrwxrwx 1 root root 40 Aug 21 16:12 current -> /opt/storm/apache-storm-0.9.2-incubating
```
with changes in versions creating their own directories and the symlink switching between active versions.

Wrapper cookbooks can override the default version with attributes
```ruby
override[:storm][:version] = "0.9.2-incubating"
override[:storm][:remote_path] = ::File.join("http://apache.mirror.iweb.ca/incubator/storm/",
"apache-storm-#{node[:storm][:version]}")
override[:storm][:remote_file] = "apache-storm-#{node[:storm][:version]}.zip"
override[:storm][:path][:version] = ::File.join(node[:storm][:path][:root],
"apache-storm-#{node[:storm][:version]}")
```