Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jicofo): respect rtcstats flag in nomad shard #717

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,10 @@ EOF
volumes = [
"local/config:/config",
"local/jicofo-service-run:/etc/services.d/jicofo/run",
[[- if eq (or (env "CONFIG_jicofo_rtcstats_enabled") "false") "true" ]]
"local/11-jicofo-rtcstats-push:/etc/cont-init.d/11-jicofo-rtcstats-push",
"local/jicofo-rtcstats-push-service-run:/etc/services.d/60-jicofo-rtcstats-push/run"
[[- end ]]
]
}

Expand Down Expand Up @@ -844,12 +846,15 @@ EOF
# jicofo rtcstats push vars
JICOFO_ADDRESS = "http://127.0.0.1:8888"
JICOFO_VISITORS_REQUIRE_MUC_CONFIG = "[[ env "CONFIG_jicofo_require_muc_config_flag" ]]"
[[- if eq (or (env "CONFIG_jicofo_rtcstats_enabled") "false") "true" ]]
RTCSTATS_SERVER="[[ env "CONFIG_jicofo_rtcstats_push_rtcstats_server" ]]"
[[- end ]]
INTERVAL=10000
JICOFO_LOG_FILE = "/local/jicofo.log"
VISITORS_XMPP_AUTH_DOMAIN="auth.[[ env "CONFIG_domain" ]]"
}

[[- if eq (or (env "CONFIG_jicofo_rtcstats_enabled") "false") "true" ]]
artifact {
source = "https://github.com/jitsi/jicofo-rtcstats-push/releases/download/release-0.0.1/jicofo-rtcstats-push.zip"
mode = "file"
Expand All @@ -858,6 +863,7 @@ EOF
archive = false
}
}
[[- end ]]
template {
data = <<EOF
#!/usr/bin/with-contenv bash
Expand All @@ -883,9 +889,11 @@ EOF

apt-get update && apt-get -y install unzip cron

[[ if eq (or (env "CONFIG_jicofo_rtcstats_enabled") "false") "true" -]]
mkdir -p /jicofo-rtcstats-push
cd /jicofo-rtcstats-push
unzip /local/jicofo-rtcstats-push.zip
[[- end ]]

echo '0 * * * * /local/jicofo-log-truncate.sh' | crontab

Expand All @@ -904,6 +912,7 @@ EOF
perms = "755"
}

[[- if eq (or (env "CONFIG_jicofo_rtcstats_enabled") "false") "true" ]]
template {
data = <<EOF
#!/usr/bin/with-contenv bash
Expand All @@ -915,6 +924,7 @@ EOF
perms = "755"

}
[[- end ]]

template {
data = <<EOF
Expand Down