From 031f31e91eb3f934032d581989844c8e341042a9 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 20 Jan 2021 15:44:42 +0100 Subject: WIP modernize jitsi conf --- app/jitsi/build/jitsi-conference-focus/Dockerfile | 7 ++----- app/jitsi/build/jitsi-conference-focus/jicofo | 9 ++++++++- .../build/jitsi-conference-focus/sip-communicator.properties | 2 -- 3 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 app/jitsi/build/jitsi-conference-focus/sip-communicator.properties (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-conference-focus/Dockerfile b/app/jitsi/build/jitsi-conference-focus/Dockerfile index e2c459c..f78cc78 100644 --- a/app/jitsi/build/jitsi-conference-focus/Dockerfile +++ b/app/jitsi/build/jitsi-conference-focus/Dockerfile @@ -18,10 +18,7 @@ FROM debian:buster RUN apt-get update && \ apt-get install -y openjdk-11-jre-headless ca-certificates -ENV JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/root -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=.sip-communicator -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi" - -COPY --from=builder /srv/build /srv/jicofo -COPY jicofo /usr/local/bin/jicofo -COPY sip-communicator.properties /root/.sip-communicator/sip-communicator.properties +COPY --from=builder /srv/build /usr/share/jicofo +COPY jicofo /usr/local/bin CMD ["/usr/local/bin/jicofo"] diff --git a/app/jitsi/build/jitsi-conference-focus/jicofo b/app/jitsi/build/jitsi-conference-focus/jicofo index 2bc6e3f..1c1f77d 100755 --- a/app/jitsi/build/jitsi-conference-focus/jicofo +++ b/app/jitsi/build/jitsi-conference-focus/jicofo @@ -8,7 +8,14 @@ ${JITSI_PROSODY_HOST} jitsi.deuxfleurs.fr conference.jitsi.deuxfleurs.fr jitsi-v 127.0.0.1 `hostname` EOF -/srv/jicofo/jicofo.sh \ +exec java \ + -Xmx400m \ + -XX:+HeapDumpOnOutOfMemoryError \ + -XX:HeapDumpPath=/tmp \ + -Djdk.tls.ephemeralDHKeySize=2048 \ + -Djava.util.logging.config.file=/srv/jicofo/lib/logging.properties \ + -cp "/usr/share/jicofo/*:/usr/share/jicofo/lib/*" \ + org.jitsi.jicofo.Main \ --host=${JITSI_PROSODY_HOST} \ --domain=jitsi.deuxfleurs.fr \ --secret=${JITSI_SECRET_JICOFO_COMPONENT} \ diff --git a/app/jitsi/build/jitsi-conference-focus/sip-communicator.properties b/app/jitsi/build/jitsi-conference-focus/sip-communicator.properties deleted file mode 100644 index 53c32e2..0000000 --- a/app/jitsi/build/jitsi-conference-focus/sip-communicator.properties +++ /dev/null @@ -1,2 +0,0 @@ -org.jitsi.jicofo.SHORT_ID=1 -org.jitsi.jicofo.BRIDGE_MUC=JvbBrewery@internal.auth.jitsi.deuxfleurs.fr -- cgit v1.2.3 From ebb772e5ba26944ac002c236d33ef164e91c6a7d Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 17:02:10 +0100 Subject: Fix ansible inventory + Fix jicofo's hocon conf + fix jicofo's dockerfile --- app/jitsi/build/jitsi-conference-focus/jicofo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-conference-focus/jicofo b/app/jitsi/build/jitsi-conference-focus/jicofo index 1c1f77d..bfc54f6 100755 --- a/app/jitsi/build/jitsi-conference-focus/jicofo +++ b/app/jitsi/build/jitsi-conference-focus/jicofo @@ -13,7 +13,8 @@ exec java \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath=/tmp \ -Djdk.tls.ephemeralDHKeySize=2048 \ - -Djava.util.logging.config.file=/srv/jicofo/lib/logging.properties \ + -Djava.util.logging.config.file=/usr/share/jicofo/lib/logging.properties \ + -Dconfig.file=/etc/jitsi/jicofo.conf \ -cp "/usr/share/jicofo/*:/usr/share/jicofo/lib/*" \ org.jitsi.jicofo.Main \ --host=${JITSI_PROSODY_HOST} \ -- cgit v1.2.3 From 7b57ff72a918ca295e2b00e76da33eec700c6a2a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 17:52:41 +0100 Subject: Simplify prosody too --- app/jitsi/build/jitsi-conference-focus/Dockerfile | 1 + app/jitsi/build/jitsi-conference-focus/jicofo | 7 +--- app/jitsi/build/jitsi-xmpp/Dockerfile | 10 ++++- .../build/jitsi-xmpp/external_components.cfg.lua | 2 - app/jitsi/build/jitsi-xmpp/xmpp_conf | 49 ---------------------- app/jitsi/build/jitsi-xmpp/xmpp_gen | 5 --- app/jitsi/build/jitsi-xmpp/xmpp_run | 18 +------- 7 files changed, 11 insertions(+), 81 deletions(-) delete mode 100644 app/jitsi/build/jitsi-xmpp/external_components.cfg.lua delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_conf (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-conference-focus/Dockerfile b/app/jitsi/build/jitsi-conference-focus/Dockerfile index f78cc78..e67b3de 100644 --- a/app/jitsi/build/jitsi-conference-focus/Dockerfile +++ b/app/jitsi/build/jitsi-conference-focus/Dockerfile @@ -20,5 +20,6 @@ RUN apt-get update && \ COPY --from=builder /srv/build /usr/share/jicofo COPY jicofo /usr/local/bin +ENV JICOFO_SECRET=IAMDEPRECATED CMD ["/usr/local/bin/jicofo"] diff --git a/app/jitsi/build/jitsi-conference-focus/jicofo b/app/jitsi/build/jitsi-conference-focus/jicofo index bfc54f6..31cd9c4 100755 --- a/app/jitsi/build/jitsi-conference-focus/jicofo +++ b/app/jitsi/build/jitsi-conference-focus/jicofo @@ -16,9 +16,4 @@ exec java \ -Djava.util.logging.config.file=/usr/share/jicofo/lib/logging.properties \ -Dconfig.file=/etc/jitsi/jicofo.conf \ -cp "/usr/share/jicofo/*:/usr/share/jicofo/lib/*" \ - org.jitsi.jicofo.Main \ - --host=${JITSI_PROSODY_HOST} \ - --domain=jitsi.deuxfleurs.fr \ - --secret=${JITSI_SECRET_JICOFO_COMPONENT} \ - --user_domain=auth.jitsi.deuxfleurs.fr \ - --user_password=${JITSI_SECRET_JICOFO_USER} + org.jitsi.jicofo.Main diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index f3dcd36..a682984 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -5,9 +5,15 @@ ARG VERSION RUN apt-get update && \ apt-get install -y prosody=${VERSION} -COPY external_components.cfg.lua /etc/prosody/conf.d/external_components.cfg.lua -COPY xmpp_conf /usr/local/bin/xmpp_conf +mkdir -p /usr/local/share/ca-certificates/ +ln -sf \ + /var/lib/prosody/auth.jitsi.crt \ + /usr/local/share/ca-certificates/auth.jitsi.crt + COPY xmpp_gen /usr/local/bin/xmpp_gen COPY xmpp_run /usr/local/bin/xmpp_run +USER prosody +RUN mkdir /run/prosody && touch /run/prosody/prosody.pid +WORKDIR /var/lib/prosody CMD ["/usr/local/bin/xmpp_run"] diff --git a/app/jitsi/build/jitsi-xmpp/external_components.cfg.lua b/app/jitsi/build/jitsi-xmpp/external_components.cfg.lua deleted file mode 100644 index beaaa87..0000000 --- a/app/jitsi/build/jitsi-xmpp/external_components.cfg.lua +++ /dev/null @@ -1,2 +0,0 @@ -component_ports = { 5347 } -component_interface = "0.0.0.0" diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_conf b/app/jitsi/build/jitsi-xmpp/xmpp_conf deleted file mode 100755 index 34b2cb3..0000000 --- a/app/jitsi/build/jitsi-xmpp/xmpp_conf +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -cat >> /etc/hosts < /etc/prosody/conf.avail/jitsi.deuxfleurs.fr.cfg.lua < Date: Thu, 28 Jan 2021 18:55:56 +0100 Subject: WIP integration jitsi --- app/jitsi/build/jitsi-xmpp/Dockerfile | 19 ++++++++++--------- app/jitsi/build/jitsi-xmpp/xmpp_gen | 4 ---- app/jitsi/build/jitsi-xmpp/xmpp_prosody | 5 +++++ app/jitsi/build/jitsi-xmpp/xmpp_root | 4 ++++ app/jitsi/build/jitsi-xmpp/xmpp_run | 4 ---- 5 files changed, 19 insertions(+), 17 deletions(-) delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_gen create mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_prosody create mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_root delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_run (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index a682984..b32953a 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -5,15 +5,16 @@ ARG VERSION RUN apt-get update && \ apt-get install -y prosody=${VERSION} -mkdir -p /usr/local/share/ca-certificates/ -ln -sf \ - /var/lib/prosody/auth.jitsi.crt \ - /usr/local/share/ca-certificates/auth.jitsi.crt +RUN mkdir -p /usr/local/share/ca-certificates/ && \ + ln -sf \ + /var/lib/prosody/certs/auth.jitsi.crt \ + /usr/local/share/ca-certificates/auth.jitsi.crt && \ + mkdir /run/prosody && \ + touch /run/prosody/prosody.pid && \ + mkdir -p /var/lib/prosody -COPY xmpp_gen /usr/local/bin/xmpp_gen -COPY xmpp_run /usr/local/bin/xmpp_run +COPY xmpp_root /usr/local/bin/xmpp_root +COPY xmpp_prosody /usr/local/bin/xmpp_prosody -USER prosody -RUN mkdir /run/prosody && touch /run/prosody/prosody.pid WORKDIR /var/lib/prosody -CMD ["/usr/local/bin/xmpp_run"] +CMD ["/usr/local/bin/xmpp_root"] diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_gen b/app/jitsi/build/jitsi-xmpp/xmpp_gen deleted file mode 100755 index a66aad8..0000000 --- a/app/jitsi/build/jitsi-xmpp/xmpp_gen +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -prosodyctl cert generate jitsi.deuxfleurs.fr -prosodyctl cert generate auth.jitsi.deuxfleurs.fr diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_prosody b/app/jitsi/build/jitsi-xmpp/xmpp_prosody new file mode 100755 index 0000000..1101302 --- /dev/null +++ b/app/jitsi/build/jitsi-xmpp/xmpp_prosody @@ -0,0 +1,5 @@ +#!/bin/bash +chown -R prosody:prosody /var/lib/prosody /etc/prosody /run/prosody + +cat /etc/prosody/accounts.txt | xargs -n3 prosodyctl register +exec prosody diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_root b/app/jitsi/build/jitsi-xmpp/xmpp_root new file mode 100755 index 0000000..293915f --- /dev/null +++ b/app/jitsi/build/jitsi-xmpp/xmpp_root @@ -0,0 +1,4 @@ +#!/bin/bash + +chown -R prosody:prosody /var/lib/prosody /etc/prosody /run/prosody +exec su -s /bin/bash -c /usr/local/bin/xmpp_prosody - prosody diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_run b/app/jitsi/build/jitsi-xmpp/xmpp_run deleted file mode 100755 index 81329d2..0000000 --- a/app/jitsi/build/jitsi-xmpp/xmpp_run +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -prosodyctl register focus auth.jitsi.deuxfleurs.fr ${JITSI_SECRET_JICOFO_USER} -prosodyctl register jvb auth.jitsi.deuxfleurs.fr ${JITSI_SECRET_VIDEOBRIDGE} -exec prosody -- cgit v1.2.3 From 0e848bb2d0e705e5e0858fe8f2c02a3c9c8f45e5 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 19:28:15 +0100 Subject: Polished prosody --- app/jitsi/build/jitsi-xmpp/Dockerfile | 15 +++++++++++---- app/jitsi/build/jitsi-xmpp/xmpp_prosody | 2 -- app/jitsi/build/jitsi-xmpp/xmpp_root | 4 ---- 3 files changed, 11 insertions(+), 10 deletions(-) delete mode 100755 app/jitsi/build/jitsi-xmpp/xmpp_root (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index b32953a..6357cc6 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -3,7 +3,13 @@ FROM debian:buster ARG VERSION RUN apt-get update && \ - apt-get install -y prosody=${VERSION} + apt-get install -y wget gnupg2 && \ + echo deb http://packages.prosody.im/debian buster main \ + | tee -a /etc/apt/sources.list && \ + wget https://prosody.im/files/prosody-debian-packages.key -O - \ + | apt-key add - && \ + apt-get update && \ + apt-get install -y prosody=${VERSION} lua-event RUN mkdir -p /usr/local/share/ca-certificates/ && \ ln -sf \ @@ -11,10 +17,11 @@ RUN mkdir -p /usr/local/share/ca-certificates/ && \ /usr/local/share/ca-certificates/auth.jitsi.crt && \ mkdir /run/prosody && \ touch /run/prosody/prosody.pid && \ - mkdir -p /var/lib/prosody + mkdir -p /var/lib/prosody && \ + chown -R prosody:prosody /var/lib/prosody /run/prosody -COPY xmpp_root /usr/local/bin/xmpp_root COPY xmpp_prosody /usr/local/bin/xmpp_prosody WORKDIR /var/lib/prosody -CMD ["/usr/local/bin/xmpp_root"] +USER prosody +CMD ["/usr/local/bin/xmpp_prosody"] diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_prosody b/app/jitsi/build/jitsi-xmpp/xmpp_prosody index 1101302..4ae73f4 100755 --- a/app/jitsi/build/jitsi-xmpp/xmpp_prosody +++ b/app/jitsi/build/jitsi-xmpp/xmpp_prosody @@ -1,5 +1,3 @@ #!/bin/bash -chown -R prosody:prosody /var/lib/prosody /etc/prosody /run/prosody - cat /etc/prosody/accounts.txt | xargs -n3 prosodyctl register exec prosody diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_root b/app/jitsi/build/jitsi-xmpp/xmpp_root deleted file mode 100755 index 293915f..0000000 --- a/app/jitsi/build/jitsi-xmpp/xmpp_root +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -chown -R prosody:prosody /var/lib/prosody /etc/prosody /run/prosody -exec su -s /bin/bash -c /usr/local/bin/xmpp_prosody - prosody -- cgit v1.2.3 From 47bcdaaf0dc6d8caaaa8bd30055420ae90cc73eb Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 21:05:10 +0100 Subject: Rework prosody's configuration --- app/jitsi/build/jitsi-conference-focus/jicofo | 6 ------ app/jitsi/build/jitsi-xmpp/Dockerfile | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-conference-focus/jicofo b/app/jitsi/build/jitsi-conference-focus/jicofo index 31cd9c4..2225e98 100755 --- a/app/jitsi/build/jitsi-conference-focus/jicofo +++ b/app/jitsi/build/jitsi-conference-focus/jicofo @@ -1,13 +1,7 @@ #!/bin/bash -cp ${JITSI_CERTS_FOLDER}/auth.jitsi.deuxfleurs.fr.crt /usr/local/share/ca-certificates/auth.jitsi.deuxfleurs.fr.crt update-ca-certificates -f -cat >> /etc/hosts < Date: Thu, 28 Jan 2021 21:47:35 +0100 Subject: Trying to switch on a development version --- app/jitsi/build/jitsi-conference-focus/Dockerfile | 5 ++--- app/jitsi/build/jitsi-xmpp/xmpp_prosody | 8 +++++++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-conference-focus/Dockerfile b/app/jitsi/build/jitsi-conference-focus/Dockerfile index e67b3de..525bffb 100644 --- a/app/jitsi/build/jitsi-conference-focus/Dockerfile +++ b/app/jitsi/build/jitsi-conference-focus/Dockerfile @@ -3,9 +3,9 @@ FROM debian:buster AS builder ARG PREFIXV ARG VERSION RUN apt-get update && \ - apt-get install -y openjdk-11-jdk maven wget unzip && \ - wget https://github.com/jitsi/jicofo/archive/${PREFIXV}${VERSION}.zip -O jicofo.zip + apt-get install -y openjdk-11-jdk-headless maven wget unzip +RUN wget https://github.com/jitsi/jicofo/archive/${PREFIXV}${VERSION}.zip -O jicofo.zip RUN unzip jicofo.zip && \ mv jicofo*${VERSION} jicofo && \ cd jicofo && \ @@ -20,6 +20,5 @@ RUN apt-get update && \ COPY --from=builder /srv/build /usr/share/jicofo COPY jicofo /usr/local/bin -ENV JICOFO_SECRET=IAMDEPRECATED CMD ["/usr/local/bin/jicofo"] diff --git a/app/jitsi/build/jitsi-xmpp/xmpp_prosody b/app/jitsi/build/jitsi-xmpp/xmpp_prosody index 4ae73f4..af179e5 100755 --- a/app/jitsi/build/jitsi-xmpp/xmpp_prosody +++ b/app/jitsi/build/jitsi-xmpp/xmpp_prosody @@ -1,3 +1,9 @@ #!/bin/bash -cat /etc/prosody/accounts.txt | xargs -n3 prosodyctl register +prosodyctl register focus auth.jitsi ${JICOFO_AUTH_PASSWORD} +prosodyctl register jvb auth.jitsi ${JVB_AUTH_PASSWORD} + +# copied from jitsi-meet.postinst +# Make sure the focus@auth user's roster includes the proxy component (this is idempotent) +prosodyctl mod_roster_command subscribe focus.jitsi focus@auth.jitsi + exec prosody -- cgit v1.2.3 From 982efd1b49f7435f7c49c2099aabfc994d3901fb Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 28 Jan 2021 23:02:37 +0100 Subject: Still so broken... --- app/jitsi/build/jitsi-conference-focus/Dockerfile | 9 ++++----- app/jitsi/build/jitsi-xmpp/Dockerfile | 9 +++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'app/jitsi/build') diff --git a/app/jitsi/build/jitsi-conference-focus/Dockerfile b/app/jitsi/build/jitsi-conference-focus/Dockerfile index 525bffb..db50746 100644 --- a/app/jitsi/build/jitsi-conference-focus/Dockerfile +++ b/app/jitsi/build/jitsi-conference-focus/Dockerfile @@ -1,10 +1,9 @@ -FROM debian:buster AS builder +FROM fedora:33 AS builder + +RUN dnf install -y java-latest-openjdk-headless maven wget unzip ARG PREFIXV ARG VERSION -RUN apt-get update && \ - apt-get install -y openjdk-11-jdk-headless maven wget unzip - RUN wget https://github.com/jitsi/jicofo/archive/${PREFIXV}${VERSION}.zip -O jicofo.zip RUN unzip jicofo.zip && \ mv jicofo*${VERSION} jicofo && \ @@ -13,7 +12,7 @@ RUN unzip jicofo.zip && \ unzip target/jicofo-1.1-SNAPSHOT-archive.zip && \ mv jicofo-1.1-SNAPSHOT /srv/build -FROM debian:buster +FROM debian:bullseye RUN apt-get update && \ apt-get install -y openjdk-11-jre-headless ca-certificates diff --git a/app/jitsi/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile index e3a8f8f..90aae76 100644 --- a/app/jitsi/build/jitsi-xmpp/Dockerfile +++ b/app/jitsi/build/jitsi-xmpp/Dockerfile @@ -1,11 +1,12 @@ FROM debian:buster as builder -ARG MEET_VERSION WORKDIR /tmp +ARG MEET_VERSION +ARG PREFIXV RUN apt-get update && \ - apt-get install -y wget unzip && \ - wget https://github.com/jitsi/jitsi-meet/archive/stable/jitsi-meet_${MEET_VERSION}.zip -O meet.zip && \ - unzip meet.zip && \ + apt-get install -y wget unzip +RUN wget https://github.com/jitsi/jitsi-meet/archive/${PREFIXV}${MEET_VERSION}.zip -O meet.zip +RUN unzip meet.zip && \ mv jitsi-meet-* jitsi-meet FROM debian:buster -- cgit v1.2.3