Install Starwhale Server with Minikube
Prerequisitesâ
Starting Minikubeâ
minikube start --addons ingress --kubernetes-version=1.25.3
For users in the mainland of China, please add --image-mirror-country=cn
parameter. If there is no kubectl bin in your machine, you may use minikube kubectl
or alias kubectl="minikube kubectl --"
alias command.
Installing Starwhale Serverâ
helm repo add starwhale https://star-whale.github.io/charts
helm repo update
helm pull starwhale/starwhale --untar --untardir ./charts
helm upgrade --install starwhale ./charts/starwhale -n starwhale --create-namespace -f ./charts/starwhale/values.minikube.global.yaml
For users in the mainland of China, use values.minikube.global.yaml
:
helm upgrade --install starwhale ./charts/starwhale -n starwhale --create-namespace -f ./charts/starwhale/values.minikube.cn.yaml
After the installation is successful, the following prompt message appears:
Release "starwhale" has been upgraded. Happy Helming!
NAME: starwhale
LAST DEPLOYED: Tue Feb 14 16:25:03 2023
NAMESPACE: starwhale
STATUS: deployed
REVISION: 14
NOTES:
******************************************
Chart Name: starwhale
Chart Version: 0.5.6
App Version: latest
Starwhale Image:
- server: ghcr.io/star-whale/server:latest
******************************************
Controller:
- visit: http://controller.starwhale.svc
Minio:
- web visit: http://minio.starwhale.svc
- admin visit: http://minio-admin.starwhale.svc
MySQL:
- port-forward:
- run: kubectl port-forward --namespace starwhale svc/mysql 3306:3306
- visit: mysql -h 127.0.0.1 -P 3306 -ustarwhale -pstarwhale
Please run the following command for the domains searching:
echo "$(sudo minikube ip) controller.starwhale.svc minio.starwhale.svc minio-admin.starwhale.svc " | sudo tee -a /etc/hosts
******************************************
Login Info:
- starwhale: u:starwhale, p:abcd1234
- minio admin: u:minioadmin, p:minioadmin
*_* Enjoy to use Starwhale Platform. *_*
Checking Starwhale Server statusâ
Keep checking the minikube service status until all deployments are running(waiting for 3~5 mins):
kubectl get deployments -n starwhale
NAME | READY | UP-TO-DATE | AVAILABLE | AGE |
---|---|---|---|---|
controller | 1/1 | 1 | 1 | 5m |
minio | 1/1 | 1 | 1 | 5m |
mysql | 1/1 | 1 | 1 | 5m |
Visiting for localâ
Make the Starwhale controller accessible locally with the following command:
echo "$(sudo minikube ip) controller.starwhale.svc minio.starwhale.svc minio-admin.starwhale.svc " | sudo tee -a /etc/hosts
Then you can visit http://controller.starwhale.svc in your local web browser.
Visiting for othersâ
Step 1: in the Starwhale Server machine
for temporary use with
socat
command:# install socat at first, ref: https://howtoinstall.co/en/socat
sudo socat TCP4-LISTEN:80,fork,reuseaddr,bind=0.0.0.0 TCP4:`minikube ip`:80When you kill the socat process, the share access will be blocked.
iptables
maybe a better choice for long-term use.Step 2: in the other machines
# for macOSX or Linux environment, run the command in the shell.
echo ${your_machine_ip} controller.starwhale.svc minio.starwhale.svc minio-admin.starwhale.svc " | sudo tee -a /etc/hosts
# for Windows environment, run the command in the PowerShell with administrator permission.
Add-Content -Path C:\Windows\System32\drivers\etc\hosts -Value "`n${your_machine_ip} controller.starwhale.svc minio.starwhale.svc minio-admin.starwhale.svc"