top of page
  • Twitter Social Icon
  • LinkedIn Social Icon
  • Facebook Social Icon

Apache Cassandra in GCP (Google Cloud Platform)

  • Writer: anydataflow
    anydataflow
  • May 16, 2021
  • 2 min read

Updated: Jul 20, 2021

Deployment of Apache Cassandra NoSql database on GCP and use cassandra query language on cloud shell.




Let's start instead going with definition and explanation content. Here assumption is that you already have google account with credentials or have lap account setup in place.


After login you will be redirected to google cloud console where you will services list left hand side and in header bar search option and some other. Here you one will be cloud shell (click on that to launch).


gcloud is the command-line tool for Google Cloud Platform. It comes pre- installed on Cloud Shell and supports tab-completion.


Launch cassandra:


1. Browse to the GCP Marketplace in the left hand navigation menu.


2. Search for “apache cassandra” and click on the search result named “Cassandra Certified by Bitnami”.




3. Click the “LAUNCH” button. After that leave all the default value & click on deploy.




In above image we kept 2 steps in single image which will be done in 2 part. 1st you have to click on launch then configuration page will open. Here you can customize cluster name, core, memory, hard disk, network..etc. but if you just want to tryout then it's better to keep all the setting default. once you know this then try customization(best approach).


4. When the database has finished deploying you will see the details in Deployment Manager.



In above image middle block provides details about the script ran to launch cassandra cluster. Right most block provides details for user/password and instance detail.


Here you can notice ssh drop down present with options, you can select "open in browser window" to connect with cassandra instance. There you can launch cassandra query language and run some CQL commands.


CQL command on GCP:


  1. Note user & password of cluster from deployment manager(from right hand side in dm)

  2. Connect with ssh as we saw in above image(right hand, at down side)

  3. Open up the CQL Shell by typing the following into the command line, replacing <user> and <pass> with the username and password you just made a note of. cqlsh -u <user> -p <pass>

  4. On success you will be connected to cassandra cluster. Now create keyspace & table, insert some data and query. Putting a consolidated snapshot below:



Once data present on Cassandra cluster it's easy to query using CQL command since it support SQL syntax also well at some level.




There are other programming API's also supported so we can easily integrate it in application software. Please let us know if any help required it will be our pleasure to help you.


We do end to end data engineering and data migration work with all the latest tools & technology, Thanks for your support.


Thanks,








 
 
 

Comments


SIGN UP AND STAY UPDATED!

Thanks for submitting!

  • Grey Twitter Icon
  • Grey LinkedIn Icon
  • Grey Facebook Icon

© 2023 by Talking Business.  Proudly created with anydataflow.com

bottom of page