tacker/samples/mgmt_driver/install_helm.sh
Ayumu Ueha 08ae05a27a Support Helm chart as interface for Kubernetes VIM
Implements new interface for Kubernetes VIM to handle Helm chart.
It enables Users to include Helm chart files as MCIOP in their VNF
Packages, to instantiate and to terminate CNF with them.
And update sample of MgmtDriver to install and configure Helm package
for using Helm cli command in the deployed Kubernetes cluster VNF, and
to restore the registered helm repositories and charts after the master
node is healed.

Implements: blueprint helmchart-k8s-vim
Change-Id: I8511b103841d5aba7edcf9ec5bb974bfa3a74bb2
2021-09-15 11:45:12 +00:00

50 lines
1.1 KiB
Bash

#!/bin/bash
set -o xtrace
###############################################################################
#
# This script will install and setting Helm for Tacker.
#
###############################################################################
declare -g HELM_VERSION="3.5.4"
declare -g HELM_CHART_DIR="/var/tacker/helm"
# Install Helm
#-------------
function install_helm {
wget -P /tmp https://get.helm.sh/helm-v$HELM_VERSION-linux-amd64.tar.gz
tar zxf /tmp/helm-v$HELM_VERSION-linux-amd64.tar.gz -C /tmp
sudo mv /tmp/linux-amd64/helm /usr/local/bin/helm
}
# Install sshpass
#----------------
function install_sshpass {
sudo apt-get install -y sshpass
}
# Create helm chart directory
#----------------------------
function create_helm_chart_dir {
sudo mkdir -p $HELM_CHART_DIR
}
# Set proxy to environment
#-------------------------
function set_env_proxy {
cat <<EOF | sudo tee -a /etc/environment >/dev/null
http_proxy=${http_proxy//%40/@}
https_proxy=${https_proxy//%40/@}
no_proxy=$no_proxy
EOF
}
# Main
# ____
install_helm
install_sshpass
create_helm_chart_dir
set_env_proxy
exit 0