aravind.est | acdf2fe | 2023-07-18 10:59:06 +0100 | [diff] [blame] | 1 | #!/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 | |
| 20 | echo "######### Installing NONRTRIC components #########" |
| 21 | |
| 22 | git clone "https://gerrit.o-ran-sc.org/r/it/dep" |
| 23 | |
| 24 | ENABLED_SERVICES=(installPms installA1controller installA1simulator installInformationservice) |
aravind.est | c128f98 | 2023-08-14 07:28:12 +0100 | [diff] [blame] | 25 | DISABLED_SERVICES=(installControlpanel installRappcatalogueservice installRappcatalogueenhancedservice installNonrtricgateway installKong installDmaapadapterservice installDmaapmediatorservice installHelmmanager installOrufhrecovery installRansliceassurance installRanpm) |
aravind.est | acdf2fe | 2023-07-18 10:59:06 +0100 | [diff] [blame] | 26 | |
| 27 | RECEIPE_FILE="dep/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml" |
| 28 | |
| 29 | for element in "${ENABLED_SERVICES[@]}"; do |
| 30 | echo "Enabling service $element" |
| 31 | yq eval ".nonrtric.$element"="true" -i $RECEIPE_FILE |
| 32 | done |
| 33 | |
| 34 | for element in "${DISABLED_SERVICES[@]}"; do |
| 35 | echo "Disabling service $element" |
| 36 | yq eval ".nonrtric.$element"="false" -i $RECEIPE_FILE |
| 37 | done |
| 38 | |
| 39 | sudo dep/bin/deploy-nonrtric -f $RECEIPE_FILE |
| 40 | |
| 41 | while [[ $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 |
| 54 | done |
| 55 | |
| 56 | echo "NONRTRIC component installation completed..." |