chore(ci): update CI configuration and improve installation guide

main
Nimbus318 10 months ago
parent 039ad033a3
commit f6423e4a1d

@ -39,26 +39,7 @@ jobs:
with: with:
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: projecthami/hami-webui-fe:${{ steps.branch-names.outputs.current_branch || steps.branch-names.outputs.tag }} tags: projecthami/hami-webui-fe-oss:${{ steps.branch-names.outputs.current_branch || steps.branch-names.outputs.tag }}
golang-lint:
name: Lint Go Code
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go environment
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Run golint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ./server
version: v1.60
args: "--timeout=5m"
build-and-push-backend: build-and-push-backend:
name: Build and Push Backend Image name: Build and Push Backend Image
@ -87,4 +68,4 @@ jobs:
context: ./server context: ./server
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
push: true push: true
tags: projecthami/hami-webui-be:${{ steps.branch-names.outputs.current_branch || steps.branch-names.outputs.tag }} tags: projecthami/hami-webui-be-oss:${{ steps.branch-names.outputs.current_branch || steps.branch-names.outputs.tag }}

@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.1 version: 1.0.2
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "1.0.0" appVersion: "1.0.2"
dependencies: dependencies:
- condition: dcgm-exporter.enabled - condition: dcgm-exporter.enabled

@ -9,11 +9,11 @@ image:
repository: projecthami/hami-webui-fe-oss repository: projecthami/hami-webui-fe-oss
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "v1.0.0" tag: "v1.0.2"
backend: backend:
repository: projecthami/hami-webui-be-oss repository: projecthami/hami-webui-be-oss
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: "v1.0.0" tag: "v1.0.2"
imagePullSecrets: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""
@ -123,7 +123,7 @@ dcgm-exporter:
gpu: "on" gpu: "on"
kube-prometheus-stack: kube-prometheus-stack:
enabled: true enabled: false
crds: crds:
enabled: false enabled: false
defaultRules: defaultRules:

@ -37,19 +37,19 @@ To set up the HAMi-WebUI Helm repository so that you download the correct HAMi-W
The following example adds the `hami-webui` Helm repository. The following example adds the `hami-webui` Helm repository.
```bash ```bash
helm repo add hami-charts https://project-hami.github.io/HAMi/ helm repo add hami-webui https://project-hami.github.io/HAMi-WebUI
``` ```
2. Run the following command to verify the repository was added: 2. Run the following command to verify the repository was added:
```bash ```bash
helm repo list | grep hami helm repo list | grep hami-webui
``` ```
After you add the repository, you should see an output similar to the following: After you add the repository, you should see an output similar to the following:
```bash ```bash
hami-charts https://project-hami.github.io/HAMi/ hami-webui https://project-hami.github.io/HAMi-WebUI
``` ```
3. Run the following command to update the repository to download the latest HAMi-WebUI Helm charts: 3. Run the following command to update the repository to download the latest HAMi-WebUI Helm charts:
@ -78,14 +78,14 @@ When you create a new namespace in Kubernetes, you can better organize, allocate
namespace/hami created namespace/hami created
``` ```
2. Search for the official `hami-charts/hami-webui` repository using the command: 2. Search for the official `hami-webui/hami-webui` repository using the command:
`helm search repo <repo-name/package-name>` `helm search repo <repo-name/package-name>`
For example, the following command provides a list of the HAMi-WebUI Helm Charts from which you will install the latest version of the HAMi-WebUI chart. For example, the following command provides a list of the HAMi-WebUI Helm Charts from which you will install the latest version of the HAMi-WebUI chart.
```bash ```bash
helm search repo hami-charts/hami-webui helm search repo hami-webui/hami-webui
``` ```
3. Before deploying, ensure that you configure the `values.yaml` file to match your clusters requirements. For detailed instructions, refer to the [Configuration Guide for HAMi-WebUI Helm Chart](../../../charts/hami-webui/README.md#configuration-guide-for-hamiwebui-helm-chart) 3. Before deploying, ensure that you configure the `values.yaml` file to match your clusters requirements. For detailed instructions, refer to the [Configuration Guide for HAMi-WebUI Helm Chart](../../../charts/hami-webui/README.md#configuration-guide-for-hamiwebui-helm-chart)
@ -98,7 +98,7 @@ When you create a new namespace in Kubernetes, you can better organize, allocate
4. Once you've adjusted the `values.yaml`, run the following command to deploy the HAMi-WebUI Helm Chart inside your namespace: 4. Once you've adjusted the `values.yaml`, run the following command to deploy the HAMi-WebUI Helm Chart inside your namespace:
```bash ```bash
helm install my-hami-webui hami-charts/hami-webui --namespace hami -f values.yaml helm install my-hami-webui hami-webui/hami-webui --namespace hami -f values.yaml
``` ```
Where: Where:

@ -68,7 +68,9 @@ func (r *nodeRepo) updateLocalNodes() {
} }
for _, node := range nodes { for _, node := range nodes {
bizNode := r.fetchNodeInfo(node) bizNode := r.fetchNodeInfo(node)
n[node.UID] = bizNode if _, ok := n[node.UID]; !ok {
n[node.UID] = bizNode
}
devices, err := p.FetchDevices(node) devices, err := p.FetchDevices(node)
if err != nil { if err != nil {
r.log.Warnf("list devices info error: %s", err) r.log.Warnf("list devices info error: %s", err)

@ -1,6 +1,6 @@
export default { export default {
vgpu: { vgpu: {
target: 'http://192.168.10.137:8000', target: 'http://127.0.0.1:8000',
secure: false, secure: false,
pathRewrite: { pathRewrite: {
'^/api/vgpu': '', '^/api/vgpu': '',

Loading…
Cancel
Save