Permalink
Browse files

A node attribute that controls if Cassandra service is enabled

  • Loading branch information...
1 parent d7935e4 commit 57970f78a528d3bea2290bbca65e87ac213aaa55 @michaelklishin michaelklishin committed Oct 3, 2012
Showing with 10 additions and 3 deletions.
  1. +4 −1 ci_environment/cassandra/attributes/default.rb
  2. +6 −2 ci_environment/cassandra/recipes/tarball.rb
@@ -21,5 +21,8 @@
:conf_dir => "/etc/cassandra/",
# commit log, data directory, saved caches and so on are all stored under the data root. MK.
:data_root_dir => "/var/lib/cassandra/",
- :log_dir => "/var/log/cassandra/"
+ :log_dir => "/var/log/cassandra/",
+ :service => {
+ :enabled => false
+ }
}
@@ -149,6 +149,10 @@
service "cassandra" do
supports :start => true, :stop => true, :restart => true
- # intentionally disabled on boot. MK.
- action [:disable, :start]
+
+ if node.cassandra.service.enabled
+ action [:enable, :start]
+ else
+ action [:disable, :start]
+ end
end

0 comments on commit 57970f7

Please sign in to comment.