If you like WireQuery, please ⭐️ it on GitHub
Table of Contents

Server Installation

Prerequisites

WireQuery is available as two Docker images: one for the frontend and one for the backend. In order for it to operate, you need to have Docker, Kubernetes or a similar environment installed with one or more instances of:

  • Postgres 14 or higher with Timescaledb extension installed
  • Redis 7 or higher

Installing WireQuery on Kubernetes

The simplest way to install WireQuery on WireQuery is through Helm. There is a Helm Chart available in the /helm directory of the WireQuery repository.

WireQuery needs to be provided a Postgresql and Redis datasource, among other properties. As such, let's start by creating a value.yaml file. For example:

wirequery-backend:
  settings:
    redisHostName: wirequery-redis-master
    redisPort: "6379"
    dbMigrateUser: postgres
    dbMigratePassword: postgres
    dbMigrateJdbcUrl: "jdbc:postgresql://wirequery-postgresql:5432/wirequery"
    dbUser: postgres
    dbPassword: postgres
    dbUrl: "jdbc:postgresql://wirequery-postgresql:5432/wirequery"
    adminPassword: <<some-admin-password>>

Here, the db and dbMigrate user, password and jdbc url need to point to an existing Postgres instance. Similarly, the redisHostName and redisPort need to point to an existing Redis instance.

The fields in settings are defined as follows:

  • dbMigrateUser: username of a user with root privileges
  • dbMigratePassword: password of a user with root privileges
  • dbMigrateJdbcUrl: JDBC url of TSDB database, e.g.: jdbc:postgresql://wirequery-postgresql:5432/wirequery
  • redisHostName: host name of Redis instance
  • redisPort: port of Redis instance, e.g. 6379
  • dbUser: username of a user with row security enabled
  • dbPassword: password of a user with row security enabled
  • dbUrl: JDBC url of TSDB database, e.g.: jdbc:postgresql://wirequery-postgresql:5432/wirequery
  • adminPassword: the admin password when initializing WireQuery

The chart can also be configured to provide Ingress. For example:

ingress:
  enabled: true
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production
  className: nginx
  tls:
    - secretName: wirequery-cert-myinstance
      hosts:
        - "myinstance.mydomain.io"
global:
  hosts:
    - host: "myinstance.mydomain.io"
grpcIngress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: letsencrypt-production
    nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
    nginx.ingress.kubernetes.io/server-snippet: |
      grpc_read_timeout "86400s";
      grpc_send_timeout "86400s";
      client_body_timeout "86400s";
  className: nginx
  tls:
    - secretName: wirequery-cert-grpc
      hosts:
        - "grpc.mydomain.io"
  hosts:
    - host: "grpc.mydomain.io"

Now that we have a values.yaml file configured, we can use Helm to install the Helm Chart:

helm install -f values.yaml --repo https://raw.githubusercontent.com/wirequery/wirequery/main/helm/wirequery/ wirequery wirequery

Congratulations, you just installed WireQuery on your Kubernetes environment! Time to Get Started.