This script automates the setup, management, and restoration of the Zenon Network (go-zenon
) node. It handles dependencies installation, Go installation, Zenon deployment, and service management. The script also offers additional options for restoring from a bootstrap, monitoring logs, and installing Grafana for visualizing data.
go-zenon
repository, builds it, and sets it up as a service.make
, gcc
, and jq
automatically without user intervention.go-zenon
service.znnd
logs in real-time.This script assumes you're running a Linux distribution that uses apt
as a package manager (e.g., Ubuntu or Debian). You need to have git
installed. You must also have superuser (root) privileges to execute this script.
Clone the script or save it locally, then run it using a bash terminal:
sudo ./go-zenon.sh [OPTIONS]
--deploy
: Deploy and set up the Zenon Network.--restore
: Restore go-zenon
from a bootstrap.--restart
: Restart the go-zenon
service.--stop
: Stop the go-zenon
service.--start
: Start the go-zenon
service.--status
: Monitor znnd
logs.--grafana
: Install Grafana for monitoring metrics.--help
: Display the help message.To deploy and set up the Zenon Network, run:
sudo ./go-zenon.sh --deploy
This will:
make
, gcc
, jq
).go-zenon
repository.go-zenon
service.To restore from a bootstrap, use:
sudo ./go-zenon.sh --restore
To monitor the znnd
logs, run:
sudo ./go-zenon.sh --status
To install Grafana for visualizing Zenon metrics:
sudo ./go-zenon.sh --grafana
You can adjust the Go version or repository URL by modifying the following variables in the script:
GO_VERSION
. The default is 1.23.0
.https://github.com/zenon-network/go-zenon.git
. You can input a different URL when prompted, or modify the script to always use a specific repository.sudo
for it to function properly.apt-get
operations.This README.md
provides an overview of how to use the script, its features, and specific commands for deployment and service management. Let me know if you need any further adjustments!