One of the easiest ways to get started with Apache Cassandra™ is using Astra
In this scenario, we'll learn how to:
- Create an Astra database
- Create a container for cqlsh that connects to Astra
- Create a table in Astra
- Insert and query data
Astra is a great Cassandra as a Service offering and Docker containers are really slick, so this is going to be fun! Let's get started!
Connect to Astra with CQL Shell Using Docker
Create your Astra Database
If you don't have an Astra account, set one up - it's easy.
Go to the Astra page in your browser: astra.datastax.com.
Let's create the database. On the Astra page, follow the steps outlined here. To make life easy, we have recommended the values you should use for this scenario in Italics.
NOTE: If you already have an Astra database with values that differ from what we suggested, you may have to adapt some of the operations in this scenario accordingly.
When you log in the first time you'll find yourself looking at the main Astra dashboard screen that looks like the image below. click on the Add Database button.
Configure your database by selecting the Free plan.
Next, select a provider.
Now, select a region near you for your database and click the Configure button.
Fill in the Configure and Create Database fields with the following values, then click the Create Database button.
- Database name: FirstDB
- Keyspace name: user_management
- Database username: DBUser
- Database password: DBPassword1
You will see the dashboard with your newly created database. While the database is initializing, the CONNECT button is inactive, but becomes active once the database is ready.
It may take a minute for the database to deploy, but you'll get an email when it's ready.