I did something similar for my installation, but I used ENV variables:
I created a directory on a machine (call this the master) with directories
for all of the distributions (call them slaves).  So, consider:

/master/slave1
/master/slave2
...
/master/slaven

then i rdist this to all of my slaves.

In the /master directory all of the standard cassandra distribution.

In the /master/slave* directory all of the machine dependent stuff.

Also in /master I have a .profile with:

-bash-4.1$ cat /master/.profile
#
export CASSANDRA_HOME=$HOME/run
SHOST=`hostname | sed s'/\..*//'`
export CASSANDRA_CONF=$CASSANDRA_HOME/conf/$SHOST
export CASSANDRA_INCLUDE=$CASSANDRA_HOME/conf/$SHOST/cassandra.in.sh
. $CASSANDRA_HOME/conf/cassandra-env.sh
PATH=$HOME/run/bin:$PATH
echo 'to start cassandra type cassandra'


this leaves me with this environment on each slave (slave1 example):
-bash-4.1$ env | grep CAS
CASSANDRA_HOME=/usr/share/cassandra/run
CASSANDRA_CONF=/usr/share/cassandra/run/conf/slave1
CASSANDRA_INCLUDE=/usr/share/cassandra/run/conf/slave1/cassandra.in.sh

Using this technique I maintain my Cassandra cluster on 1 machine and
rdist to the
participants.    Rdist makes each node independent.....

-greg


On Sun, Jun 24, 2012 at 1:11 PM, aaron morton <aa...@thelastpickle.com> wrote:
>  Idea is to avoid having the copies of cassandra code in each node,
>
> If you run cassandra from the NAS you are adding a single point of failure
> into the system.
>
> Better to use some form of deployment automation and install all the
> requirement components onto each node.
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 22/06/2012, at 12:29 AM, Flavio Baronti wrote:
>
> The option must actually include also the name of the yaml file:
>
> Dcassandra.config=file:///Users/walmart/Downloads/Cassandra/Node2-Cassandra1.1.0/conf/cassandra.yaml
>
>
> Flavio
>
>
> Il 6/21/2012 13:16 PM, Roshni Rajagopal ha scritto:
>
> Hi Folks,
>
>
>   We wanted to have a single cassandra installation, and use it to start
> cassandra in other nodes by passing it the cassandra configuration
> directories as a parameter. Idea is to avoid having the copies of cassandra
> code in each node, and starting each node by getting into bin/cassandra of
> that node.
>
>
>
> As per http://www.datastax.com/docs/1.0/references/cassandra,
>
> We have an option –D where we can supply some parameters to cassandra.
>
> Has anyone tried this?
>
> Im getting an error as below.
>
>
> walmarts-MacBook-Pro-2:Node1-Cassandra1.1.0 walmart$  bin/cassandra
>  -Dcassandra.config=file:///Users/walmart/Downloads/Cassandra/Node2-Cassandra1.1.0/conf
>
> walmarts-MacBook-Pro-2:Node1-Cassandra1.1.0 walmart$  INFO 15:38:01,763
> Logging initialized
>
>  INFO 15:38:01,766 JVM vendor/version: Java HotSpot(TM) 64-Bit Server
> VM/1.6.0_31
>
>  INFO 15:38:01,766 Heap size: 1052770304/1052770304
>
>  INFO 15:38:01,766 Classpath:
> bin/../conf:bin/../build/classes/main:bin/../build/classes/thrift:bin/../lib/antlr-3.2.jar:bin/../lib/apache-cassandra-1.1.0.jar:bin/../lib/apache-cassandra-clientutil-1.1.0.jar:bin/../lib/apache-cassandra-thrift-1.1.0.jar:bin/../lib/avro-1.4.0-fixes.jar:bin/../lib/avro-1.4.0-sources-fixes.jar:bin/../lib/commons-cli-1.1.jar:bin/../lib/commons-codec-1.2.jar:bin/../lib/commons-lang-2.4.jar:bin/../lib/compress-lzf-0.8.4.jar:bin/../lib/concurrentlinkedhashmap-lru-1.2.jar:bin/../lib/guava-r08.jar:bin/../lib/high-scale-lib-1.1.2.jar:bin/../lib/jackson-core-asl-1.9.2.jar:bin/../lib/jackson-mapper-asl-1.9.2.jar:bin/../lib/jamm-0.2.5.jar:bin/../lib/jline-0.9.94.jar:bin/../lib/json-simple-1.1.jar:bin/../lib/libthrift-0.7.0.jar:bin/../lib/log4j-1.2.16.jar:bin/../lib/metrics-core-2.0.3.jar:bin/../lib/mx4j-tools-3.0.1.jar:bin/../lib/servlet-api-2.5-20081211.jar:bin/../lib/slf4j-api-1.6.1.jar:bin/../lib/slf4j-log4j12-1.6.1.jar:bin/../lib/snakeyaml-1.6.jar:bin/../lib/snappy-java-1.0.4.1.jar:bin/../lib/snaptree-0.1.jar:bin/../lib/jamm-0.2.5.jar
>
>  INFO 15:38:01,768 JNA not found. Native methods will be disabled.
>
>  INFO 15:38:01,826 Loading settings from
> file:/Users/walmart/Downloads/Cassandra/Node2-Cassandra1.1.0/conf
>
> ERROR 15:38:01,873 Fatal configuration error error
>
> Can't construct a java object for
> tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=No single
> argument constructor found for class org.apache.cassandra.config.Config
>
>  in "<reader>", line 1, column 1:
>
>     cassandra.yaml
>
>
> The other option would be to modify cassandra.in.sh.
>
> Has anyone tried this??
>
>
> Regards,
>
> Roshni
>
>
> This email and any files transmitted with it are confidential and intended
> solely for the individual or entity to whom they are addressed. If you have
> received this email in error destroy it immediately. *** Walmart
> Confidential ***
>
>
>
>
>
>

Reply via email to