Skip to content

Latest commit

 

History

History
81 lines (65 loc) · 4.51 KB

step2_astra_ui.md

File metadata and controls

81 lines (65 loc) · 4.51 KB
Zero Downtime Migration Lab ℹ️ For technical support, please contact us via email.
⬅️ Back Step 2 (Astra UI) Next ➡️
Preliminary step: set up Target

Phase 0b

🎯 Goal: creating the Target database (Astra DB instance) and verifying it is ready for the migration.

The Target database you are going to create is an Astra DB instance. This managed solution, built on Apache Cassandra™, frees you from worrying about operations; moreover, it is a serverless architecture that scales with your needs, avoiding unnecessary resource usage. If you don't have an Astra account, go create one: the Free Tier can cover much, much more I/O and storage than what's needed for this migration exercise.

Note: you are going to execute the following steps within the Astra Web interface.

  • Create your Astra account if you haven't yet.
  • Create a database called zdmtarget with a zdmapp keyspace (detailed instructions). for the Free Tier accounts, stick to the GCP cloud provider and choose a region without the "lock" icon). The DB will be ready to use in 2-3 minutes.
  • Get a "R/W User" database token from the Astra UI and store it in a safe place (detailed instructions). You will need it a few times throughout the exercise.
  • Locate and note down the "Database ID" for your Astra DB instance. This is seen on your Astra dashboard, next to your database name (detailed instructions).
  • Find the "Download Secure Connect Bundle" dialog for your database in the Astra UI (detailed instructions), then copy the curl command and paste it in the "host-console" here to download it to this environment. Take a note of the full path to the downloaded bundle zipfile, you'll need it for the example API to run.
  • In your database's Web CQL Console on the Astra UI, paste the following script to create a schema mirroring the one on Origin:
### {"execute": false}
CREATE TABLE IF NOT EXISTS zdmapp.user_status (
  user    TEXT,
  when    TIMESTAMP,
  status  TEXT,
  PRIMARY KEY ((user), when)
) WITH CLUSTERING ORDER BY (when DESC);
I want to re-use an Astra DB instance I already have

If you already have a database (likely with a name other than zdmtarget) and want to use it, that's no problem at all! Just make sure you create a new keyspace called zdmapp in your database and, in case the DB is in the "hibernated" state, please resume it before moving to next step.

All you have to do then is replacing the name zdmtarget with your database the few times it appears in the console commands for the rest of this scenario.

🗒️ Your brand new database is created and has the right schema. Now you can start setting up the ZDM process, instructing it to use Astra DB as target.

Schema, phase 0b

⬅️ Back Next ➡️