MacOS:
# The easiest and recommended way to get Docker and
# Docker Compose is to install Docker Desktop here:
https://docs.docker.com/desktop/install/mac-install/Ubuntu:
# Follow the below link to install docker on ubuntu
https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
# Follow the below link to install standalone docker compose
https://docs.docker.com/compose/install/other/Detailed instruction: see the Makefile in the root of the repo
To start a single local node (Not Recommended)
make build-docker-node && make run-local-nodeTo start 4 node cluster
This will start a 4 node sei chain cluster.
# If this is the first time or you want to rebuild the binary:
make docker-cluster-start
# If you have run docker-cluster-start and build/seid exist,
# you can skip the build process to quick start by:
make docker-cluster-start-skipbuildAll the logs and genesis files will be generated under the temporary build/generated folder.
# To monitor logs after cluster is started
tail -f build/generated/logs/seid-0.logTo ssh into a single node
# List all containers
docker ps -a
# SSH into a running container
docker exec -it [container_name] /bin/bashCluster and monitoring together: from the repo root you can run:
make docker-cluster-start-monitoringThis stops any existing compose stack, rebuilds the node image, starts the four-node local cluster, and brings up the Prometheus and Grafana containers via the monitoring compose overlay, so you do not need to run the scripts below for that flow. To tear down the cluster and monitoring containers together:
make docker-cluster-stop-monitoringScripts only: to start Prometheus and Grafana by themselves (for example when you are not using the make target above):
./docker/monitornode/scripts/start-prometheus.sh
./docker/monitornode/scripts/start-grafana.shGrafana UI: http://localhost:3000 (login: admin / admin). To stop containers started via the scripts:
./docker/monitornode/scripts/stop-prometheus.sh
./docker/monitornode/scripts/stop-grafana.shRequirement: Follow the above steps to start a 4 node docker cluster before starting any state sync node
# Be sure to start up a 4-node cluster before you start a state sync node
make docker-cluster-start
# Wait for at least a few minutes till the latest block height exceed 500 (this can be changed via app.toml)
seid status |jq
# Start up a state sync node
make run-rpc-nodeOne of the fanciest thing of using docker is fast iteration. Here we support:
- Being able to make changes locally and start up the chain to see the immediate impact
- Being able to make changes to local dependency repo (Cosmo SDK/Tendermint) and start the chain with the latest changes without bumping or release any binary version
In order to make local debugging work, you can follow these steps:
# Clone your dependency repo and put them under the same path as sei-chain
cd sei-chain
cd ../
git clone https://github.com/sei-protocol/sei-tendermint.git
git clone https://github.com/sei-protocol/sei-cosmos.git
# Modify go.mod file to point to local repo, must use the exact same path as below:
go mod edit -replace github.com/cosmos/cosmos-sdk=../sei-cosmos
go mod edit -replace github.com/tendermint/tendermint=../sei-tendermint
# You are good to go now! Make changes as you wish to any of the dependency repo and run docker to test it out.
If you are interested in building with Sei Network: Email us at team@seinetwork.io DM us on Twitter https://twitter.com/SeiNetwork