Skip to content
Snippets Groups Projects
Commit fdbe776e authored by aguilard's avatar aguilard
Browse files

Fix bug 1647: OpenEBS error in OSM installer


Updated OpenEBS to version 1.12.0 using Helm
Updated Helm from v2.15.2 to v3.6.3

Change-Id: Ie31239181a7fbcf7a250ebbdf9123d4088ca75b3
Signed-off-by: default avataraguilard <e.dah.tid@telefonica.com>
parent 36c87727
No related branches found
No related tags found
No related merge requests found
......@@ -183,8 +183,6 @@ function remove_k8s_namespace() {
function remove_helm() {
if [ "$(helm ls -q)" == "" ] ; then
sudo helm reset --force
kubectl delete --namespace kube-system serviceaccount tiller
kubectl delete clusterrolebinding tiller-cluster-rule
sudo rm /usr/local/bin/helm
rm -rf $HOME/.helm
fi
......@@ -824,10 +822,12 @@ function kube_config_dir() {
}
function install_k8s_storageclass() {
OPENEBS_DIR="$(mktemp -d -q --tmpdir "openebs.XXXXXX")"
trap 'rm -rf "${OPENEBS_DIR}"' EXIT
wget -q https://openebs.github.io/charts/openebs-operator-1.6.0.yaml -P $OPENEBS_DIR
kubectl apply -f $OPENEBS_DIR
echo "Installing OpenEBS"
kubectl create ns openebs
helm repo add openebs https://openebs.github.io/charts
helm repo update
helm install --namespace openebs openebs openebs/openebs --version 1.12.0
helm ls -n openebs
local storageclass_timeout=400
local counter=0
local storageclass_ready=""
......@@ -911,40 +911,19 @@ function deploy_osm_pla_service() {
kubectl apply -n $OSM_STACK_NAME -f $OSM_DOCKER_WORK_DIR/osm_pla
}
#Install helm and tiller
#Install Helm v3
function install_helm() {
helm > /dev/null 2>&1
if [ $? != 0 ] ; then
# Helm is not installed. Install helm
echo "Helm is not installed, installing ..."
curl https://get.helm.sh/helm-v2.15.2-linux-amd64.tar.gz --output helm-v2.15.2.tar.gz
tar -zxvf helm-v2.15.2.tar.gz
curl https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz --output helm-v3.6.3.tar.gz
tar -zxvf helm-v3.6.3.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/helm
rm -r linux-amd64
rm helm-v2.15.2.tar.gz
fi
# Checking if tiller has being configured
kubectl --namespace kube-system get serviceaccount tiller > /dev/null 2>&1
if [ $? == 1 ] ; then
# tiller account for kubernetes
kubectl --namespace kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
# HELM initialization
helm init --stable-repo-url https://charts.helm.sh/stable --service-account tiller
# Wait for Tiller to be up and running. If timeout expires, continue installing
tiller_timeout=120;
counter=0;
tiller_status=""
while (( counter < tiller_timeout ))
do
tiller_status=`kubectl -n kube-system get deployment.apps/tiller-deploy --no-headers | awk '{print $2'}`
( [ ! -z "$tiller_status" ] && [ $tiller_status == "1/1" ] ) && echo "Tiller ready" && break
counter=$((counter + 5))
sleep 5
done
[ "$tiller_status" != "1/1" ] && echo "Tiller is NOT READY YET. Installation will continue"
rm helm-v3.6.3.tar.gz
helm repo add stable https://charts.helm.sh/stable
helm repo update
fi
}
......@@ -1202,6 +1181,8 @@ function install_lightweight() {
remove_k8s_namespace $OSM_STACK_NAME
deploy_cni_provider
taint_master_node
install_helm
track install_helm
install_k8s_storageclass
track k8s_storageclass
install_k8s_metallb
......@@ -1331,8 +1312,6 @@ EOF
track deploy_osm_pla
fi
track deploy_osm_services_k8s
install_helm
track install_helm
if [ -n "$INSTALL_K8S_MONITOR" ]; then
# install OSM MONITORING
install_k8s_monitoring
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment