Adding a database to your application
Overview
Cloud 66 Deploy v3, has a complete new way to manage databases for your applications. Currently the support for database types is limited to:
- Postgres
- Redis
While we are adding support for MySQL and MongoDB (and other database types) support soon, if you would like to use one of these databases, please use Deploy v2
It's perfectly feasible to manually install and use other database engines or datastores as part of your Cloud 66 application. We've simply automated management of the engines listed above because they are the most popular choices.
Databases are created and managed under the Clusters section of the dashboard (top navigation bar). Once they are created, you can use them under the Data Sources section of the your Applications page.
During onboarding a new app, you will see a streamlined way to create databases and do not need to go to the Clusters version. For more information on application onboarding, see initial build and deploy process
This guide deals with cases where you want to add a new database to an existing application.
Tutorial
Adding a database to a cluster
To add a database to an existing cluster, head to Clusters and click on the name of the cluster you wish to add a database to. There, select Data Sources from the left-hand nav. Click the + Add Database button and select a database engine.
You can now select the version, storage type and size of the database as well as the server pool you want to use for this database.
You can add multiple databases or different versions of the same database to a cluster.
Adding a database to an app
Head to the Applications page and click on the name of the application you wish to add a database to. There, select Data Sources from the left-hand nav. Click the + Add Data Source button and select the database from one of the available one on the same cluster.
Testing your new database
Once your database has been deployed, you can test it by logging directly into the server on which it is running via SSH. Cloud 66 Toolbelt is the quickest way to do this.
You can also use this opportunity to log into your database. You can find the username and password for your server by clicking on the name of any server listed under Data Sources.
You now have a fully functional database running as part of your application.