diff --git a/Jenkinsfile b/Jenkinsfile index a791a8e1..56220230 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,6 @@ +// STACK_NAME defines the name of the Docker stack deployed to acceptance +def STACK_NAME="lab-data-streamer" + pipeline { agent any @@ -71,26 +74,10 @@ pipeline { } steps { - sh 'docker stack rm streamer4user' + sh "docker stack rm ${STACK_NAME}" sleep(30) - // Streamer secrets - configFileProvider([configFile(fileId: 'streamer_service_config.json', variable: 'STREAMER_SERVICE_CONFIG')]) { - sh 'docker secret rm streamer-service-config.json || true' - sh 'docker secret create streamer-service-config.json $STREAMER_SERVICE_CONFIG' - } - configFileProvider([configFile(fileId: 'streamer_mailer_config.json', variable: 'STREAMER_MAILER_CONFIG')]) { - sh 'docker secret rm streamer-mailer-config.json || true' - sh 'docker secret create streamer-mailer-config.json $STREAMER_MAILER_CONFIG' - } - - // Streamer UI secrets - configFileProvider([configFile(fileId: 'streamer_ui_config.json', variable: 'STREAMER_UI_CONFIG')]) { - sh 'docker secret rm streamer-ui-config.json || true' - sh 'docker secret create streamer-ui-config.json $STREAMER_UI_CONFIG' - } - withCredentials([ usernamePassword ( credentialsId: params.STREAMER_UI_DB_CREDENTIALS, @@ -116,7 +103,7 @@ pipeline { // Use the same approach as for production script { - def statusCode = sh(script: "bash ./docker-deploy-acceptance.sh", returnStatus: true) + def statusCode = sh(script: "bash ./docker-deploy-acceptance.sh ${STACK_NAME}", returnStatus: true) echo "statusCode: ${statusCode}" } } @@ -133,14 +120,15 @@ pipeline { label 'swarm-manager' } steps { - withDockerContainer(image: 'jwilder/dockerize', args: '--network streamer4user-net') { + withDockerContainer(image: 'jwilder/dockerize', args: "--network ${STACK_NAME}_default") { sh ( label: 'Waiting for services to become available', script: 'dockerize \ -timeout 120s \ -wait tcp://service:3001 \ -wait tcp://ui-db:5432 \ - -wait http://ui:9000' + -wait http://ui:9000 \ + -wait http://stager-api-server:8080/v1/ping' ) } } @@ -148,11 +136,11 @@ pipeline { failure { sh ( label: 'Displaying service status', - script: 'docker stack ps streamer4user' + script: "docker stack ps ${STACK_NAME}" ) sh ( label: 'Displaying service logs', - script: 'docker stack services --format \'{{.Name}}\' streamer4user | xargs -n 1 docker service logs' + script: "docker stack services --format '{{.Name}}' ${STACK_NAME} | xargs -n 1 docker service logs" ) } } @@ -230,7 +218,7 @@ pipeline { post { success { - archiveArtifacts "docker-compose.yml, docker-compose.swarm.yml, env.sh" + archiveArtifacts "docker-compose.yml, docker-compose.stager.yml, docker-compose.swarm.yml, env.sh" } always { echo 'cleaning' diff --git a/docker-compose.override.yml b/docker-compose.override.yml index ffce8b7d..232afaca 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -7,7 +7,6 @@ services: ports: - ${STREAMER_UI_EXTERNAL_PORT:-9000}:9000 volumes: - - ${STREAMER_SECRETS_DIR}:/opt/streamer-ui-server/config - ${STREAMER_UI_LOG_VOL}:/opt/streamer-ui-server/log ui-db: ports: diff --git a/docker-compose.stager.yml b/docker-compose.stager.yml new file mode 100644 index 00000000..caff22e2 --- /dev/null +++ b/docker-compose.stager.yml @@ -0,0 +1,24 @@ +version: '3.7' +services: + + # stager task database + stager-db: + image: redis:alpine + user: root + command: --appendonly yes + + # stager api server + stager-api-server: + image: ${DOCKER_REGISTRY:-dccn}/data-stager-api:${STAGER_DOCKER_IMAGE_TAG:-latest} + user: root + depends_on: + - stager-db + command: -p 8080 -r redis://stager-db:6379 -c /etc/stager/api-server.yml + + # stager worker + stager-worker: + image: ${DOCKER_REGISTRY:-dccn}/data-stager-worker:${STAGER_DOCKER_IMAGE_TAG:-latest} + user: root + depends_on: + - stager-api-server + command: -r redis://stager-db:6379 -c /etc/stager/worker.yml diff --git a/docker-compose.swarm.yml b/docker-compose.swarm.yml index 4d15d75e..51068b0a 100644 --- a/docker-compose.swarm.yml +++ b/docker-compose.swarm.yml @@ -1,66 +1,74 @@ version: "3.7" services: + ## streamer service: volumes: # bind-mount for sss authentication - /var/lib/sss/pipes:/var/lib/sss/pipes - /var/lib/sss/mc:/var/lib/sss/mc:ro - environment: - # provides configuration files from docker secrets - - STREAMER_SERVICE_CONFIG=/run/secrets/streamer-service-config.json - - STREAMER_MAILER_CONFIG=/run/secrets/streamer-mailer-config.json + - ${STREAMER_SERVICE_CONFIG}:/opt/streamer/config/default.json + - ${STREAMER_MAILER_CONFIG}:/opt/streamer/config/mailer.json networks: default: # join the proxynet with hostname alias proxynet: aliases: - streamer - secrets: - - streamer-service-config.json - - streamer-mailer-config.json ui: - environment: - # provides configuration files from docker secrets - - STREAMER_UI_CONFIG=/run/secrets/streamer-ui-config.json - - STREAMER_SERVICE_CONFIG=/run/secrets/streamer-service-config.json networks: default: # join the proxynet with hostname alias proxynet: aliases: - streamer-ui - secrets: - - streamer-service-config.json - - streamer-ui-config.json - - streamer-ui-adconfig.json - - streamer-ui-ldapscert.crt ports: - ${STREAMER_UI_EXTERNAL_PORT:-9000}:9000 volumes: - ${PROJECT_CEPHFS_VOL}:/project_cephfs - ${PROJECT_VOL}:/project - ${STREAMER_UI_LOG_VOL}:/opt/streamer-ui-server/log + - ${STREAMER_SERVICE_CONFIG}:/opt/streamer-ui-server/config/streamer-service-config.json + - ${STREAMER_UI_CONFIG}:/opt/streamer-ui-server/config/streamer-ui-config.json ui-db: - ports: - - ${STREAMER_UI_DB_EXTERNAL_PORT:-9001}:${STREAMER_UI_DB_PORT:-5432} volumes: - ${STREAMER_UI_DB_DATA_VOL}:/var/lib/postgresql/data + ## stager + stager-db: + volumes: + - ${STAGER_DB_DATA_VOL}:/data + + # stager api server + stager-api-server: + volumes: + - ${STAGER_API_CONFIG}:/etc/stager/api-server.yml:ro + - ${PROJECT_VOL:-/project}:/project + - ${PROJECT_CEPHFS_VOL:-/project_cephfs}:/project_cephfs + logging: + driver: "json-file" + options: + max-size: "20m" + max-file: "5" + + # stager worker + stager-worker: + volumes: + - ${STAGER_IRODS_ICAT_CERT}:/opt/irods/ssl/icat.pem:ro + - ${STAGER_WORKER_CONFIG}:/etc/stager/worker.yml:ro + - ${PROJECT_VOL:-/project}:/project + - ${PROJECT_CEPHFS_VOL:-/project_cephfs}:/project_cephfs + deploy: + placement: + constraints: + - node.labels.IpRange==44 + logging: + driver: "json-file" + options: + max-size: "20m" + max-file: "5" + networks: default: - name: streamer4user-net attachable: true proxynet: - external: true - -secrets: - streamer-service-config.json: - external: true - streamer-mailer-config.json: - external: true - streamer-ui-config.json: - external: true - streamer-ui-adconfig.json: - external: true - streamer-ui-ldapscert.crt: - external: true + external: true \ No newline at end of file diff --git a/docker-deploy-acceptance.sh b/docker-deploy-acceptance.sh index ad41e6db..e710c677 100644 --- a/docker-deploy-acceptance.sh +++ b/docker-deploy-acceptance.sh @@ -1,6 +1,8 @@ #!/bin/bash +[ $# -lt 1 ] && echo "missing Docker stack name" >&2 && exit 1 + # export variables defined in env.sh set -a && source env.sh && set +a -docker stack up -c docker-compose.yml -c docker-compose.swarm.yml --prune --with-registry-auth --resolve-image always streamer4user \ No newline at end of file +docker stack up -c docker-compose.yml -c docker-compose.stager.yml -c docker-compose.swarm.yml --prune --with-registry-auth --resolve-image always "$1" \ No newline at end of file diff --git a/docker-deploy.sh b/docker-deploy.sh index 6fb32a77..b80802d6 100644 --- a/docker-deploy.sh +++ b/docker-deploy.sh @@ -3,15 +3,4 @@ # export variables defined in env.sh set -a && source env.sh && set +a -# add secrets, file and secret name will be identical -for f in `ls $STREAMER_SECRETS_DIR`; do - docker secret ls -f name=$f --format "{{.Name}}" | grep $f >/dev/null 2>&1 - if [ $? -eq 0 ]; then - # secret with the same name exists, remove it - docker secret rm $f - fi - # create new secret - docker secret create $f secrets/$f -done - -docker stack up -c docker-compose.yml -c docker-compose.swarm.yml --with-registry-auth streamer4user \ No newline at end of file +docker stack up -c docker-compose.yml -c docker-compose.stager.yml -c docker-compose.swarm.yml --with-registry-auth lab-data-streamer \ No newline at end of file diff --git a/env.sh b/env.sh index 55cca0e6..bd73b122 100644 --- a/env.sh +++ b/env.sh @@ -14,7 +14,7 @@ PROJECT_VOL=./testdata/project PROJECT_CEPHFS_VOL=./testdata/project_cephfs # volume for streamer job -STREAMER_DB_DATA_VOL=./testdata/redis +STREAMER_DB_DATA_VOL=./testdata/streamer/db # volume for streamer log STREAMER_SERVICE_LOG_VOL=./testdata/streamer/log @@ -35,7 +35,6 @@ STREAMER_UI_CRON_VOL=./testdata/ui/cron STREAMER_UI_LOG_VOL=./testdata/ui/log # Configuration files -STREAMER_SECRETS_DIR=./streamer/config STREAMER_SERVICE_CONFIG=./streamer/config/streamer-service-config.json STREAMER_MAILER_CONFIG=./streamer/config/streamer-mailer-config.json STREAMER_UI_CONFIG=./streamer/config/streamer-ui-config.json @@ -68,3 +67,10 @@ POSTGRES_PASSWORD=$STREAMER_UI_DB_PASSWORD POSTGRES_DATABASE=$STREAMER_UI_DB_NAME GRAFANA_USER=grafanareader GRAFANA_PASSWORD=grafanareaderpassword + +# configuration for stager +STAGER_DOCKER_IMAGE_TAG=latest +STAGER_DB_DATA_VOL=./testdata/stager/db +STAGER_API_CONFIG=./streamer/config/stager-api-server.yml +STAGER_WORKER_CONFIG=./streamer/config/stager-worker.yml +STAGER_IRODS_ICAT_CERT=./streamer/config/stager-icat.pem \ No newline at end of file diff --git a/print_env.sh b/print_env.sh index 75bb515d..8d3aff7e 100644 --- a/print_env.sh +++ b/print_env.sh @@ -37,7 +37,6 @@ echo "# volume for streamer ui log" echo "STREAMER_UI_LOG_VOL=$STREAMER_UI_LOG_VOL" echo echo "# Configuration files" -echo "STREAMER_SECRETS_DIR=$STREAMER_SECRETS_DIR" echo "STREAMER_SERVICE_CONFIG=$STREAMER_SERVICE_CONFIG" echo "STREAMER_MAILER_CONFIG=$STREAMER_MAILER_CONFIG" echo "STREAMER_UI_CONFIG=$STREAMER_UI_CONFIG" @@ -71,3 +70,10 @@ echo "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" echo "POSTGRES_DATABASE=$POSTGRES_DATABASE" echo "GRAFANA_USER=$GRAFANA_USER" echo "GRAFANA_PASSWORD=$GRAFANA_PASSWORD" +echo +echo "# configuration for stager" +echo "STAGER_DOCKER_IMAGE_TAG=$STAGER_DOCKER_IMAGE_TAG" +echo "STAGER_DB_DATA_VOL=$STAGER_DB_DATA_VOL" +echo "STAGER_API_CONFIG=$STAGER_API_CONFIG" +echo "STAGER_WORKER_CONFIG=$STAGER_WORKER_CONFIG" +echo "STAGER_IRODS_ICAT_CERT=$STAGER_IRODS_ICAT_CERT" diff --git a/streamer-ui/packages/server/routes/stager.js b/streamer-ui/packages/server/routes/stager.js index ed9e985d..8ef0695b 100644 --- a/streamer-ui/packages/server/routes/stager.js +++ b/streamer-ui/packages/server/routes/stager.js @@ -1,7 +1,6 @@ const createError = require("http-errors"); const path = require("path"); -const { basicAuthString, fetchOnce } = require("./utils"); -const fetch = require("node-fetch"); +const { fetchOnce } = require("./utils"); // location of the streamer-service-config.json file. const fconfig = path.join(__dirname, '../config/streamer-service-config.json'); @@ -20,15 +19,13 @@ var _getDac = async function(req, res, next) { delete require.cache[require.resolve(fconfig)]; const headers = { - 'Content-Type': 'application/json', - 'Authorization': basicAuthString(config.DataStager.username, config.DataStager.password), + 'Content-Type': 'application/json' }; fetchOnce( - config.DataStager.url + "/rdm/DAC/project/" + projectId, + config.DataStager.url + "/dac/project/" + projectId, { method: 'GET', - credentials: 'include', headers, }, 1000 * 30, // timeout after 30 seconds diff --git a/streamer-ui/packages/server/start-server.sh b/streamer-ui/packages/server/start-server.sh index b1f9dd15..e0f058e2 100644 --- a/streamer-ui/packages/server/start-server.sh +++ b/streamer-ui/packages/server/start-server.sh @@ -3,16 +3,6 @@ cd /opt/streamer-ui-server env -ls -l /run/secrets - -# Check and copy configuration files from secrets -if [ -f $STREAMER_SERVICE_CONFIG ]; then - cp $STREAMER_SERVICE_CONFIG config/streamer-service-config.json -fi - -if [ -f $STREAMER_UI_CONFIG ]; then - cp $STREAMER_UI_CONFIG config/streamer-ui-config.json -fi ls -l config diff --git a/streamer/Dockerfile b/streamer/Dockerfile index 10641ea7..8ac3a958 100644 --- a/streamer/Dockerfile +++ b/streamer/Dockerfile @@ -1,7 +1,6 @@ -FROM centos:7 +FROM almalinux:8 # application metadata -MAINTAINER Donders Institute LABEL donders.ru.nl.app_name "streamer" LABEL donders.ru.nl.app_maintainer "h.lee@donders.ru.nl" LABEL donders.ru.nl.app_code_repository "https://github.com/Donders-Institute/data-streamer" diff --git a/streamer/config/default.json.template b/streamer/config/default.json.template index 5d5c0885..a43a5e3f 100644 --- a/streamer/config/default.json.template +++ b/streamer/config/default.json.template @@ -9,8 +9,8 @@ "password": "bind_password" }, "DataStager": { - "url": "http://stager.dccn.nl:3000", - "username": "admin", + "url": "http://stager-api-server:8080", + "username": "root", "password": "xxxxxx" }, "Modalities": { diff --git a/streamer/lib/modalityMEG.js b/streamer/lib/modalityMEG.js index 07ae4451..2ba9e267 100644 --- a/streamer/lib/modalityMEG.js +++ b/streamer/lib/modalityMEG.js @@ -365,7 +365,7 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { var rget_args = { headers: { 'Accept': 'application/json' } }; - var myurl = sconfig.url + '/rdm/DAC/project/'; + var myurl = sconfig.url + '/dac/project/'; if ( toCatchall || p == 'unknown' ) { myurl += '_CATCHALL.MEG'; } else { @@ -389,9 +389,13 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { // here we get the collection namespace for the project var rpost_args = { - headers: { 'Accept': 'application/json', - 'Content-Type': 'application/json' }, - data: [] + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + data: { + jobs: [] + } }; if ( src_list.length == 0 ) { @@ -412,32 +416,28 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { for( var i=0; i 0 ) { - c_stager.post(sconfig.url + '/job', rpost_args, function(rdata, resp) { + c_stager.post(sconfig.url + '/jobs', rpost_args, function(rdata, resp) { if ( resp.statusCode >= 400 ) { //HTTP error var errmsg = 'HTTP error: (' + resp.statusCode + ') ' + resp.statusMessage; utility.printErr(job.id + ':MEG:execStreamerJob:submitStagerJob', errmsg); return cb_async_stager(errmsg, false); } else { - rdata.forEach( function(d) { - utility.printLog(job.id + ':MEG:execStreamerJob:submitStagerJob', JSON.stringify(d)); + rdata.jobs.forEach( function(stagerJobData) { + utility.printLog(job.id + ':MEG:execStreamerJob:submitStagerJob', JSON.stringify(stagerJobData)); }); // everything is fine return cb_async_stager(null, true); diff --git a/streamer/lib/modalityMRI.js b/streamer/lib/modalityMRI.js index 77ad58da..5a2d3b0f 100644 --- a/streamer/lib/modalityMRI.js +++ b/streamer/lib/modalityMRI.js @@ -350,7 +350,7 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { // construct project and RESTful endpoint for resolving RDM collection namespace var p = (toCatchall) ? '_CATCHALL.MRI':projectNumber; - var myurl = sconfig.url + '/rdm/DAC/project/' + p; + var myurl = sconfig.url + '/dac/project/' + p; // general function to construct destination URL for stager job var _mkDst = function(_src, _collName) { @@ -402,34 +402,30 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { } var rpost_args = { - headers: { 'Accept': 'application/json', - 'Content-Type': 'application/json' }, - data: [{ - 'type': 'rdm', - 'data': { 'clientIF': 'irods', - 'stagerUser': 'root', - 'rdmUser': 'irods', - 'title': '[' + (new Date()).toISOString() + '] Streamer.MRI: ' + src, - 'timeout': 3600, - 'timeout_noprogress': 600, - 'srcURL': src, - 'dstURL': _mkDst(src, rdata.collName) }, - 'options': { 'attempts': 5, - 'backoff': { 'delay' : 60000, - 'type' : 'fixed' } } - }] + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + data: { + "drUser": utility.getOuFromCollName(rdata.collName) + "-stager@ru.nl", + "dstURL": _mkDst(src, rdata.collName), + "srcURL": src, + "stagerUser": sconfig.username, + "stagerUserEmail": "", + "timeout": 3600, + "timeout_noprogress": 600, + "title": '[' + (new Date()).toISOString() + '] Streamer.MRI: ' + src + } }; // Submit stager job - c_stager.post(sconfig.url + '/job', rpost_args, function(rdata, resp) { + c_stager.post(sconfig.url + '/job', rpost_args, function(stagerJobData, resp) { if ( resp.statusCode >= 400 ) { //HTTP error var errmsg = 'HTTP error: (' + resp.statusCode + ') ' + resp.statusMessage; utility.printErr(job.id + ':MRI:execStreamerJob:submitStagerJob', errmsg); return cb_async(errmsg, src, projectNumber); } else { - rdata.forEach( function(d) { - utility.printLog(job.id + ':MRI:execStreamerJob:submitStagerJob', JSON.stringify(d)); - }); + utility.printLog(job.id + ':MRI:execStreamerJob:submitStagerJob', JSON.stringify(stagerJobData)); // job submitted!! set to job's maxProgress for the task job.progress(maxProgress, 100); return cb_async(null, src, projectNumber); diff --git a/streamer/lib/modalityUSER.js b/streamer/lib/modalityUSER.js index 4edda5aa..fb32c0ea 100644 --- a/streamer/lib/modalityUSER.js +++ b/streamer/lib/modalityUSER.js @@ -243,7 +243,7 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { password: sconfig.password }); var rget_args = { headers: { 'Accept': 'application/json' } }; - var myurl = sconfig.url + '/rdm/DAC/project/'; + var myurl = sconfig.url + '/dac/project/'; if ( toCatchall || p == 'unknown' ) { // NOTE: it requires the stager to provide endpoint to get the USER catchall collection. myurl += '_CATCHALL.USER'; @@ -271,9 +271,13 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { // here we get the collection namespace for the project var rpost_args = { - headers: { 'Accept': 'application/json', - 'Content-Type': 'application/json' }, - data: [] + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + data: { + jobs: [] + } }; // construct destination collection @@ -298,30 +302,26 @@ var _execStreamerJob = function(name, config, job, cb_remove, cb_done) { } // compose POST data for submitting stager jobs - rpost_args.data.push({ - 'type': 'rdm', - 'data': { 'clientIF': 'irods', - 'stagerUser': 'root', - 'rdmUser': 'irods', - 'title': '[' + (new Date()).toISOString() + '] Streamer.USER: ' + src, - 'timeout': 3600, - 'timeout_noprogress': 600, - 'srcURL': src, - 'dstURL': dst }, - 'options': { 'attempts': 5, - 'backoff': { 'delay' : 60000, - 'type' : 'fixed' } } + rpost_args.data.jobs.push({ + "drUser": utility.getOuFromCollName(rdata.collName) + "-stager@ru.nl", + "dstURL": dst, + "srcURL": src, + "stagerUser": sconfig.username, + "stagerUserEmail": "", + "timeout": 3600, + "timeout_noprogress": 600, + "title": '[' + (new Date()).toISOString() + '] Streamer.USER: ' + src }); // submit jobs to stager - c_stager.post(sconfig.url + '/job', rpost_args, function(rdata, resp) { + c_stager.post(sconfig.url + '/jobs', rpost_args, function(rdata, resp) { if ( resp.statusCode >= 400 ) { //HTTP error var errmsg = 'HTTP error: (' + resp.statusCode + ') ' + resp.statusMessage; utility.printErr(job.id + ':USER:execStreamerJob:submitStagerJob', errmsg); return cb_async(errmsg, false); } else { - rdata.forEach( function(d) { - utility.printLog(job.id + ':USER:execStreamerJob:submitStagerJob', JSON.stringify(d)); + rdata.jobs.forEach( function(stagerJobData) { + utility.printLog(job.id + ':USER:execStreamerJob:submitStagerJob', JSON.stringify(stagerJobData)); }); // everything is fine job.progress(maxProgress, 100); diff --git a/streamer/lib/utility.js b/streamer/lib/utility.js index ab3d9d08..060306f0 100644 --- a/streamer/lib/utility.js +++ b/streamer/lib/utility.js @@ -1,4 +1,5 @@ const child_process = require('child_process'); +const path = require('path'); // general error handler to send response to the client var _responseOnError = function(c_type, c_data, resp) { @@ -41,7 +42,20 @@ var _diskFree = function(path) { return freespace; } +// parses the RDR iRODS collName to get the ou name in lower case. +// +// The RDR iRODS collName is structured as follows: +// +// `/{zone}/{o}/{ou}/{collection}` +// +// This function gets the value of {ou} assuming the input `collName` +// follows the structure. +var _getOuFromCollName = function(collName) { + return path.basename(path.dirname(collName)).toLowerCase() +} + module.exports.responseOnError = _responseOnError; module.exports.printLog = _printLog; module.exports.printErr = _printErr; module.exports.diskFree = _diskFree; +module.exports.getOuFromCollName = _getOuFromCollName; diff --git a/streamer/lib/utility_ad.js b/streamer/lib/utility_ad.js index 4824f5eb..df0890bc 100644 --- a/streamer/lib/utility_ad.js +++ b/streamer/lib/utility_ad.js @@ -1,7 +1,5 @@ var config = require('config'); var ActiveDirectory = require('activedirectory'); -var utility = require('./utility'); - // utility function for finding a user profile in the Active Directory. // // The argument `name` can be one of the following type of string: diff --git a/streamer/start_streamer.sh b/streamer/start_streamer.sh index 5a93e8d9..5d0f1c0d 100755 --- a/streamer/start_streamer.sh +++ b/streamer/start_streamer.sh @@ -2,13 +2,4 @@ cd /opt/streamer -# check and copy configuration files from secrets -if [ -f $STREAMER_SERVICE_CONFIG ]; then - cp $STREAMER_SERVICE_CONFIG config/default.json -fi - -if [ -f $STREAMER_MAILER_CONFIG ]; then - cp $STREAMER_MAILER_CONFIG config/mailer.json -fi - /opt/nodejs/bin/node --expose-gc --max-old-space-size=2048 streamer.js