Skip to content

Commit

Permalink
Enable ssl flag to connect MongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
motomux committed Jul 14, 2017
1 parent 74a7fa8 commit b30660c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions init-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export APP_MONGO_URL="mongodb://app:[email protected]:10478,c
export APP_MONGO_OPLOG_URL="mongodb://oplog:[email protected]:10478,candidate.54.mongolayer.com:10216/local?authSource=tkadira-app&replicaSet=set-56175e62147ca745d8000761"
export DATA_MONGO_URL="mongodb://app:[email protected]:10478,candidate.54.mongolayer.com:10216/tkadira-data?replicaSet=set-56175e62147ca745d8000761"
export MAIL_URL="smtp://postmaster%40kadira.io:[email protected]:587"
export MONGO_SSL=false

# Engine settings
export ENGINE_PORT=11011
Expand Down
9 changes: 7 additions & 2 deletions kadira-rma/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ if [[ -z $MONGO_SHARD ]]; then
exit 1
fi

SSL_FLAG=""
if [[ $MONGO_SSL == true ]]; then
SSL_FLAG="--ssl"
fi

ENV_FILE_NAME="env-$PROFILE-$PROVIDER.js"

dumpEnvVarsTo() {
Expand All @@ -50,9 +55,9 @@ while [[ true ]]; do
dumpEnvVarsTo $ENV_FILE_NAME
set -x;
if [ -z ${START_TIME+x} ] || [ -z ${END_TIME+x} ]; then
mongo $(pick-mongo-primary $MONGO_METRICS_URL) profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js incremental-aggregation.js;
mongo $(pick-mongo-primary $MONGO_METRICS_URL) $SSL_FLAG profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js incremental-aggregation.js;
else
mongo $(pick-mongo-primary $MONGO_METRICS_URL) profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js batch-aggregation.js;
mongo $(pick-mongo-primary $MONGO_METRICS_URL) $SSL_FLAG profiles/$PROFILE.js providers/$PROVIDER.js $ENV_FILE_NAME lib.js mapreduce.js batch-aggregation.js;
fi
set +x;
completedAt=$(date +%s)
Expand Down

0 comments on commit b30660c

Please sign in to comment.