2 ################################################################################
3 # Copyright (c) 2019 AT&T Intellectual Property. #
4 # Copyright (c) 2019 Nokia. #
6 # Licensed under the Apache License, Version 2.0 (the "License"); #
7 # you may not use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
10 # http://www.apache.org/licenses/LICENSE-2.0 #
12 # Unless required by applicable law or agreed to in writing, software #
13 # distributed under the License is distributed on an "AS IS" BASIS, #
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15 # See the License for the specific language governing permissions and #
16 # limitations under the License. #
17 ################################################################################
19 # This script deploys RIC auxiliary function components automatically
26 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
28 source $DIR/../etc/ric-infra.conf
30 export RICINFRA_RELEASE_NAME=$ric_infra_helm_release_name
32 export RICINFRA_NAMESPACE=$ric_infra_namespace
34 export DEPLOY_K8S=$deployK8S
36 export DEPLOY_NEXUS=$deployNexus
38 export USE_LOCAL_HELM_REPO=$useLocalHelmRepo
40 export USE_LOCAL_DOCKER_REGISTRY=$useLocalDockerRegistry
46 source $DIR/../etc/ric-platform.conf
48 export RICPLT_RELEASE_NAME=$ric_platform_helm_release_name
50 export RICPLT_NAMESPACE=$ric_platform_namespace
55 if [ -z "$OVERRIDEYAML" ];then
56 echo "****************************************************************************************************************"
58 echo "****************************************************************************************************************"
59 echo "Deploying RIC infrastructure components without deployment recipe. Default configurations are used."
60 echo "****************************************************************************************************************"
64 export DEPLOY_K8S=$(cat $OVERRIDEYAML | grep deployK8S | awk '{print $2}')
65 export DEPLOY_NEXUS=$(cat $OVERRIDEYAML | grep deployNexus | awk '{print $2}')
66 export USE_LOCAL_HELM_REPO=$(cat $OVERRIDEYAML | grep useLocalHelmRepo | awk '{print $2}')
67 export USE_LOCAL_DOCKER_REGISTRY=$(cat $OVERRIDEYAML | grep useLocalDockerRegistry | awk '{print $2}')
72 if $USE_LOCAL_HELM_REPO && [ "$DEPLOY_NEXUS" != "true" ];then
73 echo "****************************************************************************************************************"
75 echo "****************************************************************************************************************"
76 echo "Local helm repo cannot be used if Nexus is not installed. Please change your configurations in the deployment recipe."
77 echo "****************************************************************************************************************"
82 if $USE_LOCAL_DOCKER_REGISTRY && [ "$DEPLOY_NEXUS" != "true" ];then
83 echo "****************************************************************************************************************"
85 echo "****************************************************************************************************************"
86 echo "Local docker registry cannot be used if Nexus is not installed. Please change your configurations in the deployment recipe."
87 echo "****************************************************************************************************************"
93 echo "Deploying K8S. Please make sure that you configure files in ./ric-infra/00-Kubernetes/etc correctly."
94 . ../ric-infra/00-Kubernetes/bin/install
98 if $DEPLOY_NEXUS; then
99 echo "Deploying Nexus."
100 . ../ric-infra/10-Nexus/bin/install $OVERRIDEYAML