blob: 5d1973ad8309fb6b54fb1a27037c1cf1f269276b [file] [log] [blame]
Kiran Kaminenibe7fcd92018-03-27 11:23:37 -07001#!/bin/bash
2#
3# Copyright 2018 Intel Corporation
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18# Not sure why this is needed.
19source ${SCRIPTS}/common_functions.sh
20
21CONFIG_FILE=$(pwd)/config/smsconfig.json
22
23mkdir -p $(pwd)/config
24
25cat << EOF > $CONFIG_FILE
26{
27 "cafile": "auth/selfsignedca.pem",
28 "servercert": "auth/server.cert",
29 "serverkey": "auth/server.key",
30
31 "vaultaddress": "http://$HOSTNAME:8200",
32 "vaulttoken": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
33 "disable_tls": true
34}
35EOF
36
37docker login -u docker -p docker nexus3.onap.org:10001
38docker pull nexus3.onap.org:10001/onap/aaf/sms
39docker pull docker.io/vault:0.9.5
40#
41# Running vault in dev server mode here for CSIT
42# In HELM it runs in production mode
43#
44docker run -e "VAULT_DEV_ROOT_TOKEN_ID=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" \
45 -e SKIP_SETCAP=true \
46 --name vault -d -p 8200:8200 vault:0.9.5
47docker run --workdir /sms -v "$(pwd)"/config/smsconfig.json:/sms/smsconfig.json \
48 --name sms -d -p 10443:10443 nexus3.onap.org:10001/onap/aaf/sms
49
50echo "###### WAITING FOR ALL CONTAINERS TO COME UP"
51sleep 10
52
53#
54# add here all ROBOT_VARIABLES settings
55#
56echo "# sms robot variables settings";
57ROBOT_VARIABLES="-v SMS_HOSTNAME:http://localhost -v SMS_PORT:10443"
58
59echo ${ROBOT_VARIABLES}