X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fdevops.git;a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;fp=installers%2Ffull_install_osm.sh;h=04605da77a649a33f6d9ebe40e916faad2abf898;hp=b9330b314bad3eef9b5bfdaf163fb4d738168f8e;hb=ac08600d90e5a9604346d691f8a21ebe6f08eeac;hpb=3b36f4d76ff9e12fb20ab376e1f4bf15d13d7aed diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index b9330b31..04605da7 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -856,9 +856,13 @@ function kube_config_dir() { } function install_k8s_storageclass() { - kubectl apply -f https://openebs.github.io/charts/openebs-operator-1.6.0.yaml - local storageclass_timeout=300 + 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 + local storageclass_timeout=400 local counter=0 + local storageclass_ready="" echo "Waiting for storageclass" while (( counter < storageclass_timeout )) do @@ -866,12 +870,14 @@ function install_k8s_storageclass() { if [ $? -eq 0 ] ; then echo "Storageclass available" + storageclass_ready="y" break else counter=$((counter + 15)) sleep 15 fi done + [ -n "$storageclass_ready" ] || FATAL "Storageclass not ready after $storageclass_timeout seconds. Cannot install openebs" kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' }