Quick Start

Quick Start Guide

This guide will help you get started with Thalassa Cloud’s Database as a Service (DBaaS) in minutes. You’ll learn how to create your first PostgreSQL cluster, connect to it, and perform basic database operations.

Prerequisites

Before you begin, ensure you have:

  • Thalassa Cloud Account: A valid Thalassa Cloud account with API access
  • VPC and Subnet: A VPC with at least one subnet in your desired region
  • Security Group: A security group configured to allow PostgreSQL connections (port 5432)
  • PostgreSQL Client: A PostgreSQL client like psql for connecting to your database

Create Your First Database Cluster

Create the database cluster

  1. Navigate to DBaaS: Go to the DBaaS section in your Thalassa Cloud console
  2. Create Cluster: Click “Create Database Cluster”
  3. Configure Basic Settings:
    • Name: my-first-db
    • Description: My first PostgreSQL cluster for learning
    • Engine: PostgreSQL
    • Version: 17.5
  4. Choose Instance Type: Select DB PGP Medium (2 vCPUs, 4GB RAM)
  5. Configure Storage: Set storage to 10GB Block
  6. Set Replicas: Choose 2 replicas for high availability
  7. Network Configuration:
    • Subnet: Select your private subnet
    • Security Groups: Add your database security group
  8. Review and Create: Review your configuration and click “Create Cluster”

databases & roles

After creating the database cluster, you can create new roles and databases through the database overview window. A new database within the cluster requires an existing role to be it’s owner.

Connect to Your Database

The database cluster endpoint is only accessible from within an VPC. If you want to access it from your laptop, either setup a VPN or similar solution within your VPC, or utilize a Loadbalancer to configure access to the database.

Using a load balancer

To enable external access to your database, follow these steps to set up a load balancer:

  1. Create a Target Group: Within your IaaS platform, establish a target group in the same VPC as your database cluster. Add the database cluster endpoint to this target group’s attachment list.
  2. Set Up a Load Balancer: Proceed to create a load balancer. Configure a listener for it, using port 5432 and the tcp protocol. Attach the target group you created earlier to this listener.
  3. Implement IP Access Control Lists (ACLs) on the listener to ensure secure access.
  4. Once the load balancer is fully provisioned, you can connect to your database using the load balancer’s IP address and previously configured port on the listener.