Add platform DGs to distribution
[ccsdk/distribution.git] / platform-logic / installer / src / main / scripts / setenv.sh
1 #!/bin/bash
2
3 ###
4 # ============LICENSE_START=======================================================
5 # openECOMP : SDN-C
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights
8 #                                                       reserved.
9 # ================================================================================
10 # Licensed under the Apache License, Version 2.0 (the "License");
11 # you may not use this file except in compliance with the License.
12 # You may obtain a copy of the License at
13 #
14 #      http://www.apache.org/licenses/LICENSE-2.0
15 #
16 # Unless required by applicable law or agreed to in writing, software
17 # distributed under the License is distributed on an "AS IS" BASIS,
18 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 # See the License for the specific language governing permissions and
20 # limitations under the License.
21 # ============LICENSE_END=========================================================
22 ###
23
24 SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/sdnc/data/properties}
25
26 AAIURI=$(grep org.onap.ccsdk.sli.aai.uri ${SDNC_CONFIG_DIR}/aaiclient.properties | grep -v '#' | cut -d'=' -f2)
27
28 MYSQL_USER=$(grep org.onap.ccsdk.sli.jdbc.user ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
29 MYSQL_PWD=$(grep org.onap.ccsdk.sli.jdbc.password ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
30 MYSQL_DB=$(grep org.onap.ccsdk.sli.jdbc.database ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2)
31 MYSQL_SERVER=$(grep org.onap.ccsdk.sli.jdbc.hosts ${SDNC_CONFIG_DIR}/dblib.properties | grep -v '#' | cut -d'=' -f2 | cut -d',' -f1)
32
33 ODLUSER=$(grep controllerUser ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
34 ODLPWD=$(grep controllerPass ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
35
36 ODLHOST=$(grep odlNodes ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2|cut -d',' -f1)
37 ODLPORT=$(grep controllerPort ${SDNC_CONFIG_DIR}/backup.properties | grep -v '#' | cut -d'=' -f2)
38 if [ $ODLPORT = 8443 ]
39 then
40   ODLPROTO=https
41 else
42   ODLPROTO=http
43 fi
44
45 unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy