You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Oleg Dulin <ol...@gmail.com> on 2014/09/08 21:34:46 UTC

Moving Cassandra from EC2 Classic into VPC

Dear Colleagues:

I need to move Cassandra from EC2 classic into VPC.

What I was thinking is that I can create a new data center within VPC 
and rebuild it from my existing one (switching to vnodes while I am at 
it). However, I don't understand how the ec2-snitch will deal with this.

Another idea I had was taking the ec2-snitch configuration and 
converting it into a Property file snitch. But I still don't understand 
how to perform this move since I need my newly created VPC instances to 
have public IPs -- something I would like to avoid.

Any thoughts are appreciated.

Regards,
Oleg



Re: Moving Cassandra from EC2 Classic into VPC

Posted by Ben Bromhead <be...@instaclustr.com>.
On 9 Sep 2014, at 7:33 am, Nate McCall <na...@thelastpickle.com> wrote:

> Other thoughts:
> - Go slowly and verify that clients and gossip are talking to the new nodes after each lift and shift
> - Don't forget to change seeds afterwards
> - This is not the time to upgrade/change *anything* else - match the version exactly even if its older

This +1000

take your time, wait for everything to settle and you will save yourself a lot of pain

Re: Moving Cassandra from EC2 Classic into VPC

Posted by Nate McCall <na...@thelastpickle.com>.
We've done this several times with clients - Ben's response will work and
is pretty close to the approaches we took:


>
> Use the gossiping property file snitch in the VPC data centre.
>
Agree. I don't think you could even do this effectively with the EC2Snitch.


Use a public elastic ip for each node.
>
This or use a proxy if you need encryption for regulation compliance.
Elastic IP means less moving parts though. Either way, follow this guide
closely for locking stuff down during migration:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html


>
> Have the instances in the VPC join your existing cluster.
>
This works, but we prefer a "lift and shift" where a new node replaces an
old node one-for-one. This may more or less boil down to operation
preferences and specific situations more so then one or the other being The
Right Way:

Other thoughts:
- Go slowly and verify that clients and gossip are talking to the new nodes
after each lift and shift
- Don't forget to change seeds afterwards
- This is not the time to upgrade/change *anything* else - match the
version exactly even if its older


-- 
-----------------
Nate McCall
Austin, TX
@zznate

Co-Founder & Sr. Technical Consultant
Apache Cassandra Consulting
http://www.thelastpickle.com

Re: Moving Cassandra from EC2 Classic into VPC

Posted by Ben Bromhead <be...@instaclustr.com>.
On 8 Sep 2014, at 12:34 pm, Oleg Dulin <ol...@gmail.com> wrote:

> Another idea I had was taking the ec2-snitch configuration and converting it into a Property file snitch. But I still don't understand how to perform this move since I need my newly created VPC instances to have public IPs -- something I would like to avoid.

Off the top of my head something like this might work if you want a no downtime approach:

Use the gossiping property file snitch in the VPC data centre. 

Use a public elastic ip for each node.

Have the instances in the VPC join your existing cluster.

Decommission old cluster.

Change the advertised endpoint addresses afterwards to the private addresses for nodes in the VPC using the following:
https://engineering.eventbrite.com/changing-the-ip-address-of-a-cassandra-node-with-auto_bootstrapfalse/

Once that is done, remove the elastic IPs from the instances.




Re: Moving Cassandra from EC2 Classic into VPC

Posted by Janne Jalkanen <ja...@ecyrd.com>.
Alain Rodriguez outlined this procedure that he was going to try, but failed to mention whether this actually worked :-)

https://mail-archives.apache.org/mod_mbox/incubator-cassandra-user/201406.mbox/%3CCA+VSrLopop7Th8nX20aOZ3As75g2jrJm3ryX119dekLYNHqFwA@mail.gmail.com%3E

/Janne

On 8 Sep 2014, at 23:05, Oleg Dulin <ol...@gmail.com> wrote:

