Skip to content

Commit 6518b77

Browse files
yzang2019Yiming Zang
and
Yiming Zang
authored
Add README for setting up local docker cluster (#469)
* Add README for setting up local docker cluster Co-authored-by: Yiming Zang <yzang@twitter.com>
1 parent 393a53c commit 6518b77

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

docker/README.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Prerequisite
2+
3+
### Install Docker and Docker Compose
4+
MacOS:
5+
```sh
6+
# The easiest and recommended way to get Docker and
7+
# Docker Compose is to install Docker Desktop here:
8+
https://docs.docker.com/desktop/install/mac-install/
9+
```
10+
11+
Ubuntu:
12+
```sh
13+
# Follow the below link to install docker on ubuntu
14+
https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
15+
# Follow the below link to install standalone docker compose
16+
https://docs.docker.com/compose/install/other/
17+
```
18+
19+
## Local Cluster
20+
21+
Detailed instruction: see the `Makefile` in the root of [the repo](https://github.com/sei-protocol/sei-chain/blob/master/Makefile)
22+
23+
**To start a single local node**
24+
25+
```sh
26+
make build-docker-node && make run-docker-node
27+
```
28+
29+
**To start 4 node cluster**
30+
31+
```sh
32+
# If this is the first time or you want to rebuild the binary:
33+
make docker-cluster-start
34+
35+
# If you have run docker-cluster-start and build/seid exist,
36+
# you can skip the build process to quick start by:
37+
make docker-cluster-start-skipbuild
38+
```
39+
All the logs and genesis files will be generated under the temporary build/generated folder.
40+
41+
```sh
42+
# To monitor logs after cluster is started
43+
tail -f build/generated/seid-0.log
44+
```
45+
46+
**To ssh into a single node**
47+
```sh
48+
# List all containers
49+
docker ps -a
50+
# SSH into a running container
51+
docker exec -it [container_name] /bin/bash
52+
```
53+
54+
****
55+
56+
57+
58+
# Build with Us!
59+
If you are interested in building with Sei Network:
60+
Email us at team@seinetwork.io
61+
DM us on Twitter https://twitter.com/SeiNetwor

docker/localnode/scripts/step0_build.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
# Input parameters
44
NODE_ID=${ID:-0}
55

6-
echo $"Build seid from local branch"
76
# Build seid
7+
echo "Building seid from local branch"
8+
git config --global --add safe.directory /sei-protocol/sei-chain
89
LEDGER_ENABLED=false
910
make clean
1011
make build-linux

readme.md

+6
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ WantedBy=multi-user.target
121121
* Create the symlinlk: `sudo systemctl enable seid.service`
122122
* Start the node sudo: `systemctl start seid && journalctl -u seid -f`
123123

124+
**Start a chain on 4 node docker cluster**
125+
126+
* Start local 4 node cluster: `make docker-cluster-start`
127+
* SSH into a docker container: `docker exec -it [container_name] /bin/bash`
128+
* Stop local 4 node cluster: `make docker-cluster-stop`
129+
124130
**Troubleshooting**
125131

126132
* If you see any errors related to nitro, try: `make install-all`

0 commit comments

Comments
 (0)