# Client Library Source: https://docs.regatta.dev/drivers-and-clients/client-lib The shared library that powers all Regatta drivers, providing the core API for communicating with your Regatta database. The Regatta client library is a core component required by all Regatta drivers. It provides the underlying communication layer that enables your applications to interact with the Regatta database. Before installing any language-specific driver or tool, the client library must be installed on your system. Regatta Drivers & Clients are available in two modes: * **Bundled** with the Regatta client library for a simplified all-in-one setup. Bundled packages will contain the "full" suffix. * **Standalone**, allowing dynamic linking to the Regatta client at runtime for greater flexibility. ## Installation ### Prerequisites To run a Regatta client, ensure that the following requirements are met: 1. **Operating system:** Red Hat 8–based distribution such as Oracle Linux 8 or RHEL 8.10 2. **Architecture:** x86-64 (64-bit) 3. **Required system dependencies**: The following system libraries must be installed on the host: * `glibc` * `libstdc++` * `libgcc` * `util-linux-libs` * `openssl-libs` * `libaio` ### Installation Copy the client RPM package to your target Linux machine and install it: ```bash theme={null} sudo rpm -i regatta-client-.el8.x86_64.rpm ``` Once installed, the shared library will be placed in the system library path, typically: ```bash theme={null} /usr/lib64/libregattaclient1.so. ``` You can verify installation with: ``` ls /usr/lib64/libregattaclient1.so.* ``` This confirms that the client library is now available for linking by the drivers. # Connecting Applications to Regatta Source: https://docs.regatta.dev/drivers-and-clients/connecting-applications-to-regatta Regatta supports a wide range of integrations to help you connect your applications to the database. These include native drivers, ORMs, CLI tools and more, each designed to fit seamlessly into your development environment. Explore the languages and frameworks you work with and discover the right tools for building with Regatta. Regatta clients and drivers are currently compatible with Linux-based distributions running on x86-64 architecture. Support for additional environments will be added in future releases. # Download Drivers & Clients Source: https://docs.regatta.dev/drivers-and-clients/download-drivers-and-clients Regatta makes it simple to obtain the latest drivers, client libraries, and integration tools directly from your Regatta Cloud account. ## Accessing the Download Portal 1. [Log in to your Regatta Cloud account](/regatta-cloud/regatta-cloud/access-the-cloud). 2. In the left-hand navigation bar, click **Clients & Tools**. 3. Select the language or tool you wish to download. 4. Choose the appropriate tab for that client or tool. For example, click **JavaScript** to view NodeJS and TypeORM packages. ## Understanding the Version Matrix Table Once you select a particular client or tool (e.g., **JavaScript → NodeJS**), you will see a table like this: | OS | Architecture | Version | Type | Supported DB Versions | | | - | - | - | - | - | - | | Linux | Intel | 1.3.0 | Full | 1.0.0.1297 + | \[Download] | | Linux | Intel | 1.3.0 | Standalone | 1.0.0.1297 + | \[Download] | | Linux | Intel | 1.1.0 | Full | 1.0.0.1034 – 1.0.0.1296 | \[Download] | | Linux | Intel | 1.1.0 | Standalone | 1.0.0.1034 – 1.0.0.1296 | \[Download] | ### Column Descriptions 1. **OS** - Indicates the operating system for which this package was built (e.g., Linux). 2. **Architecture** - The CPU architecture supported by this package (e.g., Intel/x86-64). 3. **Version** - The specific release number of the driver or tool. Follows Semantic Versioning `(Major.Minor.Patch)`. 4. **Type** * **Full**: Includes the Regatta client library bundled together with the driver. Ideal for a “zero-prep” installation—just copy, extract, and run with no additional dependencies. * **Standalone**: Contains only the driver (no embedded client library). Requires you to install the [**Regatta Client Library**](/drivers-and-clients/client-lib) separately. Useful if you want to manage client library upgrades independently of the driver. 5. **Supported DB Versions** - Specifies which Regatta Database cluster versions are compatible with this driver/tool.\ For example: * `1.0.0.1034 – 1.0.0.1296` means “This release works with any Regatta cluster running versions `1.0.0.1034` through `1.0.0.1296`.” * `1.0.0.1297 +` means “This release requires Regatta `1.0.0.1297` or later.” 6. **Download Button** - Click **Download** to retrieve the RPM, TAR.GZ, or ZIP package for that row. ## After Download 1. Place the downloaded package in your local workspace. 2. Navigate to the relevant section for [installation instructions](/drivers-and-clients/connecting-applications-to-regatta) and usage examples. # Install Your Java Client Source: https://docs.regatta.dev/drivers-and-clients/java/install-your-java-client ## Drivers 1. [Download the JDBC driver](/drivers-and-clients/download-drivers-and-clients). The driver is distributed as a single JAR file. Regatta provides a shaded JDBC driver which includes all required dependencies. A non-shaded driver can be provided upon request. 2. Add the Regatta JDBC driver to your Maven project: **Option A — Install locally (recommended):** Install the driver locally in your environment: ```bash theme={null} mvn install:install-file \ -Dfile=regatta-jdbc--shaded_full.jar \ -DgroupId=dev.regatta \ -DartifactId=regatta-jdbc \ -Dversion= \ -Dpackaging=jar ``` Then add the JDBC driver as a dependency to your project: ```xml theme={null} dev.regatta regatta-jdbc 1.8.0 ``` **Option B — Provided scope (when included by your runtime environment):** ```xml theme={null} dev.regatta regatta-jdbc 1.8.0 provided ``` ### Notes * **Java 8** or newer is required to use the Regatta JDBC driver. * If you are using the **Full** driver package, the Regatta client library is included automatically. If you are using the **Standalone** version, ensure that the [client library is installed](/drivers-and-clients/client-lib). * The Regatta JDBC driver implements the **JDBC 4.2 API**. Refer to the [official JDBC documentation](https://docs.oracle.com/javase/8/docs/api/java/sql/package-summary.html) for full API details * Regatta supports most of the common JDBC functionality. If you do use a JDBC command which is not supported, you will receive the following exception: ```java theme={null} class RegFeatureNotSupportedException extends SQLFeatureNotSupportedException ``` *** ## ORM frameworks 1. [Download the Regatta Hibernate dialect](/drivers-and-clients/download-drivers-and-clients). The dialect is distributed as a single JAR file. 2. Add the Regatta Hibernate dialect to your Maven project: **Option A — Install locally (recommended):** Install the dialect locally in your environment: ```bash theme={null} mvn install:install-file \ -Dfile=regatta-hibernate-.jar \ -DgroupId=dev.regatta \ -DartifactId=regatta-hibernate \ -Dversion= \ -Dpackaging=jar ``` Then add the Hibernate dialect as a dependency to your project: ```xml theme={null} dev.regatta regatta-hibernate 1.1.0 ``` **Option B — Provided scope (when included by your runtime environment):** ```xml theme={null} dev.regatta regatta-hibernate 1.1.0 provided ``` The Regatta Hibernate dialect is compatible with Hibernate 6.x (built and tested with Hibernate 6.4.4.Final) and requires Java 17 or newer. Refer to the [official Hibernate documentation](https://hibernate.org/orm/documentation/6.4/) for installation instructions and API details. # Run a Hibernate Application Source: https://docs.regatta.dev/drivers-and-clients/java/run-hibernate-application Let's create a simple Hibernate application that connects to Regatta using the Regatta JDBC driver and Hibernate dialect. ## Connection Details Regatta connection parameters are configured in `hibernate.cfg.xml`: ```xml theme={null} dev.regatta.jdbc1.RegDriver jdbc:regatta:aaa.bbb.ccc.ddd:ppp MyUserName SomeSophisticatedPassword ``` ## Example Appliaction This example application will: 1. Create an `employees` table. 2. Insert four employees using Hibernate ORM. 3. Query and print the results. 4. Delete the rows and drop the table. ### Project Structure Create a new Maven project folder, for example `regatta-hibernate-example/`, with the following layout: ```bash theme={null} regatta-hibernate-example/ ├── pom.xml └── src/ └── main/ ├── java/ │ └── dev/ │ └── regatta/ │ └── hibernate_example/ │ ├── Employee.java │ └── HibernateExample.java └── resources/ └── hibernate.cfg.xml ``` Start your Java sources with the Regatta example package: ```java theme={null} package dev.regatta.hibernate_example; ``` Note that you should import all relevant classes based on the functionality of your application and its requirements. ### Employee Entity Create the `Employee` entity and save it as: `src/main/java/dev/regatta/hibernate_example/Employee.java` ```java theme={null} package dev.regatta.hibernate_example; import jakarta.persistence.*; @Entity @Table(name = "employees") public class Employee { @Id @Column(name = "employee_key") private int id; @Column(name = "employee_name", nullable = false, length = 40) private String name; @Column(name = "employee_salary") private int salary; @Column(name = "employee_department", nullable = false, length = 50) private String department; // Required by Hibernate public Employee() {} public Employee(int id, String name, int salary, String department) { this.id = id; this.name = name; this.salary = salary; this.department = department; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getSalary() { return salary; } public void setSalary(int salary) { this.salary = salary; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } } ``` ### Hibernate Main Program Create the main program and save it as: `src/main/java/dev/regatta/hibernate_example/HibernateExample.java` ```java theme={null} package dev.regatta.hibernate_example; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import java.util.Arrays; import java.util.List; public class HibernateExample { public static void main(String[] args) { SessionFactory sessionFactory = new Configuration() .configure("hibernate.cfg.xml") .addAnnotatedClass(Employee.class) .buildSessionFactory(); try (Session session = sessionFactory.openSession()) { // Create table employees Transaction transaction = session.beginTransaction(); session.createNativeQuery( "CREATE TABLE employees (" + "employee_key INT PRIMARY KEY INDEX, " + "employee_name VARCHAR(40) NOT NULL, " + "employee_salary INT, " + "employee_department VARCHAR(50) NOT NULL" + ")" ).executeUpdate(); transaction.commit(); // Insert data transaction = session.beginTransaction(); List employeesInserted = Arrays.asList( new Employee(1, "John Doe", 10932, "DevOps"), new Employee(2, "Richard Roe", 18324, "Legal"), new Employee(3, "Jane Roe", 20411, "SoftwareDev"), new Employee(4, "Rachel Roe", 19555, "Support") ); for (Employee employee : employeesInserted) { session.persist(employee); } transaction.commit(); // Query data List employeesSelected = session.createQuery("from Employee", Employee.class).list(); for (Employee emp : employeesSelected) { System.out.println("Employee Key: " + emp.getId()); System.out.println("Employee Name: " + emp.getName()); System.out.println("Employee Salary: " + emp.getSalary()); System.out.println("Employee Department: " + emp.getDepartment()); System.out.println(); } // Cleanup: delete rows transaction = session.beginTransaction(); for (Employee emp : employeesInserted) { session.remove(emp); } transaction.commit(); // Cleanup: drop table transaction = session.beginTransaction(); session.createNativeQuery("DROP TABLE employees").executeUpdate(); transaction.commit(); } finally { sessionFactory.close(); } } } ``` ### Hiberante Configuration Save the Hibernate configuration as:`src/main/resources/hibernate.cfg.xml` ```xml theme={null} dev.regatta.jdbc1.RegDriver jdbc:regatta:aaa.bbb.ccc.ddd:ppp MyUserName SomeSophisticatedPassword dev.regatta.hibernate.RegattaDialect true none thread org.hibernate.hikaricp.internal.HikariCPConnectionProvider 10 1 30000 ``` The property `hbm2ddl.auto` controls whether Hibernate automatically manages your database schema. When set to `none`, Hibernate will not attempt to create, update, validate, or drop tables. If you prefer Hibernate to manage the schema for you during development, you may change this property: * create — Drops the existing schema (if any) and creates all tables on startup. * create-drop — Creates the schema on startup and drops it on shutdown. * update — Tries to update the schema to match your entities without dropping tables. * validate — Validates that the schema matches your entities without modifying anything. ### Maven Project Setup Create a `pom.xml` in the project root: ```xml theme={null} 4.0.0 dev.regatta.example regatta-hibernate-example 1.0.0 jar 17 17 dev.regatta regatta-jdbc 1.8.0 dev.regatta regatta-hibernate 1.1.0 org.hibernate.orm hibernate-core 6.4.4.Final org.hibernate.orm hibernate-hikaricp 6.4.4.Final com.zaxxer HikariCP 5.1.0 org.slf4j slf4j-simple 2.0.16 runtime org.codehaus.mojo exec-maven-plugin 3.5.0 dev.regatta.hibernate_example.HibernateExample ``` This `pom.xml` assumes you already [installed the Regatta JDBC driver and Hibernate dialect locally](/drivers-and-clients/java/install-your-java-client). ## Running the Application Compile and run the application: ```bash theme={null} mvn -q compile exec:java ``` Expected output: ```bash theme={null} Nov 22, 2025 9:50:30 PM org.hibernate.Version logVersion INFO: HHH000412: Hibernate ORM core version 6.4.4.Final Nov 22, 2025 9:50:30 PM org.hibernate.cache.internal.RegionFactoryInitiator initiateService INFO: HHH000026: Second-level cache disabled Nov 22, 2025 9:50:30 PM org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator initiateService INFO: HHH000130: Instantiating explicit connection provider: org.hibernate.hikaricp.internal.HikariCPConnectionProvider Hibernate: CREATE TABLE employees (employee_key INT PRIMARY KEY INDEX, employee_name VARCHAR(40) NOT NULL, employee_salary INT, employee_department VARCHAR(50) NOT NULL) Hibernate: insert into employees (employee_department,employee_name,employee_salary,employee_key) values (?,?,?,?) Hibernate: insert into employees (employee_department,employee_name,employee_salary,employee_key) values (?,?,?,?) Hibernate: insert into employees (employee_department,employee_name,employee_salary,employee_key) values (?,?,?,?) Hibernate: insert into employees (employee_department,employee_name,employee_salary,employee_key) values (?,?,?,?) Hibernate: select e1_0.employee_key,e1_0.employee_department,e1_0.employee_name,e1_0.employee_salary from employees e1_0 Employee Key: 3 Employee Name: Jane Roe Employee Salary: 20411 Employee Department: SoftwareDev Employee Key: 1 Employee Name: John Doe Employee Salary: 10932 Employee Department: DevOps Employee Key: 4 Employee Name: Rachel Roe Employee Salary: 19555 Employee Department: Support Employee Key: 2 Employee Name: Richard Roe Employee Salary: 18324 Employee Department: Legal Hibernate: delete from employees where employee_key=? Hibernate: delete from employees where employee_key=? Hibernate: delete from employees where employee_key=? Hibernate: delete from employees where employee_key=? Hibernate: DROP TABLE employees ``` # Run a JDBC Application Source: https://docs.regatta.dev/drivers-and-clients/java/run-jdbc-application Let's create a simple JDBC application that queries the Regatta database. Start by adding the reference to the regatta driver: ```java theme={null} package dev.regatta.jdbc1; ``` Note that you should import all relevant classes based on the functionality of your application and its requirements. ## Connection Details Connection parameters will be defined as follows: ```java theme={null} String url = "jdbc:regatta:aaa.bbb.ccc.ddd:ppp"; String user = "MyUserName"; String password = "SomeSophisticatedPassword"; ``` ## Example Appliaction Below is an example of a sample application that creates an `employees` table, adds four rows and then selects them. Create the main program and save it as: `src/main/java/dev/regatta/jdbc1/DatabaseExample.java` ```Java theme={null} package dev.regatta.jdbc1; import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; import java.sql.ResultSet; import java.sql.SQLException; public class DatabaseExample { public static void main(String[] args) { // Connection details String url = "jdbc:regatta:aaa.bbb.ccc.ddd:ppp"; String user = "MyUserName"; String password = "SomeSophisticatedPassword"; try { try (Connection conn = DriverManager.getConnection(url, user, password)) { try (Statement stmt = conn.createStatement()) { String createTableSQL = "CREATE TABLE employees (" + "employee_key INT PRIMARY KEY INDEX, " + "employee_name VARCHAR(40) NOT NULL, " + "employee_salary INT, " + "employee_department VARCHAR(50) NOT NULL" + ")"; stmt.executeUpdate(createTableSQL); String insertValuesSQL = "INSERT INTO employees " + "(employee_key, employee_name, employee_salary, employee_department) " + "VALUES " + "(1, 'John Doe', 10932, 'DevOps'), " + "(2, 'Richard Roe', 18324, 'Legal'), " + "(3, 'Jane Roe', 20411, 'SoftwareDev'), " + "(4, 'Rachel Roe', 19555, 'Support')"; stmt.executeUpdate(insertValuesSQL); ResultSet rs = stmt.executeQuery("SELECT * FROM employees"); while (rs.next()) { System.out.println("Employee Key: " + rs.getInt("employee_key")); System.out.println("Employee Name: " + rs.getString("employee_name")); System.out.println("Employee Salary: " + rs.getInt("employee_salary")); System.out.println("Employee Department: " + rs.getString("employee_department")); System.out.println(); } stmt.executeUpdate("DROP TABLE employees"); } } } catch (SQLException e) { System.out.println("Database access error."); e.printStackTrace(); } } } ``` ### Maven Project Setup Create a `pom.xml` alongside your example: ```xml theme={null} 4.0.0 dev.regatta.example regatta-jdbc-example 1.0.0 jar 8 8 dev.regatta regatta-jdbc 1.8.0 org.slf4j slf4j-simple 2.0.16 runtime org.codehaus.mojo exec-maven-plugin 3.5.0 dev.regatta.jdbc1.DatabaseExample ``` This `pom.xml` assumes you already [installed the Regatta JDBC driver locally](/drivers-and-clients/java/install-your-java-client). ## Running the Application Compile and run the application: ```bash theme={null} mvn -q compile exec:java ``` Expected output: ```bash theme={null} Employee Key: 1 Employee Name: John Doe Employee Salary: 10932 Employee Department: DevOps Employee Key: 2 Employee Name: Richard Roe Employee Salary: 18324 Employee Department: Legal Employee Key: 3 Employee Name: Jane Roe Employee Salary: 20411 Employee Department: SoftwareDev Employee Key: 4 Employee Name: Rachel Roe Employee Salary: 19555 Employee Department: Support ``` # Install Your Javascript Client Source: https://docs.regatta.dev/drivers-and-clients/javascript/install-your-javascript-client ## Drivers 1. [Download the Node.js driver](/drivers-and-clients/download-drivers-and-clients), and save the `.tgz` file locally (typically next to your `package.json`). 2. Install the driver: **Option A — Direct install:** Install the driver locally in your environment: ```bash theme={null} npm install path/to/node-regatta-_.tgz ``` This will install the driver, pull in required dependencies, and update your `package-lock.json`. **Option B — Add as a local package dependency:**\ Add the driver to your project’s `package.json`: ```json theme={null} "dependencies": { "node-regatta": "file: path/to/node-regatta.tgz" } ``` ### Notes * **Node.js 16** or newer is required to use the Regatta Node.js driver. * If you are using the **Full** driver package, the Regatta client library is included automatically. If you are using the **Standalone** version, ensure that the [client library is installed](/drivers-and-clients/client-lib). *** ## ORM frameworks 1. [Download the Regatta TypeORM package](/drivers-and-clients/download-drivers-and-clients). 2. Install the Regatta TypeORM package: ```bash theme={null} npm install typeorm-regatta-.tgz ``` Regatta provides a dedicated fork of TypeORM that includes the Regatta dialect inside the TypeORM core. The Regatta TypeORM package (`typeorm-regatta`) is based on [**TypeORM 0.3.20**](https://github.com/typeorm/typeorm/releases/tag/0.3.20) and is distributed as a separate `.tgz` package. Because it is a fork, it should be used instead of the standard `typeorm` dependency, and compatibility is aligned to that upstream version. # Run a Node.js Application Source: https://docs.regatta.dev/drivers-and-clients/javascript/run-nodejs-application Let's create a simple Node.js application that queries the Regatta database. Start by adding the reference to the regatta driver: ```javascript theme={null} const {getConnection} = require("node-regatta"); ``` Note that you should import all relevant classes based on the functionality of your application and its requirements. ## Connection Details Connection parameters will be defined as follows: ```javascript theme={null} const dbUrl = "aaa:bbb:ccc:ddd:pppp"; const dbUser = "MyUserName "; const dbPassword = "SomeSophisticatedPassword"; ``` ## Example Appliaction To help you get acquainted with the Regatta API for Node.js, we’ve provided a simple code example below. This application demonstrate common tasks such as creating connections, executing queries, and working with cursors. The Regatta API supports both **async/await** and **callback-based** patterns. Create the main program and save it as: `node_regatta_example.js` ```javascript theme={null} const { getConnection, ErrorVerbosityLevel } = require('node-regatta'); async function main() { /* Enter the Regatta connection URL */ const dbUrl = 'aaa.bbb.ccc.ddd:pppp'; /* Enter your Regatta username */ const dbUser = 'MyUserName'; /* Enter your Regatta password */ const dbPassword = 'SomeSophisticatedPassword'; try { /* * Establish a connection to the database using the provided credentials * and URL. * To pass client options or set a timeout for all requests to the database, * use custom getConnection: * connectCustom(user, password, host, connectionOptions, timeoutMs) */ let connection = await getConnection(dbUser, dbPassword, dbUrl); console.log('Connected to the database'); /* * Auto-commit is enabled by default. To use manual commit mode, set * auto-commit to false. */ connection.setCommitMode(false); /* * The transaction isolation level can be set. The default is the Regatta * transaction isolation level. * const { TransIsoLevel } = require("node-regatta"); * connection.setTransactionIsolation(TransIsoLevel.READ_COMMITTED); */ /* * The default connection timeout to execute each query is set to infinity. * A custom timeout can be set using the setTimeout(timeoutMs) method. */ connection.setTimeout(3000); /* * Optionally, the level of detail for error messages generated by * operations using the connection can be set. */ connection.setErrorVerbosity(ErrorVerbosityLevel.HIGH); /* * Create a new table 'users' with columns for 'id' and 'name'. * The 'id' column is the primary key and is indexed. */ await connection.execute(` CREATE TABLE users ( id INT PRIMARY KEY INDEX, name VARCHAR(128) ) `); /* * When working in manual commit mode, commit the transaction manually * using the commit method. This finalizes the transaction and makes the * changes permanent. */ await connection.commit(); console.log("Created table 'users'"); /* * Insert multiple rows of data into the 'users' table using promise style. */ await connection.execute(` INSERT INTO users (id, name) VALUES (100, 'Mario'), (200, 'Barbara'), (300, 'Marcelo'), (400, 'Henry') `); /* * Commit the transaction manually to finalize the insertion of rows into * the 'users' table and make the changes permanent. */ await connection.commit(); console.log("Inserted data into 'users' table using promise"); /* * Insert multiple rows of data into the 'users' table using callback style. */ await new Promise((resolve, reject) => { connection.execute( `INSERT INTO users (id, name) VALUES (500, 'Mike'), (600, 'Johnny')`, function (err) { if (err) { console.error('Error inserting data:', err.message); return reject(err); } /* Manually commit the transaction. */ connection.commit(function (err) { if (err) { console.error('Error committing transaction:', err.message); return reject(err); } console.log("Inserted data into 'users' table using callback"); resolve(); }); } ); }); /* * Insert multiple rows of data into the 'users' table using batch API. */ connection.addBatch("INSERT INTO users (id, name) VALUES (700, 'Logan')"); connection.addBatch("INSERT INTO users (id, name) VALUES (800, 'Nick')"); await connection.executeBatch(); /* Manually commit the transaction. */ await connection.commit(); console.log("Inserted data into 'users' table using batch API"); /* Retrieve all data from the 'users' table. */ let cursor = await connection.execute('SELECT * FROM users'); /* Manually commit the transaction. */ await connection.commit(); /* * Get cursor description - An array containing objects for each column in * the result set, with each object having a name and a SQLTypeCode * property. */ console.log('Cursor description:', cursor.description); /* * Get the total number of rows in the result set for DQL queries (SELECT) * or the number of affected rows for DML queries (INSERT, UPDATE, and * DELETE). */ console.log('Total number of rows in the result:', cursor.rowCount); /* Fetch the first 2 rows from the cursor. */ let result = await cursor.fetch(2); console.log("First 2 rows retrieved from 'users' table:", result.rows); /* Fetch all remaining rows. */ result = await cursor.fetchAll(); console.log("Remaining rows retrieved from 'users' table:", result.rows); /* Close the cursor after retrieving the data. */ await cursor.close(); /* Insert a new user and then rollback the transaction. */ await connection.execute(` INSERT INTO users (id, name) VALUES (900, 'Paul') `); /* * Rollback the transaction to undo the insertion. * After the rollback, the user with ID 900 will not exist in the table. * If execution is still running and needs to be stopped, * the abort() method can be used instead. */ await connection.rollback(); console.log('Rollback: insertion of user with ID 900 has been undone.'); /* Drop the 'users' table to clean up the database. */ await connection.execute('DROP TABLE users'); /* Manually commit the transaction. */ await connection.commit(); console.log("Dropped table 'users'"); /* * Close the database connection. * Closing the connection will also close all open cursors. */ await connection.close(); console.log('Connection closed'); } catch (error) { /* Handle any errors that occur during the database operations. */ console.error('Error:', error); } } /* Execute the main function to perform the database operations. */ main(); ``` ## Running the Application Run the application from the directory containing your example: ```bash theme={null} node node_regatta_example.js ``` Expected output: ```bash theme={null} Connected to the database Created table 'users' Inserted data into 'users' table using promise Inserted data into 'users' table using callback Inserted data into 'users' table using batch API Cursor description: [ { name: 'id', sqlTypeCode: 1 }, { name: 'name', sqlTypeCode: 7 } ] Total number of rows in the result: 8 First 2 rows retrieved from 'users' table: [ { id: 700, name: 'Logan' }, { id: 500, name: 'Mike' } ] Remaining rows retrieved from 'users' table: [ { id: 600, name: 'Johnny' }, { id: 100, name: 'Mario' }, { id: 200, name: 'Barbara' }, { id: 300, name: 'Marcelo' }, { id: 400, name: 'Henry' }, { id: 800, name: 'Nick' } ] Rollback: insertion of user with ID 900 has been undone. Dropped table 'users' Connection closed ``` # Running a TypeORM Application Source: https://docs.regatta.dev/drivers-and-clients/javascript/run-typeorm-application Let's create a simple TypeORM application that queries the Regatta database. Start by importing the relevant classes from the `typeorm-regatta` package: ```javascript theme={null} import { Column, DataSource, Entity, PrimaryColumn } from "typeorm-regatta" ``` Note that you should import all relevant classes based on the functionality of your application and its requirements. ## Connection Details Connection parameters will be defined as follows: ``` const DB_HOST = "aaa.bbb.ccc.ddd:pppp"; const DB_USER = "MyUserName"; const DB_PASSWORD = "SomeSophisticatedPassword"; ``` ## Example Appliaction To help you get acquainted with TypeORM on Regatta, we’ve provided a simple code example below.\ This application demonstrates common tasks such as defining entities, initializing a `DataSource`, inserting data, querying, updating, deleting, and cleaning up schema. ### Project Structure Create the following folder structure: ```bash theme={null} typeorm-example/ ├── package.json ├── tsconfig.json └── src/ └── typeorm_example.ts ``` ### Example Code Create the main program and save it as: `src/typeorm_example.ts` ```typescript theme={null} import { Column, DataSource, Entity, PrimaryColumn } from "typeorm-regatta" import { v4 as uuidv4 } from "uuid" // Use uuid to generate unique ids import type { QueryRunner } from "typeorm-regatta" /** * Entity definition. * TypeORM will map this class to a "users" table. */ @Entity({ name: "users" }) class User { @PrimaryColumn() id!: string @Column() firstName!: string @Column() lastName!: string @Column() age!: number } /** * Connection details (replace with your own). * Note: In TypeORM-Regatta, host includes ":". */ const DB_HOST = "aaa.bbb.ccc.ddd:pppp" const DB_USER = "MyUserName" const DB_PASSWORD = "SomeSophisticatedPassword" /** * Create a new DataSource instance. * - `type: "regatta"` is provided by the typeorm-regatta package. * - `synchronize: true` tells TypeORM to create the schema automatically. * - `extra.deviceNames` is a Regatta-specific device mapping definition. */ const dataSource = new DataSource({ type: "regatta", host: DB_HOST, username: DB_USER, password: DB_PASSWORD, entities: [User], synchronize: true, logging: true, extra: { deviceNames: ["m10d1"], }, }) async function run() { try { // Initialize the DataSource await dataSource.initialize() console.log("Data Source has been initialized!") const userRepository = dataSource.getRepository(User) // Create a new User const user = new User() user.id = uuidv4() user.firstName = "John" user.lastName = "Doe" user.age = 25 // Insert await userRepository.save(user) console.log("User has been saved!") // Query const users = await userRepository.find() console.log("Users:", users) // Update user.age = 26 await userRepository.save(user) console.log("User has been updated:", user) // Delete await userRepository.remove(user) console.log("User has been removed:", user) } catch (error) { console.error("Error:", error) } finally { // Drop the User table await dropUserTable() // Close the connection await dataSource.destroy() } } async function dropUserTable() { let queryRunner: QueryRunner | null = null try { queryRunner = dataSource.createQueryRunner() await queryRunner.connect() await queryRunner.startTransaction() // Drop the table created by @Entity() -> default table name is "user" await queryRunner.query('DROP TABLE "users"') console.log("User table has been dropped!") await queryRunner.commitTransaction() } catch (error) { console.error("Error dropping table:", error) if (queryRunner) { await queryRunner.rollbackTransaction() } } finally { if (queryRunner) { await queryRunner.release() } } } // Run the example app run() ``` ### TypeScript Configuration Create `tsconfig.json` in the project root: ```json theme={null} { "compilerOptions": { "target": "ES2020", "module": "commonjs", "strict": true, "esModuleInterop": true, "experimentalDecorators": true, "strictPropertyInitialization": false, "emitDecoratorMetadata": true, "outDir": "./dist", "lib": ["ES2020", "DOM"], "typeRoots": ["./node_modules/@types"] }, "include": ["src/typeorm_example.ts"] } ``` ### Package Setup Create a `package.json` in the project root: ```json theme={null} { "name": "typeorm-regatta-example", "version": "1.0.0", "private": true, "type": "commonjs", "scripts": { "build": "tsc", "start": "node dist/typeorm_example.js" }, "dependencies": { "typeorm-regatta": "file:path/to/typeorm-regatta-.tgz", "node-regatta": "file:path/to/node-regatta-_.tgz", "uuid": "^9.0.0", "reflect-metadata": "^0.2.0" }, "devDependencies": { "typescript": "^5.3.3", "@types/node": "^18.13.0", "@types/uuid": "^9.0.0" } } ``` This `package.json` assumes you already downloaded the [**Regatta TypeORM package and the Node.js driver**](/drivers-and-clients/javascript/install-your-javascript-client), and have them available on your local environment. Please ensure that you update the `package.json` file with the correct paths to the downloaded `.tgz` files before proceeding. ## Running the Application From the project root run: ```bash theme={null} npm install npm run build npm start ``` Expected output: ```bash theme={null} query: SHOW TABLES LIKE 'users' query: CREATE TABLE SET NOT READY "users" ("id" varchar PRIMARY KEY INDEX WITH (devices = (m10d1)), "firstName" varchar NOT NULL, "lastName" varchar NOT NULL, "age" int8 NOT NULL) WITH (devices = (m10d1)) query: ALTER TABLE "users" SET READY Data Source has been initialized! query: SELECT "User"."id" AS "User_id", "User"."firstName" AS "User_firstName", "User"."lastName" AS "User_lastName", "User"."age" AS "User_age" FROM "users" "User" WHERE "User"."id" IN ($1) -- PARAMETERS: ["acaf5ed5-223d-40ae-8080-9196717cd54f"] query: START TRANSACTION query: INSERT INTO "users"("id", "firstName", "lastName", "age") VALUES ($1, $2, $3, $4) -- PARAMETERS: ["acaf5ed5-223d-40ae-8080-9196717cd54f","John","Doe",25] query: COMMIT User has been saved! query: SELECT "User"."id" AS "User_id", "User"."firstName" AS "User_firstName", "User"."lastName" AS "User_lastName", "User"."age" AS "User_age" FROM "users" "User" Users: [ User { id: 'acaf5ed5-223d-40ae-8080-9196717cd54f', firstName: 'John', lastName: 'Doe', age: 25 } ] query: SELECT "User"."id" AS "User_id", "User"."firstName" AS "User_firstName", "User"."lastName" AS "User_lastName", "User"."age" AS "User_age" FROM "users" "User" WHERE "User"."id" IN ($1) -- PARAMETERS: ["acaf5ed5-223d-40ae-8080-9196717cd54f"] query: START TRANSACTION query: UPDATE "users" SET "age" = $1 WHERE "id" IN ($2) -- PARAMETERS: [26,"acaf5ed5-223d-40ae-8080-9196717cd54f"] query: COMMIT User has been updated: User { id: 'acaf5ed5-223d-40ae-8080-9196717cd54f', firstName: 'John', lastName: 'Doe', age: 26 } query: SELECT "User"."id" AS "User_id", "User"."firstName" AS "User_firstName", "User"."lastName" AS "User_lastName", "User"."age" AS "User_age" FROM "users" "User" WHERE "User"."id" IN ($1) -- PARAMETERS: ["acaf5ed5-223d-40ae-8080-9196717cd54f"] query: START TRANSACTION query: DELETE FROM "users" WHERE "id" = $1 -- PARAMETERS: ["acaf5ed5-223d-40ae-8080-9196717cd54f"] query: COMMIT User has been removed: User { id: undefined, firstName: 'John', lastName: 'Doe', age: 26 } query: START TRANSACTION query: DROP TABLE "users" User table has been dropped! query: COMMIT ``` # Install Your Python Client Source: https://docs.regatta.dev/drivers-and-clients/python/install-your-python-client ## Drivers 1. [Download the Python driver](/drivers-and-clients/download-drivers-and-clients). 2. Install the driver: ```bash theme={null} $ pip install pyregatta-_.tar.gz ``` ### Notes * **Python 3.6** or newer is required to use the Regatta Python driver. * If you are using the **Full** driver package, the Regatta client library is included automatically. If you are using the **Standalone** version, ensure that the [client library is installed](/drivers-and-clients/client-lib). * The Regatta Python driver follows the PEP 249 / DB-API 2.0 specification. Refer to the [official Python DB-API specification documentation](https://peps.python.org/pep-0249/) for full API details. *** ## ORM frameworks 1. [Download the Regatta SQLAlchemy dialect](/drivers-and-clients/download-drivers-and-clients). 2. Install the package: ```bash theme={null} $ pip install sqlalchemy-regatta-.tar.gz ``` Regatta supports SQLAlchemy version 2.0.34 and above. Refer to the [official SQLAlchemy documentation](https://docs.sqlalchemy.org/en/20/intro.html#installation-guide) for installation instructions and API details. 1. [Download the Regatta Django package](/drivers-and-clients/download-drivers-and-clients). 2. Install the package: ```bash theme={null} $ pip install django-regatta-.tar.gz ``` Regatta supports Django version 4.2 and above. Refer to the [official Django documentation](https://docs.djangoproject.com/en/4.2/) for installation instructions and API details. # Run a Python Application Source: https://docs.regatta.dev/drivers-and-clients/python/run-python-application Let's create a simple Python application that queries the Regatta database. Start by adding the reference to the regatta driver: ```Python theme={null} from pyregatta import connect ``` Note that you should import all relevant classes based on the functionality of your application and its requirements. ## Connection Details Connection parameters will be defined as follows: ```Python theme={null} host = "aaa.bbb.ccc.ddd:ppp" user = "MyUserName" password = "SomeSophisticatedPassword" ``` ## Example Appliaction Below is an example of a sample application that creates an `employees` table, adds four rows and then selects and prints the rows. Create the main program and save it as: `database_example.py` ```Python theme={null} from pyregatta import connect host = "aaa.bbb.ccc.ddd:pppp" user = "MyUserName" password = "SomeSophisticatedPassword" # The connection and cursor are automatically closed when their blocks are exited with connect(user, password, host) as conn: with conn.cursor() as cursor: # Create an employees table cursor.execute( """ CREATE TABLE employees ( employee_key INT PRIMARY KEY INDEX, employee_name VARCHAR(40) NOT NULL, employee_salary INT, employee_department VARCHAR(50) NOT NULL ) """ ) conn.commit() # Insert some sample rows cursor.execute( """ INSERT INTO employees (employee_key, employee_name, employee_salary, employee_department) VALUES (1, 'John Doe', 10932, 'DevOps'), (2, 'Richard Roe', 18324, 'Legal'), (3, 'Jane Roe', 20411, 'Engineering'), (4, 'Rachel Roe', 19555, 'Support') """ ) conn.commit() # Query data cursor.execute("SELECT * FROM employees") # Fetch all rows rows = cursor.fetchall() # Print the results for row in rows: # Whole row (supports index and attribute access) print(row) # Example: access a specific column # print(row.employee_name) # print(row[0]) # employee_key conn.commit() # Drop the table cursor.execute("DROP TABLE employees") ``` ## Running the Appliaction Run the application from the directory containing your example: ```bash theme={null} python3 database_example.py ``` Expected output: ```bash theme={null} (1, 'John Doe', 10932, 'DevOps') John Doe 1 (2, 'Richard Roe', 18324, 'Legal') Richard Roe 2 (3, 'Jane Roe', 20411, 'Engineering') Jane Roe 3 (4, 'Rachel Roe', 19555, 'Support') Rachel Roe 4 ``` # Regatta CLI Source: https://docs.regatta.dev/drivers-and-clients/regatta-cli A lightweight command-line tool for connecting to, managing, and querying your Regatta database clusters. The Regatta Command-Line Interface (CLI) provides a quick and convenient way to manage and query your Regatta database. You’ll need: 1. Valid user credentials 2. Network access to an active Regatta cluster ## Installation Copy the Regatta CLI RPM package to your target Linux machine and install it: ```bash theme={null} sudo rpm -i regatta-cli-.el8.x86_64.rpm ``` Verify the CLI binary is installed: ``` ls /opt/regatta/1.0/clients/cli/bin/client_cli ``` ## Launch the CLI Start the client: ```bash theme={null} /opt/regatta/1.0/clients/cli/bin/client_cli ``` You’ll see the prompt: ```powershell theme={null} rdb> ``` ## Connect to Your Cluster Authenticate with your credentials and cluster address: ```powershell theme={null} rdb>\connect user=admin pass=RegattaDefault1234! url=aaa.bbb.ccc.ddd:ppp ``` On success, you’ll see: ```` Successfully connected to RegattaDB system NOTE: From this point forward the rdb\> prompt will be omitted. ## Table Management ### Create a Table Let's create an `employees` table: ```sql CREATE TABLE employees ( employee_key INT PRIMARY KEY INDEX, employee_name VARCHAR(40) NOT NULL, employee_salary INT, employee_department VARCHAR(50) NOT NULL); ```` If successful: ```sql theme={null} statement executed successfully ``` Verify with: ```sql theme={null} SHOW TABLES; ``` ```sql theme={null} | TABLE_NAME | IS_READY | PRIMARY_KEY_COLUMN | DEVICES | ----------------------------------------------------------- | employees | true | employee_key | m10d1 | ``` ### Insert Data Insert multiple rows: ```sql theme={null} INSERT INTO employees ( employee_key, employee_name, employee_salary, employee_department) VALUES (1,'John Doe', 10932, 'DevOps'), (2,'Richard Roe', 18324, 'Legal'), (3,'Jane Roe', 20411, 'SoftwareDev'), (4,'Rachel Roe', 19555, 'Support'); ``` ```sql theme={null} statement executed successfully   ``` ### Query Data Select all records: ```sql theme={null} SELECT * from employees; ``` ```sql theme={null} statement executed successfully | employee_key | employee_name | employee_salary | employee_department | ------------------------------------------------------------------------ | 1 | John Doe | 10932 | DevOps | | 2 | Richard Roe | 18324 | Legal | | 3 | Jane Roe | 20411 | SoftwareDev | | 4 | Rachel Roe | 19555 | Support | ``` Filter with a WHERE clause: ```sql theme={null} SELECT employee_name, employee_salary FROM employees WHERE employee_salary > 18324; ``` ```sql theme={null} statement executed successfully | employee_name | employee_salary | ----------------------------------- | Jane Roe | 20411 | | Rachel Roe | 19555 | ``` ### Update Records Give Richard Roe a raise: ```sql theme={null} UPDATE employees SET employee_salary=20202 WHERE employee_name='Richard Roe'; ``` Re-run the previous `SELECT` to confirm: ```sql theme={null} statement executed successfully | employee_name | employee_salary | ----------------------------------- | Richard Roe | 20202 | | Jane Roe | 20411 | | Rachel Roe | 19555 | ``` ### Delete Records Remove the employee with the highest salary: ```sql theme={null} DELETE FROM employees WHERE employee_salary = ( SELECT MAX(employee_salary) FROM employees ); ``` Verify deletion: ```sql theme={null} statement executed successfully | employee_name | employee_salary | ----------------------------------- | Richard Roe | 20202 | | Rachel Roe | 19555 | ``` ### Drop the Table List tables: ```sql theme={null} SHOW TABLES; ``` This will present all the tables in the database: ```sql theme={null} | TABLE_NAME | IS_READY | PRIMARY_KEY_COLUMN | DEVICES | ----------------------------------------------------------- | employees | true | employee_key | m10d1 | ``` Drop `employees`: ```sql theme={null} DROP TABLE employees; ``` Confirm it’s gone: ```sql theme={null} SHOW TABLES ``` ```sql theme={null} statement executed successfully | TABLE_NAME | IS_READY | PRIMARY_KEY_COLUMN | DEVICES | TABLE_METADATA | ------------------------------------------------------------------------- ``` ## Next Steps * Explore advanced CLI commands usding the [SQL guide](/sql/specification). * Integrate with your preferred language using one of our [language-specific drivers.](/drivers-and-clients/connecting-applications-to-regatta) # Access the Cloud Source: https://docs.regatta.dev/getting-started/access-the-cloud To access the Cloud website, click the following URL to enter the login page: [**Regatta Cloud**](https://cloud.regatta.dev) You’ll be required to enter your credentials. To login, Enter the email used to register and the password received from Regatta. Note that if the email being used is one associated with Google and you are already signed into Google, you may leverage the Single-Sign-On with the Google option. Once logged in, the Clusters screen will appear. If you already have created clusters before, or someone from your account did, they will be listed here. There are several screens you can select from this page: * **Clusters** - which is the first page you will see once logged in. * **Clients & Tools** - which is covered in the [Drivers & Clients](https://docs.regatta.dev/drivers-and-clients/connecting-applications-to-regatta) section. * **Backup & Restore** - which is covered in the [Backup & Restore](https://docs.regatta.dev/regatta-cloud/database-backup-restore) section. * **Credits** - which allows you to manage your available cloud credits. * **Documentation** - Will get you here. * **Support** - will redirect you to the support channel. # Creating a Cluster Source: https://docs.regatta.dev/getting-started/creating-a-cluster You may select to use one of the available clusters or create a new one. In this example, we will create a new cluster. Clicking on the **+ CREATE NEW CLUSTER** button will redirect you to the **Create New Cluster** screen. Choose a name for the cluster (one that wasn’t used before). Here we named it **my-1st-regatta-cluster**. Please note that this document will refer back to the cluster name in later steps. If you decided to use a different cluster name, substitute it as appropriate in the steps throughout the Getting Started Guide. Select the Provider from the available list and the Region from the drop-menu. Please note that currently we only offer **Google Cloud Platform** as a Provider and the **us\_east** as region. Then select the **Cluster Type**. Once you click on the field, a drop-down menu will appear offering different cluster sizes. Please select the size required. In this example we select the **XSMALL** cluster. Click the **CONFIRM** button to complete the process. In response, you will go back to the **Clusters** screen and your new cluster will appear in the **Starting** status. Please wait until the cluster becomes available. The status will change from **Starting** to **Running**. You just created your first Regatta cluster. You can start deploying your database. This can be done via multiple ways of connecting to a Regatta cluster. The following steps will use the Regatta Cloud WebCLI. Other methods of connecting to a Regatta cluster will be covered in subsequent sections. # Getting Started Using Regatta Cloud Source: https://docs.regatta.dev/getting-started/getting-started-using-regatta-cloud The Regatta Cloud is an easy way to get you started. In the following sections we will guide you on how to access Regatta cloud, deploy a Regatta database, and access it using the WebCLI interface. **Note**: If you would like to create a self-hosted cluster, please refer to the [**Self-Hosted-Deployment**](https://docs.regatta.dev/self-hosted-deployment/prerequisites) section. It is assumed that you are already registered with Regatta and received a Username (email used to register) and Password to access the Regatta Cloud Platform. It is also assumed that a registered account(s) is associated with the user. If this is not the case, please reach out to Regatta support. # Comparing Performance Source: https://docs.regatta.dev/getting-started/linear-scaling/comparing-performance/comparing-performance To compare the performance and observe the linear scaling, we will perform a query that will require heavy processing. The following query calculates the number of items a customer bought of his or her favorite item. We order it in an ASCENDING fashion based on the Customer ID and display the first 5. Though at first glance it might look like a simple query, it involves reading and processing a large amount of data. The query for the total number of items bought by a customer: ```SQL theme={null} SELECT c.Name, c.Item, COUNT(*) AS NumberOfItems FROM Customers c JOIN Purchases p ON c.CustomerID = p.CustomerID AND c.Item = p.Item GROUP BY c.Name, c.Item, c.CustomerID ORDER BY c.CustomerID ASC LIMIT 5; ``` # MEDIUM Cluster Source: https://docs.regatta.dev/getting-started/linear-scaling/comparing-performance/medium-cluster Let’s connect to our **demo-medium** cluster. Now perform the same query on the larger cluster. This cluster has 10 nodes and should be around 10 times faster. Let’s run the query again through the CLI. image.png As can be seen above, in the larger cluster it took about 2.8 seconds. When comparing with the previous duration of demo-small of roughly 9.4 seconds we can see that the ratio between the two durations is 3⅓ (=3.35) which is 10:3, the ratio between the cluster sizes. The larger cluster executed that same query 3⅓ times faster. Please note that this is a complex JOIN requires processing a large amount of data. The database must hold a very large amount of intermediate data comprised from all tables to accomplish this task. # SMALL Cluster Source: https://docs.regatta.dev/getting-started/linear-scaling/comparing-performance/small-cluster We shall start with smaller **demo-small** cluster. Run the query through the WebCLI. In the screen below we can see the result: image.png The query took about 9.4 seconds. Note: One should appreciate that the time it takes varies and it depends on some factors, such as the interdependency in the query, the actual network and congestion and more. # Creating Demo Clusters Source: https://docs.regatta.dev/getting-started/linear-scaling/creating-demo-environment/creating-demo-clusters Now for the 2 clusters. The first cluster will be **demo-small** - a single‑node cluster with a single device. The other cluster will be **demo-medium** which is comprised of 10 nodes of the same type as **demo‑small**. To deploy **demo-small**, follow the steps described in Creating a Cluster, select the SMALL cluster type this time, but this time switch on the **Deploy Demo Data** button. Repeat the same steps for **demo-medium** but this time select the MEDIUM type.\ Deploying the clusters will take roughly 10 minutes. Once completed, each of the clusters will have the two tables described previously, populated. Let’s see the number of nodes for each cluster. Just run the following command for each of the clusters in its respective WebCLI: ```SQL theme={null} SHOW NODES ``` For each we will see the nodes comprising it. For \*\*demo-xsmall \*\*there are 3 nodes in the cluster, and for \*\*demo-medium \*\*there are 10 nodes (though you will need to scroll down to see the 10th one). Both tables in both clusters are now populated with the same data. 1 million rows in **Customers** table and 80 million rows in the **Purchases** table. Performing the following command for each of the tables (namely, Customers and Purchases) will show that. ```SQL theme={null} SELECT COUNT (*) FROM ``` # Creating the Demo Environment Source: https://docs.regatta.dev/getting-started/linear-scaling/creating-demo-environment/creating-demo-environment As stated above, we will have 2 clusters with 2 tables. Each table will be populated with data\ where the number of rows is denoted next to the table’s name. ### **Table's Schemas - Sport's Store** The schemas for the 2 tables are: `Customers (20M rows)` * `CustomerID INT` * `Name VARCHAR (100)` * `Item VARCHAR (100)` * `Phone VARCHAR (15)` `Purchases (20M rows)` * `PurchaseID INT` * `CustomerID INT` * `PurchaseDate DATE` * `AreaCode VARCHAR (3)` * `Item VARCHAR (100)` * `Price DECIMAL(10, 2)` # Linear Scaling Source: https://docs.regatta.dev/getting-started/linear-scaling/linear-scaling One of the most exciting features of the Regatta Database is its **linear scaling** capability: performance scales linearly with cluster size for both OLTP and OLAP workloads. Next, we’ll demonstrate this using an OLAP query, showing how response times improve in proportion to cluster growth. To do that, we’ll create two clusters and enable the **Deploy Demo Data** option (a toggle on the **Create New Cluster** screen). Enabling it automatically creates two predefined tables and populates them with sample data. # Create a Table Source: https://docs.regatta.dev/getting-started/regatta-basics/creating-a-table/create-a-table In this section we will demonstrate how to create a new table. Please note that most Regatta SQL commands are exactly like PostgreSQL. When they divert, we will note that clearly. To create a table (or for executing other SQL commands) we will open the ebWCLI window by clicking the **Connect** button next to our cluster. In the input line we will enter the desired SQL command. Assume you would like to create the following table: `Table: employees` * `employee_key INT` * `employee_name VARCHAR (40)` * `employee_salary INT` `employee_department VARCHAR (50)` In Regatta, you may define in which devices (storage devices that are local to each node in the cluster) the table should be stored in as well as indexes if specified. In the following example we will show both methods. # Default Device Mapping Source: https://docs.regatta.dev/getting-started/regatta-basics/creating-a-table/default-device-mapping The simple option is creating the cluster without specifying any device. If that method is chosen, then Regatta will map all tables and indexes for you. To create the described table, enter the following SQL command: ```SQL theme={null} CREATE TABLE employees ( employee_key INT PRIMARY KEY INDEX, employee_name VARCHAR(40) NOT NULL, employee_salary INT, employee_department VARCHAR(50) NOT NULL) ``` Enter SQL command SHOW TABLES: ```SQL theme={null} SHOW TABLES ``` In response, the table details will be displayed. We can see the **employee** table with all the columns and the device mappings. If we do not specify the mapping, the system will distribute the table rows across all the devices and choose a single random device for the indexes. **Notes:** * When looking at the mapping, you can see that the same device appears three times. This is the out-of-the-box default mapping, which delivers high performance. * This mapping is not necessarily the most performant, but it is the simplest behavior, and it allows someone to easily get started (which is the purpose of this document). * When there is more than one device used for indexing, we need to define range separators that will define how to map the indexes to the different devices. It is up to the user to specify this mapping. In the default mapping the indexes are mapped to a single device and therefore there is no need for range separators, so it defaults to ***no range separators***. * For further details, please refer to the [**Table creation with default data distribution**](https://docs.regatta.dev/tuning-performance/distributing-tables#table-creation-with-default-data-distribution)\*\* \*\*section. # Selected Device Mapping Source: https://docs.regatta.dev/getting-started/regatta-basics/creating-a-table/selected-device-mapping If you do decide to select to define the mapping for either data or indexes, you may do so. If you define one and not the other, Regatta will complete the definition for you. For example, if you do map the table to some devices but not decaler where an indexed key should go, Regatta will select a random device and map the index to it. The first command should display the devices that are used in the cluster. We enter SHOW DEVICES in the WebCLI command line: ```SQL theme={null} SHOW DEVICES ``` The next command will be the CREATE TABLE command. This command will look as follows (note the usage of the devices). Let’s create a similar table called **workers.** Enter the following command: ```SQL theme={null} CREATE TABLE workers ( worker_key INT PRIMARY KEY INDEX WITH (devices = (m10d1)), worker_name VARCHAR(40) NOT NULL, worker_salary INT, worker_department VARCHAR(50) NOT NULL) WITH (devices = (m10d1)) ``` Running it will create the desired table. Enter the SQL show tables command: ```SQL theme={null} SHOW TABLES ``` We can see the table with all the columns and the device mapping. Note that in the **workers** table, the data is only mapped once to the device since this is what we chose as opposed to **employees** where Regatta mapped it 3 times. We will continue here using the **employees** table. # Credentials Source: https://docs.regatta.dev/getting-started/regatta-basics/credentials All Regatta cluster deployments come with a default user. The default user’s credentials are: * Username: admin * Password: RegattaDefault1234! These can be used out-of-the-box. To change the default password, run the following command in the WebCLI: ```SQL theme={null} ALTER USER admin WITH PASSWORD '' ``` To create a new user to use, run the following command in the WebCLI: Please note that there are requirements for the username and password format. ```SQL theme={null} CREATE USER WITH PASSWORD '' ' ``` ### Username * Usernames should be between 1 and up to 64 characters long. * Begin with a letter (a-z or A-Z) or an underscore (\_). * Subsequent characters can be letters, underscores, digits (0-9), or dollar signs (\$). * Unsupported characters are permitted only if they are surrounded by double quotes. * Reserved words can be used as a username. * Names are case-sensitive. However, unquoted names are always converted to lowercase, and quoted names preserve the case and also allow spaces within the names. ### Password * Password length should be between 8 and 100 characters * A password must contain at least 3 of the following character classes: * Upper case characters * Lower case characters * Numbers * Symbols. Any of the following symbols can be used. The list is enclosed in double quotes. “ ' \~ ! @ # \$ % ^ & \* ( ) \_ - + = \[ ] \ / \< > , . ; ? ‘ : | (space)” # Delete Entry from Table Source: https://docs.regatta.dev/getting-started/regatta-basics/delete-entry-from-table Let's remove the employee with the maximal salary; that will be Jane Roe we have seen previously. We will execute the following SQL command: ```SQL theme={null} DELETE FROM employees WHERE employee_salary = (SELECT max(employee_salary) FROM employees) ``` We will run the previous SELECT again and as expected, Jane Roe was deleted. # Drop Table Source: https://docs.regatta.dev/getting-started/regatta-basics/drop-table Now we will remove the table and get back to an empty database. First, let’s run: ```SQL theme={null} SHOW TABLES ``` This will present all the tables in the database. Now, perform the following SQL DROP command: ```SQL theme={null} DROP TABLE employees ``` And don’t forget to also drop the workers table: ```SQL theme={null} DROP TABLE workers ``` Then run: ```SQL theme={null} SHOW TABLES ``` And indeed, there are no tables in the database. # Insert Values Source: https://docs.regatta.dev/getting-started/regatta-basics/insert-values Inserting values into Regatta is no different than PostgreSQL. The following command will insert a few values into the employees table: ```SQL theme={null} INSERT INTO employees ( employee_key, employee_name, employee_salary, employee_department) VALUES (1,'John Doe', 10932, 'DevOps'), (2,'Richard Roe', 18324, 'Legal'), (3,'Jane Roe', 20411, 'SoftwareDev'), (4,'Rachel Roe', 19555, 'Support') ``` Next we will access these values. # Select Values from Table Source: https://docs.regatta.dev/getting-started/regatta-basics/select-values-from-table The SELECT command is also the same as PostgreSQL. Run the following command to see all values in the table: ```SQL theme={null} SELECT * from employees ``` The CLI will display all entries. Obviously, we can perform a more complex SELECT command. For example: ```SQL theme={null} SELECT employee_name, employee_salary FROM employees WHERE employee_salary > 18324 ``` The output, as expected, will be Jane Doe and Rachel Roe since their salary is more than 18324. # Update Entry Source: https://docs.regatta.dev/getting-started/regatta-basics/update-entry Let’s give Richard Roe a raise. ```SQL theme={null} UPDATE employees SET employee_salary=20202 WHERE employee_name='Richard Roe' ``` Now let’s run the SELECT command from the previous section and see if Richard Roe appears now. Indeed, Richard Roe appears now as he has a higher salary. # Regatta Documentation Source: https://docs.regatta.dev/home Limitless power and scale **Regatta is a mission-critical, extreme performance transactional and analytical database that brings simplicity alongside powerful features.** Regatta is a modern SQL database that delivers an all-in-one solution. You can run all your workloads, either analytical or transactional on the same system at the highest performance without losing a beat. Increase the cluster size and see the performance grows linearly with it. Below you can get access to all the documentation available for Regatta. If it's your first time here, start with the Getting Started link. Otherwise, chose the subject you would like to learn about. *** ## Access Regatta Docs Through Your AI Assistant Connect your AI tools directly to the Regatta documentation using [MCP](https://modelcontextprotocol.io/docs/getting-started/intro). This enables natural-language queries with answers sourced directly from the docs. Use the following MCP URL when adding a custom connector: ```bash theme={null} https://docs.regatta.dev/mcp ``` Follow these steps to enable Regatta Docs inside Claude: 1. Log in to your [Claude.ai](https://claude.ai) account 2. Open **Settings → Connectors** 3. Click **Add custom connector** and paste the Regatta MCP URL 4. Save the connector 5. After saving, the **Regatta Docs** tool will automatically appear in the Claude tool list whenever you start a new chat. All set! You can now ask Claude questions like *"Search Regatta Docs for data distribuition best practices"* and it will use the MCP server to access the documentation directly. # Access the Cloud Source: https://docs.regatta.dev/regatta-cloud/regatta-cloud/access-the-cloud To access the Cloud website, click the following URL to enter the login page: [https://cloud.regatta.dev](https://cloud.regatta.dev) The following screen will appear, and you’ll be required to enter your credentials. To login, Enter the email used to register and the password received from Regatta. Note that if the email being used is one associated with Google and you are already signed into Google, you may leverage the Single-Sign-On with the Google option. Once logged in, the Clusters screen will appear: If you already have created clusters before, or someone from your account did, they will be listed here. There are several screens you can select from this page: * **Clusters** - which we are on * **Backup/Restore** - will be covered in Database Backup and Restore * **Support** - will redirect you to the support channel * **Documentation** - Will grant access to useful documents (including this) # Cluster IP Source: https://docs.regatta.dev/regatta-cloud/regatta-cloud/cluster-ip To attain a cluster IP, go to the platform and access the desired database by clicking on its name in the **Cluster Name** column in the **Clusters** page. You will notice that it is a link. Under the **Security** section in the **Connection Details** tab, you will see the IP and PORT of that cluster. Copy them for the next steps. # Creating a Cluster Source: https://docs.regatta.dev/regatta-cloud/regatta-cloud/create-a-cluster You may select to use one of the available clusters or create a new one. In this example, we will create a new cluster. The following section describes how to create a new cluster. Clicking on the **+ CREATE NEW CLUSTER** button (see Figure 2 Clusters page) will redirect you to the **Create New Cluster** screen: Choose a name for the cluster (one that wasn’t used before). Here we named it **my-1st-regatta-cluster**. Please note that this document will refer back to the cluster name in later steps. If you decided to use a different cluster name, substitute it as appropriate in the steps throughout the Getting Started Guide. Select the Provider from the available list and the Region from the drop-menu. Please note that currently we only offer **Google Cloud Platform** as a Provider and the **us\_east** as region. Then select the **Cluster Type**. Once you click on the field, a drop-down menu will appear offering different cluster sizes (Figure 4). Please select the size required. In this example we select the **XSMALL** cluster. Click the **CONFIRM** button to complete the process. In response, you will go back to the **Clusters** screen and your new cluster will appear in the **Starting** status. Please wait until the cluster becomes available. The status will change from **Starting** to **Running** as seen below (Frame 6). You just created your first Regatta cluster. You can start deploying your database. This can be done via multiple ways of connecting to a Regatta cluster. The following steps will use the Regatta Cloud user interface CLI. Other methods of connecting to a Regatta cluster will be covered in subsequent sections. # Delete Cluster Source: https://docs.regatta.dev/regatta-cloud/regatta-cloud/delete-cluster Once a cluster has served its purpose, you may delete it. To delete a cluster, go to the clusters page, select the cluster to be deleted by clicking on the cog to its right and selecting Delete by hovering over it. Click on the **delete** option. A pop up window will ask you to enter the cluster name (don’t worry, it appears at the top of the message). Once the name is entered (no leading or following spaces please), the **CONFIRM** button will become available. Click it. Once confirmed, a message stating that the deletion started will appear at the top and the **Status** of the cluster will change to **Deleting.** From this point, the cluster is unavailable. Once removed completely, it will disappear from the cluster list. # Regatta Cloud Source: https://docs.regatta.dev/regatta-cloud/regatta-cloud/regatta-cloud The Regatta Cloud is an easy way to create and access your Regatta database using the web CLI. The following sections describe how to simply deploy and access the Regatta database through the web interface. # Networking Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/configuration/networking How the operator exposes SM and RDB Pods inside and outside your Kubernetes cluster. The operator gives every module a stable Kubernetes Service, so its address does not change even if Kubernetes reschedules its Pod to a different node: * The SM Pod gets one Service, always `ClusterIP`, reachable only from inside your Kubernetes cluster. * Every RDB Pod gets its own Service, also always `ClusterIP`. The operator and SM use these directly for topology-aware routing to a specific RDB replica. * All RDB Pods together also get one aggregate Service, `ClusterIP` by default or `LoadBalancer` if you set `spec.rdb.service.type`. This is a simple entry point for clients that do not need to target a specific RDB replica. Setting `spec.rdb.service.type: LoadBalancer` requests an externally reachable address for the aggregate Service. Kubernetes does not fulfill this by itself: it depends on a load-balancer integration already being available in your cluster - built in on managed offerings such as GKE, EKS, and AKS, or provided by an on-prem controller such as MetalLB. If your cluster has no such integration, the Service simply stays `` with no external IP. When the address is provisioned, traffic sent to it is forwarded to the Service, which then load-balances it across every RDB Pod, the same way any Kubernetes Service load-balances across its backing Pods, and is shared across every client that connects to it rather than reserved for one. It does not target one specific RDB Pod: a client connecting through the aggregate Service may reach any RDB replica. You can additionally restrict which source IPs may reach it with `spec.rdb.service.loadBalancerSourceRanges` (a list of CIDR blocks). Just like `type: LoadBalancer` itself, Kubernetes does not enforce this field directly: it is fulfilled by the same load-balancer integration, and enforcement varies by platform - for example GKE's translates it into a firewall rule at the network edge, while other cloud providers and on-prem controllers differ or may not support it at all. Verify traffic is actually restricted on your platform rather than assuming it always is; if the integration ignores the field, the Service stays reachable from anywhere. The aggregate RDB Service is the only Service the operator itself can expose outside your Kubernetes cluster: the SM Service and per-RDB Services are always generated as `ClusterIP`, with no built-in option to change that. This means RegattaDB management operations have no supported external access path out of the box - it does not mean SM is unreachable from outside the cluster. Nothing stops you from creating your own additional Service (or Ingress) pointed at the SM Pod's selector labels to expose it yourself; the operator simply does not do this for you, will not manage or secure it, and will not know about it. If you need to run RegattaDB management commands from an external host, run your client as a Pod inside the Kubernetes cluster, use a standard Kubernetes technique such as `kubectl port-forward` to reach SM temporarily, or create your own additional Service restricted to trusted source ranges and take responsibility for securing it. `spec.rdb.service.type` only supports `ClusterIP`/`LoadBalancer` today; if you specifically need a NodePort-style Service, the same applies - you could create your own additional Service alongside the operator-managed ones. # Configuration Overview Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/configuration/overview The RegattaCluster resource: object header, version and image, and module settings. Everything you configure lives in a single `RegattaCluster` resource. This page covers the fields you set for every deployment: the object header, RegattaDB version and image, and per-module settings. See [Storage](./storage.mdx), [Networking](./networking.mdx), [Security & Lifecycle](./security-and-lifecycle.mdx), and [Resources & Scheduling](./resources-and-scheduling.mdx) for the rest of the spec. ## A minimal RegattaCluster resource ```yaml theme={null} apiVersion: regatta.dev/ kind: RegattaCluster metadata: name: my-regattadb namespace: spec: version: "" image: repository: registry.example.com/regatta tag: "" security: runAsUser: 1000 runAsGroup: 1001 fsGroup: 1001 rdb: replicas: 3 blockStorage: size: 60Gi repoStorage: size: 5Gi logs: size: 5Gi ``` `spec.version`, `spec.image`, `spec.rdb`, `spec.repoStorage`, and `spec.logs` are required. The rest of this page, and the pages that follow it, walk through every field. See [Quickstart: Single-Node RegattaCluster](../examples/quickstart-single-node.mdx) to apply this example end to end. ## Configure the object header | Field | Description | | - | - | | `apiVersion` | `regatta.dev/` | | `kind` | `RegattaCluster` | | `metadata.name` | A unique, DNS-compatible name. It is used to name every generated resource, so keep the total generated names under 63 characters | | `metadata.namespace` | The namespace where you installed the operator | ## Configure version and image | Field | Required/default | Description | | - | - | - | | `spec.version` | Required; immutable after creation | The RegattaDB release version. It must match the release built into your image | | `spec.image.repository` | Required | The RegattaDB image repository in your registry | | `spec.image.tag` | Required unless `digest` is set | An image tag | | `spec.image.digest` | Required unless `tag` is set | An immutable image digest, for example `sha256:...`; prefer this for production | | `spec.image.pullPolicy` | `IfNotPresent` | `Always`, `IfNotPresent`, or `Never` | | `spec.image.pullSecrets` | Optional | Names of image-pull Secrets in your namespace, for a private image repository | You can change `spec.image` after creation as long as `spec.version` stays the same. The operator applies the change as a same-version rolling update of the affected StatefulSet: standard Kubernetes StatefulSet behavior that replaces Pods one at a time, waiting for each replacement Pod to become Ready before moving to the next, rather than restarting every Pod at once. For the SM Pod (a single replica) this means one restart; for RDB, replicas are replaced one at a time so the others keep serving. You cannot control the pace or order of this rollout. ## Configure module settings RegattaDB has six modules: SM, SNA, Sequencer, GDD, DCM, and RDB. Each has its own `spec.` section with the same fields: | Field | Required/default | Immutable | Description | | - | - | - | - | | `port` | Module default (see table below) | Yes | The RegattaDB process port. Change it only if your release requires a different port. The operator's generated Kubernetes Service exposes it alongside `service_port` | | `service_port` | Module default (see table below) | Yes | RegattaDB's own internal service port for the module, used for internal service operations | | `num_threads` | Optional | Yes | The module's thread allocation. If set, `spec.resources` must cover it (see [Resources & Scheduling](./resources-and-scheduling.mdx)) | | `ram_MB` | Optional | Yes | The module's memory allocation in megabytes. If set, `spec.resources` must cover it | | `config` | `{}` | No | RegattaDB module settings as string key/value pairs. Every value must be a string, even for numbers or booleans, for example `"1"` rather than `1` | Default ports: | Module | `port` | `service_port` | | - | -: | -: | | SM | 8840 | 5000 | | SNA | 8841 | 5001 | | Sequencer | 8842 | 5002 | | GDD | 8843 | 5003 | | DCM | 8844 | 5004 | | RDB | 8850 | 6001 | ## RegattaCluster examples `config/examples/` in the release package includes: * `regatta-minimal.yaml`: the smallest example, shown above. * `regatta-full.yaml`: a comprehensive example that sets every configurable field, across every module, storage setting, and resource profile. Use it as a field-by-field reference, not as sizing guidance. * `regatta-static-storage.yaml`: uses pre-created `PersistentVolumes` for RDB block storage instead of a `StorageClass`, with more than one raw block device per RDB Pod. See [Example: Two Local NVMe Devices, One RDB Replica](../examples/static-storage-local-nvme.mdx) for a full walkthrough. ## Next steps * [Storage](./storage.mdx) for RDB, repo, and log storage. * [Networking](./networking.mdx) for how RegattaDB is exposed inside and outside the cluster. * [Security & Lifecycle](./security-and-lifecycle.mdx) for the security context and starting/stopping RegattaDB. * [Resources & Scheduling](./resources-and-scheduling.mdx) for CPU, RAM, and Pod placement. # Resources & Scheduling Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/configuration/resources-and-scheduling Size CPU and RAM for the SM and RDB Pods, and control where they are scheduled. ## Configure CPU and RAM `spec.resources.sm` and `spec.resources.rdb` set the total CPU and RAM for the SM Pod and every RDB Pod. | Field | Required | Description | | - | - | - | | `spec.resources.sm.requests.cpu` / `.memory` | Required if `spec.resources.sm` is set | Requested CPU and RAM for the SM Pod | | `spec.resources.sm.limits.cpu` / `.memory` | Required if `spec.resources.sm` is set | CPU and RAM limits for the SM Pod | | `spec.resources.rdb.requests.cpu` / `.memory` | Required if `spec.resources.rdb` is set | Requested CPU and RAM for every RDB Pod | | `spec.resources.rdb.limits.cpu` / `.memory` | Required if `spec.resources.rdb` is set | CPU and RAM limits for every RDB Pod | If you omit `spec.resources.sm`/`spec.resources.rdb`, the operator applies fixed minimums for both requests and limits: `6` CPU / `1200M` memory for the SM Pod, `4` CPU / `8000M` memory for every RDB Pod. Values below these minimums are rejected. CPU and memory values use standard Kubernetes quantity notation: * CPU: a whole or fractional number of cores, for example `"2"` for 2 cores or `"0.5"` for half a core; or millicores using an `m` suffix, for example `"500m"`, which equals `0.5` cores. `1000m` equals one full core. * Memory: a number followed by a size suffix. Binary suffixes `Ki`, `Mi`, `Gi`, and `Ti` are powers of 1024, for example `"512Mi"` or `"8Gi"`. Decimal suffixes `k`, `M`, `G`, and `T` are powers of 1000, for example `"500M"`. There is no plain `MB` unit; use `Mi` or `M` explicitly. This quantity notation applies to `spec.resources.*.requests/limits.memory` and `.cpu` only. The module-level `ram_MB` field (for example `spec.rdb.ram_MB`) is different: it is a plain integer number of megabytes, for example `16000`, not a Kubernetes quantity string. If you set `num_threads` or `ram_MB` on a module, `spec.resources` for that module's Pod must cover the combined totals: `spec.resources.sm` for modules in the SM Pod, `spec.resources.rdb` for modules in the RDB Pod. SNA counts toward both, since it runs in every Pod type. There is no separate field to size RegattaDB's memory-backed `/dev/shm` volume: the operator sets its `sizeLimit` equal to the same component's effective `requests.memory` (`spec.resources.sm.requests.memory` for the SM Pod, `spec.resources.rdb.requests.memory` for every RDB Pod). ### Schedule Pods Use `spec.resources.sm.scheduling` and `spec.resources.rdb.scheduling` to influence where the operator's SM and RDB Pods run. These are standard Kubernetes Pod scheduling settings; omit any setting you do not need: | Field | Effect | | - | - | | `nodeSelector` | Requires the Pod to run on a node with all listed labels. | | `tolerations` | Allows the Pod to run on nodes with matching taints; tolerations do not select a node by themselves. | | `affinity` | Sets Kubernetes node-affinity, Pod-affinity, or Pod-anti-affinity rules. | | `topologySpreadConstraints` | Controls how matching Pods are distributed across topology domains such as zones or nodes. | For example, this places RDB Pods only on nodes labeled for database workloads, tolerates a matching taint, and spreads matching RDB Pods across availability zones: ```yaml theme={null} spec: resources: rdb: scheduling: nodeSelector: workload: database tolerations: - key: workload operator: Equal value: database effect: NoSchedule topologySpreadConstraints: - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: DoNotSchedule labelSelector: matchLabels: app.kubernetes.io/component: rdb ``` The same fields and structure can be placed under `spec.resources.sm.scheduling` to apply to the combined SM Pod. Affinity, tolerations, and topology spread constraints use Kubernetes PodSpec syntax; refer to your Kubernetes documentation for available operators and details. ## CPU and RAM: scheduling behavior Kubernetes uses `requests` to decide where a Pod can run, and `limits` to cap what it can use once running: * If no Kubernetes node has enough unreserved CPU or memory to satisfy your `requests`, Kubernetes will not schedule the Pod there. A Pod stuck `Pending` while otherwise healthy often means no node currently has enough spare capacity. * A CPU limit is enforced by throttling: a container that tries to use more CPU than its limit is slowed down, not killed. * A memory limit is a hard ceiling: if a container tries to use more memory than its limit, Kubernetes kills it (OOM-killed) and restarts it. This is generic Kubernetes behavior that applies to any container, not something specific to RegattaDB. `num_threads` and `ram_MB` are RegattaDB application-level settings: they tell RegattaDB how much CPU and RAM to plan for internally, per module. Both are optional - if you leave them unset, RegattaDB's System Manager assigns them automatically. `spec.resources` is a separate, Kubernetes Pod-level setting: it is the boundary Kubernetes enforces around the whole container. Unlike `num_threads`/`ram_MB`, nothing auto-detects this for you, because the operator has no way to discover your Kubernetes node hardware. If you omit `spec.resources.sm`/`spec.resources.rdb`, the operator applies the fixed minimums from Configure CPU And RAM above, so RegattaDB Pods always get a real Kubernetes QoS guarantee - never `BestEffort`. Size them explicitly when your workload needs more than those minimums, even though you are not required to size every individual module's `num_threads`/`ram_MB` to do so. If you do set `num_threads`/`ram_MB`, `spec.resources.sm`/`spec.resources.rdb` must at least cover their combined totals; RegattaDB's own processes account for the headroom they need within that allocation. # Security & Lifecycle Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/configuration/security-and-lifecycle Configure the Pod security context, RegattaDB's credentials, and whether the operator starts or stops it. ## Configure lifecycle These fields control whether the operator actively configures and starts RegattaDB, or leaves it untouched while still managing the surrounding Kubernetes resources. Use them to stage a `RegattaCluster` resource before go-live, or to stop RegattaDB for planned maintenance without deleting anything. | Field | Default | Description | | - | - | - | | `spec.lifecycle.configure` | `true` | Whether the operator configures RegattaDB through the System Manager once Kubernetes is ready. Set `false` only when creating a new, stopped RegattaCluster resource, together with `start: false` | | `spec.lifecycle.start` | `true` | Whether the operator starts RegattaDB after configuring it. Set `false` to keep Kubernetes Pods running with RegattaDB stopped | ## Configure security | Field | Default | Description | | - | - | - | | `spec.security.runAsUser` | `1000` | The non-root Linux UID RegattaDB processes run as | | `spec.security.runAsGroup` | `1001` | The non-root Linux GID RegattaDB processes run as | | `spec.security.fsGroup` | `1001` | The filesystem group applied to mounted storage | | `spec.security.seccompProfile` | `RuntimeDefault` | A seccomp profile restricts which Linux syscalls a container may make; `RuntimeDefault` applies Kubernetes' standard restricted set, or use `Unconfined` to disable it | | `spec.security.allowPrivilegeEscalation` | `false` | Whether a RegattaDB process can gain more privileges than its parent (for example through a setuid binary). Keep `false` for production | Every Pod also always runs as non-root and uses the `OnRootMismatch` file system group-change policy, so mounted volumes are already owned by the right group when the container starts. Neither is configurable; both apply regardless of what you set under `spec.security`. ## Security context and credentials Every RegattaDB Pod runs with the settings from `spec.security`: non-root UID/GID, the seccomp profile, and `allowPrivilegeEscalation`, as configured. Pods do not mount a Kubernetes `ServiceAccount` token, because RegattaDB itself never calls the Kubernetes API. The operator's own namespaced permissions let it manage the resources described throughout this section: Services, StatefulSets, ConfigMaps, the credentials Secret, and your `RegattaCluster` status. Its only access outside that namespace is the cluster-scoped read-only permission described in [Prerequisites](../prerequisites.mdx) and [Installation](../installation.mdx). The initial RegattaDB administrator credentials, stored in a Secret named like `my-regattadb-credentials`, are deterministic rather than randomly generated per installation. Read them from that Secret rather than assuming a fixed value, and handle it with the same care as any other credential in your Kubernetes cluster. Never print the contents of the credentials Secret while troubleshooting. # Storage Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/configuration/storage Configure RDB block storage, repo and log storage, and raw block device access. ## Configure RDB replicas and storage | Field | Required/default | Immutable | Description | | - | - | - | - | | `spec.rdb.replicas` | Required; minimum `1` | Yes | The number of RDB Pods. Decide this before creating your `RegattaCluster` resource | | `spec.rdb.devices` | `1`; minimum `1` | Yes | The number of raw block devices given to every RDB Pod | | `spec.rdb.service.type` | `ClusterIP` | No | How the aggregate RDB Kubernetes Service (the Service that selects every RDB Pod together) is exposed. `ClusterIP` keeps it reachable only from inside your Kubernetes cluster. `LoadBalancer` additionally requests an externally reachable address; this is optional, and the resulting address is shared/load-balanced across every RDB Pod, not reserved for one client - see [Networking](./networking.mdx) | | `spec.rdb.service.port` | `spec.rdb.port` | No | The port RegattaDB clients connect to on the aggregate RDB Kubernetes Service, for database queries. It defaults to `spec.rdb.port`, but unlike `spec.rdb.port` (immutable), you can change it later: it only changes the Service's exposed port, not the port RDB listens on inside the container | | `spec.rdb.service.loadBalancerSourceRanges` | Optional | No | CIDR blocks allowed to reach the aggregate RDB Service when `spec.rdb.service.type` is `LoadBalancer`; ignored for `ClusterIP`. Enforcement depends on your cluster's LoadBalancer integration - GKE enforces it as a firewall rule, but behavior varies by cloud provider and on-prem controller, so verify it actually restricts traffic on your platform before relying on it | | `spec.rdb.blockStorage.size` | Required | Cannot change | Capacity of each raw block device; must resolve to more than 0 bytes | | `spec.rdb.blockStorage.storageClassName` | Optional | Cannot change | `StorageClass` that provisions the raw block devices dynamically. If omitted, Kubernetes uses your cluster's default `StorageClass`, if one is set; otherwise the PVCs stay `Pending` | | `spec.rdb.blockStorage.accessModes` | `[ReadWriteOnce]` | Cannot change | Access modes requested for each raw block device. `ReadWriteOncePod` must be used alone | | `spec.rdb.blockStorage.provisioning` | `Dynamic` | Cannot change | `Dynamic` provisions devices from the named `StorageClass`. `Static` binds to `PersistentVolumes` you pre-create; see [Choosing dynamic or static RDB storage](#choosing-dynamic-or-static-rdb-storage) below | | `spec.rdb.blockStorage.selector` | Required for `Static`; rejected for `Dynamic` | Cannot change | Selector (`matchLabels`/`matchExpressions`) matching the `PersistentVolumes` to bind, when using `Static` provisioning | Every setting under `spec.rdb.blockStorage` is fixed once your `RegattaCluster` resource is created, because Kubernetes does not allow changing a StatefulSet's storage templates. Choose these values carefully up front. * `accessModes` is a list mainly so you can request `ReadWriteOncePod` instead of the default `ReadWriteOnce`. `ReadWriteOncePod` restricts the volume to exactly one Pod cluster-wide, stricter than `ReadWriteOnce` (which technically still permits multiple Pods on the same Kubernetes node); some customers prefer it for raw block storage. `ReadOnlyMany` and `ReadWriteMany` are part of the underlying Kubernetes API but are not meaningful choices here - RDB's raw block storage is always single-writer, one device per Pod. * Every RDB Pod can be given more than one raw block device: set `spec.rdb.devices` to the total device count per Pod. All devices on an RDB Pod share the same `spec.rdb.blockStorage` settings; there is no per-device size or `StorageClass`. Device indexes start at `0`: the first device is `/dev/rdb0`, the second is `/dev/rdb1`, and so on. A `RegattaCluster` with `spec.rdb.replicas: 3` and `spec.rdb.devices: 2` creates 6 raw block PVCs in total (2 per RDB Pod): ```yaml theme={null} rdb: replicas: 3 devices: 2 blockStorage: size: 500Gi storageClassName: ``` ### Choosing dynamic or static RDB storage In short: use `Dynamic` if your cluster has a `StorageClass` that provisions raw block volumes on demand, and use `Static` if your raw block storage is provisioned outside Kubernetes (for example pre-attached local disks) or your environment does not support dynamic block provisioning. `spec.rdb.blockStorage.provisioning` selects how Kubernetes obtains the raw block `PersistentVolumes` for RDB: * `Dynamic` (the default): a `StorageClass`, named in `spec.rdb.blockStorage.storageClassName`, provisions a new `PersistentVolume` for every raw block PVC on demand. Use this when your Kubernetes cluster has a `StorageClass` that supports `volumeMode: Block`. Do not set `spec.rdb.blockStorage.selector` with `Dynamic` provisioning: Kubernetes never dynamically provisions a `PersistentVolumeClaim` that has a selector, so the PVC would stay `Pending` indefinitely; the operator rejects this combination up front instead. * `Static`: you pre-create the `PersistentVolumes` yourself, and `spec.rdb.blockStorage.selector` (`matchLabels` or `matchExpressions`) tells the operator which ones to bind. Use this when your raw block storage is provisioned outside Kubernetes, for example pre-attached local disks, or your environment does not allow dynamic provisioning for raw block storage. With `Static` provisioning, you need at least `spec.rdb.replicas * spec.rdb.devices` `PersistentVolumes` that match the selector, `StorageClass`, requested access modes, `volumeMode: Block`, and requested capacity, and that are available or already bound to your claims. The cluster-scoped read-only permission you installed in [Installation](../installation.mdx) lets the operator check these conditions before applying resources, so problems surface early. If that permission is ever missing or denied, the operator skips this check and relies on normal PVC binding as the readiness signal instead. See [Example: Two Local NVMe Devices, One RDB Replica](../examples/static-storage-local-nvme.mdx) for a full walkthrough of static provisioning. ## Configure repo and log storage `spec.repoStorage` and `spec.logs` are Pod-level settings, applying equally to the SM Pod and every RDB Pod. `spec.repoStorage` backs RegattaDB's mutable runtime repository paths. `spec.logs` backs RegattaDB's own log output at `/var/log/regatta`. See [Prepare For Deployment](https://docs.regatta.dev/self-hosted-deployment/manual-deployment/prepare-for-deployment) for the underlying storage-sizing guidance this maps to. Neither field has a default size - you must size both for your workload; `storageClassName` falls back to your cluster's default `StorageClass` if omitted. | Field | Required/default | Immutable | Description | | - | - | - | - | | `spec.repoStorage.size` | Required | Cannot change | Filesystem capacity for RegattaDB's mutable repository paths, on every Pod; must resolve to more than 0 bytes | | `spec.repoStorage.storageClassName` | Optional | Cannot change | `StorageClass` for repository storage. If omitted, Kubernetes uses your cluster's default `StorageClass`, if one is set; otherwise the PVCs stay `Pending` | | `spec.repoStorage.accessModes` | `[ReadWriteOnce]` | Cannot change | Access modes requested for the repository storage. `ReadWriteOncePod` must be used alone | | `spec.logs.size` | Required | Cannot change | Filesystem capacity for `/var/log/regatta`, on every Pod; must resolve to more than 0 bytes | | `spec.logs.storageClassName` | Optional | Cannot change | `StorageClass` for log storage. If omitted, Kubernetes uses your cluster's default `StorageClass`, if one is set; otherwise the PVCs stay `Pending` | | `spec.logs.accessModes` | `[ReadWriteOnce]` | Cannot change | Access modes requested for the log storage. | Storage size, `StorageClass`, and access modes for `spec.repoStorage` and `spec.logs` cannot change once your `RegattaCluster` resource is created, for the same reason as `spec.rdb.blockStorage`. Choose these values carefully up front. ## Multiple RDB devices: naming and readiness Every raw block device on an RDB Pod is backed by its own `PersistentVolumeClaim`, generated from the claim-template name, the RDB StatefulSet name, and the Pod ordinal. For a `RegattaCluster` named `my-regattadb`, device `0` of RDB Pod `0` produces the PVC `rdb-block-0-my-regattadb-rdb-0`; device `1` of the same Pod produces `rdb-block-1-my-regattadb-rdb-0`, and so on. Storage readiness requires every one of these PVCs, for every RDB Pod, to be bound before RegattaDB is configured. An RDB Pod with `spec.rdb.devices: 2` stays pending until both of its raw block PVCs are bound, not just one. ## Non-root access to raw block devices RDB Pods run as the non-root user and group configured in [`spec.security`](./security-and-lifecycle.mdx) (UID `1000`/GID `1001` by default) and additionally receive Linux supplemental group `6`, the conventional `disk` group on most Linux distributions, so that user can open the raw block devices without running as root. The SM Pod does not receive this supplemental group, because it has no raw block devices. Whether group `6` actually grants access depends on which Linux group your storage and container runtime assign to the device node inside the Pod. For deterministic, non-root device ownership, configure your container runtime to derive device ownership from the Pod's security context: set `device_ownership_from_security_context = true` under containerd, or the equivalent option under `[crio.runtime]` for CRI-O. Validate this on one RDB Pod, for example by checking device ownership inside the Pod, before relying on it for production. # Quickstart: Single-Node RegattaCluster Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/examples/quickstart-single-node Install the operator and stand up a single-node RegattaDB deployment on Kubernetes end to end. This page walks you through creating your first `RegattaCluster` resource. Make sure you've completed [Installation](../installation.mdx) first: the operator must already be running in your cluster. ## 1. Create a RegattaCluster resource A minimal `RegattaCluster` resource looks like this: ```yaml theme={null} apiVersion: regatta.dev/ kind: RegattaCluster metadata: name: my-regattadb namespace: spec: version: "" image: repository: registry.example.com/regatta tag: "" security: runAsUser: 1000 runAsGroup: 1001 fsGroup: 1001 rdb: replicas: 3 blockStorage: size: 60Gi repoStorage: size: 5Gi logs: size: 5Gi ``` Save it to a file under `config/examples/`, for example `config/examples/regatta-minimal.yaml`. See [Configuration Overview](../configuration/overview.mdx) for what every field means. ## 2. Apply and verify ```sh theme={null} kubectl -n apply -f config/examples/regatta-minimal.yaml kubectl -n get rgc kubectl -n get rgc my-regattadb -o yaml ``` You can also list every resource the operator generated in one command: ```sh theme={null} kubectl -n get statefulsets,services,configmaps,secrets,pods,pvc \ -l app.kubernetes.io/instance=my-regattadb ``` A new `RegattaCluster` resource does not become `Ready` immediately: Kubernetes must provision storage and start Pods before the operator can configure and start RegattaDB through the System Manager. Track `status.conditions` (see [Reading RegattaCluster Status](../operations.mdx#reading-regattacluster-status)) until you see `Ready` reported as `True`, rather than expecting readiness right away. ## Next steps * [Operations](../operations.mdx) to understand how the operator keeps Kubernetes and RegattaDB in sync, and what you can safely change afterward. * [Example: Two Local NVMe Devices, One RDB Replica](./static-storage-local-nvme.mdx) for a static-storage walkthrough. * [Troubleshooting](../troubleshooting.mdx) if your `RegattaCluster` resource doesn't reach `Ready`. # Example: Two Local NVMe Devices, One RDB Replica Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/examples/static-storage-local-nvme Bind pre-existing local NVMe devices to RDB using static RDB storage provisioning. This walks through binding two pre-existing local NVMe devices to a single RDB replica end to end (`spec.rdb.replicas: 1`, `spec.rdb.devices: 2`). See [Choosing dynamic or static RDB storage](../configuration/storage.mdx#choosing-dynamic-or-static-rdb-storage) for when to use static provisioning. ## 1. Identify the devices Identify the two raw block devices to dedicate to RDB, for example `/dev/nvme1n1` and `/dev/nvme2n1` on Kubernetes node `worker-1`. Do not format or mount them; RegattaDB manages them directly as raw block devices. ## 2. Create a `PersistentVolume` per device Create one `PersistentVolume` per device, each pinned to the node that has the device attached: ```yaml theme={null} apiVersion: v1 kind: PersistentVolume metadata: name: rdb-nvme-0 labels: regatta.dev/cluster: my-regattadb spec: capacity: storage: 2Ti volumeMode: Block accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-nvme local: path: /dev/nvme1n1 nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - worker-1 --- apiVersion: v1 kind: PersistentVolume metadata: name: rdb-nvme-1 labels: regatta.dev/cluster: my-regattadb spec: capacity: storage: 2Ti volumeMode: Block accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-nvme local: path: /dev/nvme2n1 nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - worker-1 ``` A Kubernetes `local` volume needs no CSI driver or provisioner for static binding: Kubernetes mounts the given `path` directly on the node named in `nodeAffinity`. Because both `PersistentVolumes` are pinned to `worker-1`, Kubernetes also schedules the RDB Pod on `worker-1`, since that is the only node where both devices exist. `capacity.storage` is required by the Kubernetes `PersistentVolume` API itself; it is Kubernetes' own bookkeeping value for matching `PersistentVolumeClaims` to `PersistentVolumes`, and does not resize or limit the underlying device - RegattaDB uses the raw device directly regardless of this value. If you have raw devices on more than one Kubernetes node, repeat this pattern once per node: one pair of `PersistentVolumes` (pinned through `nodeAffinity`) for every node that has its own local devices. ## 3. Point your RegattaCluster resource at these `PersistentVolumes` ```yaml theme={null} rdb: replicas: 1 devices: 2 blockStorage: provisioning: Static size: 2Ti storageClassName: local-nvme selector: matchLabels: regatta.dev/cluster: my-regattadb ``` ## 4. Apply and verify Apply the `PersistentVolumes`, then apply your `RegattaCluster` resource. With `replicas: 1` and `devices: 2`, the operator expects `1 * 2 = 2` matching `PersistentVolumes`, exactly the two you created. Kubernetes binds one PVC to each `PersistentVolume`; which one binds to which device index is not something a shared selector lets you control directly, but for two identically sized devices on the same `StorageClass` this makes no difference to RegattaDB, since every device is used the same way. Both end up mounted in the single RDB Pod, as `/dev/rdb0` and `/dev/rdb1`. If you need deterministic control over which physical device becomes `/dev/rdb0` versus `/dev/rdb1`, pre-bind each `PersistentVolume` to its expected PVC name with `claimRef` instead of relying only on the selector; see [Multiple RDB Devices: Naming And Readiness](../configuration/storage.mdx#multiple-rdb-devices-naming-and-readiness) for the exact generated PVC names. `/dev/rdb0` and `/dev/rdb1` are fixed, operator-assigned paths inside the container; they do not depend on how the host enumerates its own raw devices, so they stay stable across Pod restarts and node reboots. # Installation Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/installation Extract the release package, import images into your registry, and install the Regatta operator on your cluster. Make sure you've read [Prerequisites](./prerequisites.mdx) first. This page covers extracting the release package, importing its images into your own registry, and installing the Regatta operator. ## The release package You receive a single archive: ```text theme={null} regatta-k8s--.tar.gz ``` It contains everything you need to import RegattaDB and the operator into your own environment and install them on Kubernetes: * The RegattaDB workload image (the container that runs RegattaDB itself). * The Regatta operator image. * The Kubernetes API definition (CRD) for `RegattaCluster`. * The operator's Kubernetes identity and permissions. * The operator Deployment. * RegattaDB deployment examples you can edit. * `README.md`. * Licensing and third-party attribution files. * Release metadata and integrity checksums. Extracting the archive gives you the following layout: ```text theme={null} regatta-k8s--/ ├── README.md ├── LICENSE ├── THIRD_PARTY_NOTICES ├── CHANGELOG.md ├── MANIFEST.json ├── SHA256SUMS ├── images/ │ ├── regatta-db--.tar │ └── regatta-operator--.tar └── config/ ├── crd/ │ └── regattacluster-crd.yaml ├── rbac/ │ ├── serviceaccount.yaml │ ├── role.yaml │ ├── rolebinding.yaml │ └── clusterrole-readonly.yaml ├── operator/ │ └── deployment.yaml └── examples/ ├── regatta-minimal.yaml ├── regatta-full.yaml └── regatta-static-storage.yaml ``` The rest of this page covers extracting the package and installing the operator using the `config/crd`, `config/rbac`, and `config/operator` files above. See [Configuration Overview](/self-hosted-deployment/kubernetes/configuration/overview) and [Storage](/self-hosted-deployment/kubernetes/configuration/storage) for how the `config/examples/` files are used when you create a `RegattaCluster` resource. ## 1. Extract and verify the package ```sh theme={null} tar -xzf regatta-k8s--.tar.gz cd regatta-k8s-- sha256sum --check SHA256SUMS ``` Do not continue if the checksum verification fails. ## 2. Import images into your registry 1. Import and push each image archive to your registry. The recommended tool is `skopeo`, because it copies an image archive directly into a registry without needing a local container runtime, and preserves the exact image digest instead of rebuilding the image. `docker load` and `podman load` followed by `docker push`/`podman push` also work with these archives if you prefer a tool you already have installed: ```sh theme={null} skopeo copy \ docker-archive:images/regatta-db--.tar \ docker://registry.example.com/regatta-db: skopeo copy \ docker-archive:images/regatta-operator--.tar \ docker://registry.example.com/regatta-operator: ``` 2. Record the digest your registry assigns to each uploaded image: ```sh theme={null} skopeo inspect docker://registry.example.com/regatta-db: \ --format '{{.Digest}}' skopeo inspect docker://registry.example.com/regatta-operator: \ --format '{{.Digest}}' ``` You will use these digests in the next step, as part of a full image reference such as: ```text theme={null} registry.example.com/regatta-operator@sha256:1a2b3c4d5e6f... ``` ## 3. Point the manifests at your registry 1. In `config/operator/deployment.yaml`, set the operator container image to your uploaded operator image and digest. 2. In the example you plan to use under `config/examples/`, set `spec.image` to your uploaded RegattaDB image and digest. 3. If your registry requires authentication, create a Kubernetes Secret of type `kubernetes.io/dockerconfigjson` in ``, then reference it in `imagePullSecrets` in `config/operator/deployment.yaml` for the operator image, and in `spec.image.pullSecrets` in your `RegattaCluster` example for the RegattaDB image. ## 4. Install the operator 1. Create the namespace: ```sh theme={null} kubectl create namespace ``` 2. Install the CustomResourceDefinition: ```sh theme={null} kubectl apply -f config/crd/regattacluster-crd.yaml ``` 3. Install the operator's Kubernetes identity and permissions: ```sh theme={null} kubectl -n apply -f config/rbac/serviceaccount.yaml kubectl -n apply -f config/rbac/role.yaml kubectl -n apply -f config/rbac/rolebinding.yaml ``` 4. Install the cluster-scoped read-only permission the operator needs. This is required so the operator can discover its configured namespace and the `RegattaCluster` resource type, and recover existing resources after a restart. The same permissions also let it validate static RDB `PersistentVolumes` and `StorageClasses` before applying resources: ```sh theme={null} kubectl apply -f config/rbac/clusterrole-readonly.yaml ``` Its default binding targets the `regatta-operator` `ServiceAccount` in the `regatta` namespace. If `` is not `regatta`, edit the `ClusterRoleBinding`'s subject namespace before applying it. 5. Install the operator Deployment: ```sh theme={null} kubectl -n apply -f config/operator/deployment.yaml ``` 6. Verify that the operator is running: ```sh theme={null} kubectl -n rollout status deployment/regatta-operator kubectl -n get pods -l app.kubernetes.io/name=regatta-operator,app.kubernetes.io/component=operator kubectl -n logs deployment/regatta-operator ``` The operator is running at this point, but RegattaDB itself does not exist yet: nothing runs RegattaDB until you apply a `RegattaCluster` resource. ## Next steps Continue to [Configuration Overview](/self-hosted-deployment/kubernetes/configuration/overview), or jump straight to the [Quickstart: Single-Node RegattaCluster](/self-hosted-deployment/kubernetes/examples/quickstart-single-node) to create your first `RegattaCluster` resource. # Introduction Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/introduction Deploy and operate RegattaDB on Kubernetes with the Regatta operator. This section assumes you're already familiar with the [RegattaDB software modules](/self-hosted-deployment/manual-deployment/regattadb-software-modules) (SM, SNA, GDD, DCM, Sequencer, RDB) and how they work together in a RegattaDB deployment. The **Regatta operator** is a Kubernetes controller that automates deploying and operating RegattaDB on Kubernetes. Instead of manually creating the Kubernetes resources RegattaDB needs, provisioning its storage, and issuing System Manager (SM) commands yourself, you describe the RegattaDB deployment you want in a single `RegattaCluster` resource and let the operator drive Kubernetes and RegattaDB into that state. ## Kubernetes Concepts You Will Use | Concept | What it means for this section | | - | - | | [Pod](https://kubernetes.io/docs/concepts/workloads/pods/) | Where one or more RegattaDB modules run together; see [Deployment Architecture](#deployment-architecture) below | | [Kubernetes node](https://kubernetes.io/docs/concepts/architecture/nodes/) | A physical or virtual machine that can run Pods. Kubernetes places Pods on nodes automatically | | [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) | Keeps a fixed, ordered set of Pods running with stable identities and their own storage. The operator creates one StatefulSet for the SM Pod and one for the RDB Pods | | [Service](https://kubernetes.io/docs/concepts/services-networking/service/) | A stable network name and address for one or more Pods, even as Pods restart or move between Kubernetes nodes | | [`PersistentVolumeClaim` (PVC)](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) | A request for storage that Kubernetes binds to an actual storage volume or device | | [Raw block volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#raw-block-volume-support) | A storage device given to a Pod directly, the same way you would give RegattaDB a raw block device in a manual deployment, without a filesystem in between | | [CustomResourceDefinition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) | Registers `RegattaCluster` (full name `regattaclusters.regatta.dev`, short names `regatta`/`rgc`, usable in place of `regattacluster` in `kubectl`) as a Kubernetes resource type, so Kubernetes can store, validate, and let the operator watch it | | [`spec`](https://kubernetes.io/docs/concepts/overview/working-with-objects/#object-spec-and-status) | The part of your `RegattaCluster` resource where you write the state you want; only you (and the operator's own defaults) ever set it | | [`status`](https://kubernetes.io/docs/concepts/overview/working-with-objects/#object-spec-and-status) | The part of your `RegattaCluster` resource where the operator reports the state it observed; never edit it yourself | | [Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) | The program that continuously watches your `RegattaCluster` resource and keeps Kubernetes and RegattaDB matching it | ## What the operator does for you * **Describes your deployment as a single Kubernetes resource**: the `RegattaCluster` resource captures the RegattaDB version, image, module settings, storage, and resource sizing you want. * **Creates and maintains the Kubernetes resources RegattaDB needs**: StatefulSets, Services, ConfigMaps, and storage claims, generated and kept in sync automatically. * **Configures and starts RegattaDB for you**: once Kubernetes resources are ready, the operator configures RegattaDB modules and starts or stops RegattaDB through the System Manager (SM). * **Reports readiness continuously**: Kubernetes and RegattaDB health are reflected in the `RegattaCluster` status, so you always know the current state. ## Deployment Architecture In a manual or RDT-driven RegattaDB deployment, you decide which node runs which modules: one SM, one SNA on every node that hosts an operational module, one GDD, one DCM, one Sequencer, and one or more RDB modules. On Kubernetes, a **Pod** is the unit that runs one or more RegattaDB modules together, the same role a node plays in a manual deployment. The operator places modules for you, using the following default layout: | Pod | Count | Modules running in this Pod | | - | - | - | | SM Pod | One per RegattaDB system | SM, SNA, GDD, DCM, Sequencer | | RDB Pod | One for every RDB replica you configure | SNA, RDB | RegattaDB Kubernetes Pod layout RegattaDB Kubernetes Pod layout Unlike a manual deployment, you do not choose per-Pod module placement here. The operator uses this default layout; the only placement decision you make today is how many RDB replicas to configure. Each Pod also gets one or more stable Kubernetes Services, giving it a fixed network address, similar to assigning a fixed internal IP address to each node in a manual deployment. The SM Pod has one Service, and every RDB Pod has its own dedicated Service, so its address does not change even if Kubernetes moves the Pod to a different Kubernetes node. A **Kubernetes node** is a physical or virtual machine in your Kubernetes cluster. It is a different concept from the node used in manual RegattaDB deployment guides: a single Kubernetes node can run many Pods at once, including Pods belonging to other applications, and Kubernetes decides which node each Pod runs on and can move a Pod to a different node later. You do not assign RegattaDB modules to specific Kubernetes nodes yourself, though you can influence which Kubernetes nodes the operator's Pods are eligible to run on using standard scheduling controls; see [Schedule Pods](/self-hosted-deployment/kubernetes/configuration/resources-and-scheduling#schedule-pods). ## How this section is organized * **[Prerequisites](/self-hosted-deployment/kubernetes/prerequisites)** and **[Installation](/self-hosted-deployment/kubernetes/installation)**: what your cluster needs, and how to install the operator. * [**Configuration**](/self-hosted-deployment/kubernetes/configuration/overview): the `RegattaCluster` spec reference, covering the object header, version and image, module settings, storage, networking, security and lifecycle, and resources and scheduling. * [**Examples**](/self-hosted-deployment/kubernetes/examples/quickstart-single-node): end-to-end walkthroughs, from a single-node quickstart to static RDB storage. * [**Operations**](/self-hosted-deployment/kubernetes/operations): how the operator keeps Kubernetes and RegattaDB in sync, reading status, and making supported changes. * [**Troubleshooting**](/self-hosted-deployment/kubernetes/troubleshooting) and [**Release Notes**](/self-hosted-deployment/kubernetes/release-notes). ## Next steps New to the Regatta operator? Start with [Prerequisites](/self-hosted-deployment/kubernetes/prerequisites) and [Installation](/self-hosted-deployment/kubernetes/installation), then follow the [Quickstart: Single-Node RegattaCluster](/self-hosted-deployment/kubernetes/examples/quickstart-single-node) to deploy RegattaDB end to end. # Operations Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/operations How the operator keeps Kubernetes and RegattaDB in sync, reading status, and making supported changes. ## How the operator keeps things in sync After you apply a `RegattaCluster` resource, the operator continuously works to bring Kubernetes and RegattaDB into the state you described: 1. It creates or updates the StatefulSets, Services, ConfigMaps, and Secret your `RegattaCluster` resource requires. 2. It waits until the storage your Pods requested is bound, and every Pod is running and ready. 3. Once Kubernetes is ready, it configures and starts, or stops, RegattaDB through the System Manager (SM), using the Service addresses Kubernetes created. 4. It writes what it observed, including readiness, endpoints, and RegattaDB health, back into your `RegattaCluster` resource's status, and repeats this cycle so any drift is corrected automatically, at least every five minutes even without any change. Kubernetes objects being healthy is necessary but not sufficient: your `RegattaCluster` resource only reports readiness once RegattaDB itself confirms, through the System Manager, that it is active and healthy. ## Reading RegattaCluster status `status` is owned by the operator; never edit it yourself. Useful fields: * `status.observedGeneration`: the most recent `spec` generation the operator has reconciled. If this lags behind `metadata.generation`, the operator has not caught up yet. * `status.endpoints.sm` and `status.endpoints.rdbs[]`: the Service names, DNS names, ClusterIPs, and ports the operator advertised to RegattaDB. RegattaDB clients and management tools should use these addresses from `status`; `spec` never contains live connection addresses, only your desired configuration. * `status.rdb`: `desiredReplicas`, `readyPods`, `configuredReplicas`, and `activeReplicas` - how many RDB Pods exist, are ready, are configured in RegattaDB, and are active. * `status.modules`: per-module role summaries (`total`/`active`/`down`), as RegattaDB itself reports them. * `status.devices`: raw block device health, with a `status`, a `healthy` flag, a `failed` list of device names that are not healthy, and an `items[]` list. Each item includes the device's `name`, `path`, `node`, and `module`. * `status.regatta`: the raw System Manager observation, including `systemState`, `healthy`, `desiredState`, and recent `actions`. ### Conditions `status.conditions` follows the standard Kubernetes condition shape (`type`, `status`, `reason`, `message`): | Condition | True means | False means | | - | - | - | | `Progressing` | Waiting for infrastructure to become ready, or a RegattaDB action was just issued and a follow-up check is scheduled | Steady state with nothing pending (`KubernetesResourcesApplied`), or a permanent error blocked reconciliation - check `Degraded` and this condition's `message` | | `StorageReady` | Every expected `PersistentVolumeClaim` exists and is bound (`StorageHealthy`) | No `PersistentVolumeClaims` observed yet (`WaitingForStorage`), or some are missing, unbound, or otherwise unhealthy (`PVCsNotBound`) | | `KubernetesReady` | Both StatefulSets are fully rolled out and every expected Pod is Running and Ready (`WorkloadsReady`) | Pods are not ready (`PodsNotReady`), or a StatefulSet has not rolled out (`WorkloadsNotReady`) | | `Ready` | RegattaDB itself, through the System Manager, confirms it is active and healthy, in addition to Kubernetes being ready | Kubernetes is not ready yet (`InfrastructureNotReady`), or Kubernetes is ready but SM has not confirmed active and healthy yet (`RegattaStatusPending`) | | `Degraded` | A permanent error blocked reconciliation - for example, reason `ValidationFailed` for spec values only caught at reconcile time; check the condition's `message` for the cause | Normal operation, including a `RegattaCluster` resource you deliberately stopped (`spec.lifecycle.start: false`), which is not treated as degraded | | `RegattaStopped` | Present only when `spec.lifecycle.start: false`. SM confirms RegattaDB is stopped | The stop is still in progress (`RegattaStopping`) | `Ready=True` always requires both Kubernetes readiness and SM-confirmed RegattaDB health together; Kubernetes readiness alone is never enough. ## Making supported changes Once your `RegattaCluster` resource exists, a small set of fields remain mutable, though some have side effects worth planning for: * `spec.image` (`tag`, `digest`, `pullPolicy`, `pullSecrets`), as long as `spec.version` stays the same. The operator applies this as a same-version rolling update - see [Configure Version And Image](./configuration/overview.mdx#configure-version-and-image) for what that means and what you can/cannot control. * `config` on any module. Note that changing it restarts the Pod or Pods that host the affected module. * `spec.rdb.service.type` and `spec.rdb.service.port` (the aggregate RDB Service's own type and exposed port) only affect that Service object. RDB's actual container port stays fixed, and Kubernetes forwards the externally exposed port to it correctly, so both are always safe to change. * `spec.lifecycle.start`: set to `false` to stop RegattaDB while keeping Kubernetes Pods running, and back to `true` to start it again. Every other field covered in [Configuration](./configuration/overview.mdx), including `spec.version`, `spec.rdb.replicas`, `spec.rdb.devices`, module `port`/`service_port`/`num_threads`/`ram_MB`, and every storage setting, is immutable once your `RegattaCluster` resource is created. ## Deleting a RegattaCluster Delete the resource like any other Kubernetes object: ```sh theme={null} kubectl -n delete rgc my-regattadb ``` Deletion: 1. Makes a bounded attempt, up to 30 seconds, to stop RegattaDB through the System Manager if it is running. 2. Continues even if that stop attempt fails, recording a warning Event instead of blocking. 3. Deletes the generated StatefulSets, Services, ConfigMaps, and the credentials Secret. 4. Leaves every `PersistentVolumeClaim` in place, so your data is not deleted along with the `RegattaCluster` resource. If you are certain the data is no longer needed, delete the retained PVCs explicitly: ```sh theme={null} kubectl -n delete pvc \ -l app.kubernetes.io/name=regatta,app.kubernetes.io/instance=my-regattadb,app.kubernetes.io/managed-by=regatta-operator ``` # Prerequisites Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/prerequisites What you need before installing the Regatta operator and deploying RegattaDB on Kubernetes. Before you start, make sure you have: * Access to a Kubernetes cluster, with a `kubeconfig` that can create namespaces and install a CustomResourceDefinition, RBAC, and a Deployment. * A namespace to install into. This section uses `` as a placeholder for the Kubernetes namespace where you want the operator and RegattaDB to run. * A registry reachable from every Kubernetes node that will run RegattaDB or the operator, and any credentials it requires for image pulls. * Enough CPU and RAM on your Kubernetes nodes for the SM Pod and every RDB Pod you plan to run (see [Deployment Architecture](/self-hosted-deployment/kubernetes/introduction#deployment-architecture)). * Filesystem storage for RegattaDB's repo and log directories, through a `StorageClass` or pre-created `PersistentVolumes`. * Raw block storage for RDB, through a `StorageClass` or pre-created `PersistentVolumes` that support Kubernetes `volumeMode: Block`. RDB always uses raw block storage. This is not limited to local physical disks: any `StorageClass` or CSI driver that can present a raw block device works, including SAN, NVMe-oF, and distributed-filesystem vendor drivers that provision block-mode volumes backed by their own storage. Non-root access to raw devices, including any container-runtime configuration it requires, is covered in [Storage](/self-hosted-deployment/kubernetes/configuration/storage). ## Next steps Once prerequisites are met, continue to [Installation](/self-hosted-deployment/kubernetes/installation). # Release Notes Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/release-notes Changes, fixes, and known limitations for each Regatta operator release. ## \[26.1.0] - 2026-09-16 * Module-to-Pod placement is fixed: SM, SNA, GDD, DCM, and Sequencer always run together in one SM Pod, and SNA and RDB always run together in each RDB Pod. There is no supported way to configure a different placement. * Changing a module's `config` settings is not a live update: it restarts the Pod or Pods that host the affected module. * `spec.rdb.service.type: LoadBalancer` exposes a single external address shared by every RDB replica; it does not provide per-replica external routing. A client that needs to reach a specific RDB Pod directly must do so from inside your Kubernetes cluster. * The operator configures RegattaDB with its default administrator account - the account RegattaDB itself uses to authenticate and manage the database, separate from any Kubernetes or operator credential. There is no current support for custom database credentials. * SM's Service is always `ClusterIP`, with no built-in, operator-managed way to expose it outside your Kubernetes cluster. This is not the same as SM being technically unreachable from outside the cluster: you can create your own additional Service (or use `kubectl port-forward`) pointed at the SM Pod yourself - the operator just does not provide, manage, or secure one for you, and doing so is your own responsibility. # Troubleshooting Source: https://docs.regatta.dev/self-hosted-deployment/kubernetes/troubleshooting Diagnose a RegattaCluster resource that isn't reaching Ready. Start with the resource's own status and Events: ```sh theme={null} kubectl -n describe rgc my-regattadb kubectl -n get events --sort-by=.lastTimestamp ``` The issues below are ordered by how the operator brings a `RegattaCluster` resource up: work through them in order, since later ones only make sense once the earlier conditions pass. ## The resource is rejected on `apply` The CRD schema or an immutability rule rejected your change before the operator ever saw it. **Solution:** check the error Kubernetes printed; it names the field to fix. ## `StorageReady` is `False` Kubernetes hasn't bound all the storage your `RegattaCluster` resource needs yet. **Solution:** check the `PersistentVolumeClaims`, `PersistentVolumes`, and `StorageClasses` involved: ```sh theme={null} kubectl -n get pvc -l app.kubernetes.io/instance=my-regattadb kubectl -n describe pvc ``` ## `KubernetesReady` is `False` One or both StatefulSets haven't finished rolling out, or their Pods aren't Running and Ready yet. **Solution:** check StatefulSet rollout and Pod scheduling, image pulls, init containers, and readiness: ```sh theme={null} kubectl -n rollout status statefulset/my-regattadb-sm kubectl -n rollout status statefulset/my-regattadb-rdb kubectl -n get pods -l app.kubernetes.io/instance=my-regattadb kubectl -n describe pod ``` ## `StorageReady` and `KubernetesReady` are `True`, but `Ready` is still `False` Kubernetes is healthy; RegattaDB itself is not confirmed healthy yet. **Solution:** check `status.regatta`, `status.modules`, and `status.devices`, and the operator's own logs: ```sh theme={null} kubectl -n logs deployment/regatta-operator ``` Never print the contents of the credentials Secret while troubleshooting; nothing in it is needed to diagnose any of these conditions. See [Reading RegattaCluster Status](./operations.mdx#reading-regattacluster-status) for what each condition and status field means. # Deployment Example Source: https://docs.regatta.dev/self-hosted-deployment/manual-deployment/deployment-example This page walks through the deployment of a 10-Node RegattaDB system. ### Step 1: Node Identification and IP Assignment In this example, the cluster nodes are assigned the following RegattaDB modules: * **Node01** – Hosts the **SM**, **GDD**, **DCM**, and **Sequencer** modules, along with its local **SNA** and **RDB** modules. The node hosting the **SM** is commonly referred to as the *Management Node*. * **Node02–Node10** – Each node hosts an **SNA** module and an **RDB** module. Identify the nodes that will participate in the RegattaDB system. For each node, define: * An internal IP address for cluster communication. * An external IP address for client application access (if applicable). For this deployment, we will use the following IP assignments: * **Node01** * Internal: `10.0.0.1` * External: `192.168.1.101` * **Node02–Node10** * Internal: `10.0.0.2`–`10.0.0.10` * External: `192.168.1.102`–`192.168.1.110` The module communication and service ports will use the default port assignments described in the [Prepare for Deployment](/self-hosted-deployment/manual-deployment-copied-1/prepare-for-deployment#ip-assignment) guide. ### Step 2: Software Installation (RPM Deployment) Install the required RPM packages on each node according to its assigned role, following the instructions in the [**Prepare for Deployment**](/self-hosted-deployment/manual-deployment-copied-1/prepare-for-deployment#install-the-rpm-packages) guide. For this deployment we will be using the default `regatta` user as the deployment user. ### Step 3: Start the Management Services Start the **SM** service on **Node01** and the **SNA** service on every node in the cluster. #### Start the SM service On **Node01**, run: ```shellscript theme={null} sudo systemctl start regatta-26.0-sm.service ``` #### Start the SNA services On **Node01** through **Node10**, run: ```shellscript theme={null} sudo systemctl start regatta-26.0-sna.service ``` #### Verify the services Verify that the services are running by checking their status with `systemctl`: ```shellscript theme={null} systemctl status regatta-26.0-sm.service ``` Expected output: ```shellscript theme={null} ● regatta-26.0-sm.service - The Regatta sm service Loaded: loaded (/usr/lib/systemd/system/regatta-26.0-sm.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2026-07-19 00:06:51 IDT; 35min ago Main PID: 158236 (regatta_sm) Tasks: 27 (limit: 203820) Memory: 256.0M ``` Likewise, verify the SNA service: ```shellscript theme={null} systemctl status regatta-26.0-sna.service ``` Expected output: ```shellscript theme={null} ● regatta-26.0-sna.service - The Regatta sna service Loaded: loaded (/usr/lib/systemd/system/regatta-26.0-sna.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2026-07-19 00:06:52 IDT; 37min ago Main PID: 158366 (regatta_sna) Tasks: 94 (limit: 203820) Memory: 12.4G ``` ### Step 4: Connect to the System Before continuing with the deployment, you need a client capable of connecting to the RegattaDB system and executing SQL management commands. In this example, we will use the RegattaDB CLI, which is included in the deployment package. However, any supported RegattaDB client can be used. For information about the available clients, drivers, and integrations, refer to the [**Drivers & Clients**](/drivers-and-clients/connecting-applications-to-regatta) section. #### Connection Parameters To connect to the database, you will need: * A RegattaDB username and password. * The address of the **SM** service in the format `:`. The **SM** can be reached using any of the following addresses: * **Internal IP:** `10.0.0.1` * **External IP:** `192.168.1.101` * **Localhost:** `127.0.0.1` (when running the client on the SM node) The **SM** listens on the default communication port: * **Port:** `8840` For this deployment, we will use the default administrator credentials created during installation. The default connection parameters: * **Username:** `admin` * **Password:** `RegattaDefault1234!` * **URL:** `10.0.0.1:8840` Please replace the default password immediately after deployment is completed. #### Start the RegattaDB CLI Run the CLI: ```shellscript theme={null} /opt/regatta//clients/cli/bin/client_cli ``` The CLI prompt is displayed: ```shellscript theme={null} rdb> ``` Connect to the database: ```shellscript theme={null} rdb>\connect user=admin pass=RegattaDefault1234! url=10.0.0.1:8840 ``` If the connection is successful, the CLI displays: ```shellscript theme={null} Successfully connected to RegattaDB system ``` You are now connected to RegattaDB and can execute SQL statements as well as RegattaDB management commands. The remaining deployment steps assume you are connected to the database through the [RegattaDB CLI](/drivers-and-clients/regatta-cli). For a complete reference of the SQL management commands, see the [**System Management SQL Specification**.](/sql/system-monitoring/system-management/system-state) ### Step 5: Enter the SETUP State Transition the system to the **SETUP** state. In this state, configuration changes are permitted, allowing you to define the cluster infrastructure, storage, and module assignments. ```sql theme={null} MANAGE SYSTEM ENTER SETUP; ``` ### Step 6: Define the Cluster Infrastructure Register the deployment nodes with the cluster by assigning each node a unique name and its corresponding internal and external network addresses. For example, register **Node01**: ```sql theme={null} MANAGE NODE ADD ( NAME "Node01", NETWORK ( (INTERNAL IP "10.0.0.1") (EXTERNAL IP "192.168.1.101") ) ); ``` Then register **Node02**: ```sql theme={null} MANAGE NODE ADD ( NAME "Node02", NETWORK ( (INTERNAL IP "10.0.0.2") (EXTERNAL IP "192.168.1.102") ) ); ``` Repeat this step for **Node03** through **Node10**, updating the node name and IP addresses accordingly. ### Step 7: Provision Storage In this example, each cluster node is configured with two dedicated storage devices. This step assumes that the storage devices have already been assigned the appropriate ownership and permissions for the RegattaDB deployment user, as described in the [**Prepare for Deployment**](/self-hosted-deployment/manual-deployment-copied-1/prepare-for-deployment#storage-devices) guide. Register the storage devices for each node by specifying a unique name and the local device path. ```sql theme={null} MANAGE STORAGE DEVICE ADD ( NODE "Node01", NAME "Node01_Disk1", PATH "/dev/nvme0n1" ); MANAGE STORAGE DEVICE ADD ( NODE "Node01", NAME "Node01_Disk2", PATH "/dev/nvme1n1" ); MANAGE STORAGE DEVICE ADD ( NODE "Node02", NAME "Node02_Disk1", PATH "/dev/nvme0n1" ); MANAGE STORAGE DEVICE ADD ( NODE "Node02", NAME "Node02_Disk2", PATH "/dev/nvme1n1" ); ``` Repeat this step for **Node03** through **Node10**, updating the node name, storage device name, and device path as appropriate. ### Step 8: Add the Operational Modules Register the RegattaDB modules by assigning them to their designated nodes, network endpoints, and, for **RDB** modules, the appropriate storage devices. **Important:** Always provision the **RDB** modules after provisioning all other modules. This ensures that memory is first allocated to the non-RDB modules, allowing each **RDB** module to utilize the maximum amount of remaining memory available on its host node. #### Add the non-RDB Modules Run the following commands to add the **DCM**, **Sequencer**, and **GDD** modules on **Node01**. ```sql theme={null} MANAGE MODULE ADD ( NODE "Node01", NAME "DCM_1", ROLE DCM, NETWORK ( (INTERNAL IP "10.0.0.1") (EXTERNAL IP "192.168.1.101") ) ); MANAGE MODULE ADD ( NODE "Node01", NAME "SEQ_1", ROLE SEQUENCER, NETWORK ( (INTERNAL IP "10.0.0.1") (EXTERNAL IP "192.168.1.101") ) ); MANAGE MODULE ADD ( NODE "Node01", NAME "GDD_1", ROLE GDD, NETWORK ( (INTERNAL IP "10.0.0.1") (EXTERNAL IP "192.168.1.101") ) ); ``` #### Add the RDB Modules After all management modules have been added successfully, add an **RDB** module on each node (**Node01** through **Node10**). We use the module name `RDB_1` for the local **RDB** instance on each node. ```sql theme={null} MANAGE MODULE ADD ( NODE "Node01", NAME "RDB_1", ROLE RDB, STORAGE_DEVICE ( "Node01_Disk1", "Node01_Disk2" ), NETWORK ( (INTERNAL IP "10.0.0.1") (EXTERNAL IP "192.168.1.101") ) ); ``` Repeat this step for **Node02** through **Node10**, updating the node name, storage device names, and network addresses as appropriate. ### Step 9: Exit the SETUP State and Activate the System Finalize the deployment by exiting the **SETUP** state and starting the system. Once the system is running, verify that all modules have been provisioned successfully and that the database has reached the **ACTIVE** state. ```sql theme={null} MANAGE SYSTEM EXIT SETUP; MANAGE SYSTEM START; MANAGE SYSTEM SHOW; ``` Expected output: ```shellscript theme={null} regatta > MANAGE SYSTEM SHOW; statement executed successfully | STATE | ---------- | Active | ``` **Your RegattaDB system is now fully deployed and ready for use.** # High-Level Deployment Steps Source: https://docs.regatta.dev/self-hosted-deployment/manual-deployment/high-level-deployment-steps The deployment of a RegattaDB system follows the sequence below. This overview assumes that you have already completed the [**Prepare for Deployment**](/self-hosted-deployment/manual-deployment-copied-1/prepare-for-deployment) guide and provisioned your environment accordingly. The following sections summarize the deployment workflow. The next page provides a detailed, step-by-step deployment example covering the entire process. During the deployment process, you will use SQL management commands to communicate with the **SM**. For a complete reference of the SQL management commands, see the [**System Management SQL Specification**.](/sql/system-monitoring/system-management/system-state) ### Identify the Deployment Nodes Identify the nodes that will host the RegattaDB modules. For each node, prepare: * Internal IP addresses for cluster communication. * External IP addresses for client application access (if required). ### Deploy the SM RegattaDB uses a single **SM** (System Manager) module. * Select the node that will host the **SM**. * Install the **SM** package. * Start the **SM** service. ### Deploy the SNA Deploy an **SNA** on every node that will host one or more Operational Modules. * Install the **SNA** package. * Start the **SNA** service. ### Plan Module Placement Determine which Operational Modules will run on each node. A single node may host one or more modules. Each deployment requires: * Exactly one **DCM** * Exactly one **Sequencer** * Exactly one **GDD** * One or more **RDB** modules ### Install the Operational Modules Install the RPM packages corresponding to the assigned module roles on each node. ### Enter SETUP State Install the RegattaDB CLI, which is included in the software package. The CLI may be installed on any node that has network connectivity to the **SM**. Transition the system from the **DOWN** state to the [**SETUP**](/sql/system-management/system-states-and-commands#system-enter-setup) state to enable configuration operations. ### Define the Infrastructure Register the cluster nodes using their host names and configured IP addresses. ### Configure Storage [Register the storage devices](/sql/system-management/storage-devices) assigned to each node by specifying a unique name and the local device path for each storage device. ### Add the Operational Modules [Register each module](/sql/system-management/modules#module-add), assign it to its designated node, and associate it with the appropriate storage device. By default, RegattaDB automatically allocates memory according to the requirements of each module. Because the **RDB** is designed to consume all remaining available memory, it should always be provisioned **after** the other modules. This ensures it receives the memory that remains after the fixed allocations for the other modules have been reserved. Although RegattaDB supports manual memory allocation on a per-module basis, the default allocation should be used unless your sizing analysis requires otherwise. ### Exit SETUP State Transition the system back to the [**DOWN**](/sql/system-management/system-states-and-commands#system-exit-setup) state to finalize and lock the deployment configuration. ### Activate the System [Start the system](/sql/system-management/system-states-and-commands#system-start) to transition it to the **ACTIVE** state. During this step, the Operational Modules are started and begin accepting client connections. # Prepare for Deployment Source: https://docs.regatta.dev/self-hosted-deployment/manual-deployment/prepare-for-deployment ## Deployment Planning The first step is defining your deployment topology. The optimal topology depends on your workload profile, performance objectives, and storage requirements. RegattaDB supports a wide range of deployment configurations, allowing the system to be tailored to your specific requirements. General deployment guidelines: * Management Modules * **SM** - Deploy a single SM module for every RegattaDB system * **SNA** - Deploy one agent on every node that hosts at least one Operational Module * Operational Modules * **GDD**, **DCM**, **Sequencer** - Deploy one instance of each module per RegattaDB system * **RDB** - Deploy at least one RDB module per RegattaDB system Below are several common configurations. #### Single Node A single-node deployment consists of a single server hosting all RegattaDB modules: IMG 0279 IMG 0279 #### Multi-Node – Classic The most common multi-node deployment uses the following topology: * One node hosts all RegattaDB modules, as in a single-node deployment. * All additional nodes host both the **RDB** and **SNA** modules. IMG 0280 IMG 0280 #### Multi-Node – Custom An example of a custom multi-node deployment, which may be common in large-scale deployments. Here module placement is spread across dedicated nodes instead of following the classic layout: * One node hosts **SM**, **SNA**, **DCM**, and **GDD**. * A second node hosts **SNA** and **Sequencer**. * Every additional node (scale-out nodes) hosts **RDB** and **SNA**. RegattaDB custom multi-node deployment RegattaDB custom multi-node deployment For guidance on sizing and configuring your RegattaDB deployment, refer to **Best Practices** or contact Regatta Support for assistance. ### **Provision the Deployment Nodes** Next, provision the nodes that will host your RegattaDB deployment, ensuring that each node meets the minimum hardware, storage, networking, and software [prerequisites](/self-hosted-deployment/prerequisites). The exact hardware requirements depend on your deployment topology and workload characteristics. For guidance on sizing your deployment, refer to Best Practices or contact Regatta Support for assistance. ### Download the RegattaDB Software Next, download the RegattaDB software package. RegattaDB is distributed as a set of RPM packages, each corresponding to a specific module or utility. Copy the required RPM packages to the nodes on which they will be installed according to your planned deployment topology. The following example shows the contents of a RegattaDB software package. #### Deployment Software Each of the RPM packages below corresponds to one of the six RegattaDB modules. ```shellscript theme={null} regatta-dcm-.el8.x86_64.rpm regatta-gdd-.el8.x86_64.rpm regatta-rdb-.el8.x86_64.rpm regatta-sequencer-.el8.x86_64.rpm regatta-sm-.el8.x86_64.rpm regatta-sna-.el8.x86_64.rpm ``` ### EULA Acceptance Before deploying RegattaDB, you must read and accept the **Regatta End User License Agreement (EULA**). Acceptance of the EULA is integrated into the RPM installation process and is required before the installation can be completed. * **Interactive installations** (for example, using `yum install` or `dnf install`) - You will be prompted to review and accept the EULA during installation * **Automated installations** - Set the environment variable `ACCEPT_EULA=1` to indicate acceptance of the EULA and suppress the interactive prompt. If you are using automated installation, we strongly recommend reviewing the EULA in advance. The latest version is available at: [**https://regatta.dev/eula/**](https://regatta.dev/eula/) ### Install the RPM Packages Install the required RegattaDB RPM packages using `yum` or `dnf`: ```shellscript theme={null} sudo yum install regatta--.el8.x86_64.rpm or sudo dnf install regatta--.el8.x86_64.rpm ``` During installation, you will be prompted to review and accept the Regatta End User License Agreement (EULA): ```shellscript theme={null} ****************************************************************************** Regatta End User License Agreement (EULA) URL: https://regatta.dev/eula/ ****************************************************************************** To continue installation, type Y and press Enter. To abort, press any other key and press Enter. Accept EULA? [y/N]: ``` For unattended or automated installations, pre-approve the EULA by setting the `ACCEPT_EULA=1` environment variable: ```shellscript theme={null} sudo ACCEPT_EULA=1 yum install regatta--.el8.x86_64.rpm or sudo ACCEPT_EULA=1 dnf install regatta--.el8.x86_64.rpm ``` All RegattaDB RPM packages are installed under `/opt/regatta/`. For convenience, you can use the `/opt/regatta/current` symbolic link to reference the current installation. The examples below show the installation directories for the **SM** and **RDB** modules. **SM:** ```shellscript theme={null} /opt/regatta/current/sm ├── bin ├── LICENSE ├── sm_1 │   ├── bin │   ├── conf │   ├── log -> /var/log/regatta/sm/sm_1 │   └── repo └── tools ``` **RDB:** ```shellscript theme={null} /opt/regatta/current/rdb ├── bin ├── LICENSE ├── rdb_1 │   ├── bin │   ├── conf │   ├── log -> /var/log/regatta/rdb/rdb_1 │   └── repo └── tools ``` #### Additional RegattaDB RPM Packages In addition to the RegattaDB software modules, the RegattaDB self-hosted package includes several utilities that simplify deployment, administration, backup, and troubleshooting. The following RPM packages are included: * Regatta Deployment Tool (RDT) - An automated deployment tool for provisioning and configuring RegattaDB. For detailed instructions, refer to the [**Regatta Deployment Tool (RDT)**](/self-hosted-deployment/rdt/introduction) guide. * Regatta Debug Tool - A Docker-based utility for connecting to running RegattaDB systems to perform live diagnostics, troubleshooting, and debugging. * Regatta Bench - A benchmarking utility for executing preconfigured workloads against a RegattaDB system to evaluate performance and validate deployments. ```shellscript theme={null} regatta-bnr-.el8.x86_64.rpm regatta-rdt-.el8.x86_64.rpm regatta-debug-.el8.x86_64.rpm ``` #### Client Software The self-hosted deployment package also includes the RegattaDB client components. For installation and usage instructions, refer to [Drivers & Clients](/drivers-and-clients/connecting-applications-to-regatta). The following RPM packages are included: * Regatta Client Library * Regatta CLI * Regatta Connect - A collection of drivers, ORMs, and connectors for integrating RegattaDB with external applications, frameworks, and data platforms. ```shellscript theme={null} regatta-cli-.el8.x86_64.rpm regatta-client-.el8.x86_64.rpm regatta-connect-.el8.x86_64.rpm ``` ### Storage Devices RegattaDB is designed to work directly with **raw block storage devices** to minimize filesystem overhead and achieve the highest possible storage performance. Direct access to raw devices allows RegattaDB to optimize data layout and I/O patterns specifically for database workloads. #### Storage Requirements Each **RDB** module must be assigned at least one storage device that is not used as the operating system boot device. RegattaDB supports virtually any raw block storage device, including: * Local NVMe devices (recommended for best performance) * Local SSD devices * SAN-attached block storage (Fibre Channel, iSCSI, etc.) * Cloud block storage volumes (for example, Amazon EBS, Azure Managed Disks, or Google Persistent Disk) * Shared block storage presented to the operating system as a raw block device #### Using Filesystem-Backed Storage Although direct raw block devices are recommended, RegattaDB can also use file-backed storage devices when raw devices are not available. In this configuration, a regular file located on a mounted filesystem is presented to RegattaDB as a storage device. For example, the following command creates a sparse 1 TB file on an existing filesystem: ```shellscript theme={null} sudo fallocate -l 1T /mnt/regatta_storage/rdb_device1.dat ``` The resulting file can then be registered as a storage device during deployment: ```sql theme={null} MANAGE STORAGE DEVICE ADD ( NODE "Node01", NAME "Node01_Disk1", PATH "/mnt/regatta_storage/rdb_device1.dat" ); ``` While this approach is fully supported, direct raw block devices generally provide the best performance. #### Persistent Module State Each RegattaDB module maintains a small amount of persistent state under its repository directory: ```shellscript theme={null} /opt/regatta/current///repo ``` For example, the repository for the first **RDB** module is located at: ```text theme={null} /opt/regatta/current/rdb/rdb_1/repo ``` If required by your deployment, this directory may reside on persistent storage by mounting the desired storage device at the appropriate location. #### Storage Permissions The [deployment user](/self-hosted-deployment/manual-deployment-copied-1/prepare-for-deployment#deployment-user) must have read and write access to all storage devices used by RegattaDB. For raw block devices, assign ownership to the deployment user and group before deployment: ```shellscript theme={null} sudo chown : /dev/path/to/device ``` Repeat this step for each storage device assigned to RegattaDB. ### Deployment User RegattaDB requires a deployment user with the appropriate ownership and permissions for the installation directories, shared memory, log directories, and storage devices. The deployment owns the following resources: * Regatta installation directory - `/opt/regatta` - created during RPM installation * Shared memory directory - `/dev/shm/Regatta` - created automatically by RegattaDB at runtime * Log directory - `/var/log/regatta` - created during RPM installation * Storage devices allocated for RegattaDB During installation, the RPM packages automatically create a default deployment user and group both named `regatta`. If you wish to use a different deployment user, follow these steps: #### Installing with a Custom Deployment User To install RegattaDB with a custom deployment user and/or group, set the `REGATTA_USER` and `REGATTA_GROUP` environment variables when installing the RPM package. Each RPM creates the OS user/group if it doesn't already exist, and applies ownership of its installed files to it. `REGATTA_USER` and `REGATTA_GROUP` must: * Not be empty * Not be `root` * Start with a letter or underscore, and contain only letters, digits, `.`, `_`, or `-` If a value doesn't meet these requirements, the installation fails immediately with an error. If either variable is left unset, it defaults to `regatta`. Use the same `REGATTA_USER`/`REGATTA_GROUP` values for every RegattaDB RPM you install. Each package independently resolves the account and applies ownership to its own files, so using inconsistent values across packages will leave some files owned by the wrong user/group. **Example** Given the following RPM packages: ```text theme={null} regatta-cli-.el8.x86_64.rpm regatta-client-.el8.x86_64.rpm ``` Install them with a custom deployment user and group, `myuser`/`mygroup`: ```bash theme={null} sudo REGATTA_USER=myuser REGATTA_GROUP=mygroup yum install \ regatta-cli-.el8.x86_64.rpm \ regatta-client-.el8.x86_64.rpm ``` If `myuser`/`mygroup` don't already exist on the system, they are created automatically as a system account (no login shell, no home directory). ### IP Assignment Assign IP addresses to each node in the RegattaDB cluster. Prepare a list of: * **Internal IP addresses** used for communication between RegattaDB modules. * **External IP addresses** used by client applications to access RegattaDB (if applicable). **Note:** RegattaDB clients automatically use the external IP address when one is configured for a node. Otherwise, they fall back to the node's internal IP address. Each RegattaDB module requires two ports: * A **Communications Port**, used for communication between RegattaDB modules. * A **Service Port** used for internal service operations. By default, RegattaDB uses the port assignments shown below. We recommend using these default values unless your deployment requires otherwise (for example, when running multiple RDB modules on a single node). | Module | Communications Port | Service Port | | :- | :- | :- | | SM | 8840 | 5000 | | SNA | 8841 | 5001 | | Sequencer | 8842 | 5002 | | GDD | 8843 | 5003 | | DCM | 8844 | 5004 | | RDB | 8850 | 6001 | ### Firewall Setup Configure the firewall on each node to allow traffic on the required RegattaDB IPs and ports. At a minimum, ensure that: * The communications and service ports are accessible between all RegattaDB nodes. * Client applications can access the required external endpoints, as defined by your deployment. # RegattaDB Software Modules Source: https://docs.regatta.dev/self-hosted-deployment/manual-deployment/regattadb-software-modules Below we describe the different software modules which together make up a RegattaDB system. A module is an independently deployable user-mode process that handles a specific functional role within the distributed database architecture. In total, the architecture comprises six distinct modules. Each deployment includes a combination of these modules, distributed across one or more nodes. A **node** is the fundamental compute unit in a RegattaDB deployment. It represents a server that provides CPU, memory, networking, and storage resources to the cluster. A node may be a physical server, a virtual machine (VM), or a container, and may host one or more RegattaDB modules. RegattaDB modules can be broken down into 2 groups: Management Modules and Operational Modules. ### Management Modules These modules form the administrative framework of the RegattaDB system, providing the tools necessary to configure, monitor, and maintain the system infrastructure. The management modules are deployed as `systemd` services. They are responsible for starting, stopping, monitoring, and managing the lifecycle of the operational modules. #### SM – System Manager System Manager handles the deployment of RegattaDB on all nodes. After deployment, it manages both hardware and software resources, executes administrative commands, and coordinates ongoing system operations. #### SNA – System Node Agent The System Node Agent runs on each node where a RegattaDB module is deployed and serves as the local execution layer for the System Manager. It is responsible for managing the lifecycle of all RegattaDB modules on that node. ### Operational Modules These modules drive the core database engine, handling active workloads, maintaining data consistency, and managing the relational schema. #### RDB – Regatta Database The RDB module is RegattaDB’s distributed compute engine, responsible for query execution and data processing. It leverages CPU, network, and I/O resources efficiently, and scales by adding additional RDB modules. #### Sequencer Coordinates consistency of the distributed transactions and snapshots between all RegattaDB modules. #### DCM – Database Catalog Manager Manages the database catalog which contains all the schema definitions including tables indexes and their attributes. #### GDD – Global Deadlock Detector The Global Deadlock Detector (GDD) component is responsible for detecting circular distributed dependencies between transactions in the system and resolving them. # Prerequisites Source: https://docs.regatta.dev/self-hosted-deployment/prerequisites In order to deploy a RegattaDB system, ensure the following requirements are met on all servers that are designated for the deployment: 1. **Operating system:** Red Hat 8–based distribution such as Oracle Linux 8 or RHEL 8.10 2. **Architecture:** x86-64 (64-bit) 3. **Required system dependencies**: * `glibc` * `libstdc++` * `libgcc` * `util-linux-libs` * `openssl-libs` * `libaio` * `jemalloc` (recommended) 4. **Hardware Requirements:** * Memory: Minimum 32 GB * Disk space for RegattaDB installation: Minimum 500 MB * CPU: Minimum 4 CPUs * Storage: At least one dedicated 350-GB block storage device (preferably NVMe or SSD) that is not the system boot device 5. **Connectivity:** * Minimum 10-Gb network connection between all RegattaDB servers * Internet access for package downloads (optional) 6. **RegattaDB Software:**
Obtain the RegattaDB software package and ensure it is available on all servers designated for the deployment If you are using the [**Regatta Deployment Tool (RDT)**](/self-hosted-deployment/rdt/introduction), the software package only needs to be available on the server where the RDT is executed. The RDT automatically distributes the required RPM packages to the remaining servers. # Global Options & Credentials Source: https://docs.regatta.dev/self-hosted-deployment/rdt/advanced/global-options-and-credentials SSH credentials and other options available on every RDT command. These options can be passed on any `rdt` command, before or after the subcommand name. | Option | Env var | Description | | - | - | - | | `--user`/`-u` | `RDT_USER` | SSH user to connect with | | `--key`/`-k` | `RDT_KEY_FILE` | SSH private key file to connect with | | `--password`/`-p` | `RDT_SSH_PASSWORD` | SSH password to connect with | | `--ask-password`/`-P` | N/A | Prompt for the SSH password interactively instead of passing it on the command line | | `--verbose`/`-v` | N/A | Increase verbosity. `-v` for info-level logs, `-vv` for debug | | `--version` | N/A | Print the installed RDT version and exit | Example: ```bash theme={null} rdt --user regatta --key ~/.ssh/id_rsa config list ``` ## Two separate sets of credentials RDT talks to your infrastructure in two different ways, each with its own credentials: * **SSH credentials** (`--user`/`--key`/`--password`/`--ask-password` above): used for every node-level operation: distributing files, installing packages, managing services, probing hardware, collecting debug info, cleaning, and resetting. Passing `--user` or `--key` on **any** command persists it as the default for every subsequent command, not just the one you ran. `--password` and `--ask-password` only apply to that single invocation. * **System Manager credentials**: used only by `configure`, `start-cluster`, `stop-cluster`, and `reset` (indirectly) to connect to the database itself. These are currently fixed to Regatta's default admin account and aren't configurable through the CLI today. # Module & NUMA Configuration Source: https://docs.regatta.dev/self-hosted-deployment/rdt/advanced/module-and-numa-configuration Manually pin modules to CPU cores using your node's real NUMA topology. See [Configuration Overview](../configuration/overview.mdx#core-binding) for the `core_binded_node`/`core_binded_cores` fields themselves. This page covers how to fill them in deliberately, using your node's real NUMA topology. ## Inspecting your node's CPU and NUMA layout Before setting `core_binded_node`/`core_binded_cores` by hand, find your node's real CPU and NUMA layout. Two common tools: `lscpu` prints the NUMA node count and, for each node, the CPU ids that belong to it: ```bash theme={null} lscpu ``` ```text theme={null} NUMA node(s): 2 NUMA node0 CPU(s): 0-7 NUMA node1 CPU(s): 8-15 ``` `numactl --hardware` (package `numactl`) gives the same CPU breakdown plus each NUMA node's local memory: ```bash theme={null} numactl --hardware ``` ```text theme={null} available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 6 7 node 0 size: 131072 MB node 1 cpus: 8 9 10 11 12 13 14 15 node 1 size: 131072 MB ``` Use this data the same way you'd use probed `numa_specs` below: pick a NUMA node, use its CPU list (or a subset) as `core_binded_cores`, and set `core_binded_node` to match. ## Reading probed NUMA data If you created your config with `--probe-nodes` (see [What Changes on Your Nodes](./node-system-changes.mdx#hardware-discovery---probe-nodes)), each node's `config.numa_specs` is filled in with something like: ```json theme={null} "modules": [ { "type": "rdb", "id": 11, ..., "config": { "numa_specs": { "node0": { "cpu": "0,1,2,3,4,5,6,7", "mem_mb": 131072 }, "node1": { "cpu": "8,9,10,11,12,13,14,15", "mem_mb": 131072 } } } } ] ``` Each key is a NUMA node, with the CPU ids that belong to it and its local memory. This is recorded for reference; RDT doesn't automatically bind modules to NUMA nodes for you, you decide the binding based on this data. ## Setting core binding manually To pin a module to a set of cores, set both fields in its `config`: ```json theme={null} "modules": [ { "type": "rdb", "id": 11, ..., "config": { "core_binded_node": "0", "core_binded_cores": "0-5" } } ] ``` * `core_binded_node` identifies which NUMA node this binding corresponds to (for your own reference; it's not cross-checked against `numa_specs`). * `core_binded_cores` accepts individual CPU ids, ranges, or a mix, comma-separated (e.g. `0-5`, `0,1,2`, or `0-3,8,10-11`). Unlike the flat comma-separated list in `numa_specs.cpu`, ranges are written with a hyphen here. * If `num_threads` is left unset, it's derived automatically from the core count. If you set it explicitly, it must not exceed the number of cores in `core_binded_cores`. A typical pattern: pick a NUMA node from `numa_specs`, use a subset (or all) of its CPU list as `core_binded_cores`, and set `core_binded_node` to that NUMA node's id. # What Changes on Your Nodes Source: https://docs.regatta.dev/self-hosted-deployment/rdt/advanced/node-system-changes The system-level changes RDT makes on RegattaDB nodes during setup, cleanup, and reset. This page documents what RDT actually changes on a node's operating system when you run `setup`, `create-cluster`, `clean`, or `reset`. Useful for troubleshooting, or for understanding what you're authorizing when you grant RDT `sudo` access. ## Storage & device setup * Every storage device referenced by an RDB module has its ownership changed to `regatta:regatta`. For a raw block device, this is done via a `udev` rule written to `/etc/udev/rules.d/99-regatta-storage.rules` (re-applied immediately with `udevadm trigger`, not just after a reboot). For a file-backed device (a regular file used as storage instead of a raw block device), ownership is changed directly, since `udev` rules only apply to block devices. * Devices used by SM and DCM modules are handled differently: they're formatted as `ext4` and mounted at a fixed path under the Regatta installation directory. This reformats the device: use a raw, unused block device, never one with existing data. Ownership of the mount point is set to `regatta:regatta`. ## Service management RDT discovers every installed `regatta-*` `systemd` service on a node (except internal/ templated units) and manages all of them together: starting, stopping, or enabling them for boot as a group, based on what you asked for (`start-services`/`stop-services`/ `setup`/etc.). ## Performance tuning (`jemalloc`) If `libjemalloc` is available on the node (checked under `/usr/lib64`, then as a fallback via the system's shared library cache), RDT wires it in as `LD_PRELOAD` for the SM and SNA module environments. If it's not found, `setup` prints a warning and skips this step; it's a performance optimization, not a requirement. ## Module configuration files RDT writes each module's configuration file from your RegattaDB config, one per module instance, under that module's directory in the Regatta installation. ## Cleanup (`clean`) Removes Regatta's installation, logs, and runtime data from a node. If RDT itself is installed on that node, `clean` specifically preserves RDT's own installed files and its own log directory; everything else is removed. If RDT isn't installed there, the wipe is unconditional (installation directory, symbolic links, logs, lock files, shared memory). ## Reset (`reset`) Clears RegattaDB's runtime data while leaving the installation itself intact: shared memory files, core dumps, crash info and lock files, network identifiers, each module's repository contents, and log directories (events, traces, workload data). Binaries and configuration files are not touched. See [RegattaDB Lifecycle](../system-setup/lifecycle.mdx#resetting-regattadb) for the manual steps needed to bring RegattaDB back up afterward. ## Hardware discovery (`--probe-nodes`) When you create a config with `--probe-nodes`, RDT connects to each node and reads: * Total CPU thread count and RAM. * NUMA topology (which CPUs and how much memory belong to each NUMA node): see [Module & NUMA Configuration](./module-and-numa-configuration.mdx). * Unmounted, unformatted block devices: any large enough one found gets assigned to that node's RDB module(s) automatically. ## How RDT connects to nodes RDT connects to nodes over SSH, in parallel across many nodes at once (so large deployments aren't set up one node at a time), and reuses connections across the steps of a single command for speed. Host key verification is skipped by default, so first-time connections to new nodes won't prompt for confirmation. Make sure you trust your network path to these nodes accordingly. # Offline Installation Source: https://docs.regatta.dev/self-hosted-deployment/rdt/advanced/offline-installation Install RDT on a control node with no internet access, from a pre-built artifact bundle. If your control node has no internet access, install RDT from an offline artifact bundle: a standalone Python build plus pre-built wheels for RDT and its dependencies. This page assumes you already have that bundle in hand (obtained from your Regatta distribution or support contact). ## Installing The bundle is a directory containing `python3.9-build.tar.gz` and a `python-wheels/` folder. Run: ```bash theme={null} packaging/offline/install.sh /path/to/bundle ``` If you omit the path, it defaults to the current directory. This: 1. Extracts the standalone Python build to `~/.local/python/`. 2. Installs RDT and all its dependencies from the local wheels, no network access required. 3. Adds `~/.local/python/bin` to your `PATH` via `~/.bashrc` (only if not already present). Apply the `PATH` change and confirm: ```bash theme={null} source ~/.bashrc rdt --version ``` The `~/.bashrc` PATH update only takes effect in interactive bash shells that source it, either the current shell (after you `source` it manually) or any new one you open afterward. It won't apply automatically in a few common cases: * **Non-interactive contexts**: scripts, cron jobs, or a single non-interactive SSH command (e.g. `ssh host 'rdt --version'`) don't source `~/.bashrc` at all. Either call `rdt` by its full path (`~/.local/python/bin/rdt`) or export the `PATH` explicitly in that context: ```bash theme={null} export PATH="$HOME/.local/python/bin:$PATH" ``` * **A different login shell**: if your default shell isn't bash (e.g. zsh, fish), add the same line to that shell's own startup file instead (e.g. `~/.zshrc` for zsh). * **Login shells that don't source `~/.bashrc`**: some minimal environments only read `~/.bash_profile`/`~/.profile` on login and don't chain-load `~/.bashrc`. If a fresh login doesn't pick up the change, add the same `export PATH=...` line to whichever of those files exists on your system. This installs entirely into your home directory and doesn't require root. If you'd rather make this the system-wide `python3`, do so manually (requires root): ```bash theme={null} sudo alternatives --set python3 "$HOME/.local/python/bin/python3.9" ``` ## Compiling native extensions If installing a wheel needs to compile a C/C++ extension, set `CC`/`CXX` first: ```bash theme={null} CC=gcc CXX=g++ packaging/offline/install.sh /path/to/bundle ``` ## Troubleshooting * **"file not found"**: confirm the bundle path contains both `python3.9-build.tar.gz` and a `python-wheels/` directory. * **"permission denied"**: everything is installed under `~/.local`, so this usually means `~/.local` (or `~/.local/python` from a previous attempt) is owned by a different user or has restrictive permissions, or the bundle directory itself isn't readable by your user. Check ownership and fix it before retrying: `ls -la ~/.local` and `chown -R "$(id -un)" ~/.local` if needed. * **pip build errors for C extensions**: see the `CC`/`CXX` step above. * For more detail on what's happening, run with shell tracing: `bash -x packaging/offline/install.sh /path/to/bundle`. ## Verifying the install If `rdt --version` didn't work after installing, use these to isolate which layer failed: the extracted Python itself, your `PATH`, or the package install: ```bash theme={null} "$HOME/.local/python/bin/python3" --version # should report Python 3.9 python3 --version # run after `source ~/.bashrc`, should also report # 3.9 if PATH now resolves python3 to the new install python3 -m pip list # should list rdt and its dependencies ``` # Running RDT in a Container Source: https://docs.regatta.dev/self-hosted-deployment/rdt/advanced/running-rdt-in-a-container Run RDT from a pre-built container image instead of installing it directly. If you've been given a pre-built RDT container image (or an image tar), you can run `rdt` through it without installing anything on your control node besides Docker. ## Prerequisites * Docker, or a compatible CLI such as Podman (set `DOCKER=podman` if so). * The `rdt.sh` wrapper script (shipped alongside the image). ## Running commands Use the wrapper script exactly as you would the `rdt` binary: it forwards all arguments: ```bash theme={null} ./rdt.sh --help ./rdt.sh config create --name my-regattadb --from xsmall --ip-list 10.0.0.1 ./rdt.sh config list ./rdt.sh create-cluster --name my-regattadb --src /path/to/regatta-rpms ``` It automatically mounts your `~/.rdt` config directory and `~/.ssh` keys into the container and runs with host networking, so configs and SSH access work the same as a native install. ## Providing the image If you weren't given an already-loaded Docker image, load one from a tar file explicitly: ```bash theme={null} ./rdt.sh --src rdt_image.tar config list ``` Otherwise, the wrapper looks for an image automatically, in this order: 1. An existing Docker image tagged `rdt:` or `rdt:latest`. 2. A tar at `$RDT_DOCKER_IMAGE_PATH` (default: `/opt/regatta/current/tools/rdt/rdt_image.tar`). 3. `rdt_image.tar` in the current working directory. If none of these are found, the wrapper reports an error. See `./rdt.sh --help` for the full set of flags and environment variables. ## Environment variables | Variable | Default | Description | | - | - | - | | `DOCKER` | `docker` | Docker CLI binary to use | | `RDT_DOCKER_IMAGE_FILE` | `rdt_image.tar` | Tar filename used for auto-discovery | | `RDT_DOCKER_IMAGE_PATH` | `/opt/regatta/current/tools/rdt/rdt_image.tar` | Full tar path used for auto-discovery | # Command Reference Source: https://docs.regatta.dev/self-hosted-deployment/rdt/command-reference Every RDT command, its options, and what it does. Below is a command reference guide for the RDT. Every command also accepts the [global options](./advanced/global-options-and-credentials.mdx) (`--user`, `--key`, `--password`, `--ask-password`, `--verbose`, `--version`). Each command also has a short alias, shown in parentheses next to its name below (aliases aren't shown in `--help` output, but work the same as the full name). Run `rdt `
`--help` at any time for the same information from the CLI itself. ## `config `(alias: `c`) Manage RegattaDB configuration files. See [Creating & Managing Configs](./configuration/creating-and-managing-configs.mdx) for a guided walkthrough. ### `config create` (alias: `cr`) | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | | `--from`/`-f` | Start from a packaged template (`small` or `xsmall`). Mutually exclusive with `--nodes` | | `--nodes`/`-no` | Number of nodes to generate (mutually exclusive with `--from`) | | `--ip-file`/`-ipf` | File containing node IP addresses | | `--ip-list`/`-ips` | Comma-separated list of node IP addresses | | `--probe-nodes`/`-p` | Connect to each node over SSH to detect CPU, RAM, and devices | | `--output`/`-o` | Write to a local file instead of the config store | | `--force` | Recreate without prompting if a config by this name already exists | ### `config print` (alias: `p`) | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | | `--validate`/`-v` | Print a warning if the config fails validation. Default: enabled | ### `config edit` (alias: `e`) | Option | Description | | - | - | | `--name`/`-n` | Config name (required). Opens it in `$EDITOR` | ### `config list` (alias: `ls`) No options. Lists both packaged templates and saved configs. ### `config load` (alias: `l`) | Option | Description | | - | - | | `--file`/`-f` | Local JSON config file to import (required) | | `--name`/`-n` | Name to save it as. Defaults to the file's name (without `.json`) | ### `config remove` (alias: `rm`) | Option | Description | | - | - | | `--name`/`-n` | Config name to delete (required) | | `--force` | Delete without prompting for confirmation | ## `distribute` (alias: `di`) Distributes Regatta RPMs to every node. | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | | `--src`/`-s` | Path to a directory of RPMs or a `.tar.zst` archive (required) | ## `setup` (alias: `st`) Installs RPMs and configures nodes (see [System Setup Overview](./system-setup/overview.mdx)). | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | | `--clean-install`/`-ci` | Remove any previous installation before reinstalling. Default: off | ## `start-services` (alias: `ss`) / stop-services (alias: `sps`) Starts or stops the System Manager and SNA as node-level services. | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | ## `configure` (alias: `co`) Registers the nodes, devices, and modules with the System Manager. | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | ## `start-cluster` (alias: `sc`) / stop-cluster (alias: `stop`) Starts or stops every configured module via the System Manager (`MANAGE SYSTEM START`/ `MANAGE SYSTEM SHUTDOWN`). | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | ## `create-cluster` (alias: `ccl`) Runs the full pipeline in one command: distribute → setup → start-services → configure → start-cluster. | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | | `--src`/`-s` | Path to a directory of RPMs or a `.tar.zst` archive (required) | | `--clean-install`/`-ci` | Remove any previous installation before reinstalling. Default: off | ## `reset` (alias: `re`) Stops services, clears all RegattaDB data, and restarts services. Does **not** automatically reconfigure or restart the database afterward. See [RegattaDB Lifecycle](./system-setup/lifecycle.mdx#resetting-regattadb). | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | ## `clean` (alias: `cl`) Removes Regatta's installation, files, logs, and traces from every node (preserving RDT itself where it's installed; see [What Changes on Your Nodes](./advanced/node-system-changes.mdx#cleanup-clean)). | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | ## `collect` (alias: `coll`) Collects debug information from RegattaDB nodes. | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | | `--destination`/`-d` | Local destination path (required) | | `--nodes`/`-N` | Node name or id to collect from. Repeatable. Defaults to all nodes | | `--remote-destination`/`-r` | Remote staging directory on each node. Default: `/tmp/regatta-collect` | # Creating & Managing Configs Source: https://docs.regatta.dev/self-hosted-deployment/rdt/configuration/creating-and-managing-configs Commands for creating, editing, validating, and sharing RDT configs. This page covers the `rdt config` subcommands. See [Configuration Overview](./overview.mdx) for the JSON schema these commands read and write. ## Create a config ```bash theme={null} rdt config create --name [options] ``` | Option | Description | | - | - | | `--name`/`-n` | Config name (required) | | `--from`/`-f` | Start from a packaged template (`small` or `xsmall`). Cannot be combined with `--nodes` | | `--nodes`/`-no` | Generate a config with this many nodes instead of using a template | | `--ip-file`/`-ipf` | A file containing node IP addresses | | `--ip-list`/`-ips` | A comma-separated list of node IP addresses (e.g. `10.0.0.1,10.0.0.2`) | | `--probe-nodes`/`-p` | Connect to each node over SSH to detect its CPU, RAM, and devices | | `--output`/`-o` | Write the config to a local file instead of `~/.rdt/configs/` (it won't show up in `rdt config list`) | | `--force` | Recreate the config without prompting if a config by this name already exists | You must choose either `--from` or `--nodes` (not both) to decide the module layout: * `--from small` / `--from xsmall`: use one of the packaged templates (see [Configuration Overview](./overview.mdx#templates)). * `--nodes `: generate an N-node config yourself, following the same layout as the `small` template: node 1 gets all module types (SM, SNA, Sequencer, GDD, DCM, RDB), and every other node gets only SNA and RDB. ### Assigning node IPs If you provide `--ip-file` or `--ip-list`, those addresses are assigned to the generated nodes in order. If you provide neither, nodes default to `127.0.0.`, fine for local testing, but you'll need to edit the config afterward with real addresses. `--ip-file` scans the file for anything that looks like an IPv4 address, so one per line, comma-separated, or a mix of both all work: ``` 10.0.0.1 10.0.0.2, 10.0.0.3 ``` `--ip-list` is a simple comma-separated list and additionally accepts IPv6 addresses: ```bash theme={null} rdt config create --name my-regattadb --from small --ip-list 10.0.0.1,10.0.0.2,10.0.0.3 ``` ### Examples ```bash theme={null} # From a template, with real node IPs rdt config create --name my-regattadb --from small --ip-list 10.0.0.1,10.0.0.2,10.0.0.3 # Generate a 4-node layout from an IP file, probing each node's hardware rdt config create --name my-regattadb --ip-file ./ips.txt --nodes 4 --probe-nodes ``` ## Print a config ```bash theme={null} rdt config print --name [--validate/--no-validate] ``` Prints the config as JSON. `--validate` (on by default) also prints a warning if the config fails schema validation. ## Edit a config ```bash theme={null} rdt config edit --name ``` Opens the config in your `$EDITOR`. On save, it's re-validated; if it's invalid, you're prompted to save anyway or discard the changes. ## List configs and templates ```bash theme={null} rdt config list ``` Lists both the packaged templates and your saved configs (`~/.rdt/configs/`). ## Load a config from a file ```bash theme={null} rdt config load --file [--name ] ``` Imports an existing JSON file into `~/.rdt/configs/`. If `--name` is omitted, the config is named after the file (its filename without the `.json` extension). ## Delete a config ```bash theme={null} rdt config rm --name [--force] ``` Deletes a saved config. Prompts for confirmation unless `--force` is given. ## Next steps Once you have a config, continue to [System Setup Overview](../system-setup/overview.mdx) to deploy RegattaDB from it. # Configuration Overview Source: https://docs.regatta.dev/self-hosted-deployment/rdt/configuration/overview The RDT configuration schema: the Cluster, Node, Device, and Module object types. RDT describes a RegattaDB deployment with a single JSON configuration file, stored under `~/.rdt/configs/.json`. This page documents the schema. For the commands used to create, edit, and manage these files, see [Creating & Managing Configs](./creating-and-managing-configs.mdx). ## Deployment guidelines Before designing a configuration, keep RegattaDB's general module placement guidelines in mind: * **SM**: exactly one per deployment. * **SNA**: one per node that hosts at least one operational module (GDD, DCM, Sequencer, or RDB). * **GDD**, **DCM**, **Sequencer**: exactly one per deployment. * **RDB**: at least one per deployment; a node may host multiple RDB modules. With that in mind, here's the JSON schema itself: the fields that make up the `Cluster`, `Node`, `Device`, and `Module` objects in a config file. ## Cluster | Field | Type | Description | | - | - | - | | `version` | `string` | Configuration schema version | | `id` | `string/UUID/int` | Cluster identifier. Defaults to `"regatta-cluster"` | | `nodes` | list of Node | The nodes that make up the deployment. Defaults to empty | **Cluster-level validation:** * Node `id` must be unique across the deployment. * Exactly one instance each of SM, Sequencer, GDD, and DCM across the entire deployment (not per node). ## Node | Field | Type | Description | | - | - | - | | `id` | `int` | Unique identifier within the deployment. Defaults to `1` | | `name` | `string` | Node name. Defaults to `"regatta-node"` | | `ip` | IP address | Address RDT uses to connect to the node | | `num_threads` | `int `(optional) | Concurrency level for the node.
Leave unset to let the SM automatically set the value | | `ram_MB` | `int `(optional) | RAM budget for the node, in megabytes. Leave unset to let the SM automatically set the value | | `devices` | list of Device | Storage devices available on this node. Defaults to empty | | `modules` | list of Module | Modules to run on this node. Defaults to empty | | `config` | `object` | Arbitrary node config (e.g. probed hardware data). Defaults to empty | **Node-level validation:** * At most one instance each of SM, SNA, Sequencer, GDD, and DCM is allowed per node (mirrors the cluster-level rule). * Module `id`s must be unique within the node. * Every device name referenced by a module must exist in the node's `devices` list. * Two modules on the same node cannot reference the same device. ## Device | Field | Type | Description | | - | - | - | | `name` | `string` | Referenced by modules by this name | | `path` | path | Path to the raw block device | | `capacity` | `int `(optional) | Capacity in bytes | | `config` | `object` | Arbitrary device config. Defaults to empty | | `description` | `string `(optional) | Free-form description | ## Module All modules share a common set of fields; each module type additionally has fixed defaults for `id`, `port`, and `service_port`. | Field | Type | Description | | - | - | - | | `type` | `string` | One of `sm`, `sna`, `sequencer`, `gdd`, `dcm`, `rdb` | | `id` | `int` | Defaults to the type's standard id (see table below) | | `name` | `string` | Auto-generated as `_` if not set | | `port` | `int` | Communications port. Defaults to the type's standard port | | `service_port` | `int` | Service port. Defaults to the type's standard service port | | `num_threads` | `int `(optional) | Concurrency level for the module.
Leave unset to let the SM automatically set the value | | `ram_MB` | `int `(optional) | RAM budget for the module, in megabytes.
Leave unset to let the SM automatically set the value | | `devices` | list of strings | Names of devices (from the node) used by this module | | `config` | `object` | Arbitrary module config, e.g. core binding (see below) | ### Module type defaults | Type | Default id | Port | Service port | | - | - | - | - | | SM | 1 | 8840 | 5000 | | SNA | 2 | 8841 | 5001 | | Sequencer | 3 | 8842 | 5002 | | GDD | 4 | 8843 | 5003 | | DCM | 5 | 8844 | 5004 | | RDB | 10 | 8850 | 6001 | ### Core binding A module can be pinned to specific CPU cores via its `config`: ```json theme={null} "config": { "core_binded_node": "0", "core_binded_cores": "0-5" } ``` * `core_binded_node` is required whenever `core_binded_cores` is set. * If `num_threads` is left unset, it's derived automatically from the core range. * If `num_threads` is set, it must not exceed the number of cores in the range. ## Example A minimal single-node config with one RDB storage device: ```json theme={null} { "version": "26.0", "id": "my-regattadb", "nodes": [ { "id": 1, "name": "node_1", "ip": "10.0.0.1", "devices": [ { "name": "disk1", "path": "/dev/nvme0n1" } ], "modules": [ { "type": "sm", "id": 1, "port": 8840, "service_port": 5000, "config": {}, "devices": [] }, { "type": "sna", "id": 2, "port": 8841, "service_port": 5001, "config": {}, "devices": [] }, { "type": "sequencer", "id": 3, "port": 8842, "service_port": 5002, "config": {}, "devices": [] }, { "type": "gdd", "id": 4, "port": 8843, "service_port": 5003, "config": {}, "devices": [] }, { "type": "dcm", "id": 5, "port": 8844, "service_port": 5004, "config": {}, "devices": [] }, { "type": "rdb", "id": 10, "port": 8850, "service_port": 6001, "config": {}, "devices": ["disk1"] } ] } ] } ``` See [Creating & Managing Configs](./creating-and-managing-configs.mdx) to learn how to generate, edit, and validate files like this without hand-writing the JSON, and [Config Recipes](../examples/config-recipes.mdx) for multi-node and probed-hardware examples. ## Templates `rdt config create --from