blob: 165b0007bc4b91869ee97b9211da2af6bf69f65a [file] [log] [blame]
Instrumental32cdd552018-07-19 13:29:32 -05001#!/bin/bash
Instrumental7a1817b2018-11-05 11:11:15 -06002#########
3# ============LICENSE_START====================================================
4# org.onap.aaf
5# ===========================================================================
6# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7# ===========================================================================
8# Licensed under the Apache License, Version 2.0 (the "License");
9# you may not use this file except in compliance with the License.
10# You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS,
16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17# See the License for the specific language governing permissions and
18# limitations under the License.
19# ============LICENSE_END====================================================
20#
21
Instrumental32cdd552018-07-19 13:29:32 -050022. ./d.props
23
Instrumental94053612018-10-08 11:27:18 -050024DOCKER=${DOCKER:=docker}
Instrumentalab502672018-08-20 14:31:35 -050025function run_it() {
Instrumental94053612018-10-08 11:27:18 -050026 $DOCKER run $@ \
27 -v "aaf_config:$CONF_ROOT_DIR" \
Instrumentalca788dc2018-11-03 14:38:21 -050028 -v "aaf_status:/opt/app/aaf/status" \
Instrumental32cdd552018-07-19 13:29:32 -050029 --add-host="$HOSTNAME:$HOST_IP" \
30 --add-host="aaf.osaaf.org:$HOST_IP" \
Instrumental54883b42018-09-25 07:56:54 -050031 --env HOSTNAME=${HOSTNAME} \
Instrumental32cdd552018-07-19 13:29:32 -050032 --env AAF_ENV=${AAF_ENV} \
33 --env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
Instrumental93871ff2018-10-15 07:37:28 -050034 --env AAF_LOCATOR_AS=${AAF_LOCATOR_AS} \
Instrumental32cdd552018-07-19 13:29:32 -050035 --env LATITUDE=${LATITUDE} \
36 --env LONGITUDE=${LONGITUDE} \
Instrumental196000b2018-10-05 19:30:59 -050037 --env CASS_HOST=${CASS_HOST} \
38 --env CASSANDRA_CLUSTER=${CASSANDRA_CLUSTER} \
39 --env CASSANDRA_USER=${CASSANDRA_USER} \
40 --env CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD} \
41 --env CASSANDRA_PORT=${CASSANDRA_PORT} \
Instrumental32cdd552018-07-19 13:29:32 -050042 --name aaf_config_$USER \
Instrumentale44d2f72018-08-16 17:22:45 -050043 $PREFIX${ORG}/${PROJECT}/aaf_config:${VERSION} \
Instrumentalab502672018-08-20 14:31:35 -050044 /bin/bash $PARAMS
45}
46
Instrumentalab502672018-08-20 14:31:35 -050047PARAMS="$@"
Instrumentalca788dc2018-11-03 14:38:21 -050048case "$1" in
49 bash)
50 run_it -it --rm
51 ;;
52 -it)
53 shift
54 PARAMS="$@"
55 run_it -it --rm
56 ;;
57 *)
58 run_it --rm
59 ;;
60esac
Instrumentalab502672018-08-20 14:31:35 -050061