Merge "Add missing components in sdnc docker container"
[sdnc/oam.git] / installation / sdnc / src / main / scripts / installFeatures.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 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
25 ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
26 SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
27 CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk}
28 CCSDK_FEATURE_DIR=${CCSDK_FEATURE_DIR:-${CCSDK_HOME}/features}
29 SDNC_FEATURE_DIR=${SDNC_FEATURE_DIR:-${SDNC_HOME}/features}
30
31 CCSDK_EXTRAS=" \
32    ansible-adapter \
33    lcm"
34
35
36
37 SDNC_NORTHBOUND_FEATURES=" \
38   generic-resource-api \
39   vnfapi \
40   vnftools"
41
42
43 SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-1.3.1-SNAPSHOT}
44
45 # Install CCSDK features
46 ${CCSDK_HOME}/bin/installCcsdkFeatures.sh
47
48 # Install CCSDK extras, used by SDNC but not APP-C
49 echo "Installing CCSDK extras"
50 for feature in ${CCSDK_FEATURES}
51 do
52         if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ]
53         then
54                 ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh
55     else
56              echo "No installer found for ${feature}"
57     fi
58 done
59
60
61 echo "Installing SDN-C northbound"
62 for feature in ${SDNC_NORTHBOUND_FEATURES}
63 do
64   if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ]
65   then
66     ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh
67   else
68     echo "No installer found for feature sdnc-${feature}"
69   fi
70 done
71
72