Still fixing jitsi nomad service

This commit is contained in:
Quentin 2020-03-27 22:48:12 +01:00
parent abf0b925cc
commit 395437ebb9
4 changed files with 31 additions and 8 deletions

View file

@ -6,4 +6,4 @@ JITSI_PROSODY_BOSH_HOST=127.0.0.1
JITSI_PROSODY_HOST=127.0.0.1 JITSI_PROSODY_HOST=127.0.0.1
JITSI_CERTS_FOLDER=/secrets/certs/ JITSI_CERTS_FOLDER=/secrets/certs/
JITSI_NAT_PUBLIC_IP=redacted JITSI_NAT_PUBLIC_IP=redacted
JITSI_NAT_LOCAL_IP={{ env "NOMAD_IP_videobridge_video1_port" }} JITSI_NAT_LOCAL_IP={{ env "NOMAD_IP_video1_port" }}

View file

@ -26,7 +26,7 @@ services:
volumes: [ './jitsi-certs/:/certs:ro' ] volumes: [ './jitsi-certs/:/certs:ro' ]
jitsi-videobridge: jitsi-videobridge:
build: ./jitsi-videobridge build: ./jitsi-videobridge
image: superboum/amd64_jitsi_videobridge:v1 image: superboum/amd64_jitsi_videobridge:v3
network_mode: host network_mode: host
ports: ports:
- "4443:4443" - "4443:4443"

View file

@ -6,14 +6,17 @@ ${JITSI_PROSODY_HOST} jitsi.deuxfleurs.fr conference.jitsi.deuxfleurs.fr jitsi-v
EOF EOF
cd /srv/jvb cd /srv/jvb
mkdir -p /srv/jvb/.sip-communicator
cat > ~/.sip-communicator/sip-communicator.properties <<EOF cat > /srv/jvb/.sip-communicator/sip-communicator.properties <<EOF
org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
# The videobridge uses 443 by default with 4443 as a fallback, but since we're already # The videobridge uses 443 by default with 4443 as a fallback, but since we're already
# running nginx on 443 in this example doc, we specify 4443 manually to avoid a race condition # running nginx on 443 in this example doc, we specify 4443 manually to avoid a race condition
org.jitsi.videobridge.TCP_HARVESTER_PORT=4443 org.jitsi.videobridge.TCP_HARVESTER_PORT=4443
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=${JITSI_NAT_LOCAL_IP} org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=${JITSI_NAT_LOCAL_IP}
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=${JITSI_NAT_PUBLIC_IP} org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=${JITSI_NAT_PUBLIC_IP}
org.jitsi.videobridge.NAT_HARVESTER_LOCAL_ADDRESS=${JITSI_NAT_LOCAL_IP}
org.jitsi.videobridge.NAT_HARVESTER_PUBLIC_ADDRESS=${JITSI_NAT_PUBLIC_IP}
EOF EOF
./jvb.sh \ ./jvb.sh \

View file

@ -42,8 +42,13 @@ job "jitsi" {
data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.key\" }}" data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.key\" }}"
destination = "secrets/certs/jitsi.deuxfleurs.fr.key" destination = "secrets/certs/jitsi.deuxfleurs.fr.key"
} }
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
template { template {
data = "{{ key \"secrets/jitsi/global_env\" }}" source = "secrets/global_env.tpl"
destination = "secrets/global_env" destination = "secrets/global_env"
env = true env = true
} }
@ -103,8 +108,13 @@ job "jitsi" {
data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.key\" }}" data = "{{ key \"secrets/jitsi/jitsi.deuxfleurs.fr.key\" }}"
destination = "secrets/certs/jitsi.deuxfleurs.fr.key" destination = "secrets/certs/jitsi.deuxfleurs.fr.key"
} }
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
template { template {
data = "{{ key \"secrets/jitsi/global_env\" }}" source = "secrets/global_env.tpl"
destination = "secrets/global_env" destination = "secrets/global_env"
env = true env = true
} }
@ -159,8 +169,13 @@ job "jitsi" {
data = "{{ key \"secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt\" }}" data = "{{ key \"secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt\" }}"
destination = "secrets/certs/auth.jitsi.deuxfleurs.fr.crt" destination = "secrets/certs/auth.jitsi.deuxfleurs.fr.crt"
} }
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
template { template {
data = "{{ key \"secrets/jitsi/global_env\" }}" source = "secrets/global_env.tpl"
destination = "secrets/global_env" destination = "secrets/global_env"
env = true env = true
} }
@ -174,7 +189,7 @@ job "jitsi" {
task "videobridge" { task "videobridge" {
driver = "docker" driver = "docker"
config { config {
image = "superboum/amd64_jitsi_videobridge:v1" image = "superboum/amd64_jitsi_videobridge:v3"
network_mode = "host" network_mode = "host"
port_map { port_map {
video1_port = 4443 video1_port = 4443
@ -182,8 +197,13 @@ job "jitsi" {
} }
} }
artifact {
source = "http://127.0.0.1:8500/v1/kv/secrets/jitsi/global_env?raw"
destination = "secrets/global_env.tpl"
mode = "file"
}
template { template {
data = "{{ key \"secrets/jitsi/global_env\" }}" source = "secrets/global_env.tpl"
destination = "secrets/global_env" destination = "secrets/global_env"
env = true env = true
} }