blob: f9cf1bc3583060e8696d05ad00af05a145d8c8e1 [file] [log] [blame]
Instrumental32cdd552018-07-19 13:29:32 -05001#!/bin/bash
2. ./d.props
Instrumental196000b2018-10-05 19:30:59 -05003if [ -e ./cass.props ]; then
4 . ./cass.props
5fi
Instrumental32cdd552018-07-19 13:29:32 -05006
Instrumental94053612018-10-08 11:27:18 -05007DOCKER=${DOCKER:=docker}
Instrumentalab502672018-08-20 14:31:35 -05008function run_it() {
Instrumental94053612018-10-08 11:27:18 -05009 $DOCKER run $@ \
10 -v "aaf_config:$CONF_ROOT_DIR" \
Instrumental32cdd552018-07-19 13:29:32 -050011 --add-host="$HOSTNAME:$HOST_IP" \
12 --add-host="aaf.osaaf.org:$HOST_IP" \
Instrumental54883b42018-09-25 07:56:54 -050013 --env HOSTNAME=${HOSTNAME} \
Instrumental32cdd552018-07-19 13:29:32 -050014 --env AAF_ENV=${AAF_ENV} \
15 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
Instrumental93871ff2018-10-15 07:37:28 -050016 --env AAF_LOCATOR_AS=${AAF_LOCATOR_AS} \
Instrumental32cdd552018-07-19 13:29:32 -050017 --env LATITUDE=${LATITUDE} \
18 --env LONGITUDE=${LONGITUDE} \
Instrumental196000b2018-10-05 19:30:59 -050019 --env CASS_HOST=${CASS_HOST} \
20 --env CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER} \
21 --env CASSANDRA_USER=${CASSANDRA_USER} \
22 --env CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD} \
23 --env CASSANDRA_PORT=${CASSANDRA_PORT} \
Instrumental32cdd552018-07-19 13:29:32 -050024 --name aaf_config_$USER \
Instrumentale44d2f72018-08-16 17:22:45 -050025 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
Instrumentalab502672018-08-20 14:31:35 -050026 /bin/bash $PARAMS
27}
28
Instrumentalab502672018-08-20 14:31:35 -050029PARAMS="$@"
30if [ "$PARAMS" != "" ]; then
31 run_it -it --rm
32fi
33