Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Resource Access Guide

This document outlines the procedures for accessing various project resources and environments.

Staging Database (Indexer)

This section details how to connect to the Staging environment database used by the Indexer.

Prerequisites

  1. Cluster Access: Ensure you have access to the Kube360 cluster.
  2. Credentials: Obtain the necessary database credentials. Contact Sibi if you do not have them.

Connection Steps

Run the following commands in your terminal to access the database pod:

  1. Configure your shell for the cluster (replace fish with your preferred shell if necessary):

    k3 kubeconfig fish
    
  2. Launch a temporary pod with a PostgreSQL client:

    kubectl run psql-client --rm -it --image=ubuntu -- /bin/bash
    
  3. Inside the pod, install the PostgreSQL client:

    apt update && apt install -y postgresql-client
    
  4. Connect to the database:

    psql -h satoshi-staging-ro.satoshi-sandbox.svc.cluster.local -U indexer -d indexerv2
    

Example Usage

Once connected, you can execute SQL queries. For example:

SELECT operation_id 
FROM receipt_to_operation_map 
WHERE receipt_id = 'Dyy1BVtx6Zd5B8RUzVoq4zk9p7C94Zo8int9T4eqQcXg';