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 sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install $1" 2> /tmp/installErr
32 # ${ODL_HOME}/bin/client feature:install $1 2> /tmp/installErr
34 if grep -q 'Failed to get the session' /tmp/installErr; then
42 function waitForKaraf {
44 while [ $COUNT -lt 20 ]; do
45 sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:list $1" 2> /tmp/installErr
46 # ${ODL_HOME}/bin/client feature:list $1 2> /tmp/installErr
48 if grep -q 'Failed to get the session' /tmp/installErr; then
60 onap-appc-dmaap-adapter \
61 onap-appc-chef-adapter \
62 onap-appc-netconf-adapter \
63 onap-appc-rest-adapter \
64 onap-appc-lifecycle-management \
65 onap-appc-license-manager"
70 onap-appc-sdc-listener \
72 onap-appc-iaas-adapter \
73 onap-appc-ansible-adapter \
74 onap-appc-sequence-generator \
75 onap-appc-config-generator \
76 onap-appc-config-data-services \
77 onap-appc-config-adaptor \
78 onap-appc-config-audit \
79 onap-appc-config-encryption-tool \
80 onap-appc-config-flow-controller \
81 onap-appc-config-params"
84 onap-appc-artifact-handler \
85 onap-appc-aai-client \
86 onap-appc-event-listener \
87 onap-appc-network-inventory-client \
88 onap-appc-design-services \
89 onap-appc-interfaces-service"
91 APPC_FEATURES_UNZIP=" \
97 appc-netconf-adapter \
99 appc-lifecycle-management \
107 appc-ansible-adapter \
108 appc-sequence-generator \
109 appc-config-generator \
110 appc-config-data-services \
111 appc-config-adaptor \
113 appc-config-encryption-tool \
114 appc-config-flow-controller \
116 appc-artifact-handler \
118 appc-network-inventory-client \
119 appc-design-services \
120 appc-interfaces-service"
126 #echo "Enabling core APP-C features"
127 #featureInstall odl-netconf-connector odl-restconf-noauth odl-netconf-clustered-topology odl-mdsal-clustering
129 echo "Installing APP-C Features"
132 for feature in ${APPC_FEATURES_UNZIP}
134 if [ -f ${APPC_FEATURE_DIR}/${feature}/install-feature.sh ]
136 ${APPC_FEATURE_DIR}/${feature}/install-feature.sh
138 echo "No installer found for feature ${feature}"
142 for feature in ${APPC_FEATURES_1}
144 group1Features="${group1Features} ${feature}"
147 echo "Installing features: ${group1Features}"
149 sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group1Features}"
150 # ${ODL_HOME}/bin/client "feature:install -r ${group1Features}"
152 echo "Install of features took $(expr $end - $start) seconds"
154 echo "Sleep Finished"
156 echo "Installing dispatcher features"
158 sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r onap-appc-request-handler onap-appc-command-executor onap-appc-lifecycle-management onap-appc-workflow-management lock-manager onap-appc-provider"
159 # ${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"
161 echo "Install of dispatcher features took $(expr $end - $start) seconds"
163 echo "Sleep Finished"
165 for feature in ${APPC_FEATURES_2}
167 group2Features="${group2Features} ${feature}"
170 echo "Installing features: ${group2Features}"
172 sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group2Features}"
173 # ${ODL_HOME}/bin/client "feature:install -r ${group2Features}"
175 echo "Install of features took $(expr $end - $start) seconds"
177 echo "Sleep Finished"
179 for feature in ${APPC_FEATURES_3}
181 group3Features="${group3Features} ${feature}"
184 echo "Installing features: ${group3Features}"
186 sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group3Features}"
187 # ${ODL_HOME}/bin/client "feature:install -r ${group3Features}"
189 echo "Install of features took $(expr $end - $start) seconds"
191 echo "Sleep Finished"
193 #Copy json template file for use by the generic restart DG aai fix
194 mkdir -p /opt/onap/appc/restapi/templates
195 cp /opt/onap/appc/data/aai-named-query.json /opt/onap/appc/restapi/templates/aai-named-query.json