tools/import-stx
Davlet Panech 74653b6298 stx-init-env: download builder images
* stx-init-env
  - convert to executable form & prohibit sourcing
  - add command-line processing
  - download pre-built images from docker hub by default,
    instead of rebuilding; option to force a rebuild
  - option to delete minikube cluster

* import-stx: remove executable permission

* stx/lib/stx/stx_control.py:
  - stx control start: don't fail if helm chart is already installed
  - stx control stop: don't fail if helm chart is already uninstalled

Story: 2008846
Task: 43819
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Idf301c4809ba747da08281ea5a735f3f2c4a3f8e
2021-11-03 13:44:39 -04:00

27 lines
775 B
Plaintext

# bash
if [ -z "$MINIKUBE_HOME" ];then
MINIKUBE_HOME=$HOME
else
if [ ! -d "$MINIKUBE_HOME" ]; then
echo "The directory defined by \$MINIKUBE_HOME doesn't exist"
return 1
fi
fi
FSTYPE=$(stat -f -L -c %T $MINIKUBE_HOME)
if [ x"$FSTYPE" == x"nfs" ]; then
echo ""
echo "Warning: stx minikube doesn't allow \$MINIKUBE_HOME or \$HOME directory as nfs mount point!!!"
echo " Please set non-nfs MINIKUBE_HOME with the command 'export MINIKUBE_HOME=XXX/YYY'"
echo ""
unset MINIKUBE_HOME
return 1
fi
export PRJDIR=$(pwd)
export PATH=$PRJDIR/stx/bin:$PATH
export MINIKUBENAME=${MINIKUBENAME:-minikube-$USER-upstream}
export KUBECONFIG=$MINIKUBE_HOME/.kube/config
export STX_BUILD_HOME="${STX_BUILD_HOME:-/localdisk/$USER}"