Tomáš Levora | b7b7720 | 2018-12-20 10:10:38 +0100 | [diff] [blame] | 1 | #! /usr/bin/env bash |
| 2 | |
| 3 | # COPYRIGHT NOTICE STARTS HERE |
| 4 | # |
| 5 | # Copyright 2018 © Samsung Electronics Co., Ltd. |
| 6 | # |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # |
| 19 | # COPYRIGHT NOTICE ENDS HERE |
| 20 | |
| 21 | |
| 22 | # fail fast |
| 23 | set -e |
| 24 | |
| 25 | # OS check |
| 26 | . /etc/os-release |
| 27 | OS_ID="${ID}" |
| 28 | |
| 29 | case "$OS_ID" in |
| 30 | centos) |
| 31 | ;; |
| 32 | rhel) |
| 33 | ;; |
| 34 | ubuntu) |
| 35 | ;; |
| 36 | *) |
| 37 | echo This OS is not supported: $OS_ID |
| 38 | exit 1 |
| 39 | ;; |
| 40 | esac |
| 41 | |
| 42 | # boilerplate |
| 43 | RELATIVE_PATH=./tools # relative path from this script to 'common-functions.sh' |
| 44 | if [ "$IS_COMMON_FUNCTIONS_SOURCED" != YES ] ; then |
| 45 | SCRIPT_DIR=$(dirname "${0}") |
| 46 | LOCAL_PATH=$(readlink -f "$SCRIPT_DIR") |
| 47 | . "${LOCAL_PATH}"/"${RELATIVE_PATH}"/common-functions.sh |
| 48 | fi |
| 49 | |
| 50 | get_configuration |
| 51 | copy_onap_values_file |
| 52 | patch_npm_oom |
| 53 | patch_spring_oom |
| 54 | patch_cfy_manager_depl $OS_ID |
| 55 | deploy_onap |