3 # ============LICENSE_START===============================================
4 # Copyright (C) 2023 Nordix Foundation. All rights reserved.
5 # Copyright (C) 2023-2024 OpenInfra Foundation Europe. All rights reserved.
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
11 # http://www.apache.org/licenses/LICENSE-2.0
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 # ============LICENSE_END=================================================
21 echo "######### Installing NONRTRIC components #########"
23 ENABLED_SERVICES=(installPms installA1controller installA1simulator installInformationservice installrAppmanager installDmeParticipant installCapifcore installServicemanager installKong)
24 DISABLED_SERVICES=(installControlpanel installRappcatalogueservice installRappcatalogueenhancedservice installNonrtricgateway installDmaapadapterservice installDmaapmediatorservice installHelmmanager installOrufhrecovery installRansliceassurance installRanpm)
26 if [[ "${ENABLED_SERVICES[@]}" =~ "installRanpm" ]]; then
27 git clone --recursive "https://gerrit.o-ran-sc.org/r/it/dep"
29 git clone "https://gerrit.o-ran-sc.org/r/it/dep"
32 RECEIPE_FILE="dep/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml"
34 for element in "${ENABLED_SERVICES[@]}"; do
35 echo "Enabling service $element"
36 yq eval ".nonrtric.$element"="true" -i $RECEIPE_FILE
39 for element in "${DISABLED_SERVICES[@]}"; do
40 echo "Disabling service $element"
41 yq eval ".nonrtric.$element"="false" -i $RECEIPE_FILE
44 # Dev mode installation configuration
45 if [[ "$1" == "dev" ]]; then
46 SNAPSHOT_REPO='nexus3.o-ran-sc.org:10003/o-ran-sc'
47 RAPP_MANAGER_VERSION=$(grep -oPm2 "(?<=<version>)[^<]+" "../../pom.xml" | tail -n1)
48 DME_PARTICIPANT_VERSION=$(grep -oPm2 "(?<=<version>)[^<]+" "../../participants/pom.xml" | tail -n1)
49 echo "Rapp Manager Version: $RAPP_MANAGER_VERSION"
50 echo "DME Participant Version: $DME_PARTICIPANT_VERSION"
51 yq eval ".rappmanager.rappmanager.image.registry"=\"$SNAPSHOT_REPO\" -i $RECEIPE_FILE
52 yq eval ".rappmanager.rappmanager.image.tag"=\"$RAPP_MANAGER_VERSION\" -i $RECEIPE_FILE
53 yq eval ".rappmanager.rappmanager.imagePullPolicy=\"Always\"" -i $RECEIPE_FILE
54 yq eval ".dmeparticipant.dmeparticipant.image.registry"=\"$SNAPSHOT_REPO\" -i $RECEIPE_FILE
55 yq eval ".dmeparticipant.dmeparticipant.image.tag"=\"$DME_PARTICIPANT_VERSION\" -i $RECEIPE_FILE
56 yq eval ".dmeparticipant.dmeparticipant.imagePullPolicy=\"Always\"" -i $RECEIPE_FILE
59 sudo dep/bin/deploy-nonrtric -f $RECEIPE_FILE
61 while [[ $TIME -lt 2000 ]]; do
62 NONRTRIC_PODS=$(kubectl get pods -n nonrtric --field-selector=status.phase!=Running,status.phase!=Succeeded --no-headers)
63 if [[ -z "$NONRTRIC_PODS" ]]; then
64 echo "All NONRTRIC Components are running."
65 kubectl get pods -n nonrtric
69 echo "Waiting for NONRTRIC Components to be running..."
70 echo "These pods are not running"
72 TIME=$(expr $TIME + 5)
76 echo "NONRTRIC component installation completed..."