SQL Database

In JetDeploy console you can start a fully dedicated SQL Database instance. Supported platforms are:

  • PostgreSQL PostgreSQL

  • MariaDB MariaDB

Create

During service creation you need to select:

  • Type

    Choose one of the supported database type and version

  • Service name

    A unique service ident name. This name cannot be changed after creation. A random string is filled as initial default value

Click Next button to add few more specifications:

  • Database name

    Choose a database name that will be created on setup

  • Storage size

    Define the initial max storage capacity of the database instance

Note

Connection and authentication data (e.g. host, port, username and password) will be visible in the detail page after database creation success.

Click Next button and the database creation process will start.

Details

In the Service Detail page you can access to various information of your database:

  • Type

    Type of your database instance (e.g. PostgreSQL, MariaDB, etc.)

  • Version

    Full version of your running database instance (e.g. 13.8 for PostgreSQL, 10.7 for MariaDB, etc.)

  • Status

    Status of your database instance. To be fully operational it must be in Ready state.

  • External Endpoint

    It is the external endpoint of your database instance, reachable by your laptop, external services or apps running out of JetDeploy infrastructure. <External-Host>:<External-Port> you find here can be used to connect by client utilities (psql for PostgreSQL, mysql for MariaDB) for database administration tasks.

    Note

    Visible only when Expose action done

  • Internal Endpoint

    It is the internal endpoint of your database instance, reachable by other Services or Apps you create in JetDeploy. <Host>:<Port> you find here can be used as Environment variables in your App to connect to this service.

  • Database Name

    Name of the custom database (created at startup) you choose during the creation process. <name> of the database you find here can be used as Environment variable in your App to connect to this database instance.

  • Username

    Root user of the database instance (e.g. postgres for PostgreSQL, root for MariaDB).

  • Password

    Random generated password of the root user.

Tip

For security reason we suggest you to create a new application-specific username and password, using password policy recommendations and the least privilege principle

You could find additional fields in the Service Detail page that are specific for the type of Service you’re running.

In the Operations section, at bottom, you can view information of the tasks created by various Actions you can run on your SQL database using JetDeploy console.

Actions

Different types of Action can be executed on your instance:

Expose Use this action when you need to connect to your instance from external, e.g. your development computer or an application or service not running in JetDeploy platform.
For security reasons we suggest you to keep external access active for a short period of time, limited to the time necessary for data migration, troubleshooting or maintenance tasks.

View Logs Use this action when you need to view logs of your instance.

Start Start of your instance, usually when your instance has been previously stopped.

Stop Stop of your instance

Restart Restart of your instance.

Destroy Request a service destroy of your instance.

Warning

Destroy action is risky and you will lose all your data. Please be absolutely sure when run this action.

Settings

Note

JetDeploy is in closed alpha status, so at the moment to increase the Storage size after service creation you need to open a Support Request

Usage examples

PostgreSQL

  • psql utility

    First of all you should Expose your Service if you run the utility on your local laptop.
    Then check connection details in the Service Detail page:

    Note

    Type: PostgreSQL
    Version: 13.8
    Status: Ready
    External Endpoint: creaky-pelting.gw1.jetdeploy.app:19184
    Internal Endpoint: creaky-pelting:5432
    Database Name: database-0 (created on setup)
    Username: postgres (created on setup)
    Password: 726221f8f95042e5be434df1a906bb5c

    Now you’re ready to connect:

    $ psql -h creaky-pelting.gw1.jetdeploy.app -p 19184 -U postgres database-0
    

    Press enter. The utility will ask for a password:

    Password for user postgres:
    

    Insert the password and press Enter

    psql (13.8)
    Type "help" for help.
    
    database-0=#
    

    Great! You’re now ready to use your SQL database instance!