Skip to main content

Advanced operations

Resetting database credentials


This procedure cause service disruption on application which use reset database account

ThingPark Enterprise applications use each one it's own database account to connect to databases.

Both mongo and sql credentials can be reset and automatically renewed. From 7.2, It's done by deleting the secret that store credentials of account to renew:

  • Select the account to reset in the list of following secrets
kubectl -n $NAMESPACE get secret | grep  "mongo-account"
kubectl -n $NAMESPACE get secret | grep "sql-account"
  • Delete (the) selected secret(s), here both mongo and sql one used by the smp service
$ kubectl -n $NAMESPACE delete secret smp-sql-account
secret "smp-sql-account" deleted
$ kubectl -n $NAMESPACE delete secret smp-mongo-account
secret "smp-mongo-account" deleted
kubectl -n $NAMESPACE rollout restart deployment sql-proxy 
  • Finally trigger a rollout restart of (the) application deployment(s). If you are not sure about impacted deployment, restart all next one
kubectl -n $NAMESPACE rollout restart deployment wlogger twa-ran twa-dev twa-core twa-admin tpx-flow-supervisor tpx-flow-hub tpx-flow-engine tpx-flow-bridge tpx-flow-api tp-dx-admin smp-tpe  nssa-spectrum-analysis nssa-network-survey wireless-pki

Update IotFlow connection topics retentions

This procedure must be used to updated existing IotFLow connection topics when tpx-flow.kafka.topicConfigRetentionMs value is changed.

  1. Open a bash session within a kafka broker pod
kubectl -n $NAMESPACE exec -it kafka-cluster-kafka-0 -- bash
  1. Update each Tpx.ConnectionId.xx topic configuration with tpx-flow.kafka.topicConfigRetentionMs value
# Retrieve connection topic names
./bin/ --bootstrap-server --list | grep 'Tpx.ConnectionId'
# Apply for each one the new retention value
./bin/ --bootstrap-server --topic Tpx.ConnectionId.3 --alter --add-config
./bin/ --bootstrap-server --topic Tpx.ConnectionId.3 --describe