8bcee26f1a
Implement the stx control module so that the developer could manage the four containers with the 'stx control xxx' command. Containers: (stx-builder|stx-pkgbuilder|stx-lat-tool|stx-repomgr) Now we assume that we have a minikube env to be ready for this module, we can use it directly. For the minikube env installation we can build it with the stx-init-env script later. Now support the action: [status|start|stop|enter|upgrade] stx control status: Check status of the containers stx control start: Boot the containers up stx control stop: Shutdown the containers stx control enter: Login the container(default builder) stx control upgrade: Upgrade the containers This module will be used after the developer have a minikube env, Please refer to the more help information with the command 'stx control --help' Story: 2008862 Task: 42514 Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Change-Id: I0c25e0f784671e90c56d5d367b12a27c3f3fa7cf
26 lines
703 B
Bash
Executable File
26 lines
703 B
Bash
Executable File
#!/bin/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=minikube-$USER-upstream
|
|
export KUBECONFIG=$MINIKUBE_HOME/.kube/config
|