From 81fcf1b0f9e307f9e224e98cac39283b0cbdf0f1 Mon Sep 17 00:00:00 2001 From: Alex Grin <362784+lyoshenka@users.noreply.github.com> Date: Tue, 10 Jan 2023 15:37:38 -0500 Subject: [PATCH] Updated Setting up a Hub (markdown) --- Setting-up-a-Hub.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Setting-up-a-Hub.md b/Setting-up-a-Hub.md index bb9b512..3b472d1 100644 --- a/Setting-up-a-Hub.md +++ b/Setting-up-a-Hub.md @@ -8,7 +8,7 @@ We recommend a `c5.4xlarge` instance or equivalent (16 vCPU, 32G RAM, 500GB SSD ### create lbry user -``` +```bash sudo adduser lbry --disabled-password --gecos "" sudo -H -u lbry bash -c 'mkdir -p /home/lbry/.ssh && echo "YOUR-SSH-KEY" >> /home/lbry/.ssh/authorized_keys' sudo -H -u root bash -c 'echo "lbry ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers' @@ -21,7 +21,7 @@ sudo -H -u root bash -c 'echo "lbry ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers' https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository -``` +```bash sudo apt-get update sudo apt-get install -y ca-certificates curl gnupg lsb-release sudo mkdir -p /etc/apt/keyrings @@ -39,7 +39,7 @@ sudo systemctl enable containerd.service ### create lbcd and rocksdb volumes -``` +```bash mkdir -p /home/lbry/docker-volumes/lbcd /home/lbry/docker-volumes/rocksdb # sudo chown -R 999:999 /home/lbry/docker-volumes ## not needed unless you encounter problems docker volume create --driver local --opt type=none --opt device=/home/lbry/docker-volumes/lbcd --opt o=bind lbry_lbcd @@ -51,7 +51,7 @@ docker volume create --driver local --opt type=none --opt device=/home/lbry/dock ### download lbcd snapshot -``` +```bash sudo apt install -y zstd cd /home/lbry/docker-volumes/lbcd wget -c https://snapshots.lbry.com/blockchain/lbcd_snapshot_1238238_v0.22.116_2022-10-07.tar.zst -O - | tar --zstd -x @@ -67,7 +67,7 @@ __remember to remove markdown if downloading directly from that url__ ### start lbcd first and let it catch up -``` +```bash docker compose up -d lbcd ``` @@ -78,7 +78,7 @@ wait for it to sync fully (how will they know?) ### download scribe snapshot -``` +```bash cd /home/lbry/docker-volumes/lbcd wget -c https://snapshots.lbry.com/hub/block_1288882/lbry-rocksdb.tar -O - | tar -x sudo chown -R 999:999 . @@ -89,7 +89,7 @@ cd ~ scribe sync takes about a week if you sync from scratch, or an hour or two if you use a recent snapshot -``` +```bash docker compose up -d scribe ``` @@ -99,7 +99,7 @@ wait for it to sync ### then start elastic sync and wait for that -``` +```bash docker compose up -d scribe_elastic_sync ```