Skip to content

web3cdnservices/subquery-indexer-toolkit

Repository files navigation

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

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. image

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

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 http://172.29.13.3:8000
Indexer Proxy http://172.29.13.5:8375
Traefik 172.29.13.6 ports 8082(metrics), 80(public), 443(public with Letsencrypt)
Prometheus http://172.29.13.8:9090
Node Exporter http://172.29.13.9:9100
Grafana http://172.29.13.10:3000

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. image

Postgres. image

Traefik. image

Basic indexer stat. image

*** New dashboards *** screencapture-192-168-155-8-3000-d-c8889d8b-d737-4e86-bdaa-9926870775f2-subquery-indexer-heartbeat-2023-07-28-16_27_36

New features for monitoring & alerting indexers image_2023-07-30_05-15-03

*** revision 3 *** subquery_dashboar_demo_3

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

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published