jibri: adds autoscaler sidecar hook to signal final shutdown (#1810)
This commit is contained in:
committed by
GitHub
parent
f2b2cc445d
commit
726b0f0636
@@ -5,7 +5,7 @@ export SHUTDOWN_POLLING_INTERVAL={{ $SHUTDOWN_POLLING_INTERVAL }}
|
|||||||
export STATS_POLLING_INTERVAL={{ $STATS_POLLING_INTERVAL }}
|
export STATS_POLLING_INTERVAL={{ $STATS_POLLING_INTERVAL }}
|
||||||
export PORT={{ .Env.AUTOSCALER_SIDECAR_PORT }}
|
export PORT={{ .Env.AUTOSCALER_SIDECAR_PORT }}
|
||||||
export GRACEFUL_SHUTDOWN_SCRIPT="/opt/jitsi/jibri/wait_graceful_shutdown.sh"
|
export GRACEFUL_SHUTDOWN_SCRIPT="/opt/jitsi/jibri/wait_graceful_shutdown.sh"
|
||||||
export TERMINATE_SCRIPT="/opt/jitsi/jibri/shutdown.sh"
|
export TERMINATE_SCRIPT="/opt/jitsi/shutdown.sh"
|
||||||
export ENABLE_REPORT_STATS=true
|
export ENABLE_REPORT_STATS=true
|
||||||
export POLLING_URL="{{ .Env.AUTOSCALER_URL }}/sidecar/poll"
|
export POLLING_URL="{{ .Env.AUTOSCALER_URL }}/sidecar/poll"
|
||||||
export STATUS_URL="{{ .Env.AUTOSCALER_URL }}/sidecar/status"
|
export STATUS_URL="{{ .Env.AUTOSCALER_URL }}/sidecar/status"
|
||||||
|
|||||||
11
jibri/rootfs/opt/jitsi/shutdown.sh
Executable file
11
jibri/rootfs/opt/jitsi/shutdown.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/with-contenv bash
|
||||||
|
# notify the sidecar of imminent shutdown
|
||||||
|
PORT=${AUTOSCALER_SIDECAR_PORT:-6000}
|
||||||
|
curl -d '{}' -v 0:$PORT/hook/v1/shutdown
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
# signal jibri to shutdown via rest api
|
||||||
|
/opt/jitsi/jibri/shutdown.sh
|
||||||
|
|
||||||
|
# shutdown everything else
|
||||||
|
s6-svscanctl -t /var/run/s6/services
|
||||||
Reference in New Issue
Block a user