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 | ca788dc | 2018-11-03 14:38:21 -0500 | [diff] [blame^] | 8 | -v "aaf_status:/opt/app/aaf/status" \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 9 | --add-host="$HOSTNAME:$HOST_IP" \ |
| 10 | --add-host="aaf.osaaf.org:$HOST_IP" \ |
Instrumental | 54883b4 | 2018-09-25 07:56:54 -0500 | [diff] [blame] | 11 | --env HOSTNAME=${HOSTNAME} \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 12 | --env AAF_ENV=${AAF_ENV} \ |
| 13 | --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \ |
Instrumental | 93871ff | 2018-10-15 07:37:28 -0500 | [diff] [blame] | 14 | --env AAF_LOCATOR_AS=${AAF_LOCATOR_AS} \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 15 | --env LATITUDE=${LATITUDE} \ |
| 16 | --env LONGITUDE=${LONGITUDE} \ |
Instrumental | 196000b | 2018-10-05 19:30:59 -0500 | [diff] [blame] | 17 | --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} \ |
Instrumental | 32cdd55 | 2018-07-19 13:29:32 -0500 | [diff] [blame] | 22 | --name aaf_config_$USER \ |
Instrumental | e44d2f7 | 2018-08-16 17:22:45 -0500 | [diff] [blame] | 23 | $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \ |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 24 | /bin/bash $PARAMS |
| 25 | } |
| 26 | |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 27 | PARAMS="$@" |
Instrumental | ca788dc | 2018-11-03 14:38:21 -0500 | [diff] [blame^] | 28 | case "$1" in |
| 29 | bash) |
| 30 | run_it -it --rm |
| 31 | ;; |
| 32 | -it) |
| 33 | shift |
| 34 | PARAMS="$@" |
| 35 | run_it -it --rm |
| 36 | ;; |
| 37 | *) |
| 38 | run_it --rm |
| 39 | ;; |
| 40 | esac |
Instrumental | ab50267 | 2018-08-20 14:31:35 -0500 | [diff] [blame] | 41 | |