Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 1 | #!/bin/bash |
Instrumental | bc299c0 | 2018-09-25 06:42:31 -0500 | [diff] [blame] | 2 | |
| 3 | # Pull in AAF Env Variables from AAF install |
| 4 | if [ -e ../../docker/d.props ]; then |
| 5 | . ../../docker/d.props |
Instrumental | bc299c0 | 2018-09-25 06:42:31 -0500 | [diff] [blame] | 6 | fi |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 7 | DOCKER=${DOCKER:-docker} |
Instrumental | bc299c0 | 2018-09-25 06:42:31 -0500 | [diff] [blame] | 8 | |
| 9 | if [ "$($DOCKER volume ls | grep aaf_cass_data)" = "" ]; then |
| 10 | $DOCKER volume create aaf_cass_data |
| 11 | echo "Created Cassandra Volume aaf_cass_data" |
| 12 | fi |
| 13 | |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 14 | # Optional mount instead of v |
| 15 | # --mount 'type=volume,src=aaf_cass_data,dst=/var/lib/cassandra,volume-driver=local' \ |
Instrumental | bc299c0 | 2018-09-25 06:42:31 -0500 | [diff] [blame] | 16 | if [ "`$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 \ |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 25 | -v "aaf_cass_data:/var/lib/cassandra" \ |
Instrumental | 08e9340 | 2018-10-03 08:38:52 -0500 | [diff] [blame] | 26 | -d ${PREFIX}${ORG}/${PROJECT}/aaf_cass:${VERSION} "onap" |
Instrumental | bc299c0 | 2018-09-25 06:42:31 -0500 | [diff] [blame] | 27 | else |
| 28 | $DOCKER start aaf_cass |
| 29 | fi |