Skip to content

Commit

Permalink
refactor helm charts with self mysql/minio to tune minikube deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
tianweidut committed Feb 15, 2023
1 parent 7b36b67 commit 0509fa1
Show file tree
Hide file tree
Showing 25 changed files with 859 additions and 421 deletions.
60 changes: 40 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,67 +284,87 @@ Let's go ahead and finish the tutorial on the on-premises instance.
minikube start
```
> For users in the mainland of China, please add these startup parameters:`--image-mirror-country=cn --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers`. If there is no kubectl bin in your machine, you may use `minikube kubectl` or `alias kubectl="minikube kubectl --"` alias command.
> For users in the mainland of China, please add the startup parameter:`--image-mirror-country=cn`.
```bash
minikube start --image-mirror-country=cn
```
If there is no kubectl bin in your machine, you may use `minikube kubectl` or `alias kubectl="minikube kubectl --"` alias command.
- 🍵 **STEP3**: Installing Starwhale
```bash
helm repo add starwhale https://star-whale.github.io/charts
helm repo update
export SWNAME=starwhale SWNS=starwhale
helm upgrade --install $SWNAME starwhale/starwhale --namespace $SWNS --create-namespace --set minikube.enabled=true --set mysql.primary.persistence.storageClass=$SWNAME-mysql --set minio.persistence.storageClass=$SWNAME-minio --set image.registry=docker-registry.starwhale.cn --set minio.global.imageRegistry=docker-registry.starwhale.cn --set mysql.global.imageRegistry=docker-registry.starwhale.cn
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`.
```bash
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:
```bash
Release "starwhale" has been upgraded. Happy Helming!
NAME: starwhale
LAST DEPLOYED: Thu Jun 23 14:48:02 2022
LAST DEPLOYED: Tue Feb 14 16:25:03 2023
NAMESPACE: starwhale
STATUS: deployed
REVISION: 1
REVISION: 14
NOTES:
******************************************
Chart Name: starwhale
Chart Version: 0.3.0
App Version: 0.3.0
...
Chart Version: 0.1.0
App Version: latest
Starwhale Image:
- server: ghcr.io/star-whale/server:latest
Runtime default Image:
- runtime image: ghcr.io/star-whale/starwhale:latest
******************************************
Web Visit:
Port Forward Visit:
- starwhale controller:
- run: kubectl port-forward --namespace starwhale svc/starwhale-controller 8082:8082
- run: kubectl port-forward --namespace starwhale svc/controller 8082:8082
- visit: http://localhost:8082
- minio admin:
- run: kubectl port-forward --namespace starwhale svc/starwhale-minio 9001:9001
- run: kubectl port-forward --namespace starwhale svc/minio 9001:9001
- visit: http://localhost:9001
- mysql:
- run: kubectl port-forward --namespace starwhale svc/starwhale-mysql 3306:3306
- run: kubectl port-forward --namespace starwhale svc/mysql 3306:3306
- visit: mysql -h 127.0.0.1 -P 3306 -ustarwhale -pstarwhale
******************************************
Login Info:
- starwhale: u:starwhale, p:abcd1234
- minio admin: u:minioadmin, p:minioadmin
*_* Enjoy using Starwhale. *_*
*_* Enjoy to use Starwhale Platform. *_*
```
Then keep checking the minikube service status until all pods are running.
Then keep checking the minikube service status until all deployments are running.
```bash
kubectl get pods -n starwhale
kubectl get deployments -n starwhale
```
| NAME | READY | STATUS | RESTARTS | AGE |
|:-----|-------|--------|----------|-----|
|starwhale-controller-7d864558bc-vxvb8|1/1|Running|0|1m
|starwhale-minio-7d45db75f6-7wq9b|1/1|Running|0|2m
|starwhale-mysql-0|1/1|Running|0|2m
| 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|
Make the Starwhale controller accessible locally with the following command:
```bash
kubectl port-forward --namespace starwhale svc/starwhale-controller 8082:8082
kubectl port-forward --namespace starwhale svc/controller 8082:8082
```
- ☕ **STEP4**: Upload the artifacts to the cloud instance
Expand Down
3 changes: 0 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
use helm to install:
- helm install starwhale ./ --namespace starwhale
- helm upgrade starwhale ./ --namespace starwhale
13 changes: 2 additions & 11 deletions docker/charts/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,5 @@ dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.16.0
- name: mysql
repository: https://charts.bitnami.com/bitnami
version: 8.9.6
- name: minio
repository: https://charts.bitnami.com/bitnami
version: 11.7.6
- name: nexus-repository-manager
repository: https://sonatype.github.io/helm3-charts/
version: 39.0.0
digest: sha256:882b4bd412bf6cd30cce2236144b1e0ad8edf7585ac46d0d6d39479fc26e530c
generated: "2022-06-21T19:23:38.63261854+08:00"
digest: sha256:cd0a73bdd9d5146e1392f5aa4c552822bed8c80f6fb962e56444d342f918e546
generated: "2023-02-13T17:11:47.46212364+08:00"
14 changes: 1 addition & 13 deletions docker/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,7 @@ icon: https://github.com/star-whale/starwhale/raw/main/docs/static/img/logo_72x7
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.x.x
- name: mysql
condition: mysql.enabled
repository: https://charts.bitnami.com/bitnami
version: 8.x.x
- name: minio
condition: minio.enabled
repository: https://charts.bitnami.com/bitnami
version: 11.x.x
- name: nexus-repository-manager
condition: nexus3.enabled
repository: https://sonatype.github.io/helm3-charts/
version: 39.x.x
version: 1.16.0

version: "0.1.0"
appVersion: "latest"
Loading

0 comments on commit 0509fa1

Please sign in to comment.