From 28f8607fc7df644876025554ca7affdab189bc29 Mon Sep 17 00:00:00 2001 From: Ben van Hartingsveldt Date: Wed, 23 Jul 2025 21:18:52 +0200 Subject: [PATCH] Fill all tutorial pages --- app/components/note.js | 4 +- documents/tutorials.md | 13 +++ documents/tutorials/setup-blockchain-lbcd.md | 53 ++++++++++++ .../tutorials/setup-blockchain-lbrycrd.md | 6 +- documents/tutorials/setup-elasticsearch.md | 42 ++++++++++ documents/tutorials/setup-hub.md | 84 +++++++++++++++++++ documents/tutorials/setup-sdk-lbrynet.md | 19 +++++ 7 files changed, 216 insertions(+), 5 deletions(-) create mode 100644 documents/tutorials/setup-elasticsearch.md diff --git a/app/components/note.js b/app/components/note.js index ed5252c..19a9eff 100644 --- a/app/components/note.js +++ b/app/components/note.js @@ -11,9 +11,9 @@ import { html } from 'hono/html' // E X P O R T -export default (text) => html` +export default () => html`
Note - ${text} + It is recommended to use LBCD.
`; diff --git a/documents/tutorials.md b/documents/tutorials.md index 295b366..0b2d108 100644 --- a/documents/tutorials.md +++ b/documents/tutorials.md @@ -25,3 +25,16 @@ These tutorials will explain how to run different elements from the LBRY Network ### Tutorial #1 - "Hello Satoshi!" Learn how to [create and modify a simple LBRY electron application](/tutorial-hellosatoshi) we'll call "[Hello Satoshi](/tutorial-hellosatoshi)". + +--- + +## Old tutorials + +### Setup your Development Environment + +- **Desktop Application** - [Video tutorial](/resources/video-lbrydesktop) to setup the [Desktop app](https://github.com/lbryio/lbry-desktop) development environment. +- **Android Application** - [Video tutorial](/resources/video-lbryandroid) to setup the [Android app](https://github.com/lbryio/lbry-android) development environment. +- **LBRY SDK** - [Video tutorial](/resources/video-lbrysdk) to setup the [LBRY SDK](https://github.com/lbryio/lbry-sdk) development environment. +- **LBRY Blockchain** - [Video tutorial](/resources/video-lbrycrd) to setup the [LBRY Blockchain](https://github.com/lbryio/lbrycrd) development environment. + + diff --git a/documents/tutorials/setup-blockchain-lbcd.md b/documents/tutorials/setup-blockchain-lbcd.md index e69de29..333eb25 100644 --- a/documents/tutorials/setup-blockchain-lbcd.md +++ b/documents/tutorials/setup-blockchain-lbcd.md @@ -0,0 +1,53 @@ +--- +title: Setup LBRY blockchain with LBCD +description: Learn how to setup the LBRY blockchain with LBCD. +--- + +## Running + +### With Docker + +```shell +docker run -d lbryfoundation/lbcd +``` + +Or if you want to change some parameters: + +```shell +docker run --entrypoint "lbcd --notls" -d lbryfoundation/lbcd +``` + +For all possible parameters, see [doc.go](https://github.com/lbryio/lbcd/blob/a0ff51b84acc553c9e9568e80c7873c03e24d679/doc.go). E.g., when changing the RPC credentials, use `--rpcuser` and `--rpcpass`. + +### With Docker Compose + +Create a `docker-compose.yml` file with this content: + +```yml +version: "3" + +volumes: + lbcd: + +services: + lbcd: + image: lbry/lbcd:latest + restart: always + network_mode: host + command: + - "--notls" + - "--rpcuser=lbry" + - "--rpcpass=lbry" + - "--rpclisten=127.0.0.1" + volumes: + - "lbcd:/root/.lbcd" + ports: + - "127.0.0.1:9245:9245" + - "9246:9246" # p2p port +``` + +Then run: + +```shell +docker-compose up -d +``` diff --git a/documents/tutorials/setup-blockchain-lbrycrd.md b/documents/tutorials/setup-blockchain-lbrycrd.md index 5286ae0..a84df28 100644 --- a/documents/tutorials/setup-blockchain-lbrycrd.md +++ b/documents/tutorials/setup-blockchain-lbrycrd.md @@ -1,9 +1,9 @@ --- -title: Setup LBRY blockchain with lbrycrd -description: Learn how to setup the LBRY blockchain with lbrycrd. +title: Setup LBRY blockchain with LBRYCRD +description: Learn how to setup the LBRY blockchain with LBRYCRD. --- - + ## Building diff --git a/documents/tutorials/setup-elasticsearch.md b/documents/tutorials/setup-elasticsearch.md new file mode 100644 index 0000000..4046b80 --- /dev/null +++ b/documents/tutorials/setup-elasticsearch.md @@ -0,0 +1,42 @@ +--- +title: Setup Elasticsearch +description: Learn how to setup Elasticsearch. +--- + +## Running + +### With Docker Compose + +Create a `docker-compose.yml` file with this content: + +```yml +version: "3" + +volumes: + es01: + +services: + es01: + image: docker.elastic.co/elasticsearch/elasticsearch:7.16.0 + container_name: es01 + environment: + - node.name=es01 + - discovery.type=single-node + - indices.query.bool.max_clause_count=8192 + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms8g -Xmx8g" # no more than 32, remember to disable swap + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - "es01:/usr/share/elasticsearch/data" + ports: + - "127.0.0.1:9200:9200" +``` + +Then run: + +```shell +docker-compose up -d +``` diff --git a/documents/tutorials/setup-hub.md b/documents/tutorials/setup-hub.md index e69de29..475d2b3 100644 --- a/documents/tutorials/setup-hub.md +++ b/documents/tutorials/setup-hub.md @@ -0,0 +1,84 @@ +--- +title: Setup LBRY Hub +description: Learn how to setup the LBRY Hub. +--- + +## Running + +The Hub needs a running Elasticsearch instance. [Learn how to set up Elasticsearch.](/tutorials/setup-elasticsearch) + +### With Docker Compose + +Create a `docker-compose.yml` file with this content: + +```shell +version: "3" + +volumes: + lbry_rocksdb: + +services: + scribe: + depends_on: + - scribe_elastic_sync + image: lbry/hub:${SCRIBE_TAG:-master} + restart: always + network_mode: host + volumes: + - "lbry_rocksdb:/database" + environment: + - HUB_COMMAND=scribe + - SNAPSHOT_URL=https://snapshots.lbry.com/hub/lbry-rocksdb.zip + command: + - "--daemon_url=http://lbry:lbry@127.0.0.1:9245" + - "--max_query_workers=2" + - "--cache_all_tx_hashes" + - "--index_address_statuses" + scribe_elastic_sync: + image: lbry/hub:${SCRIBE_TAG:-master} + restart: always + network_mode: host + ports: + - "127.0.0.1:19080:19080" # elastic notifier port + volumes: + - "lbry_rocksdb:/database" + environment: + - HUB_COMMAND=scribe-elastic-sync + - FILTERING_CHANNEL_IDS=770bd7ecba84fd2f7607fb15aedd2b172c2e153f 95e5db68a3101df19763f3a5182e4b12ba393ee8 + - BLOCKING_CHANNEL_IDS=dd687b357950f6f271999971f43c785e8067c3a9 06871aa438032244202840ec59a469b303257cad b4a2528f436eca1bf3bf3e10ff3f98c57bd6c4c6 + command: + - "--elastic_host=127.0.0.1" + - "--elastic_port=9200" + - "--max_query_workers=2" + herald: + depends_on: + - scribe_elastic_sync + - scribe + image: lbry/hub:${SCRIBE_TAG:-master} + restart: always + network_mode: host + ports: + - "50001:50001" # electrum rpc port and udp ping port + - "2112:2112" # comment out to disable prometheus metrics + volumes: + - "lbry_rocksdb:/database" + environment: + - HUB_COMMAND=herald + - FILTERING_CHANNEL_IDS=770bd7ecba84fd2f7607fb15aedd2b172c2e153f 95e5db68a3101df19763f3a5182e4b12ba393ee8 + - BLOCKING_CHANNEL_IDS=dd687b357950f6f271999971f43c785e8067c3a9 06871aa438032244202840ec59a469b303257cad b4a2528f436eca1bf3bf3e10ff3f98c57bd6c4c6 + command: + - "--index_address_statuses" + - "--daemon_url=http://lbry:lbry@127.0.0.1:9245" + - "--elastic_host=127.0.0.1" + - "--elastic_port=9200" + - "--max_query_workers=4" + - "--host=0.0.0.0" + - "--max_sessions=100000" + - "--prometheus_port=2112" # comment out to disable prometheus metrics +``` + +Then run: + +```shell +docker-compose up -d +``` diff --git a/documents/tutorials/setup-sdk-lbrynet.md b/documents/tutorials/setup-sdk-lbrynet.md index e69de29..d6babea 100644 --- a/documents/tutorials/setup-sdk-lbrynet.md +++ b/documents/tutorials/setup-sdk-lbrynet.md @@ -0,0 +1,19 @@ +--- +title: Setup LBRY SDK with lbrynet +description: Learn how to setup the LBRY SDK with lbrynet. +--- + +## Running + +The media server RPC will run on `127.0.0.1:5279` by default, so it is only accessibly by the machine itself. + +### With executable + +- Download the latest version at https://github.com/lbryio/lbry-sdk/releases for the right target operating system. + +- Extract the ZIP file. + +- Run: +```shell +lbrynet start +```