4 # ============LICENSE_START=======================================================
6 # ================================================================================
7 # Copyright (C) 2017-2019 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
41 function waitForKaraf {
43 while [ $COUNT -lt 20 ]; do
44 ${ODL_HOME}/bin/client feature:list $1 2> /tmp/installErr
46 if grep -q 'Failed to get the session' /tmp/installErr; then
58 onap-appc-dmaap-adapter \
59 onap-appc-chef-adapter \
60 onap-appc-netconf-adapter \
61 onap-appc-rest-adapter \
62 onap-appc-lifecycle-management \
63 onap-appc-license-manager"
68 onap-appc-sdc-listener \
70 onap-appc-iaas-adapter \
71 onap-appc-ansible-adapter \
72 onap-appc-sequence-generator \
73 onap-appc-config-generator \
74 onap-appc-config-data-services \
75 onap-appc-config-adaptor \
76 onap-appc-config-audit \
77 onap-appc-config-encryption-tool \
78 onap-appc-config-flow-controller \
79 onap-appc-config-params"
82 onap-appc-artifact-handler \
83 onap-appc-aai-client \
84 onap-appc-event-listener \
85 onap-appc-network-inventory-client \
86 onap-appc-design-services \
87 onap-appc-interfaces-service"
89 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 \
116 appc-network-inventory-client \
117 appc-design-services \
118 appc-interfaces-service"
124 #echo "Enabling core APP-C features"
125 #featureInstall odl-netconf-connector odl-restconf-noauth odl-netconf-clustered-topology odl-mdsal-clustering
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 for feature in ${APPC_FEATURES_1}
142 group1Features="${group1Features} ${feature}"
145 echo "Installing features: ${group1Features}"
147 ${ODL_HOME}/bin/client "feature:install -r ${group1Features}"
149 echo "Install of features took $(expr $end - $start) seconds"
151 echo "Sleep Finished"
153 echo "Installing dispatcher features"
155 ${ODL_HOME}/bin/client "feature:install -r onap-appc-request-handler onap-appc-command-executor onap-appc-lifecycle-management onap-appc-workflow-management lock-manager onap-appc-provider"
157 echo "Install of dispatcher features took $(expr $end - $start) seconds"
159 echo "Sleep Finished"
161 for feature in ${APPC_FEATURES_2}
163 group2Features="${group2Features} ${feature}"
166 echo "Installing features: ${group2Features}"
168 ${ODL_HOME}/bin/client "feature:install -r ${group2Features}"
170 echo "Install of features took $(expr $end - $start) seconds"
172 echo "Sleep Finished"
174 for feature in ${APPC_FEATURES_3}
176 group3Features="${group3Features} ${feature}"
179 echo "Installing features: ${group3Features}"
181 ${ODL_HOME}/bin/client "feature:install -r ${group3Features}"
183 echo "Install of features took $(expr $end - $start) seconds"
185 echo "Sleep Finished"
187 #Copy json template file for use by the generic restart DG aai fix
188 mkdir -p /opt/onap/appc/restapi/templates
189 cp /opt/onap/appc/data/aai-named-query.json /opt/onap/appc/restapi/templates/aai-named-query.json