diff options
author | Instrumental <jonathan.gathman@att.com> | 2018-10-05 19:30:59 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2018-10-05 19:31:01 -0500 |
commit | 196000bb838818d9e3cc3d5c08614c1898388135 (patch) | |
tree | 751531d15e211acfa8ebcd4cff23edef6ec3b987 /auth/sample/bin/service.sh | |
parent | dc37d74431e83a3587f20720354c7c95d487fb95 (diff) |
Add Detail Cass Config
Add ability to set all "cassandra.cluster" properties by Container Envs
Issue-ID: AAF-542
Change-Id: Ia7dadd6203df0072723c856b7a6028ba2ad67e58
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/sample/bin/service.sh')
-rw-r--r-- | auth/sample/bin/service.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh index da2eb855..9cbe4533 100644 --- a/auth/sample/bin/service.sh +++ b/auth/sample/bin/service.sh @@ -93,9 +93,17 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then cadi_etc_dir=$LOCAL \ cadi_prop_files=$CONFIG/local/initialConfig.props:$CONFIG/local/aaf.props:${TMP} rm ${TMP} - # Default Password for Default Cass - CASS_PASS=$("$JAVA" -jar $CONFIG/bin/aaf-cadi-aaf-*-full.jar cadi digest "cassandra" $LOCAL/org.osaaf.aaf.keyfile) - sed -i.backup -e "s/\\(cassandra.clusters.password=enc:\\)/\\1$CASS_PASS/" $LOCAL/org.osaaf.aaf.cassandra.props + + # Cassandra Config stuff + # Default is expect a Cassandra on same Node + CASS_HOST=${CASS_HOST:="localhost:127.0.0.1"} + CASS_PASS=$("$JAVA" -jar $CONFIG/bin/aaf-cadi-aaf-*-full.jar cadi digest "${CASSANDRA_PASSWORD:-cassandra}" $LOCAL/org.osaaf.aaf.keyfile) + CASS_NAME=${CASS_HOST/:*/} + sed -i.backup -e "s/\\(cassandra.clusters=\\).*/\\1${CASSANDRA_CLUSTERS:=$CASS_NAME}/" \ + -e "s/\\(cassandra.clusters.user=\\).*/\\1${CASSANDRA_USER:=cassandra}/" \ + -e "s/\\(cassandra.clusters.password=enc:\\).*/\\1$CASS_PASS/" \ + -e "s/\\(cassandra.clusters.port=\\).*/\\1${CASSANDRA_PORT:=9042}/" \ + $LOCAL/org.osaaf.aaf.cassandra.props if [ -n "$CM_CA_LOCAL" ]; then if [ -n "$CM_CA_PASS" ]; then |