diff options
-rw-r--r-- | support/doc/tools.md | 84 |
1 files changed, 59 insertions, 25 deletions
diff --git a/support/doc/tools.md b/support/doc/tools.md index ae52f2c7d..c86f0d12b 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md | |||
@@ -1,30 +1,8 @@ | |||
1 | # CLI tools guide | 1 | # CLI tools guide |
2 | 2 | ||
3 | <!-- START doctoc generated TOC please keep comment here to allow auto update --> | 3 | [[toc]] |
4 | <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | 4 | |
5 | **Table of Contents** | 5 | ## Remote PeerTube CLI |
6 | |||
7 | - [Remote Tools](#remote-tools) | ||
8 | - [Dependencies](#dependencies) | ||
9 | - [Installation](#installation) | ||
10 | - [CLI wrapper](#cli-wrapper) | ||
11 | - [peertube-import-videos.js](#peertube-import-videosjs) | ||
12 | - [peertube-upload.js](#peertube-uploadjs) | ||
13 | - [peertube-plugins.js](#peertube-pluginsjs) | ||
14 | - [peertube-redundancy.js](#peertube-redundancyjs) | ||
15 | - [Server tools](#server-tools) | ||
16 | - [parse-log](#parse-log) | ||
17 | - [regenerate-thumbnails.js](#regenerate-thumbnailsjs) | ||
18 | - [create-import-video-file-job.js](#create-import-video-file-jobjs) | ||
19 | - [create-move-video-storage-job.js](#create-move-video-storage-jobjs) | ||
20 | - [prune-storage.js](#prune-storagejs) | ||
21 | - [update-host.js](#update-hostjs) | ||
22 | - [reset-password.js](#reset-passwordjs) | ||
23 | - [plugin install/uninstall](#plugin-installuninstall) | ||
24 | |||
25 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
26 | |||
27 | ## Remote Tools | ||
28 | 6 | ||
29 | You need at least 512MB RAM to run the script. | 7 | You need at least 512MB RAM to run the script. |
30 | Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC. | 8 | Scripts can be launched directly from a PeerTube server, or from a separate server, even a desktop PC. |
@@ -371,3 +349,59 @@ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production np | |||
371 | cd /var/www/peertube-docker | 349 | cd /var/www/peertube-docker |
372 | docker-compose exec -u peertube peertube npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin | 350 | docker-compose exec -u peertube peertube npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin |
373 | ``` | 351 | ``` |
352 | |||
353 | ## PeerTube runner | ||
354 | |||
355 | PeerTube >= 5.2 supports VOD or Live transcoding by a remote PeerTube runner. | ||
356 | |||
357 | |||
358 | ### Installation | ||
359 | |||
360 | ```bash | ||
361 | sudo npm install -g @peertube/peertube-runner | ||
362 | ``` | ||
363 | |||
364 | ### Configuration | ||
365 | |||
366 | The runner uses env paths like `~/.config`, `~/.cache` and `~/.local/share` directories to store runner configuration or temporary files. | ||
367 | |||
368 | Multiple PeerTube runners can run on the same OS by using the `--id` CLI option (each runner uses its own config/tmp directories): | ||
369 | |||
370 | ```bash | ||
371 | peertube-runner [commands] --id instance-1 | ||
372 | peertube-runner [commands] --id instance-2 | ||
373 | peertube-runner [commands] --id instance-3 | ||
374 | ``` | ||
375 | |||
376 | |||
377 | ### Run the server | ||
378 | |||
379 | Run the runner in server mode so it can run transcoding jobs of registered PeerTube instances: | ||
380 | |||
381 | ```bash | ||
382 | peertube-runner server | ||
383 | ``` | ||
384 | |||
385 | ### Register | ||
386 | |||
387 | To register the runner on a new PeerTube instance so the runner can process its transcoding job: | ||
388 | |||
389 | ```bash | ||
390 | peertube-runner register --url http://peertube.example.com --registration-token ptrrt-... --runner-name my-runner-name | ||
391 | ``` | ||
392 | |||
393 | The runner will then use a websocket connection with the PeerTube instance to be notified about new available transcoding jobs. | ||
394 | |||
395 | ### Unregister | ||
396 | |||
397 | To unregister a PeerTube instance: | ||
398 | |||
399 | ```bash | ||
400 | peertube-runner unregister --url http://peertube.example.com | ||
401 | ``` | ||
402 | |||
403 | ### List registered instances | ||
404 | |||
405 | ```bash | ||
406 | peertube-runner list-registered | ||
407 | ``` | ||