blob: 5757051fc4881004600f009f92b0051b470aa38d [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
Instrumentalab502672018-08-20 14:31:35 -05007function run_it() {
8 docker run $@ \
Instrumental32cdd552018-07-19 13:29:32 -05009 --mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \
10 --add-host="$HOSTNAME:$HOST_IP" \
11 --add-host="aaf.osaaf.org:$HOST_IP" \
Instrumental54883b42018-09-25 07:56:54 -050012 --env HOSTNAME=${HOSTNAME} \
Instrumental32cdd552018-07-19 13:29:32 -050013 --env AAF_ENV=${AAF_ENV} \
14 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
15 --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
Instrumentalaeb80c82018-08-21 10:24:08 -050027function set_prop() {
28docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3"
29}
30
Instrumentalab502672018-08-20 14:31:35 -050031function encrypt_it() {
32 docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2"
33}
34
Instrumentalb8a81292018-08-23 16:32:45 -050035function set_it() {
36 docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2"
37}
38
Instrumentalab502672018-08-20 14:31:35 -050039PARAMS="$@"
40if [ "$PARAMS" != "" ]; then
41 run_it -it --rm
42fi
43