Humanitec supports a range of Relational Database Management Systems (RDBMS) out of the box. In all of these systems there is a distinction between the database and the RDBMS server or instance.
Humanitec can manage the life-cycle of resources, or use resources that are managed external to Humanitec. These are described by Dynamic and Static resource definitions respectively.
You would set up a Static Resource Definition if you already had a database created in an instance and wanted to use it as is.
For example: in your Production environment, databases might be managed by a DBA team. Humanitec should just pass the connection parameters through to the running workload as provided by the DBAs.
Humanitec does not need to connect to the instance as it just passes the connection parameters to the workloads at deployment time.
Start in the Static resources tab of the Organization Settings
Choose the database type you want to add by clicking on the relevant icon.
Choose an ID that you will use to identify the definition in Humanitec later. It must be a valid Humanitec ID.
Fill out the connection parameters that the workload will use to connect to the database.
Click the Create button to create the definition.
Our CLI is currently in closed beta. Please contact us if you want to learn more.
Static resource definitions can be created via the Create Static Resource endpoint.
You would set up a Dynamic Resource Definition when you want Humanitec to dynamically spin up and tear down databases in an existing instance.
For example: when a developer creates a new temporary development environment, Humanitec should create any required databases in the existing instance as necessary. When the environment is deleted, the databases created for that environment should be deleted as well.
In order to create additional databases in the instance, Humanitec needs to connect to the instance.
The access method refers to how Humanitec connects to an RDBMS instance. Currently, 3 access methods are supported out of the box:
A direct connection is where Humanitec connects directly to the RDBMS instance. The instance must be accessible on the public internet for this to be possible. This is the default configuration when using Aiven managed databases, or public Amazon RDS and Azure Databases.
When connecting over SSH, Humanitec first connects to bastion host or jump server and then makes an onward connection from that server to the instance itself. This is a common way of administering private RDBMS instances, for example a private Amazon RDS instance running inside a private VPC.
Google provides their own proxy which can be used to securely connect to private Cloud SQL instances without the need of a dedicated bastion host.
The supported databases along with their access methods are summarised here:
Google Cloud SQL Proxy