From 901cda4814ce3eff99efb40781de7ca4f3f4429f Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sun, 6 Jan 2019 22:44:35 -0800 Subject: [PATCH] Enable backdoor in all services, and add telnet to containers --- backfiller/Dockerfile | 3 ++- docker-compose.jsonnet | 9 +++++++++ downloader/Dockerfile | 3 ++- restreamer/Dockerfile | 3 ++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/backfiller/Dockerfile b/backfiller/Dockerfile index c7a58cf..808ceb3 100644 --- a/backfiller/Dockerfile +++ b/backfiller/Dockerfile @@ -1,6 +1,7 @@ FROM alpine:3.7 # dependencies needed for compiling c extensions -RUN apk --update add py2-pip gcc python-dev musl-dev +# also busybox-extras for telnet for easier use of backdoor +RUN apk --update add py2-pip gcc python-dev musl-dev busybox-extras # Install common lib first as it changes less COPY common /tmp/common diff --git a/docker-compose.jsonnet b/docker-compose.jsonnet index 66054b4..49f8adf 100644 --- a/docker-compose.jsonnet +++ b/docker-compose.jsonnet @@ -29,6 +29,10 @@ backfiller: 8002, }, + // The local port within each container to bind the backdoor server on. + // You can exec into the container and telnet to this port to get a python shell. + backdoor_port:: 1234, + // Other nodes to backfill from. You should not include the local node. peers:: [ "http://wubloader.codegunner.com/" @@ -47,6 +51,7 @@ command: [ $.channel, "--qualities", std.join(",", $.qualities), + "--backdoor-port", std.toString($.backdoor_port), ], // Mount the segments directory at /mnt volumes: ["%s:/mnt" % $.segments_path], @@ -66,6 +71,9 @@ // Expose on the configured host port by mapping that port to the default // port for restreamer, which is 8000. ports: ["%s:8000" % $.ports.restreamer], + command: [ + "--backdoor-port", std.toString($.backdoor_port), + ], }, backfiller: { @@ -75,6 +83,7 @@ "--stream", $.channel, "-v", std.join(",", $.qualities), "--nodes", std.join(",", $.peers), + "--backdoor-port", std.toString($.backdoor_port), ], // Mount the segments directory at /mnt volumes: ["%s:/mnt" % $.segments_path], diff --git a/downloader/Dockerfile b/downloader/Dockerfile index 995dd4f..c147f80 100644 --- a/downloader/Dockerfile +++ b/downloader/Dockerfile @@ -1,6 +1,7 @@ FROM alpine:3.7 # dependencies needed for compiling c extensions -RUN apk --update add py2-pip gcc python-dev musl-dev +# also busybox-extras for telnet for easier use of backdoor +RUN apk --update add py2-pip gcc python-dev musl-dev busybox-extras # Install common lib first as it changes less COPY common /tmp/common diff --git a/restreamer/Dockerfile b/restreamer/Dockerfile index e23295f..443ff2f 100644 --- a/restreamer/Dockerfile +++ b/restreamer/Dockerfile @@ -1,6 +1,7 @@ FROM alpine:3.7 # dependencies needed for compiling c extensions, plus ffmpeg for cutting -RUN apk --update add py2-pip gcc python-dev musl-dev ffmpeg +# also busybox-extras for telnet for easier use of backdoor +RUN apk --update add py2-pip gcc python-dev musl-dev ffmpeg busybox-extras # Install common lib first as it changes less COPY common /tmp/common