mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-13 22:15:26 +00:00
added default values in add-as-replica: mongo0.internal.sapsailing.com as PRIMARY and "live" as replica set name
Change-Id: I0cb9b5489290fde3a3fed49f363e117731e637b7
This commit is contained in:
1 parent
3d3984a11f
commit
04eeb0d0d0
1 file changed
+6
@@ -1,6 +1,12 @@
|
||||
#!/bin/bash
|
||||
REPLICA_SET_NAME=$(ec2-metadata | grep REPLICA_SET_NAME | sed -e 's/^user-data: //' | sed -e 's/^REPLICA_SET_NAME=//')
|
||||
if [ -z "$REPLICA_SET_NAME" ]; then
|
||||
REPLICA_SET_NAME=live
|
||||
fi
|
||||
REPLICA_SET_PRIMARY=$(ec2-metadata | grep REPLICA_SET_PRIMARY | sed -e 's/^user-data: //' | sed -e 's/^REPLICA_SET_PRIMARY=//')
|
||||
if [ -z "$REPLICA_SET_PRIMARY" ]; then
|
||||
REPLICA_SET_PRIMARY=mongo0.internal.sapsailing.com:27017
|
||||
fi
|
||||
REPLICA_SET_PRIORITY=$(ec2-metadata | grep REPLICA_SET_PRIORITY | sed -e 's/^user-data: //' | sed -e 's/^REPLICA_SET_PRIORITY=//')
|
||||
if [ -z "$REPLICA_SET_PRIORITY" ]; then
|
||||
REPLICA_SET_PRIORITY=0
|
||||
|
||||
Reference in new issue
Block a user