You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Manu Chadha <ma...@hotmail.com> on 2020/06/03 06:04:03 UTC

Cassandra and Docker

Hi

I want to run Cassandra within Docker. I am new to both to be honest.


  1.  Is it better to use Cassandra within Docker or is it better to install/run Cassandra directly on a VM in the cloud?
  2.  Is there a Docker image for Cassandra (for 3.11.4) which I can pull/use?
  3.  How will data be stored if I use Docker/Cassandra? If the container stops, then would re-running the image use existing data or would I use lose data?
  4.  How would I configure a DC if I use Docker/Cassandra? Say I run 3 containers on 3 VMs for RF=3, how would I provide this configuration through Docker?

Thanks
Manu

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10


RE: Cassandra and Docker

Posted by Manu Chadha <ma...@hotmail.com>.
I forgot to mention, I am on Windows 10

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

________________________________
From: Manu Chadha <ma...@hotmail.com>
Sent: Wednesday, June 3, 2020 7:04:03 AM
To: user@cassandra.apache.org <us...@cassandra.apache.org>
Subject: Cassandra and Docker


Hi



I want to run Cassandra within Docker. I am new to both to be honest.



  1.  Is it better to use Cassandra within Docker or is it better to install/run Cassandra directly on a VM in the cloud?
  2.  Is there a Docker image for Cassandra (for 3.11.4) which I can pull/use?
  3.  How will data be stored if I use Docker/Cassandra? If the container stops, then would re-running the image use existing data or would I use lose data?
  4.  How would I configure a DC if I use Docker/Cassandra? Say I run 3 containers on 3 VMs for RF=3, how would I provide this configuration through Docker?



Thanks

Manu



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10



RE: Cassandra and Docker

Posted by Rh...@swisscom.com.
  1.  Use what works for you. People are starting to use C* in Docker though. Lots of info on google for this.
  2.  https://hub.docker.com/_/cassandra
  3.  You probably want to mount an external volume in the container - https://docs.docker.com/storage/volumes/
  4.  Connect to C* with cql and specify the RF with a CREATE/ALTER KEYSPACE command.

From: Manu Chadha <ma...@hotmail.com>
Sent: 03 June 2020 08:04
To: user@cassandra.apache.org
Subject: Cassandra and Docker

Hi

I want to run Cassandra within Docker. I am new to both to be honest.


  1.  Is it better to use Cassandra within Docker or is it better to install/run Cassandra directly on a VM in the cloud?
  2.  Is there a Docker image for Cassandra (for 3.11.4) which I can pull/use?
  3.  How will data be stored if I use Docker/Cassandra? If the container stops, then would re-running the image use existing data or would I use lose data?
  4.  How would I configure a DC if I use Docker/Cassandra? Say I run 3 containers on 3 VMs for RF=3, how would I provide this configuration through Docker?

Thanks
Manu

Sent from Mail<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=02%7C01%7CRhys.Campbell%40swisscom.com%7C5bbb25464d85498e16ba08d80783f653%7C364e5b87c1c7420d9beec35d19b557a1%7C1%7C0%7C637267610634687292&sdata=XzBfcov7IezOnjDRBrjiuls2MGQue0a2RHhK1Ptez%2Fs%3D&reserved=0> for Windows 10


Re: Cassandra and Docker

Posted by amit sehas <cu...@yahoo.com.INVALID>.
What If I were to deploy this in AWS?  Is there a straightforward way to allocate resource in AWS and tell Cassandra about them?

thanks






On Thursday, June 4, 2020, 03:10:11 AM PDT, Cédrick Lunven <ce...@datastax.com> wrote: 





Hello,

Having Cassandra in Docker is nice because you don't have anything to install.

Cassandra can be installed in multiple ways but this is tarball and as such not for windows.

The Docker hub website is very detailed about what are the options you can usem which ports to open  (as stated by Rhys)
https://hub.docker.com/_/cassandra/#!

I would propose you to go with docker-compose in a file where everyhing is already defined for you. 

I have attached 2 files. One for a single node and one for 1 dc and 3 nodes for Cassandra 3.

docker-compose -f cassandra3-1dc-1node.yaml


docker exec -it `docker ps | grep cassandra-node1 | cut -b 1-12` cqlsh

Cheers

On Wed, Jun 3, 2020 at 8:53 AM Erick Ramirez <er...@datastax.com> wrote:
> Personally, I'd recommend learning Docker on its own or Cassandra on its own. I wouldn't try to do it at the same time if you're new to both technologies. It's hard enough as it is for experienced users. If you're using both and you run into issues, you will find it difficult to know whether the problem is Docker, Cassandra, or both. As always, YMMV. Good luck. Cheers!
>>  
>> 
>> 
> 


-- 

Cedrick Lunven

e. cedrick.lunven@datastax.com
w. www.datastax.com



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org


Re: Cassandra and Docker

Posted by Cédrick Lunven <ce...@datastax.com>.
Hello,

Having Cassandra in Docker is nice because you don't have anything to
install.

Cassandra can be installed in multiple ways but this is tarball and as such
not for windows.

The Docker hub website is very detailed about what are the options you can
usem which ports to open  (as stated by Rhys)
https://hub.docker.com/_/cassandra/#!

I would propose you to go with docker-compose in a file where everyhing is
already defined for you.

I have attached 2 files. One for a single node and one for 1 dc and 3 nodes
for Cassandra 3.

docker-compose -f cassandra3-1dc-1node.yaml

docker exec -it `docker ps | grep cassandra-node1 | cut -b 1-12` cqlsh

Cheers

On Wed, Jun 3, 2020 at 8:53 AM Erick Ramirez <er...@datastax.com>
wrote:

> Personally, I'd recommend learning Docker on its own or Cassandra on its
> own. I wouldn't try to do it at the same time if you're new to both
> technologies. It's hard enough as it is for experienced users. If you're
> using both and you run into issues, you will find it difficult to know
> whether the problem is Docker, Cassandra, or both. As always, YMMV. Good
> luck. Cheers!
>
>>

-- 
Cedrick Lunven
e. cedrick.lunven@datastax.com
w. www.datastax.com

Re: Cassandra and Docker

Posted by Erick Ramirez <er...@datastax.com>.
Personally, I'd recommend learning Docker on its own or Cassandra on its
own. I wouldn't try to do it at the same time if you're new to both
technologies. It's hard enough as it is for experienced users. If you're
using both and you run into issues, you will find it difficult to know
whether the problem is Docker, Cassandra, or both. As always, YMMV. Good
luck. Cheers!

>