blob: 7301c50e10a53cab7f4d4573b469ab7ba481db29 [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} \
16 --env LATITUDE=${LATITUDE} \
17 --env LONGITUDE=${LONGITUDE} \
Instrumental196000b2018-10-05 19:30:59 -050018 --env CASS_HOST=${CASS_HOST} \
19 --env CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER} \
20 --env CASSANDRA_USER=${CASSANDRA_USER} \
21 --env CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD} \
22 --env CASSANDRA_PORT=${CASSANDRA_PORT} \
Instrumental32cdd552018-07-19 13:29:32 -050023 --name aaf_config_$USER \
Instrumentale44d2f72018-08-16 17:22:45 -050024 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
Instrumentalab502672018-08-20 14:31:35 -050025 /bin/bash $PARAMS
26}
27
Instrumentalaeb80c82018-08-21 10:24:08 -050028function set_prop() {
Instrumental94053612018-10-08 11:27:18 -050029 $DOCKER exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3"
Instrumentalaeb80c82018-08-21 10:24:08 -050030}
31
Instrumentalab502672018-08-20 14:31:35 -050032function encrypt_it() {
Instrumental94053612018-10-08 11:27:18 -050033 $DOCKER exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2"
Instrumentalab502672018-08-20 14:31:35 -050034}
35
Instrumentalb8a81292018-08-23 16:32:45 -050036function set_it() {
Instrumental94053612018-10-08 11:27:18 -050037 $DOCKER exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2"
Instrumentalb8a81292018-08-23 16:32:45 -050038}
39
Instrumentalab502672018-08-20 14:31:35 -050040PARAMS="$@"
41if [ "$PARAMS" != "" ]; then
42 run_it -it --rm
43fi
44