- Pull the Docker-Compose file with downloadable images from Docker Hub
- Clone this repository or download the Docker-Compose file
- Execute
docker-compose up -d
- After one minute (grafana needs time) go to http://localhost:3000 (admin:admin)
-
Git the source code of each server and build images locally before run Docker-Compose:
2.1. Gno (genesis modified & listen address 0.0.0.0 tm2/pkg/bft/rpc/config/config.go)
git clone https://github.com/RaulBernal/gno.git cd gno docker build -t gnoland:bind0 .
2.2. TX-Indexder
cd .. git clone https://github.com/RaulBernal/tx-indexer.git cd tx-indexer docker build -t tx-indexer:latest .
2.3. Supernova
cd .. git clone https://github.com/RaulBernal/supernova.git cd supernova docker build -t supernova:script .
2.4. Enginetwo parser
git clone https://github.com/RaulBernal/enginetwo.git cd enginetwo docker build -t enginetwo:grafana .
2.5. Grafana
cd .. git clone https://github.com/RaulBernal/spacecraft.git cd spacecraft docker build -t grafana:gno .
2.6. Run with composer If you still are at spacecraft folder:
docker-compose -f docker-compose_images.yml up -d
Please follow this instructions to get everything restored again, what we will do is the following:
- Install and run a Gno.Land node (configure keys, accounts, systemd file service, etc)
- Install and run TX-Indexer as improved RPC/WS data endpoint (GraphQL)
- Download Supernova and automate some flying TXs
- Download and automate EngineTwo Parser, a middleware between TX-Indexer and Grafana, which parse blocks into a simple SQLite3 database.
- Compose a Grafana (docker image) with predefined connection to SQLite3 file & new working Dashboard
These instructions were tested in two different hosts running Ubuntu Linux v22 amd64
Prerequisites (with direct install, no docker) are:
- Linux amd64 (Ubuntu v22 recommended)
- To have a root or sudoer account
- GoLang v1.22
- Get script:
wget https://raw.githubusercontent.com/RaulBernal/spacecraft/main/install_go.sh
- Run it:
chmod +x install_go.sh && ./install_go.sh
- Get script:
- Docker & Docker Compose
- Get script:
wget https://raw.githubusercontent.com/RaulBernal/spacecraft/main/install_docker.sh
- Run it:
chmod +x install_docker.sh && ./install_docker.sh
- Get script:
- Download automated script
wget https://raw.githubusercontent.com/RaulBernal/spacecraft/main/install_gnoland.sh
- Run it
chmod +x install_gnoland.sh && ./install_gnoland.sh
- After execute the script the daemon will be running and persistent with systemd.
- You can start the node with:
sudo systemctl start gnoland.service && sudo journalctl -fu gnoland -o cat
- You can stop the node with:
sudo systemctl stop gnoland.service
- If you want to reset the Gnoland' state to block 0 run:
./reset_gnoland.sh
(stop the daemon first please)
- Download automated script
wget https://raw.githubusercontent.com/RaulBernal/spacecraft/main/install_tx-indexer.sh
- Run it
chmod +x install_tx-indexer.sh && ./install_tx-indexer.sh
- After execute the script the daemon will be running and persistent with systemd.
- You can start the node with:
sudo systemctl start tx-indexer.service && sudo journalctl -fu tx-indexer -o cat
- You can stop the node with:
sudo systemctl stop tx-indexer.service
- If you want to reset the TX-Indexer' state to block 0 run:
./reset_tx-indexer.sh
(stop the daemon first please)
- Download automated script
wget https://raw.githubusercontent.com/RaulBernal/spacecraft/main/install_supernova.sh
- Run it
chmod +x install_supernova.sh && ./install_supernova.sh
- You can run the Supernova_Simulation in a SCREEN session:
screen -S Supernova
cd supernova
./supernova_simulation_light.sh
- Press CTRL + A + D to leave it running
- To recover a running screen session type in terminal:
screen -r name_session
(screen -r
to list all)"
- Download automated script
wget https://raw.githubusercontent.com/RaulBernal/spacecraft/main/install_enginetwo.sh
- Run it
chmod +x install_enginetwo.sh && ./install_enginetwo.sh
- This is the alpha version of EngineTwo!!!.
- You can run the parser in a SCREEN session:
screen -S Parser
(Press CTRL + A + D to leave it running)
cd enginetwo
sudo -u grafanauser /usr/local/go/bin/go run main.go
- If you stop it and you want to resume, edit main.go, and replace the starting block in the main() functions
sudo -u grafanauser nano main.go"
If the last message was: Reached last known block height 5764, waiting for new blocks to be generated...
you need to put here go verifyAndInsertBlocks(db, 5765)
and rerun with sudo -u grafanauser /usr/local/go/bin/go run main.go
- If you want delete the database and start from the scratch:
sudo -u grafanauser rm data.sqlite3 && sudo -u grafanauser /usr/local/go/bin/go run main.go
- Download automated script
wget https://raw.githubusercontent.com/RaulBernal/spacecraft/main/install_grafana.sh
- Run it
chmod +x install_grafana.sh && ./install_grafana.sh
- Check if is running with:
docker ps
- Check LOGs with:
docker logs grafana
- If you want to rebuild the Grafana docker:
cd $HOME/grafana && docker-compose down && docker-compose up -d
- If you get this error:
ERROR: Volume grafana_data declared as external, but could not be found.
you can try to solve with:docker volume create --name=grafana_data