blob: 85ce4b8b6d7314144235a998ace64b8a338a0652 [file] [log] [blame]
aravind.est98d1f7b2024-06-24 17:01:47 +01001#!/bin/bash
2# ============LICENSE_START=======================================================
3# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
4# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# ============LICENSE_END============================================
17#
18
19ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
20CM_VERSION="v0.16.1"
21CM_PORT="8879"
22HELM_LOCAL_REPO="$ROOT_DIR/chartstorage"
23
24echo "Installing ChartMuseum binary..."
25pushd /tmp
26wget https://get.helm.sh/chartmuseum-$CM_VERSION-linux-amd64.tar.gz
27tar xvfz chartmuseum-$CM_VERSION-linux-amd64.tar.gz
28sudo mv /tmp/linux-amd64/chartmuseum /usr/local/bin/chartmuseum
29popd
30
31echo "Starting ChartMuseum on port $CM_PORT..."
32nohup chartmuseum --port=$CM_PORT --storage="local" --storage-local-rootdir=$HELM_LOCAL_REPO >/dev/null 2>&1 &
33echo $! > $ROOT_DIR/CM_PID.txt
34
35wget https://get.helm.sh/helm-v3.12.3-linux-amd64.tar.gz
36tar xvfz /tmp/helm-v3.12.3-linux-amd64.tar.gz
37sudo mv linux-amd64/helm /usr/local/bin/helm
38
39TAR_VERSION=v0.10.3
40echo "Downloading and installing helm-push ${TAR_VERSION} ..."
41TAR_FILE=helm-push-${TAR_VERSION}.tar.gz
42HELM_PLUGINS=$(helm env HELM_PLUGINS)
43mkdir -p $HELM_PLUGINS/helm-push
44cd $HELM_PLUGINS/helm-push
45wget https://nexus.o-ran-sc.org/content/repositories/thirdparty/chartmuseum/helm-push/$TAR_VERSION/$TAR_FILE
46tar zxvf $TAR_FILE >/dev/null
47rm $TAR_FILE
48helm repo remove local
49helm repo add local http://localhost:8879
50popd
51
52sudo apt-get install make -y
53(cd smo && make all)
54
55# Creating namespace
56kubectl create ns smo
57
58# Installing helm charts
59helm install --debug oran-smo local/smo --namespace smo
60
61# Show the installed pods
62kubectl get po -n smo