Skip to content

Commit

Permalink
docs(quick-start): 更新快速开始文档
Browse files Browse the repository at this point in the history
- 在 Docker 和 K8s 文档中添加创建告警策略和告警的链接
- 优化 K8s 文档的格式和结构,提高可读性
- 调整部分文案,使其更加准确和一致
  • Loading branch information
aide-cloud committed Nov 16, 2024
1 parent a35a65c commit afad0ce
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 52 deletions.
2 changes: 2 additions & 0 deletions docs/1-quick-start/3-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ docker-compose ps
- 前端服务:http://localhost:5173
- 后端服务:http://localhost:8000/api

**[创建告警策略并告警](https://aide-family.github.io/blog/new-strategy)**

## 查看服务日志

```shell
Expand Down
97 changes: 45 additions & 52 deletions docs/1-quick-start/4-k8s.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ sidebar_position: 4

### 准备配置文件

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

<Tabs>
<TabItem value="palace" label="Palace">
Expand Down Expand Up @@ -135,7 +134,7 @@ data:
host: smtp.163.com
port: 25
user:
pass:
pass:
oss:
type: "local"
Expand All @@ -148,7 +147,8 @@ data:
path: "./data/moon_oss"
url: https://moon.aide-cloud.cn/api
downloadPre: "/file/download"
```
````
</TabItem>
<TabItem value="deployment.yaml" label="deployment.yaml">
```yaml
Expand Down Expand Up @@ -198,7 +198,8 @@ spec:
- name: palace-data
configMap:
name: palace-config
```
````
</TabItem>
<TabItem value="service.yaml" label="service.yaml">
```yaml
Expand Down Expand Up @@ -255,26 +256,20 @@ spec:
</Tabs>
</TabItem>
<TabItem value="houyi" label="HouYi">
<Tabs>
<TabItem value="configmap.yaml" label="configmap.yaml">
</TabItem>
<TabItem value="deployment.yaml" label="deployment.yaml">
</TabItem>
<TabItem value="service.yaml" label="service.yaml">
</TabItem>
</Tabs>
<TabItem value='houyi' label='HouYi'>
<Tabs>
<TabItem value='configmap.yaml' label='configmap.yaml'></TabItem>
<TabItem value='deployment.yaml' label='deployment.yaml'></TabItem>
<TabItem value='service.yaml' label='service.yaml'></TabItem>
</Tabs>
</TabItem>
<TabItem value="rabbit" label="Rabbit">
<Tabs>
<TabItem value="configmap.yaml" label="configmap.yaml">
</TabItem>
<TabItem value="deployment.yaml" label="deployment.yaml">
</TabItem>
<TabItem value="service.yaml" label="service.yaml">
</TabItem>
</Tabs>
<TabItem value='rabbit' label='Rabbit'>
<Tabs>
<TabItem value='configmap.yaml' label='configmap.yaml'></TabItem>
<TabItem value='deployment.yaml' label='deployment.yaml'></TabItem>
<TabItem value='service.yaml' label='service.yaml'></TabItem>
</Tabs>
</TabItem>
<TabItem value="moon-frontend" label="Moon Frontend">
Expand Down Expand Up @@ -305,14 +300,14 @@ kubectl create secret tls moon -n application \
--key moon.aide-cloud.cn.key
```

## 部署Palace
## 部署 Palace

```shell
kubectl apply -f moon/palace/
```

### 查看Pod
### 查看 Pod

```shell
kubectl get pods -n application -l app=palace
```
Expand All @@ -324,7 +319,7 @@ NAME READY STATUS RESTARTS AGE
palace-7f994f5fdf-9tvmj 1/1 Running 0 6h26m
```

### 查看Service
### 查看 Service

```shell
kubectl get svc -n application -l app=palace
Expand All @@ -337,7 +332,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
palace ClusterIP 10.96.231.48 <none> 8000/TCP,9000/TCP 4d6h
```

### 查看Ingress
### 查看 Ingress

```shell
kubectl get ingress -n application -l app=palace
Expand All @@ -350,7 +345,7 @@ NAME CLASS HOSTS ADDRESS PORTS AGE
palace nginx moon.aide-cloud.cn localhost 80, 443 4d5h
```

### 访问Palace API
### 访问 Palace API

```shell
curl https://moon.aide-cloud.cn/api/health
Expand All @@ -359,18 +354,17 @@ curl https://moon.aide-cloud.cn/api/health
输出如下:

```json
{"healthy":true, "version":"v1.1.28"}
{ "healthy": true, "version": "v1.1.28" }
```


## 部署HouYi
## 部署 HouYi

```shell
kubectl apply -f moon/houyi/
```

### 查看Pod
### 查看 Pod

```shell
kubectl get pods -n application -l app=houyi
```
Expand All @@ -382,7 +376,7 @@ NAME READY STATUS RESTARTS AGE
houyi-6974c75b46-jf2lj 1/1 Running 0 6h33m
```

### 查看Service
### 查看 Service

```shell
kubectl get svc -n application -l app=houyi
Expand All @@ -395,7 +389,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
houyi ClusterIP 10.96.76.5 <none> 8001/TCP,9001/TCP 4d5h
```

### 访问HouYi API
### 访问 HouYi API

> 端口映射 kubectl port-forward service/houyi 8001:8001 -n application
Expand All @@ -406,17 +400,17 @@ curl http://localhost:8001/api/health
输出如下:

```json
{"healthy":true, "version":"v1.1.28"}
{ "healthy": true, "version": "v1.1.28" }
```

## 部署Rabbit
## 部署 Rabbit

```shell
kubectl apply -f moon/rabbit/
```

### 查看Pod
### 查看 Pod

```shell
kubectl get pods -n application -l app=rabbit
```
Expand All @@ -428,7 +422,7 @@ NAME READY STATUS RESTARTS AGE
rabbit-fd4f7dc4c-nxcx5 1/1 Running 0 6h40m
```

### 查看Service
### 查看 Service

```shell
kubectl get svc -n application -l app=rabbit
Expand All @@ -441,7 +435,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
rabbit ClusterIP 10.96.103.66 <none> 8002/TCP,9002/TCP 4d5h
```

### 访问Rabbit API
### 访问 Rabbit API

> 端口映射 kubectl port-forward service/rabbit 8002:8002 -n application
Expand All @@ -452,17 +446,17 @@ curl http://localhost:8002/api/health
输出如下:

```json
{"healthy":true, "version":"v1.1.28"}
{ "healthy": true, "version": "v1.1.28" }
```

## 部署Moon Frontend
## 部署 Moon Frontend

```shell
kubectl apply -f moon/moon-frontend/
```

### 查看Pod
### 查看 Pod

```shell
kubectl get pods -n application -l app=moon-frontend
```
Expand All @@ -474,7 +468,7 @@ NAME READY STATUS RESTARTS AGE
moon-frontend-66b58b56bc-gqmlb 1/1 Running 0 12h
```

### 查看Service
### 查看 Service

```shell
kubectl get svc -n application -l app=moon-frontend
Expand All @@ -487,7 +481,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
moon-frontend ClusterIP 10.96.154.167 <none> 80/TCP 2d22
```

### 查看Ingress
### 查看 Ingress

```shell
kubectl get ingress -n application -l app=moon-frontend
Expand All @@ -500,9 +494,8 @@ NAME CLASS HOSTS ADDRESS PORTS AGE
moon-frontend nginx moon.aide-cloud.cn localhost 80, 443 2d22h
```

### 访问Moon Frontend
### 访问 Moon Frontend

https://moon.aide-cloud.cn



**[创建告警策略并告警](https://aide-family.github.io/blog/new-strategy)**

0 comments on commit afad0ce

Please sign in to comment.