blob: 4f2499c729749a9907bd7d6e1229291392b9899d [file] [log] [blame]
Instrumentalbc299c02018-09-25 06:42:31 -05001#!/bin/bash
2
3# Pull in AAF Env Variables from AAF install
4if [ -e ../../docker/d.props ]; then
5 . ../../docker/d.props
6else
7 . ../../docker/d.props.init
8fi
9
10if [ -e /usr/bin/docker ]; then
11 DOCKER=/usr/bin/docker
12elif [ -e /usr/local/bin/docker ]; then
13 DOCKER=/usr/local/bin/docker
14else
15 echo Docker not available in /usr/bin or /usr/local/bin
16 exit
17fi
18
19if [ "$($DOCKER volume ls | grep aaf_cass_data)" = "" ]; then
20 $DOCKER volume create aaf_cass_data
21 echo "Created Cassandra Volume aaf_cass_data"
22fi
23
24if [ "`$DOCKER ps -a | grep aaf_cass`" == "" ]; then
25 echo "starting Cass from 'run'"
26 # NOTE: These HEAP Sizes are minimal. Not set for full organizations.
27 $DOCKER run \
28 --name aaf_cass \
29 -e HEAP_NEWSIZE=512M \
30 -e MAX_HEAP_SIZE=1024M \
31 -e CASSANDRA_DC=dc1 \
32 -e CASSANDRA_CLUSTER_NAME=osaaf \
33 --mount 'type=volume,src=aaf_cass_data,dst=/var/lib/cassandra,volume-driver=local' \
34 -d ${ORG}/${PROJECT}/aaf_cass:${VERSION}
35else
36 $DOCKER start aaf_cass
37fi