This project collects the optimal infrastructure that makes it easier to work with the infrastructure and improve the quality of its indexer.
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
- 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
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
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.
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.
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)
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.
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.
-
Postgres statistic
-
Internal metrics from Subquery
-
Traefik metrics (for load counting and error counter)
-
Node exporter
Some screenshots from just created instance.
New features for monitoring & alerting indexers
Very soon postgres migration for low space servers! Be patient.