Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Apr 9, 2012
0 parents commit a67e8e2
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
*~
#~
.rbx
*.class
40 changes: 40 additions & 0 deletions README.md
@@ -0,0 +1,40 @@
# Apache Cassandra Chef Cookbook

This is an OpsCode Chef cookbook for Apache Cassandra ([DataStax Community Edition](http://www.datastax.com/products/community)).

It uses officially released Debian packages, provides Upstart service script but has no
way to tweak Cassandra configuration parameters using Chef node attributes. The reason for
that is it was created for CI and development environments. Attributes will be used in the future,
doing so for single-server installations won't be difficult.


## Apache Cassandra Version

This cookbook currently provides Apache Cassandra 1.0.x (DataStax Community Edition).

## Supported OS Distributions

Ubuntu 11.04, 11.10.


## Recipes

Main recipe is `cassandra::datastax`.


## Attributes

This cookbook is very bare bones and targets development and CI environments, there are no attributes
at the moment.


## Dependencies

OpenJDK 6 or Sun JDK 6.


## Copyright & License

Michael S. Klishin, Travis CI Development Team, 2012.

Released under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html).
47 changes: 47 additions & 0 deletions recipes/datastax.rb
@@ -0,0 +1,47 @@
#
# Cookbook Name:: cassandra
# Recipe:: datastax
#
# Copyright 2011-2012, Michael S Klishin & Travis CI Development Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This recipe relies on a PPA package and is Ubuntu/Debian specific. Please
# keep this in mind.

include_recipe "java"

apt_repository "datastax" do
uri "http://debian.datastax.com/community"
distribution "stable"
components ["main"]
key "http://debian.datastax.com/debian/repo_key"

action :add
end

# DataStax Server Community Edition package will not install w/o this
# one installed. MK.
package "python-cql" do
action :install
end

package "dsc" do
action :install
end

service "cassandra" do
supports :restart => true, :status => true
action [:enable, :start]
end

0 comments on commit a67e8e2

Please sign in to comment.