Permalink
Browse files

changed dir structure, cleaned up old stuff, added top level readme a…

…nd correct Vagrant file for CCM
  • Loading branch information...
1 parent c14ae14 commit a509cd1188f22d5508fcfd5277da6713e5f550d7 @zznate committed Jan 22, 2014
View
@@ -0,0 +1,7 @@
+# Useful Vagrant Boxes for Cassandra
+
+Currently, the only one here uses Cassandra Cluster Manager (CCM) for running a cluster on a single image.
+
+### Coming Soon
+
+Three node cluster in a vagrant file
View
@@ -1,26 +0,0 @@
-Vagrant.configure("2") do |config|
- #config.vm.box = "cassandra2_0"
- config.vm.box = "precise64"
- config.vm.box_url = "http://files.vagrantup.com/precise64.box"
- #config.vm.box_url = "./cassandra2_0.box"
- # provisioner is puppet
- #config.vm.provision "puppet"
-
- config.vm.define "cass1" do |cass1|
- cass1.vm.hostname = "cass1"
- cass1.vm.network :private_network, ip: "192.168.33.10"
- cass1.vm.provision "shell", path: "provision_cass.sh", args: "10"
- end
-
- #config.vm.define "cass2" do |cass2|
- # cass2.vm.hostname = "cass2"
- # cass2.vm.network :private_network, ip: "192.168.33.11"
- #end
-
- # box specific parameters like memory and CPU
- config.vm.provider :virtualbox do |vb|
- vb.customize ["modifyvm", :id, "--memory", "1024"]
- end
-
-
-end
View
@@ -1,26 +0,0 @@
-Vagrant.configure("2") do |config|
- #config.vm.box = "cassandra2_0"
- config.vm.box = "precise64"
- config.vm.box_url = "http://files.vagrantup.com/precise64.box"
- #config.vm.box_url = "./cassandra2_0.box"
- # provisioner is puppet
- #config.vm.provision "puppet"
-
- config.vm.define "cass1" do |cass1|
- cass1.vm.hostname = "cass1"
- cass1.vm.network :private_network, ip: "192.168.33.10"
- cass1.vm.provision "shell", path: "provision_cass.sh", args: "10"
- end
-
- #config.vm.define "cass2" do |cass2|
- # cass2.vm.hostname = "cass2"
- # cass2.vm.network :private_network, ip: "192.168.33.11"
- #end
-
- # box specific parameters like memory and CPU
- config.vm.provider :virtualbox do |vb|
- vb.customize ["modifyvm", :id, "--memory", "1024"]
- end
-
-
-end
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-addr=192.168.33.$1
-echo $addr
-sed -e "s/127.0.0.1/$addr/" -e "s/localhost/$addr/" /etc/cassandra/cassandra.yaml.template > /etc/cassandra/cassandra.yaml
View
@@ -1,20 +0,0 @@
-# Builds on the stock precise64.box to add Oracle's JDK7.
-# A good starting point for anything Java-based.
-#
-Vagrant.configure("2") do |config|
- config.vm.box = "ccm-precise64"
- config.vm.box_url = "/Users/zznate/vagrant-boxes/ccm-precise64.box"
-
- config.vm.define "ccm_cluster" do |ccm_cluster|
- ccm_cluster.vm.hostname = "ccm-cluster"
- ccm_cluster.vm.network :private_network, ip: "192.168.33.11"
- end
-
- # box specific parameters like memory and CPU
- config.vm.provider :virtualbox do |vb|
- vb.customize ["modifyvm", :id, "--memory", "2048"]
- end
-
-
-end
-
@@ -0,0 +1,21 @@
+# Vagrant Image for Cassandra Cluster Manager (CCM)
+
+This is a pretty straight forward Vagrant file for deploying a box which contains Cassandra Cluster Manager (CCM). CCM is an excellent tool in and of itself. It can be found here: [https://github.com/pcmanus/ccm/](https://github.com/pcmanus/ccm/).
+
+## Recommended Usage
+
+Keep this Vagrant file in the top level of your Java project directory (at the same level as your `pom.xml` or `build.xml` files).
+
+Once there, follow these steps to load the image, login then start a three node Cassandra cluster:
+
+1. vagrant up
+
+2. vagrant ssh
+
+3. ccm create cluster-1_2_12 -v 1.2.12 -n 3 -i 192.168.33.1
+
+4. ccm start
+
+These steps create a running three node cluster which can be accessed via `192.168.33.11, 192.168.33.12, 192.168.33.13`.
+
+
@@ -0,0 +1,26 @@
+# Builds on the stock precise64.box to add Oracle's JDK7.
+# We then add ant and a few python tools to enable the use of
+# Cassandra Cluster Manager (CCM)
+#
+Vagrant.configure("2") do |config|
+ config.vm.box = "ccm-multi-precise64"
+ #config.vm.box_url = "https://s3-us-west-2.amazonaws.com/tlp-vagrant-boxes/ccm-multi-precise64.box"
+ config.vm.box_url = "/Users/zznate/vagrant-boxes/ccm-multi-precise64.box"
+
+ config.vm.define "ccm_cluster" do |ccm_cluster|
+ ccm_cluster.vm.hostname = "ccm-cluster"
+ ccm_cluster.vm.network "private_network", ip: "192.168.33.11"
+ ccm_cluster.vm.network "private_network", ip: "192.168.33.12"
+ ccm_cluster.vm.network "private_network", ip: "192.168.33.13"
+ ccm_cluster.vm.network "forwarded_port", guest: 9160, guest_ip: "192.168.33.11", host: 9161
+ ccm_cluster.vm.network "forwarded_port", guest: 9160, guest_ip: "192.168.33.12", host: 9162
+ ccm_cluster.vm.network "forwarded_port", guest: 9160, guest_ip: "192.168.33.13", host: 9163
+ end
+
+ # box specific parameters like memory and CPU
+ config.vm.provider :virtualbox do |vb|
+ vb.customize ["modifyvm", :id, "--memory", "2048"]
+ end
+
+end
+
@@ -1,16 +0,0 @@
-Vagrant.configure("2") do |config|
- config.vm.box = "updated-java-precise64"
- config.vm.box_url = "./updated-java-precise64.box"
-
- config.vm.define "jdk7base" do |jdk7base|
- jdk7base.vm.hostname = "jdk7base"
- jdk7base.vm.network :private_network, ip: "192.168.33.9"
- end
-
- # box specific parameters like memory and CPU
- config.vm.provider :virtualbox do |vb|
- vb.customize ["modifyvm", :id, "--memory", "1024"]
- end
-
-
-end

0 comments on commit a509cd1

Please sign in to comment.