Deployment onap rename
[appc/deployment.git] / platform-logic / installer / src / main / scripts / install.sh
1 #!/bin/bash
2
3 ###
4 # ============LICENSE_START=======================================================
5 # APPC
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
12
13 #      http://www.apache.org/licenses/LICENSE-2.0
14
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.
22 ###
23
24 # BASEDIR env variable points to /opt/onap/appc/svclogic
25 BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
26
27
28 # Load directed graphs
29 for graphlist in $(find $BASEDIR/graphs -name graph.versions -print)
30 do
31   curdir=$(dirname $graphlist)
32
33   # Load files from directory containing graph.versions file
34   echo "Loading APP-C Directed Graphs from $curdir"
35   for file in $(ls $curdir/*.xml)
36   do
37     echo "Loading $file ..."
38     $BASEDIR/bin/svclogic.sh load $file $BASEDIR/config/svclogic.properties
39   done
40
41   # Activate directed graphs
42   while read module rpc version mode
43   do
44      echo "Activating APP-C DG $module $rpc $version $mode"
45      $BASEDIR/bin/svclogic.sh activate $module $rpc $version $mode $BASEDIR/config/svclogic.properties
46   done < <(cat $graphlist)
47 done