Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | . ./d.props |
| 3 | |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 4 | DOCKER=${DOCKER:=docker} |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 5 | function run_it() { |
Instrumental | 9405361 | 2018-10-08 11:27:18 -0500 | [diff] [blame] | 6 | $DOCKER run $@ \ |
| 7 | -v "aaf_config:$CONF_ROOT_DIR" \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 8 | --add-host="$HOSTNAME:$HOST_IP" \ |
| 9 | --add-host="aaf.osaaf.org:$HOST_IP" \ |
Instrumental | 54883b4 | 2018-09-25 07:56:54 -0500 | [diff] [blame] | 10 | --env HOSTNAME=${HOSTNAME} \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 11 | --env AAF_ENV=${AAF_ENV} \ |
| 12 | --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \ |
Instrumental | 93871ff | 2018-10-15 07:37:28 -0500 | [diff] [blame] | 13 | --env AAF_LOCATOR_AS=${AAF_LOCATOR_AS} \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 14 | --env LATITUDE=${LATITUDE} \ |
| 15 | --env LONGITUDE=${LONGITUDE} \ |
Instrumental | 196000b | 2018-10-05 19:30:59 -0500 | [diff] [blame] | 16 | --env CASS_HOST=${CASS_HOST} \ |
| 17 | --env CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER} \ |
| 18 | --env CASSANDRA_USER=${CASSANDRA_USER} \ |
| 19 | --env CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD} \ |
| 20 | --env CASSANDRA_PORT=${CASSANDRA_PORT} \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 21 | --name aaf_config_$USER \ |
Instrumental | e44d2f7 | 2018-08-16 17:22:45 -0500 | [diff] [blame] | 22 | $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \ |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 23 | /bin/bash $PARAMS |
| 24 | } |
| 25 | |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 26 | PARAMS="$@" |
Instrumental | 5ccce03 | 2018-11-02 13:12:33 -0500 | [diff] [blame] | 27 | if [ -z "$PARAMS" ]; then |
| 28 | run_it --rm |
| 29 | else |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 30 | run_it -it --rm |
| 31 | fi |
| 32 | |