blob: 7aee605ca7a8203302091b5a6d419a80ba8089c9 [file] [log] [blame]
Instrumental97083ef2018-04-25 15:22:38 -05001#!/bin/bash
Instrumental12f7f462018-04-23 15:43:47 -05002# Pull in Variables from d.props
Instrumentalf482ea02018-04-10 15:03:24 -05003. ./d.props
Sai Gandhamce6a67f2018-04-10 14:25:35 +00004
Instrumental71037c32018-03-26 13:51:48 -07005
6if [ "$1" == "" ]; then
Instrumentalac836d02018-04-06 05:27:41 -05007 AAF_COMPONENTS=`ls -r ../aaf_${VERSION}/bin | grep -v '\.'`
Instrumental71037c32018-03-26 13:51:48 -07008else
9 AAF_COMPONENTS=$1
10fi
11
12for AAF_COMPONENT in ${AAF_COMPONENTS}; do
Instrumental71037c32018-03-26 13:51:48 -070013 case "$AAF_COMPONENT" in
Instrumental679f1422018-04-06 14:59:36 -050014 "service")
15 PORTMAP="8100:8100"
16 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
17 ;;
18 "locate")
19 PORTMAP="8095:8095"
20 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
21 ;;
22 "oauth")
23 PORTMAP="8140:8140"
24 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
25 ;;
26 "gui")
27 PORTMAP="8200:8200"
28 ;;
29 "cm")
30 PORTMAP="8150:8150"
31 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
32 ;;
33 "hello")
34 PORTMAP="8130:8130"
35 ;;
36 "fs")
37 PORTMAP="80:8096"
38 ;;
Instrumental71037c32018-03-26 13:51:48 -070039 esac
40
Instrumentalac836d02018-04-06 05:27:41 -050041 echo Starting aaf_$AAF_COMPONENT...
Instrumental679f1422018-04-06 14:59:36 -050042
Instrumentalac836d02018-04-06 05:27:41 -050043 docker run \
Instrumental1efda072018-04-24 07:08:05 -050044 -d \
Instrumentalac836d02018-04-06 05:27:41 -050045 --name aaf_$AAF_COMPONENT \
Instrumental679f1422018-04-06 14:59:36 -050046 --hostname="${AAF_COMPONENT}.aaf.osaaf.org" \
47 --add-host="$HOSTNAME:$HOST_IP" \
48 --add-host="aaf.osaaf.org:$HOST_IP" \
49 ${LINKS} \
Instrumentalac836d02018-04-06 05:27:41 -050050 --publish $PORTMAP \
51 --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \
Instrumentalf482ea02018-04-10 15:03:24 -050052 ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
Instrumental71037c32018-03-26 13:51:48 -070053done