blob: bc8a85e473bacbbbadac2dfbb7fa36a7b869f5fb [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() {
29 $DOCKER exec -it aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2" "$3"
30}
31
32function encrypt_it() {
33 $DOCKER exec -it aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP encrypt "$1" "$2"
34}
35
36function set_it() {
37 $DOCKER exec -it aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2"
38}
39
40PARAMS="$@"
41if [ "$PARAMS" != "" ]; then
42 run_it -it --rm
43fi
44