Running visibility on my-sql in k8s setup

Hi the out of box helms comes with visibility on ES and i think there is kafka to populate the visibility db, is that understanding correct?

In my setup , i want to run both temporal and visibility db in mysql, what changes do i need to make in helm to get this done?

2 Likes

Hi Madhu, thank you for the question!

Your understanding is correct, the out-of-the-box helm charts come with extended visibility, provided by ElasticSearch (and my understanding is that kafka is used solely for the extended visibility functionality).

If you want to deploy over mysql, you can use the instructions provided in https://github.com/temporalio/helm-charts#bring-your-own-mysql . This will configure the system to use mysql for both default and visibility data stores, but it will still use ElasticSearch for extended visibility features (such as tctl --ns mynamespace wf count).

You can also skip ElasticSearch (and ES-only extended visibility functionality) altogether. To do that, provide these two helm install options. to not include ElasticSearch/kafka in your installation:

  • --set elasticsearch.enabled=false
  • --set kafka.enabled=false

Here is an example of a complete helm install command line that does just that, which is based on what we continuously run in our test pipelines (I also just tested this, just in case;):

~/src/temporal-helm-charts $ helm install \
      -f values/values.mysql.yaml temporaltest \
      --set server.replicaCount=3 \
      --set server.config.persistence.default.sql.user=<MYSQLUSER> \
      --set server.config.persistence.default.sql.password=<MYSQLPWD> \
      --set server.config.persistence.visibility.sql.user=<MYSQLUSER> \
      --set server.config.persistence.visibility.sql.password=<MYSQLPWD> \
      --set server.config.persistence.default.sql.host=<MYSQLHOST> \
      --set server.config.persistence.visibility.sql.host=<MYSQLHOST> \
      --set server.config.persistence.default.sql.database=temporal \
      --set server.config.persistence.visibility.sql.database=temporal_visibility \
      --set elasticsearch.enabled=false  \
      --set kafka.enabled=false . \
      --timeout 15m

Hope this helps!

Thank you,
Mark.

PS I added a github ticket to also clearly document this in the readme. https://github.com/temporalio/helm-charts/issues/57

thanks @markmark lemme try it out.

Another follow up questions.
Does using ES vs Mysql change any of the metrics which are reported to prometheus/ else where? i.e. by not using advanced visibility (and hence ES), do we lose some metrics?