Updated Setting up a Hub (markdown)
parent
c5a34db1de
commit
cb768fad74
1 changed files with 27 additions and 15 deletions
|
@ -1,10 +1,12 @@
|
||||||
## create an aws instance
|
## Server Setup
|
||||||
|
|
||||||
|
### create an aws instance
|
||||||
|
|
||||||
We recommend a `c5.4xlarge` instance or equivalent (16 vCPU, 32G RAM, 500GB SSD drive)
|
We recommend a `c5.4xlarge` instance or equivalent (16 vCPU, 32G RAM, 500GB SSD drive)
|
||||||
|
|
||||||
(As a benchmark, on Nov 13, 2022 this setup used 350 gigs of disk space.)
|
(As a benchmark, on Nov 13, 2022 this setup used 350 gigs of disk space.)
|
||||||
|
|
||||||
## create lbry user
|
### create lbry user
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo adduser lbry --disabled-password --gecos ""
|
sudo adduser lbry --disabled-password --gecos ""
|
||||||
|
@ -12,10 +14,10 @@ sudo -H -u lbry bash -c 'mkdir -p /home/lbry/.ssh && echo "YOUR-SSH-KEY" >> /hom
|
||||||
sudo -H -u root bash -c 'echo "lbry ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
|
sudo -H -u root bash -c 'echo "lbry ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
|
||||||
```
|
```
|
||||||
|
|
||||||
## logout and log in as lbry user
|
### logout and log in as lbry user
|
||||||
|
|
||||||
|
|
||||||
## install docker
|
### install docker
|
||||||
|
|
||||||
https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
|
https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
|
||||||
|
|
||||||
|
@ -35,8 +37,7 @@ sudo systemctl enable containerd.service
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### create lbcd and rocksdb volumes
|
||||||
## create lbcd and rocksdb volumes
|
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir -p /home/lbry/docker-volumes/lbcd /home/lbry/docker-volumes/rocksdb
|
mkdir -p /home/lbry/docker-volumes/lbcd /home/lbry/docker-volumes/rocksdb
|
||||||
|
@ -46,7 +47,9 @@ docker volume create --driver local --opt type=none --opt device=/home/lbry/dock
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## download lbcd snapshot
|
## LBCD
|
||||||
|
|
||||||
|
### download lbcd snapshot
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt install -y zstd
|
sudo apt install -y zstd
|
||||||
|
@ -56,13 +59,13 @@ sudo chown -R 999:999 .
|
||||||
cd ~
|
cd ~
|
||||||
```
|
```
|
||||||
|
|
||||||
## download docker-compose.yml
|
### download docker-compose.yml
|
||||||
|
|
||||||
https://github.com/lbryio/hub/wiki/docker-compose.yml
|
https://github.com/lbryio/hub/wiki/docker-compose.yml
|
||||||
|
|
||||||
__remember to remove markdown if downloading directly from that url__
|
__remember to remove markdown if downloading directly from that url__
|
||||||
|
|
||||||
## start lbcd first and let it catch up
|
### start lbcd first and let it catch up
|
||||||
|
|
||||||
```
|
```
|
||||||
docker compose up -d lbcd
|
docker compose up -d lbcd
|
||||||
|
@ -71,7 +74,9 @@ docker compose up -d lbcd
|
||||||
wait for it to sync fully (how will they know?)
|
wait for it to sync fully (how will they know?)
|
||||||
|
|
||||||
|
|
||||||
## download scribe snapshot
|
## Scribe
|
||||||
|
|
||||||
|
### download scribe snapshot
|
||||||
|
|
||||||
```
|
```
|
||||||
cd /home/lbry/docker-volumes/lbcd
|
cd /home/lbry/docker-volumes/lbcd
|
||||||
|
@ -80,7 +85,7 @@ sudo chown -R 999:999 .
|
||||||
cd ~
|
cd ~
|
||||||
```
|
```
|
||||||
|
|
||||||
## start scribe and let it sync
|
### start scribe and let it sync
|
||||||
|
|
||||||
scribe sync takes two days if you sync from scratch, or an hour or two if you use a recent snapshot
|
scribe sync takes two days if you sync from scratch, or an hour or two if you use a recent snapshot
|
||||||
|
|
||||||
|
@ -90,7 +95,9 @@ docker compose up -d scribe
|
||||||
|
|
||||||
wait for it to sync
|
wait for it to sync
|
||||||
|
|
||||||
## then start elastic sync and wait for that
|
## Elastic Sync
|
||||||
|
|
||||||
|
### then start elastic sync and wait for that
|
||||||
|
|
||||||
```
|
```
|
||||||
docker compose up -d scribe_elastic_sync
|
docker compose up -d scribe_elastic_sync
|
||||||
|
@ -99,10 +106,15 @@ docker compose up -d scribe_elastic_sync
|
||||||
wait for it to sync
|
wait for it to sync
|
||||||
|
|
||||||
|
|
||||||
## finally start herald
|
## Herald
|
||||||
|
|
||||||
|
## Monitoring
|
||||||
|
|
||||||
|
start prometheus and grafana
|
||||||
|
|
||||||
|
do this to check that everything is working
|
||||||
|
|
||||||
|
|
||||||
|
## Federation
|
||||||
## federation
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue