Stabilize build scripts
This commit is contained in:
parent
c2960f75b7
commit
cb69a1123c
7 changed files with 153 additions and 36 deletions
|
@ -56,8 +56,7 @@ services:
|
||||||
context: ./jitsi/build/jitsi-conference-focus
|
context: ./jitsi/build/jitsi-conference-focus
|
||||||
args:
|
args:
|
||||||
# https://github.com/jitsi/jicofo
|
# https://github.com/jitsi/jicofo
|
||||||
PREFIXV: jitsi-meet_
|
JICOFO_TAG: jitsi-meet_5463
|
||||||
VERSION: 5463
|
|
||||||
image: superboum/amd64_jitsi_conference_focus:v7
|
image: superboum/amd64_jitsi_conference_focus:v7
|
||||||
|
|
||||||
jitsi-videobridge:
|
jitsi-videobridge:
|
||||||
|
@ -65,8 +64,8 @@ services:
|
||||||
context: ./jitsi/build/jitsi-videobridge
|
context: ./jitsi/build/jitsi-videobridge
|
||||||
args:
|
args:
|
||||||
# https://github.com/jitsi/jitsi-videobridge
|
# https://github.com/jitsi/jitsi-videobridge
|
||||||
PREFIXV: stable/jitsi-meet_
|
# note: JVB is not tagged with non-stable tags
|
||||||
VERSION: 5390
|
JVB_TAG: stable/jitsi-meet_5390
|
||||||
image: superboum/amd64_jitsi_videobridge:v17
|
image: superboum/amd64_jitsi_videobridge:v17
|
||||||
|
|
||||||
jitsi-xmpp:
|
jitsi-xmpp:
|
||||||
|
|
|
@ -0,0 +1,91 @@
|
||||||
|
From 3da458fc04560e8ddd597f7910c4f53b714d58ab Mon Sep 17 00:00:00 2001
|
||||||
|
From: Quentin Dufour <quentin@dufour.io>
|
||||||
|
Date: Mon, 1 Feb 2021 06:53:21 +0100
|
||||||
|
Subject: [PATCH] Remove broken command line args parameters setting
|
||||||
|
|
||||||
|
---
|
||||||
|
src/main/java/org/jitsi/jicofo/Main.java | 61 ------------------------
|
||||||
|
1 file changed, 61 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/jitsi/jicofo/Main.java b/src/main/java/org/jitsi/jicofo/Main.java
|
||||||
|
index 558d1b3..59e04bb 100644
|
||||||
|
--- a/src/main/java/org/jitsi/jicofo/Main.java
|
||||||
|
+++ b/src/main/java/org/jitsi/jicofo/Main.java
|
||||||
|
@@ -50,7 +50,6 @@ public static void main(String[] args)
|
||||||
|
logger.error("An uncaught exception occurred in thread=" + t, e));
|
||||||
|
|
||||||
|
setupMetaconfigLogger();
|
||||||
|
- setSystemProperties(args);
|
||||||
|
JitsiConfig.Companion.reloadNewConfig();
|
||||||
|
|
||||||
|
// Make sure that passwords are not printed by ConfigurationService
|
||||||
|
@@ -80,66 +79,6 @@ public static void main(String[] args)
|
||||||
|
JicofoServices.jicofoServicesSingleton = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /**
|
||||||
|
- * Read the command line arguments and env variables, and set the corresponding system properties used for
|
||||||
|
- * configuration of the XMPP component and client connections.
|
||||||
|
- */
|
||||||
|
- private static void setSystemProperties(String[] args)
|
||||||
|
- throws ParseException
|
||||||
|
- {
|
||||||
|
- CmdLine cmdLine = new CmdLine();
|
||||||
|
-
|
||||||
|
- // We may end execution here if one of required arguments is missing
|
||||||
|
- cmdLine.parse(args);
|
||||||
|
-
|
||||||
|
- // XMPP host/domain
|
||||||
|
- String host;
|
||||||
|
- String componentDomain;
|
||||||
|
- // Try to get domain, can be null after this call(we'll fix that later)
|
||||||
|
- componentDomain = cmdLine.getOptionValue("domain");
|
||||||
|
- // Host name
|
||||||
|
- host = cmdLine.getOptionValue("--host", componentDomain == null ? "localhost" : componentDomain);
|
||||||
|
- // Try to fix component domain
|
||||||
|
- if (isBlank(componentDomain))
|
||||||
|
- {
|
||||||
|
- componentDomain = host;
|
||||||
|
- }
|
||||||
|
- if (componentDomain != null)
|
||||||
|
- {
|
||||||
|
- // For backward compat, the "--domain" command line argument controls the domain for the XMPP component
|
||||||
|
- // as well as XMPP client connection.
|
||||||
|
- System.setProperty(XmppClientConnectionConfig.legacyXmppDomainPropertyName, componentDomain);
|
||||||
|
- }
|
||||||
|
- if (host != null)
|
||||||
|
- {
|
||||||
|
- // For backward compat, the "--host" command line argument controls the hostname for the XMPP component
|
||||||
|
- // as well as XMPP client connection.
|
||||||
|
- System.setProperty(XmppClientConnectionConfig.legacyHostnamePropertyName, host);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // XMPP client connection
|
||||||
|
- String focusDomain = cmdLine.getOptionValue("--user_domain");
|
||||||
|
- String focusUserName = cmdLine.getOptionValue("--user_name");
|
||||||
|
- String focusPassword = cmdLine.getOptionValue("--user_password");
|
||||||
|
- if (isBlank(focusPassword))
|
||||||
|
- {
|
||||||
|
- focusPassword = System.getenv("JICOFO_AUTH_PASSWORD");
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (focusDomain != null)
|
||||||
|
- {
|
||||||
|
- System.setProperty(XmppClientConnectionConfig.legacyDomainPropertyName, focusDomain);
|
||||||
|
- }
|
||||||
|
- if (focusUserName != null)
|
||||||
|
- {
|
||||||
|
- System.setProperty(XmppClientConnectionConfig.legacyUsernamePropertyName, focusUserName);
|
||||||
|
- }
|
||||||
|
- if (isNotBlank(focusPassword))
|
||||||
|
- {
|
||||||
|
- System.setProperty(XmppClientConnectionConfig.legacyPasswordPropertyName, focusPassword);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
private static void setupMetaconfigLogger()
|
||||||
|
{
|
||||||
|
org.jitsi.utils.logging2.Logger configLogger = new org.jitsi.utils.logging2.LoggerImpl("org.jitsi.config");
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
|
@ -3,25 +3,15 @@ FROM fedora:33 AS builder
|
||||||
# unzip is required when executing the mvn package command
|
# unzip is required when executing the mvn package command
|
||||||
RUN dnf install -y java-latest-openjdk-headless maven git unzip
|
RUN dnf install -y java-latest-openjdk-headless maven git unzip
|
||||||
|
|
||||||
ARG PREFIXV
|
ARG JICOFO_TAG
|
||||||
ARG VERSION
|
RUN git clone --depth 1 --branch $JICOFO_TAG https://github.com/jitsi/jicofo
|
||||||
|
|
||||||
# Create a cache
|
|
||||||
RUN git clone https://github.com/superboum/jicofo && \
|
|
||||||
cd jicofo && \
|
|
||||||
mvn package -DskipTests -Dassembly.skipAssembly=false
|
|
||||||
|
|
||||||
WORKDIR jicofo
|
WORKDIR jicofo
|
||||||
# Ensure latest version is compiled
|
COPY *.patch .
|
||||||
RUN git pull && \
|
RUN git apply 0001-Remove-broken-command-line-args-parameters-setting.patch
|
||||||
git checkout 194795ed2a3ca08c25322c99f1ee89d134e1e1a2
|
RUN mvn package -DskipTests -Dassembly.skipAssembly=false
|
||||||
|
|
||||||
# Wild patch for debug, once it will work we can safely remove this dead code
|
RUN unzip target/jicofo-1.1-SNAPSHOT-archive.zip && \
|
||||||
#COPY jicofogit/src/main/kotlin/org/jitsi/jicofo/JicofoServices.kt src/main/kotlin/org/jitsi/jicofo/JicofoServices.kt
|
|
||||||
#COPY jicofogit/src/main/java/org/jitsi/impl/protocol/xmpp/XmppProtocolProvider.java src/main/java/org/jitsi/impl/protocol/xmpp/XmppProtocolProvider.java
|
|
||||||
|
|
||||||
RUN mvn package -DskipTests -Dassembly.skipAssembly=false && \
|
|
||||||
unzip target/jicofo-1.1-SNAPSHOT-archive.zip && \
|
|
||||||
mv jicofo-1.1-SNAPSHOT /srv/build
|
mv jicofo-1.1-SNAPSHOT /srv/build
|
||||||
|
|
||||||
FROM debian:bullseye
|
FROM debian:bullseye
|
||||||
|
|
|
@ -2,8 +2,13 @@
|
||||||
|
|
||||||
update-ca-certificates -f
|
update-ca-certificates -f
|
||||||
|
|
||||||
|
if [ -z "${JICOFO_MEMORY}" ]; then
|
||||||
|
echo "You must set the env variable 'JICOFO_MEMORY'. eg. JICOFO_MEMORY=3072m"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
exec java \
|
exec java \
|
||||||
-Xmx400m \
|
-Xmx${JICOFO_MEMORY} \
|
||||||
-XX:+HeapDumpOnOutOfMemoryError \
|
-XX:+HeapDumpOnOutOfMemoryError \
|
||||||
-XX:HeapDumpPath=/tmp \
|
-XX:HeapDumpPath=/tmp \
|
||||||
-Djdk.tls.ephemeralDHKeySize=2048 \
|
-Djdk.tls.ephemeralDHKeySize=2048 \
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
From b327e580ab83110cdb52bc1d11687a096b8fc1df Mon Sep 17 00:00:00 2001
|
||||||
|
From: Quentin Dufour <quentin@dufour.io>
|
||||||
|
Date: Mon, 1 Feb 2021 07:16:50 +0100
|
||||||
|
Subject: [PATCH] Disable legacy parameters
|
||||||
|
|
||||||
|
---
|
||||||
|
jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt | 8 --------
|
||||||
|
1 file changed, 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt b/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt
|
||||||
|
index df71f480..8f0ef9a5 100644
|
||||||
|
--- a/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt
|
||||||
|
+++ b/jvb/src/main/kotlin/org/jitsi/videobridge/Main.kt
|
||||||
|
@@ -62,14 +62,6 @@ fun main(args: Array<String>) {
|
||||||
|
// to be passed.
|
||||||
|
System.setProperty("org.eclipse.jetty.util.log.class", "org.eclipse.jetty.util.log.JavaUtilLog")
|
||||||
|
|
||||||
|
- // Before initializing the application programming interfaces (APIs) of
|
||||||
|
- // Jitsi Videobridge, set any System properties which they use and which
|
||||||
|
- // may be specified by the command-line arguments.
|
||||||
|
- System.setProperty(
|
||||||
|
- Videobridge.REST_API_PNAME,
|
||||||
|
- cmdLine.getOptionValue("--apis").contains(Videobridge.REST_API).toString()
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
// Reload the Typesafe config used by ice4j, because the original was initialized before the new system
|
||||||
|
// properties were set.
|
||||||
|
JitsiConfig.reloadNewConfig()
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
FROM debian:buster AS builder
|
FROM debian:buster AS builder
|
||||||
|
|
||||||
ARG PREFIXV
|
|
||||||
ARG VERSION
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y wget unzip maven openjdk-11-jdk-headless
|
apt-get install -y git unzip maven openjdk-11-jdk-headless
|
||||||
|
|
||||||
RUN wget https://github.com/jitsi/jitsi-videobridge/archive/${PREFIXV}${VERSION}.zip -O jvb.zip
|
ARG JVB_TAG
|
||||||
|
RUN git clone --depth 1 --branch ${JVB_TAG} https://github.com/jitsi/jitsi-videobridge
|
||||||
|
|
||||||
RUN unzip jvb.zip && \
|
WORKDIR jitsi-videobridge
|
||||||
mv jitsi-videobridge*${VERSION} jvb && \
|
COPY *.patch .
|
||||||
cd jvb && \
|
RUN git apply 0001-Disable-legacy-parameters.patch
|
||||||
mvn package -DskipTests && \
|
RUN mvn package -DskipTests
|
||||||
ls jvb/target && \
|
RUN unzip jvb/target/jitsi-videobridge*.zip && \
|
||||||
unzip jvb/target/jitsi-videobridge*.zip && \
|
|
||||||
mv jitsi-videobridge-*-SNAPSHOT build
|
mv jitsi-videobridge-*-SNAPSHOT build
|
||||||
|
|
||||||
FROM debian:buster
|
FROM debian:buster
|
||||||
|
@ -21,7 +18,7 @@ FROM debian:buster
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y openjdk-11-jre-headless curl
|
apt-get install -y openjdk-11-jre-headless curl
|
||||||
|
|
||||||
COPY --from=builder /jvb/build /usr/share/jvb
|
COPY --from=builder /jitsi-videobridge/build /usr/share/jvb
|
||||||
COPY jvb_run /usr/local/bin/jvb_run
|
COPY jvb_run /usr/local/bin/jvb_run
|
||||||
|
|
||||||
CMD ["/usr/local/bin/jvb_run"]
|
CMD ["/usr/local/bin/jvb_run"]
|
||||||
|
|
|
@ -9,10 +9,15 @@ if [ -z "${JITSI_NAT_PUBLIC_IP}" ]; then
|
||||||
JITSI_NAT_PUBLIC_IP=$(curl https://ifconfig.me)
|
JITSI_NAT_PUBLIC_IP=$(curl https://ifconfig.me)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "${JVB_MEMORY}" ]; then
|
||||||
|
echo "You must set the env variable 'JVB_MEMORY'. eg: JVB_MEMORY=3072m"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "NAT config: ${JITSI_NAT_LOCAL_IP} -> ${JITSI_NAT_PUBLIC_IP}"
|
echo "NAT config: ${JITSI_NAT_LOCAL_IP} -> ${JITSI_NAT_PUBLIC_IP}"
|
||||||
|
|
||||||
exec java \
|
exec java \
|
||||||
-Xmx3072m \
|
-Xmx${JVB_MEMORY} \
|
||||||
-XX:+UseConcMarkSweepGC \
|
-XX:+UseConcMarkSweepGC \
|
||||||
-XX:+HeapDumpOnOutOfMemoryError \
|
-XX:+HeapDumpOnOutOfMemoryError \
|
||||||
-XX:HeapDumpPath=/tmp \
|
-XX:HeapDumpPath=/tmp \
|
||||||
|
@ -22,5 +27,4 @@ exec java \
|
||||||
-Dorg.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=${JITSI_NAT_LOCAL_IP} \
|
-Dorg.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=${JITSI_NAT_LOCAL_IP} \
|
||||||
-Dorg.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=${JITSI_NAT_PUBLIC_IP} \
|
-Dorg.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=${JITSI_NAT_PUBLIC_IP} \
|
||||||
-cp '/usr/share/jvb/jitsi-videobridge.jar:/usr/share/jvb/lib/*' \
|
-cp '/usr/share/jvb/jitsi-videobridge.jar:/usr/share/jvb/lib/*' \
|
||||||
org.jitsi.videobridge.MainKt \
|
org.jitsi.videobridge.MainKt
|
||||||
--apis=rest,xmpp
|
|
||||||
|
|
Reference in a new issue