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-network-inventory-client \
90 appc-design-services \
91 appc-interfaces-service"
93 APPC_FEATURES_UNZIP=" \
98 appc-netconf-adapter \
100 appc-lifecycle-management \
108 appc-ansible-adapter \
109 appc-sequence-generator \
110 appc-config-generator \
111 appc-config-data-services \
112 appc-config-adaptor \
114 appc-config-encryption-tool \
115 appc-config-flow-controller \
117 appc-artifact-handler \
119 appc-network-inventory-client \
120 appc-design-services \
121 appc-interfaces-service"
127 echo "Enabling core APP-C features"
128 featureInstall odl-netconf-connector-all
129 featureInstall odl-restconf-noauth
130 featureInstall odl-netconf-topology
133 echo "Installing APP-C Features"
136 for feature in ${APPC_FEATURES_UNZIP}
138 if [ -f ${APPC_FEATURE_DIR}/${feature}/install-feature.sh ]
140 ${APPC_FEATURE_DIR}/${feature}/install-feature.sh
142 echo "No installer found for feature ${feature}"
146 #${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
148 for feature in ${APPC_FEATURES_1}
150 echo "Installing ${feature}"
152 ${ODL_HOME}/bin/client "feature:install -r ${feature}"
154 echo "Install of ${feature} took $(expr $end - $start) seconds"
156 echo "Sleep Finished"
159 echo "Installing dispatcher features"
161 ${ODL_HOME}/bin/client "feature:install -r appc-request-handler appc-command-executor appc-lifecycle-management appc-workflow-management lock-manager"
163 echo "Install of dispatcher features took $(expr $end - $start) seconds"
165 echo "Sleep Finished"
167 for feature in ${APPC_FEATURES_2}
169 echo "Installing ${feature}"
171 ${ODL_HOME}/bin/client "feature:install -r ${feature}"
173 echo "Install of ${feature} took $(expr $end - $start) seconds"
175 echo "Sleep Finished"