blob: bd66a433c2b723bfe61ce796887da33dbb345091 [file] [log] [blame]
aravind.estacdf2fe2023-07-18 10:59:06 +01001#!/bin/bash
2
3# ============LICENSE_START===============================================
4# Copyright (C) 2023 Nordix Foundation. All rights reserved.
5# ========================================================================
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
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
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# ============LICENSE_END=================================================
18#
19
20echo "######### Installing NONRTRIC components #########"
21
22git clone "https://gerrit.o-ran-sc.org/r/it/dep"
23
24ENABLED_SERVICES=(installPms installA1controller installA1simulator installInformationservice)
aravind.estc128f982023-08-14 07:28:12 +010025DISABLED_SERVICES=(installControlpanel installRappcatalogueservice installRappcatalogueenhancedservice installNonrtricgateway installKong installDmaapadapterservice installDmaapmediatorservice installHelmmanager installOrufhrecovery installRansliceassurance installRanpm)
aravind.estacdf2fe2023-07-18 10:59:06 +010026
27RECEIPE_FILE="dep/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml"
28
29for element in "${ENABLED_SERVICES[@]}"; do
30 echo "Enabling service $element"
31 yq eval ".nonrtric.$element"="true" -i $RECEIPE_FILE
32done
33
34for element in "${DISABLED_SERVICES[@]}"; do
35 echo "Disabling service $element"
36 yq eval ".nonrtric.$element"="false" -i $RECEIPE_FILE
37done
38
39sudo dep/bin/deploy-nonrtric -f $RECEIPE_FILE
40
41while [[ $TIME -lt 2000 ]]; do
42 NONRTRIC_PODS=$(kubectl get pods -n nonrtric --field-selector=status.phase!=Running --no-headers)
43 if [[ -z "$NONRTRIC_PODS" ]]; then
44 echo "All NONRTRIC Components are running."
45 kubectl get pods -n nonrtric
46 break
47 fi
48
49 echo "Waiting for NONRTRIC Components to be running..."
50 echo "These pods are not running"
51 echo "$NONRTRIC_PODS"
52 TIME=$(expr $TIME + 5)
53 sleep 5
54done
55
56echo "NONRTRIC component installation completed..."