Skip to content

LAB2_Create your Astra instance

Rebecca Mills edited this page Feb 23, 2021 · 5 revisions

⚒️ Create your Astra instance

Exercise time: ~10 minutes

Objectives

In this step, we will:

  • Create an Astra database to store game documents

We will cover:

  1. Register and Sign In to Astra
  2. Configure and create your database
  3. Activate Cassandra awesome

One of the first things we need to do is hook up the "plumbing" of our application to talk to our back-end services, namely, our Cassandra database with Astra and Netlify. Once this is in place, we are connected and ready to go with the services we need to power our app.

We will also be making use of the Document API to connect to our Astra database. The Stargate API framework allows developers the freedom to access Astra with a variety of APIs, the Document API being one. With the Document API, you can save and search schemaless JSON documents in Cassandra. No need to use SQL, CQL, or any database drivers to talk to the data layer. Just code and move on.

ehem...for those of you familiar with Apache Cassandra, yes, I just said you could skip data modeling.

Document API Flow


ASTRA service is available at url https://astra.datastax.com. ASTRA is the simplest way to run Cassandra with zero operations at all - just push the button and get your cluster. Astra offers 5 Gb Tier Free Forever and you don't need a credit card or anything to sign-up and use it.

1. Register and Sign In to Astra

✅ Step 1a. Use the dialogs to create and account and/or sign in

You can use your Github, Google accounts or register with an email.

Make sure to chose a password with minimum 8 characters, containing upper and lowercase letters, at least one number and special character

Registration Image

Login Image

2. Configure and create your database

✅ 1. Select the free tier: 5GB storage, no obligation

✅ 2. Select a cloud provider: The free tier only allows GCP, other tiers will allow the other vendors.

✅ 3. Select the region: This is the region where your database will reside physically (choose one close to you or your users). For people in EMEA please use europe-west1 idea here is to reduce latency.

✅ 4. Click Configure Database

Note: The cloud provider GCP is chosen by default when using the FREE tier. Paid tiers allow provider choice.

pic

Note: We've given you all of the values you need with each instruction. While Astra allows you to fill in these fields with values of your own choosing, please follow our reccomendations to make the rest of the exercises easier to follow. If you don't, you are on your own! :)

✅ 5. Fill in the database name - battlestax_db.

✅ 6. Fill in the keyspace name - battlestax. It's really important that you use the name battlestax here in order for all the exercises to work well. We realize you want to be creative, but please just roll with this one today.

✅ 7. Fill in the Database User name - battle_user. Note the user name is case-sensitive. Please use the case we suggest here.

✅ 8. Fill in the password - battle_password1. Fill in both the password and the confirmation fields. Note that the password is also case-sensitive. Please use the case we suggest here.

✅ 9. Create the database. Review all the fields to make sure they are as shown, and click the Create Database button.

my-pic

3. Activate Cassandra awesome

Honestly, there's not much to do here, but wait a couple minutes for your Astra database to start up. Once completed, you will have a fully managed Apache Cassandra database ready to rock and power your app.

You will see your new database Pending in the Dashboard. my-pic

The status will change to Active when the database is ready, this will only take 2-3 minutes and you will also receive an email when it is ready.

my-pic

Awesome! While you are waiting for your database to startup feel free to move to the next section.

Clone this wiki locally