PeerTube_original/scripts
Jelle Besseling 0305db28c9
Add support for saving video files to object storage (#4290)
* Add support for saving video files to object storage

* Add support for custom url generation on s3 stored files

Uses two config keys to support url generation that doesn't directly go
to (compatible s3). Can be used to generate urls to any cache server or
CDN.

* Upload files to s3 concurrently and delete originals afterwards

* Only publish after move to object storage is complete

* Use base url instead of url template

* Fix mistyped config field

* Add rudenmentary way to download before transcode

* Implement Chocobozzz suggestions

https://github.com/Chocobozzz/PeerTube/pull/4290#issuecomment-891670478

The remarks in question:
    Try to use objectStorage prefix instead of s3 prefix for your function/variables/config names
    Prefer to use a tree for the config: s3.streaming_playlists_bucket -> object_storage.streaming_playlists.bucket
    Use uppercase for config: S3.STREAMING_PLAYLISTS_BUCKETINFO.bucket -> OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET (maybe BUCKET_NAME instead of BUCKET)
    I suggest to rename moveJobsRunning to pendingMovingJobs (or better, create a dedicated videoJobInfo table with a pendingMove & videoId columns so we could also use this table to track pending transcoding jobs)
    https://github.com/Chocobozzz/PeerTube/pull/4290/files#diff-3e26d41ca4bda1de8e1747af70ca2af642abcc1e9e0bfb94239ff2165acfbde5R19 uses a string instead of an integer
    I think we should store the origin object storage URL in fileUrl, without base_url injection. Instead, inject the base_url at "runtime" so admins can easily change this configuration without running a script to update DB URLs

* Import correct function

* Support multipart upload

* Remove import of node 15.0 module stream/promises

* Extend maximum upload job length

Using the same value as for redundancy downloading seems logical

* Use dynamic part size for really large uploads

Also adds very small part size for local testing

* Fix decreasePendingMove query

* Resolve various PR comments

* Move to object storage after optimize

* Make upload size configurable and increase default

* Prune webtorrent files that are stored in object storage

* Move files after transcoding jobs

* Fix federation

* Add video path manager

* Support move to external storage job in client

* Fix live object storage tests

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-08-17 08:26:20 +02:00
..
build Fix angular builds 2021-07-05 15:19:23 +02:00
clean Remove scripty 2021-05-05 10:51:32 +02:00
dev Move to sass module 2021-06-28 10:54:02 +02:00
e2e Fix logger warning level 2021-05-14 14:17:53 +02:00
i18n Add player mode to player stats 2021-04-28 09:07:57 +02:00
migrations Add moderation helpers to plugins 2020-05-07 15:07:01 +02:00
plugin Upgrade server dependencies 2021-06-25 17:39:27 +02:00
setup Fix tsconfig with CLI tools 2019-10-23 10:53:20 +02:00
benchmark.ts Speed up plugin transcoding tests 2021-07-22 08:55:14 +02:00
ci.sh Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
client-build-stats.ts Update stats format 2021-02-11 08:41:12 +01:00
client-report.sh Upgrade to angular 10 2020-08-07 08:28:14 +02:00
create-import-video-file-job.ts Upgrade server dependencies 2021-06-25 17:39:27 +02:00
create-transcoding-job.ts Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
generate-cli-doc.sh (doc) add manpage to peertube cli 2018-10-20 19:16:56 +02:00
generate-code-contributors.ts Introduce CLI command 2021-07-20 15:27:16 +02:00
help.sh Remove scripty 2021-05-05 10:51:32 +02:00
nightly.sh Add ability to build client with source maps 2021-02-02 15:37:18 +01:00
openapi-clients.sh Typo 2021-08-11 14:43:03 +02:00
openapi-peertube-version.sh OpenAPI clients generation 2020-02-14 14:14:14 +01:00
optimize-old-videos.ts Add support for saving video files to object storage (#4290) 2021-08-17 08:26:20 +02:00
parse-log.ts Refactor video links builders 2021-07-26 15:04:37 +02:00
print-transcode-command.ts Upgrade server dependencies 2021-06-25 17:39:27 +02:00
prune-storage.ts Use random names for VOD HLS playlists 2021-07-26 11:29:31 +02:00
regenerate-thumbnails.ts Upgrade server dependencies 2021-06-25 17:39:27 +02:00
release-embed-api.sh Add embed api build 2019-12-18 10:14:25 +01:00
release.sh Try to fix openapi script 2021-08-11 14:38:07 +02:00
reset-password.ts Upgrade server dependencies 2021-06-25 17:39:27 +02:00
test.sh Speedup CI 2021-06-17 10:43:34 +02:00
update-host.ts Use random names for VOD HLS playlists 2021-07-26 11:29:31 +02:00
upgrade.sh Remove annoying superfluous slash 2021-06-02 16:51:23 +02:00