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