blob: 2b5f709a86989c030dbcab989909d69c05512883 [file] [log] [blame]
Instrumental924b18d2018-04-05 20:17:18 -05001#!/bin/bash drun.sh
Instrumentalf482ea02018-04-10 15:03:24 -05002. ./d.props
Sai Gandhamce6a67f2018-04-10 14:25:35 +00003
Instrumental71037c32018-03-26 13:51:48 -07004
5if [ "$1" == "" ]; then
Instrumentalac836d02018-04-06 05:27:41 -05006 AAF_COMPONENTS=`ls -r ../aaf_${VERSION}/bin | grep -v '\.'`
Instrumental71037c32018-03-26 13:51:48 -07007else
8 AAF_COMPONENTS=$1
9fi
10
11for AAF_COMPONENT in ${AAF_COMPONENTS}; do
Instrumental71037c32018-03-26 13:51:48 -070012 case "$AAF_COMPONENT" in
Instrumental679f1422018-04-06 14:59:36 -050013 "service")
14 PORTMAP="8100:8100"
15 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
16 ;;
17 "locate")
18 PORTMAP="8095:8095"
19 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
20 ;;
21 "oauth")
22 PORTMAP="8140:8140"
23 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
24 ;;
25 "gui")
26 PORTMAP="8200:8200"
27 ;;
28 "cm")
29 PORTMAP="8150:8150"
30 LINKS="--link aaf_cass:cassandra --add-host=$CASS_HOST"
31 ;;
32 "hello")
33 PORTMAP="8130:8130"
34 ;;
35 "fs")
36 PORTMAP="80:8096"
37 ;;
Instrumental71037c32018-03-26 13:51:48 -070038 esac
39
Instrumentalac836d02018-04-06 05:27:41 -050040 echo Starting aaf_$AAF_COMPONENT...
Instrumental679f1422018-04-06 14:59:36 -050041
Instrumentalac836d02018-04-06 05:27:41 -050042 docker run \
43 -d \
44 --name aaf_$AAF_COMPONENT \
Instrumental679f1422018-04-06 14:59:36 -050045 --hostname="${AAF_COMPONENT}.aaf.osaaf.org" \
46 --add-host="$HOSTNAME:$HOST_IP" \
47 --add-host="aaf.osaaf.org:$HOST_IP" \
48 ${LINKS} \
Instrumentalac836d02018-04-06 05:27:41 -050049 --publish $PORTMAP \
50 --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \
Instrumentalf482ea02018-04-10 15:03:24 -050051 ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
Instrumental71037c32018-03-26 13:51:48 -070052done