Skip to content

Commit

Permalink
Merge pull request spidernet-io#2312 from ty-dc/docs/optimize_doc_format
Browse files Browse the repository at this point in the history
[docs]: optimize doc format for spiderpool
  • Loading branch information
weizhoublue authored Sep 6, 2023
2 parents e8a8b15 + 05d1d2b commit ce6ee0e
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 44 deletions.
32 changes: 16 additions & 16 deletions docs/usage/install/underlay/get-started-ovs-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ Ovs-cni 不会配置网桥,由用户创建它们,并将它们连接到 L2、
~# ip route add default via <默认网关IP> dev br1
```

创建后,可以在每个节点上查看到如下的网桥信息:
3. 创建后,可以在每个节点上查看到如下的网桥信息:

```bash
~# ovs-vsctl show
ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
Bridge br1
Port eth0
Interface eth0
Port br1
Interface br1
type: internal
Port veth97fb4795
Interface veth97fb4795
ovs_version: "2.17.3"
```
```bash
~# ovs-vsctl show
ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
Bridge br1
Port eth0
Interface eth0
Port br1
Interface br1
type: internal
Port veth97fb4795
Interface veth97fb4795
ovs_version: "2.17.3"
```

## 安装 Spiderpool

Expand Down Expand Up @@ -122,7 +122,7 @@ ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
4. Spiderpool 为简化书写 JSON 格式的 Multus CNI 配置,它提供了 SpiderMultusConfig CR 来自动管理 Multus NetworkAttachmentDefinition CR。如下是创建 Ovs SpiderMultusConfig 配置的示例:
* 确认 ovs-cni 所需的网桥名称,本例子以 br1 为例:
* 确认 ovs-cni 所需的网桥名称,本例子以 br1 为例:
```shell
BRIDGE_NAME="br1"
Expand All @@ -136,7 +136,7 @@ ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
cniType: ovs
ovs:
bridge: "${BRIDGE_NAME}"
EOF
EOF
```
## 创建应用
Expand Down
32 changes: 16 additions & 16 deletions docs/usage/install/underlay/get-started-ovs.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,21 @@ Note: Ovs-cni does not configure bridges, it is up to the user to create them an
~# ip route add default via <默认网关IP> dev br1
```

Once created, the following bridge information can be viewed on each node:
3. Once created, the following bridge information can be viewed on each node:

```bash
~# ovs-vsctl show
ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
Bridge br1
Port eth0
Interface eth0
Port br1
Interface br1
type: internal
Port veth97fb4795
Interface veth97fb4795
ovs_version: "2.17.3"
```
```bash
~# ovs-vsctl show
ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
Bridge br1
Port eth0
Interface eth0
Port br1
Interface br1
type: internal
Port veth97fb4795
Interface veth97fb4795
ovs_version: "2.17.3"
```

## Install Spiderpool

Expand Down Expand Up @@ -124,7 +124,7 @@ ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
4. To simplify writing Multus CNI configuration in JSON format, Spiderpool provides SpiderMultusConfig CR to automatically manage Multus NetworkAttachmentDefinition CR. Here is an example of creating an ovs-cni SpiderMultusConfig configuration:
* Confirm the required host bridge for ovs-cni, for example based on the command `ovs-vsctl show`, this example takes the host bridge: `br1` as an example.
* Confirm the required host bridge for ovs-cni, for example based on the command `ovs-vsctl show`, this example takes the host bridge: `br1` as an example.
```shell
BRIDGE_NAME="br1"
Expand All @@ -138,7 +138,7 @@ ec16d9e1-6187-4b21-9c2f-8b6cb75434b9
cniType: ovs
ovs:
bridge: "${BRIDGE_NAME}"
EOF
EOF
```
## Create applications
Expand Down
12 changes: 6 additions & 6 deletions docs/usage/install/underlay/get-started-sriov-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Spiderpool 可用作 underlay 网络场景下提供固定 IP 的一种解决方
~# lspci -s 0000:04:00.0 -v |grep SR-IOV
Capabilities: [180] Single Root I/O Virtualization (SR-IOV)
```

### 安装 Sriov-network-operator

Sriov-network-operator 可以帮助我们自动安装、配置 sriov-cni 和 sriov-device-plugin。
Expand All @@ -40,9 +40,9 @@ Sriov-network-operator 可以帮助我们自动安装、配置 sriov-cni 和 sri
git clone https://github.com/k8snetworkplumbingwg/sriov-network-operator.git && cd sriov-network-operator/deployment
helm install -n sriov-network-operator --create-namespace --set operator.resourcePrefix=spidernet.io --wait sriov-network-operator ./
```

