Skip to content

Commit

Permalink
opt quick start doc (#776)
Browse files Browse the repository at this point in the history
* opt quick start doc

* fix lint

* Update site/content/en/docs/getting-started/quick_start.md

Co-authored-by: 罗泽轩 <[email protected]>

* Update site/content/en/docs/getting-started/quick_start.md

Co-authored-by: 罗泽轩 <[email protected]>

---------

Co-authored-by: 罗泽轩 <[email protected]>
  • Loading branch information
alpha-baby and spacewander authored Oct 21, 2024
1 parent d651fdf commit f4b50ca
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 17 deletions.
8 changes: 4 additions & 4 deletions controller/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,10 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
mosn.io/htnn/api v0.4.0 h1:LAvDpTQlBQWX+O/hpYex5wcZeem5AZVD8ceAywUPG/Y=
mosn.io/htnn/api v0.4.0/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/types v0.4.0 h1:HM/Oc0UTr18X9nbu2bY3+KJ7otY4OYMo6uMnTZOqo/0=
mosn.io/htnn/types v0.4.0/go.mod h1:YOL3isYyKslxC4h5JDwaWt6E504Q9gKITfJP3NMm7ls=
mosn.io/htnn/api v0.4.1 h1:8WJWk4u384wwDN8C49AKyqAZmp4isxhnnbiF9y9SJgs=
mosn.io/htnn/api v0.4.1/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/types v0.4.1 h1:16UWyECDM7cIi4rBlBSYAtud/HSN4WYVPmL3fNYqmFc=
mosn.io/htnn/types v0.4.1/go.mod h1:MOXUQ/TfUrrgrPsfrXapyxwJ3nonhVeXRiXKgqU7a6s=
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs=
Expand Down
2 changes: 1 addition & 1 deletion e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ require (
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
mosn.io/htnn/api v0.4.0 // indirect
mosn.io/htnn/api v0.4.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
12 changes: 6 additions & 6 deletions e2e/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
mosn.io/htnn/api v0.4.0 h1:LAvDpTQlBQWX+O/hpYex5wcZeem5AZVD8ceAywUPG/Y=
mosn.io/htnn/api v0.4.0/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/controller v0.4.0 h1:XlVAgrhiIciWD+E4gTxexE6tMBrJp5y5Bd5oTbq4ThI=
mosn.io/htnn/controller v0.4.0/go.mod h1:U5LwSarrwoYl6gN8LmXs3ogUpGFfdO32dcfV+Quoy9A=
mosn.io/htnn/types v0.4.0 h1:HM/Oc0UTr18X9nbu2bY3+KJ7otY4OYMo6uMnTZOqo/0=
mosn.io/htnn/types v0.4.0/go.mod h1:YOL3isYyKslxC4h5JDwaWt6E504Q9gKITfJP3NMm7ls=
mosn.io/htnn/api v0.4.1 h1:8WJWk4u384wwDN8C49AKyqAZmp4isxhnnbiF9y9SJgs=
mosn.io/htnn/api v0.4.1/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/controller v0.4.1 h1:WN5j4VVxOUG9PBUhCpIX3SJuRLSKnEKpDvt/WF29YjQ=
mosn.io/htnn/controller v0.4.1/go.mod h1:4za5ACW1PZJw+Ovhkzx2tBQbTqxUKi7HVgnz4imIyhk=
mosn.io/htnn/types v0.4.1 h1:16UWyECDM7cIi4rBlBSYAtud/HSN4WYVPmL3fNYqmFc=
mosn.io/htnn/types v0.4.1/go.mod h1:MOXUQ/TfUrrgrPsfrXapyxwJ3nonhVeXRiXKgqU7a6s=
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs=
Expand Down
8 changes: 4 additions & 4 deletions plugins/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
mosn.io/htnn/api v0.4.0 h1:LAvDpTQlBQWX+O/hpYex5wcZeem5AZVD8ceAywUPG/Y=
mosn.io/htnn/api v0.4.0/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/types v0.4.0 h1:HM/Oc0UTr18X9nbu2bY3+KJ7otY4OYMo6uMnTZOqo/0=
mosn.io/htnn/types v0.4.0/go.mod h1:YOL3isYyKslxC4h5JDwaWt6E504Q9gKITfJP3NMm7ls=
mosn.io/htnn/api v0.4.1 h1:8WJWk4u384wwDN8C49AKyqAZmp4isxhnnbiF9y9SJgs=
mosn.io/htnn/api v0.4.1/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/types v0.4.1 h1:16UWyECDM7cIi4rBlBSYAtud/HSN4WYVPmL3fNYqmFc=
mosn.io/htnn/types v0.4.1/go.mod h1:MOXUQ/TfUrrgrPsfrXapyxwJ3nonhVeXRiXKgqU7a6s=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
77 changes: 77 additions & 0 deletions site/content/en/docs/getting-started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,44 @@ REVISION: 1
TEST SUITE: None
```

Check the installed components:

```shell
$ helm status htnn-controller -n istio-system ─╯
NAME: htnn-controller
LAST DEPLOYED: Tue Oct 8 20:13:59 2024
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To learn more about the release, try:
$ helm status htnn-controller -n istio-system
$ helm get all htnn-controller -n istio-system
```

Check the installed components by this command `helm get all htnn-controller -n istio-system`

**Note**: we will install many resources in this step, please make sure you are in a clean k8s cluster or there will be no resource conflict. Here we will pull the `ghcr.io/mosn/htnn-controller` image, if there is a network problem, you need to configure the network proxy or manually download this image.

```shell
$ kubectl get all -n istio-system ─╯
NAME READY STATUS RESTARTS AGE
pod/istiod-586df46dcb-t25s2 1/1 Running 0 14h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/istiod ClusterIP 10.96.76.196 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 14h

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/istiod 1/1 1 1 14h

NAME DESIRED CURRENT READY AGE
replicaset.apps/istiod-586df46dcb 1 1 1 14h

NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/istiod Deployment/istiod <unknown>/80% 1 5 1 14h
```

3. Install the data plane component:

```shell
Expand All @@ -49,6 +87,45 @@ TEST SUITE: None

Here we have not used the `--wait` parameter, instead, we used the `kubectl wait` command to wait for the `istio-ingressgateway` deployment to complete. Because `kind` does not support LoadBalancer type of Service by default, the ExternalIP for Service `istio-ingressgateway` will remain in `Pending` status. This does not affect our hands-on experience. If you're interested in this, refer to the [kind official documentation](https://kind.sigs.k8s.io/docs/user/loadbalancer/) and consider installing metallb.

Check the installed components:

```shell
$ helm status htnn-gateway -n istio-system ─╯
NAME: htnn-gateway
LAST DEPLOYED: Tue Oct 8 17:02:12 2024
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To learn more about the release, try:
$ helm status htnn-gateway -n istio-system
$ helm get all htnn-gateway -n istio-system
```

```shell
$ kubectl get all -n istio-system ─╯
NAME READY STATUS RESTARTS AGE
pod/istio-ingressgateway-67d7cd6587-qv9vv 1/1 Running 0 14m
pod/istiod-586df46dcb-t25s2 1/1 Running 0 16h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/istio-ingressgateway LoadBalancer 10.96.96.229 <pending> 15021:30251/TCP,80:31122/TCP,443:30790/TCP 21m
service/istiod ClusterIP 10.96.76.196 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 16h

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/istio-ingressgateway 1/1 1 1 21m
deployment.apps/istiod 1/1 1 1 16h

NAME DESIRED CURRENT READY AGE
replicaset.apps/istio-ingressgateway-67d7cd6587 1 1 1 21m
replicaset.apps/istiod-586df46dcb 1 1 1 16h

NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/istio-ingressgateway Deployment/istio-ingressgateway <unknown>/80% 1 5 1 21m
horizontalpodautoscaler.autoscaling/istiod Deployment/istiod <unknown>/80% 1 5 1 16h
```

## Configuring Routes

After installing HTNN, let's experience its features.
Expand Down
77 changes: 77 additions & 0 deletions site/content/zh-hans/docs/getting-started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,44 @@ REVISION: 1
TEST SUITE: None
```

查看安装的组件:

```shell
$ helm status htnn-controller -n istio-system ─╯
NAME: htnn-controller
LAST DEPLOYED: Tue Oct 8 20:13:59 2024
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To learn more about the release, try:
$ helm status htnn-controller -n istio-system
$ helm get all htnn-controller -n istio-system
```

还可以通过该命令查看安装了哪些 k8s 资源 `helm get all htnn-controller -n istio-system`

**注意**: 这里会部署很多资源,请确保你是一个干净 k8s 集群或者不会产生资源冲突。这里会拉取 `m.daocloud.io/ghcr.io/mosn/htnn-controller` 镜像,有可能会存在网络问题导致拉取失败,有必要请自行配置网络代理或者手动下载该镜像。

```shell
$ kubectl get all -n istio-system ─╯
NAME READY STATUS RESTARTS AGE
pod/istiod-586df46dcb-t25s2 1/1 Running 0 14h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/istiod ClusterIP 10.96.76.196 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 14h

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/istiod 1/1 1 1 14h

NAME DESIRED CURRENT READY AGE
replicaset.apps/istiod-586df46dcb 1 1 1 14h

NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/istiod Deployment/istiod <unknown>/80% 1 5 1 14h
```

3. 安装数据面组件:

```shell
Expand All @@ -53,6 +91,45 @@ TEST SUITE: None

这里我们没有使用 `--wait` 参数,而是使用 `kubectl wait` 命令等待 `istio-ingressgateway` 部署完成。因为 `kind` 默认不支持 LoadBalancer 类型的 Service,所以 Service `istio-ingressgateway` 的 ExternalIP 会一直处于 `Pending` 状态。这不影响我们的上手体验。如果你对此感兴趣,可以参考 [kind 官方文档](https://kind.sigs.k8s.io/docs/user/loadbalancer/) 以及安装 metallb。

查看安装的组件:

```shell
$ helm status htnn-gateway -n istio-system ─╯
NAME: htnn-gateway
LAST DEPLOYED: Tue Oct 8 17:02:12 2024
NAMESPACE: istio-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
To learn more about the release, try:
$ helm status htnn-gateway -n istio-system
$ helm get all htnn-gateway -n istio-system
```

```shell
$ kubectl get all -n istio-system ─╯
NAME READY STATUS RESTARTS AGE
pod/istio-ingressgateway-67d7cd6587-qv9vv 1/1 Running 0 14m
pod/istiod-586df46dcb-t25s2 1/1 Running 0 16h

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/istio-ingressgateway LoadBalancer 10.96.96.229 <pending> 15021:30251/TCP,80:31122/TCP,443:30790/TCP 21m
service/istiod ClusterIP 10.96.76.196 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 16h

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/istio-ingressgateway 1/1 1 1 21m
deployment.apps/istiod 1/1 1 1 16h

NAME DESIRED CURRENT READY AGE
replicaset.apps/istio-ingressgateway-67d7cd6587 1 1 1 21m
replicaset.apps/istiod-586df46dcb 1 1 1 16h

NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/istio-ingressgateway Deployment/istio-ingressgateway <unknown>/80% 1 5 1 21m
horizontalpodautoscaler.autoscaling/istiod Deployment/istiod <unknown>/80% 1 5 1 16h
```

## 配置路由

安装完 HTNN 后,让我们体验下它的功能。
Expand Down
4 changes: 2 additions & 2 deletions types/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
mosn.io/htnn/api v0.4.0 h1:LAvDpTQlBQWX+O/hpYex5wcZeem5AZVD8ceAywUPG/Y=
mosn.io/htnn/api v0.4.0/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
mosn.io/htnn/api v0.4.1 h1:8WJWk4u384wwDN8C49AKyqAZmp4isxhnnbiF9y9SJgs=
mosn.io/htnn/api v0.4.1/go.mod h1:LuQVGTOQos5tOLl7c+z4ukFO1eOfm/Q3GNQ+8OnlIhE=
sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
sigs.k8s.io/gateway-api v1.0.0 h1:iPTStSv41+d9p0xFydll6d7f7MOBGuqXM6p2/zVYMAs=
Expand Down

0 comments on commit f4b50ca

Please sign in to comment.