From 1dc0f4a99cec45537fa483d334b12dbe3f56ab07 Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Mon, 24 Jun 2024 17:54:03 +0100 Subject: [PATCH] [DEV-only] Box patches to test recording fallback --- .env | 2 ++ Makefile | 1 + config/full-stack.json | 4 ++-- config/make-os.sh | 11 ++++++----- scripts/livepeer-minio | 5 ++++- 5 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 000000000..bd01d686e --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +CATALYST_API_STORAGE_FALLBACK_URLS=http://127.0.0.1:8888/os-recordings/=http://127.0.0.1:8888/os-recordings-backup/ +CATALYST_UPLOADER_STORAGE_FALLBACK_URLS=s3+http://admin:password@localhost:9420/os-recordings/=s3+http://admin:password@localhost:9000/os-recordings-backup/ diff --git a/Makefile b/Makefile index 6436b5002..48aa7bd1a 100644 --- a/Makefile +++ b/Makefile @@ -229,6 +229,7 @@ box-dev: scripts -p 3478:3478 \ -p 3478:3478/udp \ -p 5349:5349 \ + -p 9001:9001 \ -p 9090:9090 \ -p 40000-40100:40000-40100/udp \ livepeer/in-a-box diff --git a/config/full-stack.json b/config/full-stack.json index 8651e9db2..5ceb41bbe 100644 --- a/config/full-stack.json +++ b/config/full-stack.json @@ -7,11 +7,11 @@ "autopushes": [ [ "videorec+", - "s3+http://admin:password@localhost:9000/os-recordings/$wildcard/$uuid/source/$segmentCounter.ts?m3u8=../output.m3u8&split=5&video=source&audio=AAC&append=1&waittrackcount=2&recstart=-1" + "s3+http://admin:password@localhost:9420/os-recordings/$wildcard/$uuid/source/$segmentCounter.ts?m3u8=../output.m3u8&split=5&video=source&audio=AAC&append=1&waittrackcount=2&recstart=-1" ], [ "video+", - "s3+http://admin:password@localhost:9000/os-recordings/$wildcard/$uuid/source/$segmentCounter.ts?m3u8=../output.m3u8&split=5&video=source&audio=AAC&append=1&waittrackcount=2&recstart=-1" + "s3+http://admin:password@localhost:9420/os-recordings/$wildcard/$uuid/source/$segmentCounter.ts?m3u8=../output.m3u8&split=5&video=source&audio=AAC&append=1&waittrackcount=2&recstart=-1" ] ], "config": { diff --git a/config/make-os.sh b/config/make-os.sh index 52af41293..93122804d 100755 --- a/config/make-os.sh +++ b/config/make-os.sh @@ -4,19 +4,20 @@ set -euo pipefail function makeStore() { PREFIX=$1 + PORT=$2 result=$(curl --silent \ -H "authorization: Bearer $LP_COM_TOKEN_ADMIN" \ http://localhost:8888/api/object-store \ -X POST \ -H "content-type: application/json" \ --data-raw '{ - "url": "s3+http://admin:password@127.0.0.1:9000/'$PREFIX'", + "url": "s3+http://admin:password@127.0.0.1:'$PORT'/'$PREFIX'", "publicUrl": "http://127.0.0.1:8888/'$PREFIX'" }') echo $result | jq -r '.id' } -echo '"vodObjectStoreId": "'$(makeStore os-vod)'",' -echo '"vodCatalystObjectStoreId": "'$(makeStore os-catalyst-vod)'",' -echo '"vodCatalystPrivateAssetsObjectStore": "'$(makeStore os-private)'",' -echo '"recordCatalystObjectStoreId": "'$(makeStore os-recordings)'",' +echo '"vodObjectStoreId": "'$(makeStore os-vod 9000)'",' +echo '"vodCatalystObjectStoreId": "'$(makeStore os-catalyst-vod 9000)'",' +echo '"vodCatalystPrivateAssetsObjectStore": "'$(makeStore os-private 9000)'",' +echo '"recordCatalystObjectStoreId": "'$(makeStore os-recordings 9420)'",' diff --git a/scripts/livepeer-minio b/scripts/livepeer-minio index 593f54ec0..b8ffc314e 100755 --- a/scripts/livepeer-minio +++ b/scripts/livepeer-minio @@ -18,10 +18,13 @@ bash <