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 \
89 APPC_FEATURES_UNZIP=" \
94 appc-netconf-adapter \
96 appc-lifecycle-management \
104 appc-ansible-adapter \
105 appc-sequence-generator \
106 appc-config-generator \
107 appc-config-data-services \
108 appc-config-adaptor \
110 appc-config-encryption-tool \
111 appc-config-flow-controller \
113 appc-artifact-handler \
120 echo "Enabling core APP-C features"
121 featureInstall odl-netconf-connector-all
122 featureInstall odl-restconf-noauth
123 featureInstall odl-netconf-topology
126 echo "Installing APP-C Features"
129 for feature in ${APPC_FEATURES_UNZIP}
131 if [ -f ${APPC_FEATURE_DIR}/${feature}/install-feature.sh ]
133 ${APPC_FEATURE_DIR}/${feature}/install-feature.sh
135 echo "No installer found for feature ${feature}"
139 #${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
141 for feature in ${APPC_FEATURES_1}
143 echo "Installing ${feature}"
145 ${ODL_HOME}/bin/client "feature:install -r ${feature}"
147 echo "Install of ${feature} took $(expr $end - $start) seconds"
149 echo "Sleep Finished"
152 echo "Installing dispatcher features"
154 ${ODL_HOME}/bin/client "feature:install -r appc-request-handler appc-command-executor appc-lifecycle-management appc-workflow-management lock-manager"
156 echo "Install of dispatcher features took $(expr $end - $start) seconds"
158 echo "Sleep Finished"
160 for feature in ${APPC_FEATURES_2}
162 echo "Installing ${feature}"
164 ${ODL_HOME}/bin/client "feature:install -r ${feature}"
166 echo "Install of ${feature} took $(expr $end - $start) seconds"
168 echo "Sleep Finished"