Make Container Config Strategy
Issue-ID: AAF-378
Change-Id: I57186f66b9713262643e0f440f5b9eb78154c155
Signed-off-by: Instrumental <jonathan.gathman@att.com>
diff --git a/auth/auth-cass/docker/dinstall.sh b/auth/auth-cass/docker/dinstall.sh
index 44ee713..bdbadf6 100644
--- a/auth/auth-cass/docker/dinstall.sh
+++ b/auth/auth-cass/docker/dinstall.sh
@@ -7,11 +7,24 @@
echo Docker not available in /usr/bin or /usr/local/bin
exit
fi
+
+if [ "$($DOCKER volume ls | grep aaf_cass_data)" = "" ]; then
+ $DOCKER volume create aaf_cass_data
+ echo "Created Cassandra Volume aaf_cass_data"
+fi
+
echo "Running DInstall"
if [ "`$DOCKER ps -a | grep aaf_cass`" == "" ]; then
echo "starting Cass from 'run'"
# NOTE: These HEAP Sizes are minimal. Not set for full organizations.
- $DOCKER run --name aaf_cass -e HEAP_NEWSIZE=512M -e MAX_HEAP_SIZE=1024M -e CASSANDRA_DC=dc1 -e CASSANDRA_CLUSTER_NAME=osaaf -d cassandra:3.11
+ $DOCKER run \
+ --name aaf_cass \
+ -e HEAP_NEWSIZE=512M \
+ -e MAX_HEAP_SIZE=1024M \
+ -e CASSANDRA_DC=dc1 \
+ -e CASSANDRA_CLUSTER_NAME=osaaf \
+ --mount 'type=volume,src=aaf_cass_data,dst=/var/lib/cassandra,volume-driver=local' \
+ -d cassandra:3.11
# Set on local Disk
# -v /opt/app/cass:/var/lib/cassandra
echo "aaf_cass Starting"
diff --git a/auth/auth-cass/src/main/cql/init.cql b/auth/auth-cass/src/main/cql/init.cql
index c06e5ee..bf75998 100644
--- a/auth/auth-cass/src/main/cql/init.cql
+++ b/auth/auth-cass/src/main/cql/init.cql
@@ -264,3 +264,10 @@
start timestamp,
PRIMARY KEY ((class))
);
+
+CREATE TABLE config (
+ name varchar,
+ tag varchar,
+ value varchar,
+ PRIMARY KEY (name,tag)
+);