blob: 2005e1a1022f9604e5c0049c8d320084853843b8 [file] [log] [blame]
Sai Gandham67a6d892018-10-10 04:31:59 -05001#!/bin/bash
2. ./d.props
3if [ -e ./cass.props ]; then
4 . ./cass.props
5fi
6
7DOCKER=${DOCKER:=docker}
8function run_it() {
9 $DOCKER run $@ \
10 -v "aaf_config:$CONF_ROOT_DIR" \
11 --add-host="$HOSTNAME:$HOST_IP" \
12 --add-host="aaf.osaaf.org:$HOST_IP" \
13 --env HOSTNAME=${HOSTNAME} \
14 --env AAF_ENV=${AAF_ENV} \
15 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
16 --env LATITUDE=${LATITUDE} \
17 --env LONGITUDE=${LONGITUDE} \
18 --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} \
23 --name aaf_config_$USER \
24 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
25 /bin/bash $PARAMS
26}
27
28function set_prop() {
Sai Gandham971334d2018-10-11 14:07:45 -050029 $DOCKER exec -d aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3"
Sai Gandham67a6d892018-10-10 04:31:59 -050030}
31
32function encrypt_it() {
Sai Gandham971334d2018-10-11 14:07:45 -050033 $DOCKER exec -d aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2"
Sai Gandham67a6d892018-10-10 04:31:59 -050034}
35
36function set_it() {
Sai Gandham971334d2018-10-11 14:07:45 -050037 $DOCKER exec -d aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2"
Sai Gandham67a6d892018-10-10 04:31:59 -050038}
39
40PARAMS="$@"
41if [ "$PARAMS" != "" ]; then
Sai Gandhambdaf4452018-10-12 12:21:01 -050042 run_it -d --rm
Sai Gandham67a6d892018-10-10 04:31:59 -050043fi
44