-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deployment testnet and mainnet (#100)
- Loading branch information
1 parent
e74a83d
commit 19f07a8
Showing
4 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Prerequisites | ||
Install Docker following the installation guide for Linux OS: [https://docs.docker.com/engine/installation/](https://docs.docker.com/engine/installation/) | ||
* [CentOS](https://docs.docker.com/install/linux/docker-ce/centos) | ||
* [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu) | ||
|
||
Install docker compose | ||
* [Docker compose](https://docs.docker.com/compose/install/) | ||
|
||
Build dependencies | ||
* [Network](https://docs.u2u.xyz/network/build-dependencies) | ||
* [Create validator wallet](https://docs.u2u.xyz/network/run-validator-node/mainnet-validator-node#create-a-validator-wallet) | ||
|
||
### Buiding image | ||
|
||
``` | ||
cd <path>/go-u2u | ||
make NET=mainnet u2u-image | ||
``` | ||
|
||
### Configuration | ||
``` | ||
Update password wallet in "/etc/password" | ||
Go to <path>/go-u2u/deployment/mainnet | ||
Update config in docker-compose.yml: | ||
validator.id <id> | ||
validator.pubkey <pubkey> | ||
bootnodes <bootnodes> | ||
``` | ||
|
||
### Running node | ||
``` | ||
docker compose up -d | ||
``` | ||
|
||
### Logging | ||
```` | ||
docker logs -f --tail 10 u2u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: '3' | ||
services: | ||
node: | ||
image: u2u:latest | ||
container_name: u2u | ||
restart: always | ||
volumes: | ||
- ./data:/root/.u2u | ||
- ../../mainnet.g:/mainnet.g | ||
- /etc/password:/password | ||
ports: | ||
- 30303:30303 | ||
- 30303:30303/udp | ||
- 19090:19090 | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: 300m | ||
command: | ||
--genesis /mainnet.g | ||
--gcmode full | ||
--genesis.allowExperimental | ||
--cache 3875 | ||
--port 30303 | ||
--http | ||
--http.addr="0.0.0.0" | ||
--http.port=8545 | ||
--http.corsdomain="*" | ||
--http.vhosts="*" | ||
--validator.id <id> | ||
--validator.pubkey <pubkey> | ||
--validator.password /password | ||
--bootnodes <bootnodes> | ||
--monitor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Prerequisites | ||
Install Docker following the installation guide for Linux OS: [https://docs.docker.com/engine/installation/](https://docs.docker.com/engine/installation/) | ||
* [CentOS](https://docs.docker.com/install/linux/docker-ce/centos) | ||
* [Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu) | ||
|
||
Install docker compose | ||
* [Docker compose](https://docs.docker.com/compose/install/) | ||
|
||
Build dependencies | ||
* [Network](https://docs.u2u.xyz/network/build-dependencies) | ||
* [Create validator wallet](https://docs.u2u.xyz/network/run-validator-node/testnet-validator-node#create-a-validator-wallet) | ||
|
||
### Buiding image | ||
``` | ||
cd <path>/go-u2u | ||
make NET=testnet u2u-image | ||
``` | ||
|
||
### Configuration | ||
``` | ||
Update password wallet in "/etc/password" | ||
Go to <path>/go-u2u/deployment/testnet | ||
Update config in docker-compose.yml: | ||
validator.id <id> | ||
validator.pubkey <pubkey> | ||
bootnodes <bootnodes> | ||
``` | ||
|
||
### Running node | ||
``` | ||
docker compose up -d | ||
``` | ||
|
||
### Logging | ||
```` | ||
docker logs -f --tail 10 u2u |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: '3' | ||
services: | ||
node: | ||
image: u2u:latest | ||
container_name: u2u | ||
restart: always | ||
volumes: | ||
- ./data:/root/.u2u | ||
- ../../testnet.g:/testnet.g | ||
- /etc/password:/password | ||
ports: | ||
- 30303:30303 | ||
- 30303:30303/udp | ||
- 19090:19090 | ||
logging: | ||
driver: "json-file" | ||
options: | ||
max-size: 300m | ||
command: | ||
--genesis /testnet.g | ||
--gcmode full | ||
--genesis.allowExperimental | ||
--cache 3875 | ||
--port 30303 | ||
--http | ||
--http.addr="0.0.0.0" | ||
--http.port=8545 | ||
--http.corsdomain="*" | ||
--http.vhosts="*" | ||
--validator.id <id> | ||
--validator.pubkey <pubkey> | ||
--validator.password /password | ||
--bootnodes <bootnodes> | ||
--monitor |