Giter VIP home page Giter VIP logo

cassandra.api's Introduction

Leaves on DataStax Astra™ with NoSQL, and Apache Cassandra™ in the cloud!

version

Open in Gitpod

Table of Contents

  1. Astra Setup & Configuring Credentials
  2. Getting Started
    1. Running Data Migrator
    2. Node JS
    3. Python
    4. Running Unit Tests
    5. Running Admin UI

Setup

1.1 Create Account

  • Before you start using our tools, you'll need to create an account on DataStax Astra

Astra

1.2 Create New Database

  • You'll then be directed to the home page. Locate the Create Database button on the left side:

NikitaPic

  • On the following screen, press the Get Started button underneath "Pay as you go":

NikitaPic

  • Enter a database name and keyspace name. Select any of the providers at the bottom and select the region closest to you. Then press Create Database

NikitaPic

  • Now wait a few minutes for the database to spin up, and click on the name of the database on the left side of the screen. Expected result:

NikitaPic

Database is ready, notice how the status changed from pending to Active and now you now have the connect button enabled.*

1.3 Finding Secure Connect Bundle

  • Get your secure connect bundle.
  • Press the blue Connect button at the top right corner, and then select "Node.js" under the menu "Connect using a driver":

NikitaPic

1.4 Download Secure Connect Bundle

  • Finally, click the Download Bundle button to download the zip. Once saved, move the zip into the cassandra.api/astra.credentials directory of this project.

NikitaPic

1.5 Generate Tokens For Database

  • In the top left corner, press the arrow next to the "Current Organization" name and go to Organization Settings:

NikitaPic

  • Navigate to Token Management, Select the role "Admin User" and press Generate Token. Expected result:

NikitaPic

  • Before leaving this page, make sure to save these three values into a text document (or press the 'Download CSV' button)

1.6 Configure Cassandra.API Connection

  • Fill in the naming conventions you declared earlier, when you setup your database, in your (cassandra.api/astra.credentials/UserCred.json) file
  • For Username, input your generated Client ID (from Token Management)
  • For Password, input your generated Client Secret
  • The following is an example of that the UserCred.json file would look like using the credentials used for configuring the Astra instance.
{ 
    "username":"your-client-id", 
    "password":"your-client-secret", 
    "cluster":"testdb2", 
    "keyspace":"testkeyspace", 
    "table":"leaves"
}

The last value table wasn't declared before so you can do that here for the first time.


Getting Started

It's best to go through this project in the following order so you do not get confused.

2.1 Run the data migrator to transfer data from our cassandra.api to your Astra Database.

2.2 Setup an API so that you can communicate with your Astra database. We have 2 APIs for you to use:

2.3 Run this set of unit tests against your API to confirm that it is working properly.

2.4 Launch Web Admin UI to visualize your Astra Database in Table Format


Reference Material

Cassandra.API Documentation Walkthrough

Cassandra.API Blog Post: Part 1

Cassandra.API Blog Post: Part 2

Building a REST API with DataStax Astra using Node & Python: Part 1

Building a REST API with DataStax Astra using Node & Python: Part 2

Cassandra.API Live Workshop w/DataStax

Cassandra.API Video Demo: Part 1

Cassandra.API Video demo: Part 2

cassandra.api's People

Contributors

adp8ke avatar anomnaco avatar clun avatar dependabot[bot] avatar jvymvn avatar nikita311 avatar ryanquey avatar stefanvinica avatar tanakamapondera avatar xingh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.