4 # ============LICENSE_START=======================================================
6 # ================================================================================
7 # Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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=========================================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
25 APPC_HOME=${APPC_HOME:-/opt/onap/appc}
26 APPC_FEATURE_DIR=${APPC_FEATURE_DIR:-${APPC_HOME}/features}
28 function featureInstall {
30 while [ $COUNT -lt 10 ]; do
31 ${ODL_HOME}/bin/client feature:install $1 2> /tmp/installErr
33 if grep -q 'Failed to get the session' /tmp/installErr; then
46 appc-netconf-adapter \
48 appc-lifecycle-management \
56 appc-ansible-adapter \
57 appc-sequence-generator \
58 appc-artifact-handler \
65 appc-netconf-adapter \
67 appc-lifecycle-management \
77 appc-ansible-adapter \
78 appc-sequence-generator \
79 appc-config-generator \
80 appc-config-data-services \
83 appc-config-encryption-tool \
84 appc-config-flow-controller \
86 appc-artifact-handler \
90 APPC_FEATURES_UNZIP=" \
95 appc-netconf-adapter \
97 appc-lifecycle-management \
105 appc-ansible-adapter \
106 appc-sequence-generator \
107 appc-config-generator \
108 appc-config-data-services \
109 appc-config-adaptor \
111 appc-config-encryption-tool \
112 appc-config-flow-controller \
114 appc-artifact-handler \
121 echo "Enabling core APP-C features"
122 featureInstall odl-netconf-connector-all
123 featureInstall odl-restconf-noauth
124 featureInstall odl-netconf-topology
127 echo "Installing APP-C Features"
130 for feature in ${APPC_FEATURES_UNZIP}
132 if [ -f ${APPC_FEATURE_DIR}/${feature}/install-feature.sh ]
134 ${APPC_FEATURE_DIR}/${feature}/install-feature.sh
136 echo "No installer found for feature ${feature}"
140 #${ODL_HOME}/bin/client feature:install appc-metric appc-dmaap-adapter appc-event-listener appc-chef-adapter appc-netconf-adapter appc-rest-adapter appc-lifecycle-management appc-dispatcher appc-provider appc-dg-util appc-dg-shared appc-sdc-listener appc-oam appc-iaas-adapter appc-ansible-adapter appc-sequence-generator appc-config-generator appc-config-data-services appc-config-adaptor appc-config-audit appc-config-encryption-tool appc-config-flow-controller appc-config-params appc-artifact-handler appc-aai-client
142 for feature in ${APPC_FEATURES_1}
144 echo "Installing ${feature}"
146 ${ODL_HOME}/bin/client "feature:install -r ${feature}"
148 echo "Install of ${feature} took $(expr $end - $start) seconds"
150 echo "Sleep Finished"
153 echo "Installing dispatcher features"
155 ${ODL_HOME}/bin/client "feature:install -r appc-request-handler appc-command-executor appc-lifecycle-management appc-workflow-management lock-manager"
157 echo "Install of dispatcher features took $(expr $end - $start) seconds"
159 echo "Sleep Finished"
161 for feature in ${APPC_FEATURES_2}
163 echo "Installing ${feature}"
165 ${ODL_HOME}/bin/client "feature:install -r ${feature}"
167 echo "Install of ${feature} took $(expr $end - $start) seconds"
169 echo "Sleep Finished"