Dan Timoney | 471dafa | 2017-08-21 14:44:05 -0400 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | ### |
| 4 | # ============LICENSE_START======================================================= |
| 5 | # openECOMP : SDN-C |
| 6 | # ================================================================================ |
| 7 | # Copyright (C) 2017 AT&T Intellectual Property. All rights |
| 8 | # reserved. |
| 9 | # ================================================================================ |
| 10 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 11 | # you may not use this file except in compliance with the License. |
| 12 | # You may obtain a copy of the License at |
| 13 | # |
| 14 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | # |
| 16 | # Unless required by applicable law or agreed to in writing, software |
| 17 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | # See the License for the specific language governing permissions and |
| 20 | # limitations under the License. |
| 21 | # ============LICENSE_END========================================================= |
| 22 | ### |
| 23 | |
| 24 | ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} |
| 25 | ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} |
| 26 | SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} |
| 27 | SDNC_FEATURE_DIR=${SDNC_FEATURE_DIR:-${SDNC_HOME}/features} |
| 28 | |
| 29 | SDNC_CORE_FEATURES=" \ |
| 30 | dblib \ |
| 31 | filters \ |
| 32 | sli \ |
| 33 | sliPluginUtils \ |
| 34 | sliapi" |
| 35 | |
| 36 | SDNC_ADAPTORS_FEATURES=" \ |
| 37 | aai-service \ |
| 38 | mdsal-resource \ |
| 39 | resource-assignment \ |
| 40 | sql-resource" |
| 41 | |
| 42 | SDNC_NORTHBOUND_FEATURES=" \ |
| 43 | asdcApi \ |
| 44 | dataChange |
| 45 | |
| 46 | SDNC_PLUGINS_FEATURES=" \ |
| 47 | properties-node \ |
| 48 | restapi-call-node" |
| 49 | |
| 50 | |
| 51 | SDNC_CORE_VERSION=${SDNC_CORE_VERSION:-0.0.1-SNAPSHOT} |
| 52 | SDNC_ADAPTORS_VERSION=${SDNC_ADAPTORS_VERSION:-0.0.1-SNAPSHOT} |
| 53 | SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-0.0.1-SNAPSHOT} |
| 54 | SDNC_PLUGINS_VERSION=${SDNC_PLUGINS_VERSION:-0.0.1-SNAPSHOT} |
| 55 | |
| 56 | echo "Enabling core features" |
| 57 | ${ODL_HOME}/bin/client -u karaf feature:install odl-mdsal-all |
| 58 | ${ODL_HOME}/bin/client -u karaf feature:install odl-mdsal-apidocs |
| 59 | ${ODL_HOME}/bin/client -u karaf feature:install odl-restconf-all |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | echo "Installing SDN-C core" |
| 65 | for feature in ${SDNC_CORE_FEATURES} |
| 66 | do |
| 67 | if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] |
| 68 | then |
| 69 | ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh |
| 70 | else |
| 71 | echo "No installer found for feature sdnc-${feature}" |
| 72 | fi |
| 73 | done |
| 74 | |
| 75 | echo "Installing SDN-C adaptors" |
| 76 | for feature in ${SDNC_ADAPTORS_FEATURES} |
| 77 | do |
| 78 | if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] |
| 79 | then |
| 80 | ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh |
| 81 | else |
| 82 | echo "No installer found for feature sdnc-${feature}" |
| 83 | fi |
| 84 | done |
| 85 | |
| 86 | echo "Installing SDN-C northbound" |
| 87 | for feature in ${SDNC_NORTHBOUND_FEATURES} |
| 88 | do |
| 89 | if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] |
| 90 | then |
| 91 | ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh |
| 92 | else |
| 93 | echo "No installer found for feature sdnc-${feature}" |
| 94 | fi |
| 95 | done |
| 96 | |
| 97 | echo "Installing SDN-C plugins" |
| 98 | for feature in ${SDNC_PLUGINS_FEATURES} |
| 99 | do |
| 100 | if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] |
| 101 | then |
| 102 | ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh |
| 103 | else |
| 104 | echo "No installer found for feature sdnc-${feature}" |
| 105 | fi |
| 106 | done |