Access the TimescaleDB instance in STFC

  • To access the timescaleDB instance in STFC, please check latest k8s-test job(line 57) to get the latest external IP and port.

  • The external IP for mid: 10.200.10.143/timescaledb.ska-eda-mid-db.svc.cluster.local `` and port : ``5432 are for current deployment. If it is redeployed, make sure to update it with latest external IP.

  • The external IP for low : 10.200.12.14 / timescaledb.ska-eda-low-db.svc.cluster.local``and port : ``5432 are for current deployment. If it is redeployed, make sure to update it with latest external IP.

  • Install postgres client on user machine :Follow the steps in the given : https://www.postgresql.org/download/linux/ubuntu/ for installation.

  • Make sure the user’s machine is connected to SFTC vpn.

  • Enter below command to access the TimescaleDB.

    psql -U admin -h <external-ip> -p <port> -d <db-name>

  • Where default db-name is postgres and branch specific db-name can be ska_archiver_<branch_name> ,for eg : ska_archiver_hm_72.

  • Enter the password to access the DB.

TimescaleDB for SKA

Introduction

This directory contains a Helm chart to deploy a two node TimescaleDB cluster in a High Availability (HA) configuration on Kubernetes. This chart will do the following:

  • Creates two (by default) pods using a Kubernetes statefulset.

  • Each pod has a container created using the TimescaleDB docker image. - TimescaleDB 2.1 and PG 13

  • Each of the containers runs a TimescaleDB instance and Patroni agent.

  • Each TimescaleDB instance is configured for replication (1 Master + 1 Replicas).

Installation

To install the chart with the release name my-release, first in values.yaml you need to set credentials mentioned in list below. If you decide not to set those credentials, they will be randomly generated. Those credentials can be setup via helm only during helm first run and they won’t be rotated with subsequent helm update commands to prevent breaking the database.

The credentials can be found in above sections

  • The credentials for the superuser, admin and stand-by users

  • TLS Certificates

  • pgbackrest config (optional)

Then you can install the chart with: console helm install <pod-name> charts/timescaledb -n <namespace>

You can override parameters using the –set key=value[,key=value] argument to helm install, e.g., to install the chart with backup enabled:

console helm install <pod-name> charts/timescaledb -n <namespace> --set backup.enabled=true

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart.

console helm install <pod-name> -f <path to values.yaml> charts/timescaledb

In this case, a simple example-values.yaml is present in example folder, this way we can write multiple values.yaml as per specifications

Installing for different SKA environments

This repository provides multiple installation options tailored for needs of different SKA deployment environments. This is done because of differences in the computing infrastructure in each environment. The parameters specific to an environment are maintained in separate yaml files. These files should be given as additional parameters while installing the TimescaleDB in respective environment. For example, to install timescaledb chart for psi-low specifications, we can use following command

console helm install timescaledb-1 -f charts/timescaledb/environment/psi-low-values.yaml charts/timescaledb

Similarly different values.yaml can be used to deploy timescaledb as per the specifications of that environment.

For details about what parameters you can set, have a look at the [Administrator Guide](docs/admin-guide.md#configure)

Cleanup

To remove the spawned pods you can run a simple

console helm delete my-release

Some items, (pvc’s and S3 backups for example) are not immediately removed. To also purge these items, have a look at the [Administrator Guide](docs/admin-guide.md#cleanup)

  • Further reading

    • [Administrator Guide](docs/admin-guide.md)