Instrumental | 924b18d | 2018-04-05 20:17:18 -0500 | [diff] [blame] | 1 | #!/bin/bash drun.sh |
Instrumental | f482ea0 | 2018-04-10 15:03:24 -0500 | [diff] [blame] | 2 | . ./d.props |
Sai Gandham | ce6a67f | 2018-04-10 14:25:35 +0000 | [diff] [blame] | 3 | |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 4 | |
| 5 | if [ "$1" == "" ]; then |
Instrumental | ac836d0 | 2018-04-06 05:27:41 -0500 | [diff] [blame] | 6 | AAF_COMPONENTS=`ls -r ../aaf_${VERSION}/bin | grep -v '\.'` |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 7 | else |
| 8 | AAF_COMPONENTS=$1 |
| 9 | fi |
| 10 | |
| 11 | for AAF_COMPONENT in ${AAF_COMPONENTS}; do |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 12 | case "$AAF_COMPONENT" in |
Instrumental | 679f142 | 2018-04-06 14:59:36 -0500 | [diff] [blame] | 13 | "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 | ;; |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 38 | esac |
| 39 | |
Instrumental | ac836d0 | 2018-04-06 05:27:41 -0500 | [diff] [blame] | 40 | echo Starting aaf_$AAF_COMPONENT... |
Instrumental | 679f142 | 2018-04-06 14:59:36 -0500 | [diff] [blame] | 41 | |
Instrumental | ac836d0 | 2018-04-06 05:27:41 -0500 | [diff] [blame] | 42 | docker run \ |
| 43 | -d \ |
| 44 | --name aaf_$AAF_COMPONENT \ |
Instrumental | 679f142 | 2018-04-06 14:59:36 -0500 | [diff] [blame] | 45 | --hostname="${AAF_COMPONENT}.aaf.osaaf.org" \ |
| 46 | --add-host="$HOSTNAME:$HOST_IP" \ |
| 47 | --add-host="aaf.osaaf.org:$HOST_IP" \ |
| 48 | ${LINKS} \ |
Instrumental | ac836d0 | 2018-04-06 05:27:41 -0500 | [diff] [blame] | 49 | --publish $PORTMAP \ |
| 50 | --mount type=bind,source=$CONF_ROOT_DIR,target=/opt/app/osaaf \ |
Instrumental | f482ea0 | 2018-04-10 15:03:24 -0500 | [diff] [blame] | 51 | ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 52 | done |