init: libra instructions
This commit is contained in:
commit
adcd7a4aba
61
README.md
Normal file
61
README.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
### Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# ---------------------------
|
||||||
|
# 1. Environment setup (Ubuntu 20.04)
|
||||||
|
# ---------------------------
|
||||||
|
|
||||||
|
# install deps
|
||||||
|
sudo apt install tmux git make jq --yes
|
||||||
|
|
||||||
|
# download latest release
|
||||||
|
curl -sL https://api.github.com/repos/OLSF/libra/releases/latest | jq -r '.assets[].browser_download_url' | wget -i -
|
||||||
|
|
||||||
|
# make binaries executable
|
||||||
|
chmod +x ...
|
||||||
|
|
||||||
|
# extract web-monitor
|
||||||
|
tar -xf web-monitor.tar.gz --directory ~/.0L/web-monitor/
|
||||||
|
|
||||||
|
# add to .bashrc
|
||||||
|
export PATH=$HOME/libra:$PATH
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
# ---------------------------
|
||||||
|
# 2. Onboarding
|
||||||
|
# ---------------------------
|
||||||
|
|
||||||
|
# create blockchain account
|
||||||
|
onboard keygen
|
||||||
|
|
||||||
|
# mine genesis proof
|
||||||
|
onboard val -u $IP
|
||||||
|
mkdir init-backup && cp -r ~/.0L/* ~/init-backup/
|
||||||
|
|
||||||
|
# ---------------------------
|
||||||
|
# 3. Diem Node
|
||||||
|
# ---------------------------
|
||||||
|
|
||||||
|
# create systemd service and copy contents
|
||||||
|
sudo nano /etc/systemd/system/diem-node.service
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl start diem-node.service
|
||||||
|
sudo systemctl enable diem-node.service
|
||||||
|
|
||||||
|
# ---------------------------
|
||||||
|
# 4. Tower
|
||||||
|
# ---------------------------
|
||||||
|
|
||||||
|
# create systemd service and copy content
|
||||||
|
sudo nano /etc/systemd/user/tower.service
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
systemctl --user start tower.service
|
||||||
|
systemctl --user enable tower.service
|
||||||
|
```
|
||||||
|
|
||||||
|
### Debug
|
||||||
|
|
||||||
|
```bash
|
||||||
|
tail -n 100 -f ~/logs/node.log
|
||||||
|
tail -n 100 -f ~/logs/tower.log
|
||||||
|
```
|
20
diem-node.service
Normal file
20
diem-node.service
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=0L Node Service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
LimitNOFILE=200000
|
||||||
|
|
||||||
|
# Point the config to either full node or validator node
|
||||||
|
WorkingDirectory=/home/deployer/.0L
|
||||||
|
ExecStart=/home/deployer/libra-release/diem-node --config /home/deployer/.0L/validator.node.yaml
|
||||||
|
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10s
|
||||||
|
|
||||||
|
# Make sure you CREATE the directory and file for your node.log
|
||||||
|
StandardOutput=file:/home/deployer/logs/node.log
|
||||||
|
StandardError=file:/home/deployer/logs/node.log
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=diem-node.service
|
15
libra-monitor.service
Normal file
15
libra-monitor.service
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=0L Monitor Service
|
||||||
|
|
||||||
|
ExecStart=/home/deployer/libra-release/ol serve
|
||||||
|
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10s
|
||||||
|
|
||||||
|
# Make sure you CREATE the directory and file for your node.log
|
||||||
|
StandardOutput=file:/home/deployer/logs/monitor.log
|
||||||
|
StandardError=file:/home/deployer/logs/monitor.log
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=libra-monitor.service
|
18
tower.service
Normal file
18
tower.service
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=0L Tower Service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# Point the config to either full node or validator node
|
||||||
|
WorkingDirectory=/home/deployer/.0L
|
||||||
|
ExecStart=/home/deployer/libra-release/tower -o start
|
||||||
|
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10s
|
||||||
|
|
||||||
|
# Make sure you CREATE the directory and file for your node.log
|
||||||
|
StandardOutput=file:/home/deployer/logs/tower.log
|
||||||
|
StandardError=file:/home/deployer/logs/tower.log
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=diem-tower.service
|
Loading…
Reference in New Issue
Block a user