> 必须给 sriov 工作节点打上 label: 'node-role.kubernetes.io/worker=""',sriov-operator 相关组件才会就绪。
>
>
> sriov-network-operator 默认安装在 sriov-network-operator 命名空间下

2. 配置 sriov-network-operator
Expand Down Expand Up @@ -78,7 +78,7 @@ Sriov-network-operator 可以帮助我们自动安装、配置 sriov-cni 和 sri
vendor: 15b3
syncStatus: Succeeded
```

从上面可知,节点 `node-1` 上的接口 `enp4s0f0np0``enp4s0f1np1` 都具有 SR-IOV 功能,并且支持的最大 VF 数量为 8。 下面我们将通过创建 SriovNetworkNodePolicy CRs 来配置 VFs,并且安装 sriov-device-plugin :

```shell
Expand All @@ -99,7 +99,7 @@ Sriov-network-operator 可以帮助我们自动安装、配置 sriov-cni 和 sri
resourceName: sriov_netdevice
EOF
```
> 下发后, 因为需要配置节点启用 SR-IOV 功能,可能会重启节点。如有需要,指定工作节点而非 Master 节点。
> resourceName 不能为特殊字符,支持的字符: [0-9],[a-zA-Z] 和 "_"
Expand Down Expand Up @@ -194,7 +194,7 @@ Sriov-network-operator 可以帮助我们自动安装、配置 sriov-cni 和 sri
resourceName: spidernet.io/sriov_netdevice
EOF
```
> 注意: SpiderIPPool.Spec.multusName: `kube-system/sriov-test` 要和创建的 SpiderMultusConfig 实例的 Name 和 Namespace 相匹配
> resourceName: spidernet.io/sriov_netdevice 由安装 sriov-operator 指定的 resourcePrefix: spidernet.io 和创建 SriovNetworkNodePolicy CR 时指定的 resourceName: sriov_netdevice 拼接而成
Expand Down
12 changes: 6 additions & 6 deletions docs/usage/install/underlay/get-started-sriov.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ SriovNetwork helps us install sriov-cni and sriov-device-plugin components, maki
git clone https://github.com/k8snetworkplumbingwg/sriov-network-operator.git && cd sriov-network-operator/deployment
helm install -n sriov-network-operator --create-namespace --set operator.resourcePrefix=spidernet.io --wait sriov-network-operator ./
```

> You may need to label SR-IOV worker nodes using node-role.kubernetes.io/worker="" label, if not already.
>
>
> By default, SR-IOV Operator will be deployed in namespace 'openshift-sriov-network-operator'.
>
>
> After installation, the node may reboot automatically. If necessary, install sriov-network-operator to the designated worker nodes.

2. Configure sriov-network-operator

Firstly, check the status of SriovNetworkNodeState CRs to confirm that sriov-network-operator has found a network card on the node that supports the SR-IOV feature.
Firstly, check the status of SriovNetworkNodeState CRs to confirm that sriov-network-operator has found a network card on the node that supports the SR-IOV feature.

```shell
$ kubectl get sriovnetworknodestates.sriovnetwork.openshift.io -n sriov-network-operator node-1 -o yaml
Expand Down Expand Up @@ -81,7 +81,7 @@ SriovNetwork helps us install sriov-cni and sriov-device-plugin components, maki
syncStatus: Succeeded
```

As can be seen from the above, interfaces 'enp4s0f0np0' and 'enp4s0f1np1' on node 'node-1' both have SR-IOV capability and support a maximum number of VFs of 8. Below we will configure the VFs by creating SriovNetworkNodePolicy CRs and install sriov-device-plugin:
As can be seen from the above, interfaces 'enp4s0f0np0' and 'enp4s0f1np1' on node 'node-1' both have SR-IOV capability and support a maximum number of VFs of 8. Below we will configure the VFs by creating SriovNetworkNodePolicy CRs and install sriov-device-plugin:

```shell
$ cat << EOF | kubectl apply -f -
Expand Down
2 changes: 2 additions & 0 deletions docs/usage/spider-subnet.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# SpiderSubnet

**English**[**简体中文**](./spider-subnet-zh_CN.md)

The Spiderpool owns a CRD SpiderSubnet, which can help applications (such as Deployment, ReplicaSet, StatefulSet, Job, CronJob, DaemonSet) to create a corresponding SpiderIPPool.

Here are some annotations that you should write down on the application template Pod annotation:
Expand Down

0 comments on commit ce6ee0e

Please sign in to comment.