3 # ============LICENSE_START====================================================
5 # ===========================================================================
6 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7 # ===========================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19 # ============LICENSE_END====================================================
21 # Pull in Variables from d.props
24 CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER:=$CASSANDRA_DOCKER}
26 DOCKER=${DOCKER:=docker}
28 # Running without params keeps from being TTY
31 if [ "$1" == "" ]; then
32 AAF_COMPONENTS=$(cat components)
37 for AAF_COMPONENT in ${AAF_COMPONENTS}; do
41 case "$AAF_COMPONENT" in
43 PUBLISH="--publish 8100:8100"
44 if [ -z "$CASSANDRA_DOCKER" ]; then
45 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-service && exec bin/service"
47 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-service aaf-cass && exec bin/service"
48 LINKS="--link $CASSANDRA_DOCKER"
49 echo $CASSANDRA_CLUSTER
53 PUBLISH="--publish 8095:8095"
54 LINKS="--link aaf-cass --link aaf-service"
55 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-locate aaf-service && exec bin/locate"
58 PUBLISH="--publish 8140:8140"
59 LINKS="--link aaf-cass --link aaf-service --link aaf-locate"
60 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-oauth aaf-service && exec bin/oauth"
63 PUBLISH="--publish 8150:8150"
64 LINKS="--link aaf-cass --link aaf-service --link aaf-locate --link aaf-oauth"
65 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-cm aaf-locate && exec bin/cm"
68 PUBLISH="--publish 8200:8200"
69 LINKS="--link aaf-service --link aaf-locate --link aaf-oauth --link aaf-cm"
70 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-gui aaf-locate && exec bin/gui"
73 PUBLISH="--publish 80:8096"
74 LINKS="--link aaf-locate"
75 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-fs aaf-locate && exec bin/fs"
78 PUBLISH="--publish 8130:8130"
79 LINKS="--link aaf-service --link aaf-locate --link aaf-oauth --link aaf-cm"
80 CMD_LINE="cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-hello aaf-locate && exec bin/hello"
84 echo Starting aaf-$AAF_COMPONENT...
85 if [ -n "${DUSER}" ]; then
86 THE_USER="--user $DUSER"
93 --name aaf-$AAF_COMPONENT \
95 --env AAF_ENV=${AAF_ENV} \
96 --env aaf_locator_container=docker \
97 --env aaf_locator_container_ns=${NAMESPACE} \
98 --env aaf_locator_fqdn=${HOSTNAME} \
99 --env aaf_locator_public_fqdn=${HOSTNAME} \
100 --env aaf_deployed_version=${VERSION} \
101 --env LATITUDE=${LATITUDE} \
102 --env LONGITUDE=${LONGITUDE} \
103 --env CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER} \
104 --env CASSANDRA_USER=${CASSANDRA_USER} \
105 --env CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD} \
106 --env CASSANDRA_PORT=${CASSANDRA_PORT} \
108 -v "aaf_config:$CONF_ROOT_DIR" \
109 -v "aaf_status:/opt/app/aaf/status" \
110 ${PREFIX}${ORG}/${PROJECT}/aaf_core:${VERSION} \
111 /bin/bash -c "$CMD_LINE"