3 # ============LICENSE_START=======================================================
5 # ================================================================================
6 # Copyright (C) 2017 AT&T Intellectual Property. All rights
8 # ================================================================================
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
13 # http://www.apache.org/licenses/LICENSE-2.0
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 # ============LICENSE_END============================================
27 if [ "$(uname)" = "Darwin" ]; then
33 # Place the scripts in run order:
34 source ${SCRIPTS}/common_functions.sh
36 # Clone AAF Authz repo
37 CODE_DIR="$WORKSPACE/archives/opt"
41 # Get or refresh AAF Code set
46 git clone --depth 1 http://gerrit.onap.org/r/aaf/authz -b master
52 # Locate to Docker dir
54 if [ ! -e d.props ]; then
55 cp d.props.init d.props
59 # Fill in anything missing
60 $SED "s/^LATITUDE=.*/LATITUDE=${LATITUDE:=38.0}/" d.props
61 $SED "s/^LONGITUDE=.*/LONGITUDE=${LONGITUDE:=-72.0}/" d.props
62 # For Jenkins, gotta use 10001, not 10003
63 DOCKER_REPOSITORY=nexus3.onap.org:10001
64 $SED "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$DOCKER_REPOSITORY/" d.props
66 $SED "s/HOSTNAME=.*/HOSTNAME=aaf.api.simpledemo.onap.org/" d.props
67 DOCKER_NAME=$(docker info | grep Name | awk '{print $2}' )
68 echo "Docker Name is $DOCKER_NAME"
70 if [ "$DOCKER_NAME" = "minikube" ]; then
72 HOST_IP=$(minikube ip)
74 echo "Trying to get IP from Docker $DOCKER_NAME with 'ip route' method"
75 # ip route get 8.8.8.8
76 HOST_IP=$(ip route get 8.8.8.8 | awk '{print $7}')
77 if [ -z "$HOST_IP" ]; then
78 echo "Critical HOST_IP could not be obtained by 2 different methods. Exiting..."
83 $SED "s/HOST_IP=.*/HOST_IP=$HOST_IP/" d.props
88 AAF_DOCKER_VERSION=${VERSION}
89 NEXUS_USERNAME=anonymous
90 NEXUS_PASSWD=anonymous
91 echo "$NEXUS_PASSWD" | docker login -u $NEXUS_USERNAME --password-stdin $DOCKER_REPOSITORY
93 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION
94 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_config:$AAF_DOCKER_VERSION
95 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_cm:$AAF_DOCKER_VERSION
96 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_fs:$AAF_DOCKER_VERSION
97 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_gui:$AAF_DOCKER_VERSION
98 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_hello:$AAF_DOCKER_VERSION
99 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_locate:$AAF_DOCKER_VERSION
100 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_oauth:$AAF_DOCKER_VERSION
101 docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_service:$AAF_DOCKER_VERSION
103 # Cassandra Install/Start
104 cd ../auth-cass/docker
105 echo Cassandra Install
119 for C in aaf_service aaf_locate aaf_oauth aaf_cm aaf_gui aaf_hello aaf_fs; do
123 bash ./aaf.sh wait aaf_service
125 AAF_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aaf_service)
126 echo AAF_IP=${AAF_IP}
128 #Pass any variables required by Robot test suites in ROBOT_VARIABLES
129 ROBOT_VARIABLES="-v AAF_IP:${AAF_IP}"