blob: 21de1ac4d21c336d490930cfbbb17ffa1a48e336 [file] [log] [blame]
Instrumental94053612018-10-08 11:27:18 -05001#!/bin/bash
Instrumentalbc299c02018-09-25 06:42:31 -05002
3# Pull in AAF Env Variables from AAF install
4if [ -e ../../docker/d.props ]; then
5 . ../../docker/d.props
Instrumentalbc299c02018-09-25 06:42:31 -05006fi
Instrumental94053612018-10-08 11:27:18 -05007DOCKER=${DOCKER:-docker}
Instrumentalbc299c02018-09-25 06:42:31 -05008
9if [ "$($DOCKER volume ls | grep aaf_cass_data)" = "" ]; then
10 $DOCKER volume create aaf_cass_data
11 echo "Created Cassandra Volume aaf_cass_data"
12fi
13
Instrumental94053612018-10-08 11:27:18 -050014# Optional mount instead of v
15# --mount 'type=volume,src=aaf_cass_data,dst=/var/lib/cassandra,volume-driver=local' \
Instrumentalbc299c02018-09-25 06:42:31 -050016if [ "`$DOCKER ps -a | grep aaf_cass`" == "" ]; then
17 echo "starting Cass from 'run'"
18 # NOTE: These HEAP Sizes are minimal. Not set for full organizations.
19 $DOCKER run \
20 --name aaf_cass \
21 -e HEAP_NEWSIZE=512M \
22 -e MAX_HEAP_SIZE=1024M \
23 -e CASSANDRA_DC=dc1 \
24 -e CASSANDRA_CLUSTER_NAME=osaaf \
Instrumental94053612018-10-08 11:27:18 -050025 -v "aaf_cass_data:/var/lib/cassandra" \
Instrumental08e93402018-10-03 08:38:52 -050026 -d ${PREFIX}${ORG}/${PROJECT}/aaf_cass:${VERSION} "onap"
Instrumentalbc299c02018-09-25 06:42:31 -050027else
28 $DOCKER start aaf_cass
29fi