Database Setup
tags:
- administration
- installation
- helm
- database
- postgresql
- mysql
Flex requires a database for persistence storage. Choose between PostgreSQL(recommended) or MySQL.
#Production Recommendations
For production environments, use a managed database service:
| Cloud Provider | PostgreSQL Service | MySQL Service |
|---|---|---|
| AWS | Amazon RDS for PostgreSQL | Amazon RDS for MySQL |
| Google Cloud | Cloud SQL for PostgreSQL | Cloud SQL for MySQL |
| Azure | Azure Database for PostgreSQL | Azure Database for MySQL |
#Option 1: PostgreSQL (Recommended)
#Testing/Development Setup
Deploy PostgreSQL on your cluster for testing:
wget https://raw.githubusercontent.com/GluuFederation/flex/v6.4.1/automation/pgsql.yaml
kubectl apply -f pgsql.yaml#PostgreSQL Configuration
Add this to your override.yaml:
config:
configmap:
cnSqlDbName: gluu
cnSqlDbPort: 5432
cnSqlDbDialect: pgsql
cnSqlDbHost: postgresql.gluu.svc
cnSqlDbUser: postgres
cnSqlDbTimezone: UTC
cnSqldbUserPassword: Test1234# # Change for production!#Option 2: MySQL
#Testing/Development Setup
Deploy MySQL on your cluster for testing:
wget https://raw.githubusercontent.com/GluuFederation/flex/v6.4.1/automation/mysql.yaml
kubectl apply -f mysql.yaml#MySQL Configuration
Add this to your override.yaml:
config:
configmap:
cnSqlDbName: gluu
cnSqlDbPort: 3306
cnSqlDbDialect: mysql
cnSqlDbHost: mysql.gluu.svc
cnSqlDbUser: root
cnSqlDbTimezone: UTC
cnSqldbUserPassword: Test1234# # Change for production!#Connecting to Managed Databases
When using a managed database service, update these values:
cnSqlDbHost: Your database endpoint/hostnamecnSqlDbUser: Your database usernamecnSqldbUserPassword: Your database passwordcnSqlDbName: Your database name (create beforehand)
#Next Steps
Proceed to Install Flex to deploy the Helm chart.
