README

Swiss knife for Subquery indexers

This project collects the optimal infrastructure that makes it easier to work with the infrastructure and improve the quality of its indexer.

Infrastructure

dgrm_1

What is inside?

Inside the package, you can always support the indexer on the current version without the risk of damaging the configuration :)

The solution is based on

  • Postgres

  • Subquerynetwork/indexer-coordinator

  • Redis

  • Subquerynetwork/indexer-proxy

  • Trafik

  • Grafana

  • Node exporter

  • Wireguard

Requirements

  • Any Linux dist

  • docker-compose (https://github.com/docker/compose)

  • docker (https://www.docker.com/)

  • Hard drive NVME FROM 3TB

  • 64GB memory

  • Fast and stable ethernet connection

New setup

cd /opt
git clone https://github.com/web3cdnservices/subquery-indexer-toolkit.git
cd subquery-indexer-toolkit
bash ./tools/generate_initial_configuration

Script will generate keys and request for domain name for indexer and email.

Next step preparing system and deploy all requrement software.

bash ./tools/start_indexer_with_wireguard 
image

After this command all services succesfully initialized. Next step - Connect indexer wallet to coordinator and generate operator wallet.

Your SSL certificated will be requested automatically and reissue if needed.
image

Upgrade

cd /opt/subquery-indexer-toolkit
git pull
bash ./tools/start_indexer_with_wireguard 

All your configs will be safe. You not need manually edit configurations anymore.

Connecting to wireguard network

You shuld install wireguard client on your home pc

  • Macos (https://apps.apple.com/us/app/wireguard/id1451685025?mt=12)

  • Linux (see repos. yum install wireguard, emerge -av wireguard, apt install wireguard)

  • Windows (https://www.wireguard.com/install/) PS also you can have access to coordinator/grafana pr any service anywhere with your android,iphone. (Just import config)

    • https://play.google.com/store/apps/details?id=com.wireguard.android

    • https://apps.apple.com/us/app/wireguard/id1441195209

Archive SubqueryIndexerHandbook.tar.gz containes wireguard folder with 2 configuration files. You need only one. Secondary for secondary device or for team.

Fell free copy paste configuratin and connect with it. Nothing nedd to change.

Internal addresses

By default Wireguard mask 10.253.1.0/24, but you can set you own in .env file Internal network mask: 172.29.13.0/24 All addresses and services accessible via private network!

Service
Address
Annotation

Postgres

172.29.13.2

Redis

172.29.13.4

Indexer Coordinator

Traefik

172.29.13.6

ports 8082(metrics), 80(public), 443(public with Letsencrypt)

Wireguard by default use 816 port. But you can set it manually in .env file. This file NEVER overwrites, Script preventing override.

Inbox monitoring

  • Postgres statistic

  • Internal metrics from Subquery

  • Traefik metrics (for load counting and error counter)

  • Node exporter

    Some screenshots from just created instance.

Node exporter.

Postgres.

Traefik.

Basic indexer stat.

*** New dashboards ***

New features for monitoring & alerting indexers

*** revision 3 ***

Guys, project from indexer for indexers. Fill free for Issues.

Very soon postgres migration for low space servers! Be patient.

Last updated