Skip to content

How to Access Databases

Prerequisites

MySQL Access

Overview

Use the MySQL client available in the launcher pod to connect to MySQL databases.

Steps

  1. Scale up the launcher deployment

    bash
    kubectl scale deploy launcher -nlauncher --replicas=1
  2. Exec inside the launcher pod

    bash
    make kexec
  3. Connect to MySQL

    bash
    mysql -u <user> -h <host_ip|host_fqdn> -p

Connection Details

  • Find <user> and <host_ip|host_fqdn> in 1Password item: TrueWatch <region-code> Infra
  • Common usernames: root or df_core

Cleanup

  1. Scale down the launcher pod when finished

    bash
    kubectl scale deploy launcher -nlauncher --replicas=0

PostgreSQL Access

Overview

Use the psql client available in any func2 pod to connect to PostgreSQL databases.

Steps

  1. Exec inside any func2 pod

    bash
    make kexec
  2. Connect to PostgreSQL

    bash
    psql -h <hostname> -U <username> <database>

Connection Details

  • Find connection parameters in 1Password item: TrueWatch <region-code> Infra

Redis Access

Overview

Use the redis-cli client available in any func2 pod to connect to Redis.

Steps

  1. Exec inside any func2 pod

    bash
    make kexec
  2. Connect to PostgreSQL

    bash
    redis-cli -h <hostname>
    redis-cli
    auth <password>

Connection Details

  • Find connection parameters using kubectl get cm core -nforethought-core -o yaml | grep redis -A10

ScopeDB Access

Overview

Use the scopeql client available in the scopedb-default pod to query ScopeDB.

Steps

  1. Exec inside the scopedb-default pod

    bash
    make kexec
  2. Launch the ScopeQL client

    bash
    scopeql