> I get that, but if you read my opening post, I have an existing cluster in EC2 classic that I have no idea how to move to VPC cleanly.
> 
> 
> On 2014-09-08 19:52:28 +0000, Bram Avontuur said:
> 
> I have setup Cassandra into VPC with the EC2Snitch and it works without issues. I didn't need to do anything special to the configuration. I have created instances in 2 availability zones, and it automatically
> picks it up as 2 different data racks. Just make sure your nodes can see each other in the VPC, e.g. setup a security group that allows connections from other nodes from the same group.
> 
> There should be no need to use public IP's if whatever talks to cassandra is also within your VPC.
> 
> Hope this helps.
> Bram
> 
> 
> On Mon, Sep 8, 2014 at 3:34 PM, Oleg Dulin <ol...@gmail.com> wrote:
> Dear Colleagues:
> 
> I need to move Cassandra from EC2 classic into VPC.
> 
> What I was thinking is that I can create a new data center within VPC and rebuild it from my existing one (switching to vnodes while I am at it). However, I don't understand how the ec2-snitch will deal with this.
> 
> Another idea I had was taking the ec2-snitch configuration and converting it into a Property file snitch. But I still don't understand how to perform this move since I need my newly created VPC instances to have public IPs -- something I would like to avoid.
> 
> Any thoughts are appreciated.
> 
> Regards,
> Oleg
> 
> 
> 


Re: Moving Cassandra from EC2 Classic into VPC

Posted by Oleg Dulin <ol...@gmail.com>.
I get that, but if you read my opening post, I have an existing cluster 
in EC2 classic that I have no idea how to move to VPC cleanly.


On 2014-09-08 19:52:28 +0000, Bram Avontuur said:

> I have setup Cassandra into VPC with the EC2Snitch and it works without 
> issues. I didn't need to do anything special to the configuration. I 
> have created instances in 2 availability zones, and it automatically
> picks it up as 2 different data racks. Just make sure your nodes can 
> see each other in the VPC, e.g. setup a security group that allows 
> connections from other nodes from the same group.
> 
> There should be no need to use public IP's if whatever talks to 
> cassandra is also within your VPC.
> 
> Hope this helps.
> Bram
> 
> 
> On Mon, Sep 8, 2014 at 3:34 PM, Oleg Dulin <ol...@gmail.com> wrote:
> Dear Colleagues:
> 
> I need to move Cassandra from EC2 classic into VPC.
> 
> What I was thinking is that I can create a new data center within VPC 
> and rebuild it from my existing one (switching to vnodes while I am at 
> it). However, I don't understand how the ec2-snitch will deal with this.
> 
> Another idea I had was taking the ec2-snitch configuration and 
> converting it into a Property file snitch. But I still don't understand 
> how to perform this move since I need my newly created VPC instances to 
> have public IPs -- something I would like to avoid.
> 
> Any thoughts are appreciated.
> 
> Regards,
> Oleg



Re: Moving Cassandra from EC2 Classic into VPC

Posted by Bram Avontuur <br...@longtailvideo.com>.
I have setup Cassandra into VPC with the EC2Snitch and it works without
issues. I didn't need to do anything special to the configuration. I have
created instances in 2 availability zones, and it automatically
picks it up as 2 different data racks. Just make sure your nodes can see
each other in the VPC, e.g. setup a security group that allows connections
from other nodes from the same group.

There should be no need to use public IP's if whatever talks to cassandra
is also within your VPC.

Hope this helps.
Bram


On Mon, Sep 8, 2014 at 3:34 PM, Oleg Dulin <ol...@gmail.com> wrote:

> Dear Colleagues:
>
> I need to move Cassandra from EC2 classic into VPC.
>
> What I was thinking is that I can create a new data center within VPC and
> rebuild it from my existing one (switching to vnodes while I am at it).
> However, I don't understand how the ec2-snitch will deal with this.
>
> Another idea I had was taking the ec2-snitch configuration and converting
> it into a Property file snitch. But I still don't understand how to perform
> this move since I need my newly created VPC instances to have public IPs --
> something I would like to avoid.
>
> Any thoughts are appreciated.
>
> Regards,
> Oleg
>
>
>