Postgresql BYODB Tutorial
This tutorial demonstrates how to configure your own PostgreSQL database on our PostgreSQL service, a.k.a. Relational Database Service. BYODB stands for Bring Your Own Database, that means you can access your database and perform queries through Lua scripts on the Murano platform. The database you configured could be your backend storage and it fulfills the need of organizing your data in a relational way.
- Have the access to the PostgreSQL service on your Application Solution. See tips for getting a free PostgreSQL database if you don’t already have one.
Tips on getting your own database credentials
Generally, the PostgreSQL service accepts any public PostgreSQL databases. We recommend AWS RDS if you need a high throughput, low latency, and high reliability database. ElephantSQL is good for those who just need a low/no cost plan to get a starter database. In the alpha stage of our service, we used the "Tiny Turtle" plan from ElephantSQL as our default database for users. Of course, they also offer other plans with various sizes and speeds. Pick one that is best suited to your requirements.
Configure your database credentials
In SOLUTIONS, click on Services.
Click on the PostgreSQL service and complete the configuration fields with your database credentials. Click APPLY.
1. Username * Type: String * Description: the username of your database account 2. Password * Type: String * Description: the password of your database account 3. Hostname * Type: String * Description: the hostname of your database server * Example: xxxx.oooo.us-west-1.rds.amazonaws.com 4. Database * Type: String * Description: the database name which you would like to connect to
Your existing lua code that uses Postgresql.query or .queries should work as before without any need to change.