Managed Databases - Kool Cloud

Most of the time, the web applications you are going to deploy will usually have their accompanying database.

Kool.dev Cloud offers two ways for you to deploy your databases:

  1. Deploy databases as regular containers.
  2. Use a managed database on a shared structure.
  3. Use a dedicated Database Custom Resource (i.e., RDS dedicated instance).

All of these options come with basic daily backup routines for your safety.

Deploying a container that is going to run your database is pretty straightforward—just like you have it in your local docker-compose.yml for your local environment, you can deploy that very same container. The benefit of this is you have full control over your container configuration and can use any type of database.

  • Persistent disk storage: by default, deployed containers are ephemeral and DO NOT have any disk persistent storage. This may cause problems if you deploy a database and upon restart, all your data is lost. You must make sure to include in your container deploy configuration a persistent disk storage, so upon restarts, your data is kept safe and is no longer ephemeral.
  • Environment variables: your database image may require specific environment variables to determine credentials and other settings. You need to make sure you set them correctly, different from your local ones.

This option is the easiest to get started with but currently only supports MySQL 8 database deployments.

If you have a MySQL database in your docker-compose.yml, you can just assign that service the cloud: true on your kool.cloud.yml, and Kool.dev Cloud is going to set up a new database on a running shared RDS instance.

This managed option will provide you with variable placeholders for you to get a hold of the credentials automatically generated as well as the database name/host.

Here is the list of Kool.dev variables placeholders available and how you would use them in your environment variables definition to use the managed database:

DB_HOST="{{KOOL_DATABASE_HOST}}" DB_PORT={{KOOL_DATABASE_PORT}} DB_DATABASE="{{KOOL_DATABASE_DATABASE}}" DB_USERNAME="{{KOOL_DATABASE_USERNAME}}" DB_PASSWORD="{{KOOL_DATABASE_PASSWORD}}"

The placeholders always have the {{PLACEHOLDER}} syntax. When used anywhere in your kool.cloud.yml configuration, they are going to be replaced by their managed values when deploying.

  • Currently, only supports MySQL 8 deployments.
  • Being a shared resource, top performance is not guaranteed (unless you have it running in your own Cloud vendor account in the Enterprise offer).
  • Best suited for development and staging workloads.

You can have any sort of custom resource for your application, including dedicated databases (i.e., RDS or ElastiCache).

As this is not yet fully automated, you need to contact our support to set it up for you in your account.

One of the benefits is having total control of your setup not only on disk/computing performance but as well as tailored backup and replication options.

kool.dev
By choosing "Accept all cookies" you agree to the use of cookies to help us provide you with a better user experience and to analyse website usage. Only the essential cookies are necessary for the proper functioning of our website and cannot be refused.
Check out our Cookie Policy and Privacy Policy for more information.