Skip to content

Commit

Permalink
--remove some parts on default.rb
Browse files Browse the repository at this point in the history
--remove datastax repo, dont work with natty.
  • Loading branch information
cocoy committed Mar 9, 2012
1 parent 4578a18 commit dce7245
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 37 deletions.
14 changes: 7 additions & 7 deletions recipes/additional_settings.rb
Expand Up @@ -13,8 +13,8 @@
#
###################################################

execute "rm -rf /etc/motd"
execute "touch /etc/motd"
#execute "rm -rf /etc/motd"
#execute "touch /etc/motd"
execute 'echo "export JAVA_HOME=/usr/lib/jvm/java-6-sun" | sudo -E tee -a ~/.bashrc'
execute 'echo "export JAVA_HOME=/usr/lib/jvm/java-6-sun" | sudo -E tee -a ~/.profile'
execute 'sudo bash -c "ulimit -n 32768"'
Expand All @@ -26,8 +26,8 @@
# Open ports for communications in Rackspace.
# This is HORRIBLE security.
# Make sure to properly configure your cluster here.
if node[:cloud][:provider] == "rackspace" and node[:platform] == "centos"
execute 'sudo service iptables stop' do
ignore_failure true
end
end
#if node[:cloud][:provider] == "rackspace" and node[:platform] == "centos"
# execute 'sudo service iptables stop' do
# ignore_failure true
# end
#end
22 changes: 11 additions & 11 deletions recipes/default.rb
Expand Up @@ -27,16 +27,18 @@
end

# Only for debug purposes
OPTIONAL_INSTALL = true




OPTIONAL_INSTALL = false

include_recipe "cassandra::setup_repos"

# using java recipe for the node and comment this
#include_recipe "cassandra::required_packages"
#
# instead user java recipe.

node["java"]["install_flavor"] = "oracle"
include_recipe "java"

include_recipe "cassandra::required_packages"


if OPTIONAL_INSTALL
Expand All @@ -53,13 +55,11 @@
include_recipe "cassandra::additional_settings"


include_recipe "cassandra::token_generation"


include_recipe "cassandra::create_seed_list"
#include_recipe "cassandra::token_generation"

#include_recipe "cassandra::create_seed_list"

include_recipe "cassandra::write_configs"
#include_recipe "cassandra::write_configs"


include_recipe "cassandra::restart_service"
11 changes: 8 additions & 3 deletions recipes/required_packages.rb
Expand Up @@ -13,20 +13,25 @@
#
###################################################


case node[:platform]
when "ubuntu", "debian"
# Ensure all native components are up to date
# execute 'sudo apt-get -y upgrade'

node["java"]["install_flavor"] = "oracle"
include_recipe "java"

# Allow for non-interactive Sun Java setup
execute 'echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true" | sudo debconf-set-selections'
package "sun-java6-jdk"
#execute 'echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true" | sudo debconf-set-selections'
#package "sun-java6-jdk"

# Uninstall other Java Versions
execute 'sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java'
#execute 'sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java'
package "openjdk-6-jre-headless" do
action :remove
end

package "openjdk-6-jre-lib" do
action :remove
end
Expand Down
40 changes: 24 additions & 16 deletions recipes/setup_repos.rb
Expand Up @@ -34,30 +34,38 @@
apt_repository "cassandra-repo" do
uri "http://www.apache.org/dist/cassandra/debian"
components [node[:setup][:deployment], "main"]
keyserver "pgp.mit.edu"
#keyserver "pgp.mit.edu"
keyserver "keys.gnupg.net"
key "2B5C1B00"
#key "F758CE318D77295D"
#F758CE318D77295D
action :add
end
end

# Adds the DataStax repo:
# deb http://debian.riptano.com/<codename> <codename> main
apt_repository "datastax-repo" do
uri "http://debian.datastax.com/" << node[:internal][:codename]
distribution node[:internal][:codename]
components ["main"]
key "http://debian.datastax.com/debian/repo_key"
action :add
end
#apt_repository "datastax-repo" do
# uri "http://debian.datastax.com/" << node[:internal][:codename]
# distribution node[:internal][:codename]
# components ["main"]
# key "http://debian.datastax.com/debian/repo_key"
# #key "350200F2B999A372"
# action :add
#end
# fix for add_app
##execute "add_repository_key" do
# command "wget -O - http://debian.datastax.com/debian/repo_key | apt-key add -"
#end

# Adds the Sun Java repo:
# deb http://archive.canonical.com lucid partner
apt_repository "sun-java6-jdk" do
uri "http://archive.canonical.com"
distribution "lucid"
components ["partner"]
action :add
end
# Adds the Sun Java repo: --- now added using java
# deb http://archive.canonical.com lucid partner
#apt_repository "sun-java6-jdk" do
# uri "http://archive.canonical.com"
# distribution "lucid"
# components ["partner"]
# action :add
#end

when "centos", "redhat", "fedora"
if node[:platform] == "fedora"
Expand Down

0 comments on commit dce7245

Please sign in to comment.