blob: 6ba8631db641c7d1c99cfe48166e464985c41838 [file] [log] [blame]
Instrumental32cdd552018-07-19 13:29:32 -05001#!/bin/bash
2. ./d.props
3
Instrumental94053612018-10-08 11:27:18 -05004DOCKER=${DOCKER:=docker}
Instrumentalab502672018-08-20 14:31:35 -05005function run_it() {
Instrumental94053612018-10-08 11:27:18 -05006 $DOCKER run $@ \
7 -v "aaf_config:$CONF_ROOT_DIR" \
Instrumentalca788dc2018-11-03 14:38:21 -05008 -v "aaf_status:/opt/app/aaf/status" \
Instrumental32cdd552018-07-19 13:29:32 -05009 --add-host="$HOSTNAME:$HOST_IP" \
10 --add-host="aaf.osaaf.org:$HOST_IP" \
Instrumental54883b42018-09-25 07:56:54 -050011 --env HOSTNAME=${HOSTNAME} \
Instrumental32cdd552018-07-19 13:29:32 -050012 --env AAF_ENV=${AAF_ENV} \
13 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
Instrumental93871ff2018-10-15 07:37:28 -050014 --env AAF_LOCATOR_AS=${AAF_LOCATOR_AS} \
Instrumental32cdd552018-07-19 13:29:32 -050015 --env LATITUDE=${LATITUDE} \
16 --env LONGITUDE=${LONGITUDE} \
Instrumental196000b2018-10-05 19:30:59 -050017 --env CASS_HOST=${CASS_HOST} \
18 --env CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER} \
19 --env CASSANDRA_USER=${CASSANDRA_USER} \
20 --env CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD} \
21 --env CASSANDRA_PORT=${CASSANDRA_PORT} \
Instrumental32cdd552018-07-19 13:29:32 -050022 --name aaf_config_$USER \
Instrumentale44d2f72018-08-16 17:22:45 -050023 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
Instrumentalab502672018-08-20 14:31:35 -050024 /bin/bash $PARAMS
25}
26
Instrumentalab502672018-08-20 14:31:35 -050027PARAMS="$@"
Instrumentalca788dc2018-11-03 14:38:21 -050028case "$1" in
29 bash)
30 run_it -it --rm
31 ;;
32 -it)
33 shift
34 PARAMS="$@"
35 run_it -it --rm
36 ;;
37 *)
38 run_it --rm
39 ;;
40esac
Instrumentalab502672018-08-20 14:31:35 -050041