Notes on setting up Temporal v1.3.0 on AWS Aurora MYSQL (Serverless, 5.7.12)
Missing items from the Helm chart:
-
Missing ability to set the target MySQL host when setting up the DB; it tries to connect to localhost even when sql host is setup. Had to run setup locally (see caveats below)
-
Missing ability to set SQL_CONNECT_ATTRIBUTES=tx_isolation=“READ-COMMITTED”. Without setting, below error is encountered:
$ ./temporal-sql-tool create-database -database temporal
2020/11/15 19:21:46 error creating database:Error 1193: Unknown system variable 'transaction_isolation'
Cadence Helm chart has option for this → banzai-charts/values.yaml at master · banzaicloud/banzai-charts · GitHub
- I had to do a custom _helpers.tpl so that credentials can be read from a custom sealed secrets. Example values:
...
default:
driver: "sql"
sql:
...
port: 3306
database: temporal
user: temporal
existingSecret: "temporalxx"
secretKey: "default-passwd"
...
_helpers.tpl
...
{{- define "temporal.persistence.sql.secretName" -}}
...
{{- $storeConfig := index $global.Values.server.config.persistence $store -}}
{{- if $storeConfig.sql.existingSecret -}}
{{- $storeConfig.sql.existingSecret -}}
{{- else if $storeConfig.sql.password -}}
...