Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E3C768271 for ; Sun, 14 Aug 2011 18:07:54 +0000 (UTC) Received: (qmail 59927 invoked by uid 500); 14 Aug 2011 18:07:52 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 59725 invoked by uid 500); 14 Aug 2011 18:07:52 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 59717 invoked by uid 99); 14 Aug 2011 18:07:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Aug 2011 18:07:51 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of eldad87@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Aug 2011 18:07:47 +0000 Received: by wwf5 with SMTP id 5so3454401wwf.25 for ; Sun, 14 Aug 2011 11:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=U+2IEOAIy+D5G8G9uWv++9FXrhD6XzJ4IYOjc/otipY=; b=H9Enw3vvgdWyLiFtyb3aDvpbLuTmgdno+0qONCR/6rfy4qhXthMGPlU2+dZjKW+mnP jPf8OCbd646686ZC2sC9p7C0HIA4ph/gtwQ/cIpkoJ1Q84NOtX8d5LTuqwGXTp6art7M bTQbv6a8XnQYcxE9A5QNt4EAlHz8ARQSyBuf0= MIME-Version: 1.0 Received: by 10.216.175.65 with SMTP id y43mr2693247wel.47.1313345246063; Sun, 14 Aug 2011 11:07:26 -0700 (PDT) Received: by 10.216.37.4 with HTTP; Sun, 14 Aug 2011 11:07:26 -0700 (PDT) In-Reply-To: <654C69BC-8635-4796-940E-EC73F44B95BC@thelastpickle.com> References: <654C69BC-8635-4796-940E-EC73F44B95BC@thelastpickle.com> Date: Sun, 14 Aug 2011 21:07:26 +0300 Message-ID: Subject: Re: Best practices when deploying & upgrading a cassandra cluster From: Eldad Yamin To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016363b82eedbed5d04aa7b0438 --0016363b82eedbed5d04aa7b0438 Content-Type: text/plain; charset=ISO-8859-1 Is there any good reason why shouldn't we build the latest version from source? Thanks! On Fri, Aug 12, 2011 at 12:18 AM, aaron morton wrote: > In a non dev system it's a lot easier to use the packages > http://wiki.apache.org/cassandra/DebianPackaging > http://www.datastax.com/docs/0.8/install/packaged_releases > > Cheers > > ----------------- > Aaron Morton > Freelance Cassandra Developer > @aaronmorton > http://www.thelastpickle.com > > On 12 Aug 2011, at 02:30, Martin Lansler wrote: > > (Note: This is a repost from another thread which did not have a > relevant subject, sorry for the spamming) > > Hi Eldad / All, > > On Wed, Aug 10, 2011 at 8:32 AM, Eldad Yamin wrote: > > Can you please explain how did you upgraded. something like step-by-step. > > Thanks! > > > I took the liberty of replying to the group as it would be interesting > to hear how other folks out there are doing it... > > I'm *not* running a prod system, just a test system of three nodes on > my laptop. So it would be nice to hear about real setups. Here is my > test setup: > > apache-cassandra -> apache-cassandra-0.8.3 > apache-cassandra-0.8.2/ > apache-cassandra-0.8.3/ > node1/ > node2/ > node3/ > > All nodeX look like: > bin -> ../apache-cassandra/bin/ > commitlog/ > conf/ > data/ > interface -> ../apache-cassandra/interface/ > lib -> ../apache-cassandra/lib/ > saved_caches/ > > The 'conf' directory is copied into each node from the virgin > cassandra distribution. I then create a local GIT repo and add the > 'conf' directory so I can track any configuration changes on a node. > Then relevant node specific configuration settings are set. The > 'commitlog', 'data' and 'saved_caches' are created by cassandra and > must be configured in 'cassandra.yaml' for each node. > > When I upgrade I do the following: > > 1. > Make a diff of the new conf files from the new version so that get > new parameters etc... I use emacs ediff-mode. > 2. > Remove the old "apache-cassandra" symlink and point it to the new cassandra > dist > 3. > In a rolling fashion stop one node, and then restart it... as the > symlink is changes it will then boot with the upgraded cassandra dist. > (remember to cd out & in of the bin/ dir otherwise you will still be > in the old directory). > (4). > Should something break... just re-create the old symlink and restart > the node (provided cassandra has not performed any non backwards > compatible changes to the db files, should be noted in the README) > > That's pretty much it. > > On a prod setup one would probably use a tool such as puppet > (www.puppetlabs.com/) to ease setting up on many nodes... But there > are many ways to do this, for instance pssh > (http://code.google.com/p/parallel-ssh/). > > Regards, > -Martin > > > --0016363b82eedbed5d04aa7b0438 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Is there any good reason=A0why=A0shouldn't we buil= d the latest version from source?

Thanks!
On Fri, Aug 12, 2011 at 12:18 AM, aaron morton <aaron@thelastpickle= .com> wrote:
In a no= n dev system it's a lot easier to use the packages=A0

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton

On 12 Aug 2011, at 02:30, Martin Lansler wrote:

(Note: This is a repost from another thread whic= h did not have a
relevant subject, sorry for the spamming)

Hi Eld= ad / All,

On Wed, Aug 10, 2011 at 8:32 AM, Eldad Yamin <eldad87@gmail.com> wrote:
Can you please explain how did you upgraded. something = like step-by-step.
Thanks!

I took t= he liberty of replying to the group as it would be interesting
to hear h= ow other folks out there are doing it...

I'm *not* running a pro= d system, just a test system of three nodes on
my laptop. So it would be nice to hear about real setups. Here is my
tes= t setup:

apache-cassandra -> apache-cassandra-0.8.3
apache-cas= sandra-0.8.2/
apache-cassandra-0.8.3/
node1/
node2/
node3/

All nodeX look like:
bin -> ../apache-cassandra/bin/
commitlog= /
conf/
data/
interface -> ../apache-cassandra/interface/
li= b -> ../apache-cassandra/lib/
saved_caches/

The 'conf'= directory is copied into each node from the virgin
cassandra distribution. I then create a local GIT repo and add the
'= conf' directory so I can track any configuration changes on a node.
= Then relevant node specific configuration settings are set. The
'com= mitlog', 'data' and 'saved_caches' are created by cassa= ndra and
must be configured in 'cassandra.yaml' for each node.

When I= upgrade I do the following:

1.
Make a diff of the new conf files= from the new version so that =A0get
new parameters etc... I use emacs e= diff-mode.
2.
Remove the old "apache-cassandra" symlink and point it to t= he new cassandra dist
3.
In a rolling fashion stop one node, and then= restart it... as the
symlink is changes it will then boot with the upgr= aded cassandra dist.
(remember to cd out & in of the bin/ dir otherwise you will still bein the old directory).
(4).
Should something break... just re-create= the old symlink and restart
the node (provided cassandra has not perfor= med any non backwards
compatible changes to the db files, should be noted in the README)

T= hat's pretty much it.

On a prod setup one would probably use a t= ool such as puppet
(www.puppetlabs.com/) to ease setting up on many nodes... But there=
are many ways to do this, for instance pssh
(http://code.google.com/p/parallel= -ssh/).

Regards,
-Martin


--0016363b82eedbed5d04aa7b0438--