Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ssl flag to connect MongoDB #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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