Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 4016d5c

Browse files
authored
Merge pull request #1 from open-webrtc-toolkit/master
Update code
2 parents d838f10 + 525cabb commit 4016d5c

37 files changed

+727
-142
lines changed

doc/servermd/Server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Customers must be familiar with industry standards and best practices for deploy
447447

448448
The following instructions are provided only as recommendations regarding security best practices and by no means are they fully complete:
449449

450-
1. For the key pair access on OWT server, make sure only people with high enough privilege can have the clearance.
450+
1. For the key pair access on OWT server, make sure only people/process with high enough privilege can have the clearance. For service key, authentication service is recommended to integrate with OWT server and access it. For cipher key, hardware security storage is recommended.
451451
2. Regular system state audits or system change auto-detection. For example, OWT server system changes notification mechanism by third-party tool.
452452
3. Establish policy of file based operation history for the tracking purpose.
453453
4. Establish policy disallowing saving credentials for remote system access on OWT server.

docker/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ RUN wget -O - ${NICE_REPO} | tar xz && \
2727
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-removecandidate.patch && \
2828
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-keepalive.patch && \
2929
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-startcheck.patch && \
30+
patch -p1 < owt-server-${LIBNICE_PATCH_VER}/scripts/patches/libnice014-closelock.patch && \
3031
./configure --prefix="/usr/local" --libdir=/usr/local/lib/x86_64-linux-gnu && \
3132
make -s V=0 && \
3233
make install
3334

3435

3536
# Build open ssl
36-
ARG OPENSSL_BASE="1.1.1"
37-
ARG OPENSSL_VER="1.1.1h"
37+
ARG OPENSSL_VER="1.1.1j"
3838
ARG OPENSSL_REPO=https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz
3939

4040
RUN wget -O - ${OPENSSL_REPO} | tar xz && \
@@ -92,7 +92,6 @@ ARG FFMPEG_VER="4.1.3"
9292
ARG FFMPEG_DIR="ffmpeg-${FFMPEG_VER}"
9393
ARG FFMPEG_SRC="${FFMPEG_DIR}.tar.bz2"
9494
ARG FFMPEG_SRC_URL="http://ffmpeg.org/releases/${FFMPEG_SRC}"
95-
ARG FFMPEG_SRC_MD5SUM="9985185a8de3678e5b55b1c63276f8b5"
9695

9796
RUN wget ${FFMPEG_SRC_URL} && tar xf ${FFMPEG_SRC} && mv ${FFMPEG_DIR} FFmpeg && \
9897
cd FFmpeg ;
@@ -154,7 +153,7 @@ ARG OWT_BRANCH=master
154153
ARG IMG_APP_PATH=/app_data/
155154
ENV APP_PATH=${IMG_APP_PATH}
156155

157-
RUN apt-get update && apt-get install -y -q --no-install-recommends python libglib2.0-dev rabbitmq-server mongodb libboost-thread-dev libboost-system-dev liblog4cxx-dev
156+
RUN apt-get update && apt-get install -y -q --no-install-recommends python libglib2.0-dev rabbitmq-server mongodb libboost-thread-dev libboost-system-dev liblog4cxx-dev libgstreamer-plugins-base1.0-dev
158157

159158
# 1. Clone OWT server source code
160159
# 2. Clone licode source code and patch

source/agent/analytics/dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"../nodeManager.js",
1717
"../workingNode.js",
1818
"../../common/cipher.js",
19-
"../../common/amqp_client.js",
19+
"../../common/amqpClient.js",
2020
"../../common/cipher.js",
2121
"../../common/clusterWorker.js",
2222
"../../common/loadCollector.js",

source/agent/analytics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "OWT-Server-Agent",
33
"version":"5.0.0",
44
"dependencies": {
5-
"amqp": "*",
5+
"amqplib": "^0.7.0",
66
"log4js": "^1.1.1",
77
"node-getopt": "*",
88
"toml": "*"

source/agent/audio/dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"../workingNode.js",
1616
"log4cxx.properties",
1717
"../../common/cipher.js",
18-
"../../common/amqp_client.js",
18+
"../../common/amqpClient.js",
1919
"../../common/clusterWorker.js",
2020
"../../common/loadCollector.js",
2121
"../../common/logger.js",

source/agent/conference/conference.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ var Conference = function (rpcClient, selfRpcId) {
509509
return Promise.all(pl)
510510
.then(() => {
511511
doClean();
512-
process.exit();
512+
process.kill(process.pid, 'SIGINT');
513513
});
514514
};
515515

source/agent/conference/dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"../networkHelper.js",
2323
"../../common/formatUtil.js",
2424
"../../common/cipher.js",
25-
"../../common/amqp_client.js",
25+
"../../common/amqpClient.js",
2626
"../../common/clusterWorker.js",
2727
"../../common/loadCollector.js",
2828
"../../common/logger.js",

source/agent/conference/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "OWT-Server-Conference-Controller",
33
"version":"5.0.0",
44
"dependencies": {
5-
"amqp": "*",
5+
"amqplib": "^0.7.0",
66
"log4js": "^1.1.1",
77
"node-getopt": "*",
88
"toml": "*",

source/agent/index.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ for (var prop in opt.options) {
5252

5353
var clusterWorker = require('./clusterWorker');
5454
var nodeManager = require('./nodeManager');
55-
var amqper = require('./amqp_client')();
55+
var amqper = require('./amqpClient')();
5656
var rpcClient;
5757
var monitoringTarget;
5858

@@ -221,16 +221,21 @@ amqper.connect(config.rabbit, function () {
221221
});
222222

223223
['SIGINT', 'SIGTERM'].map(function (sig) {
224-
process.on(sig, function () {
224+
process.on(sig, async function () {
225225
log.warn('Exiting on', sig);
226+
manager && manager.dropAllNodes(true);
227+
worker && worker.quit();
228+
try {
229+
await amqper.disconnect();
230+
} catch(e) {
231+
log.warn('Exiting e:', e);
232+
}
226233
process.exit();
227234
});
228235
});
229236

230237
process.on('exit', function () {
231-
manager && manager.dropAllNodes(true);
232-
worker && worker.quit();
233-
amqper.disconnect();
238+
log.info('Process exit');
234239
});
235240

236241
process.on('unhandledRejection', (reason) => {

source/agent/nodeManager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ module.exports = function (spec, spawnOptions, onNodeAbnormallyQuit, onTaskAdded
309309
};
310310

311311
that.dropAllNodes = function(quietly) {
312+
spawn_failed = true;
312313
Object.keys(processes).map(function (k) {
313314
!quietly && onNodeAbnormallyQuit && onNodeAbnormallyQuit(k, tasksOnNode(k));
314315
dropNode(k);

0 commit comments

Comments
 (0)