Skip to content

Commit

Permalink
Merge pull request #282 from RyanZhaoXB/master-dev
Browse files Browse the repository at this point in the history
fix some errors of the document
  • Loading branch information
kubeedge-bot authored Jan 3, 2023
2 parents 0770a0a + 4d180cd commit 8b1d6d7
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 44 deletions.
4 changes: 2 additions & 2 deletions content/en/docs/architecture/cloud/edge_controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following are the functions performed by Edge controller:
- Creates Respective manager (pod, configmap, secret) for handling events by calling manager interface
- Locates configmap and secret should be send to which node

![Downstream Controller](/static/img/edgecontroller/DownstreamController.png)
![Downstream Controller](/img/edgecontroller/DownstreamController.png)
## Upstream Controller:
### Sync watch and update status of resource and events

Expand All @@ -52,7 +52,7 @@ The following are the functions performed by Edge controller:
   - **PodIp**: IP address allocated to the Pod
   - **QosClass**: Assigned to the pod based on resource requirement

   ![Upstream Controller](/static/img/edgecontroller/UpstreamController.png)
   ![Upstream Controller](/img/edgecontroller/UpstreamController.png)

## Controller Manager:
### Creates manager interface and implements ConfigmapManager, LocationCache and podManager
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/architecture/edge/edged.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type: docs

EdgeD is an edge node module which manages pod lifecycle. It helps users to deploy containerized workloads or applications at the edge node. Those workloads could perform any operation from simple telemetry data manipulation to analytics or ML inference and so on. Using `kubectl` command line interface at the cloud side, users can issue commands to launch the workloads.

Several OCI-compliant runtimes are supported through the Container Runtime Interface (CRI). See [KubeEdge runtime configuration](../../../feature/cri) for more information on how to configure edged to make use of other runtimes.
Several OCI-compliant runtimes are supported through the Container Runtime Interface (CRI). See [KubeEdge runtime configuration](../../../advanced/cri) for more information on how to configure edged to make use of other runtimes.

There are many modules which work in tandem to achieve edged's functionalities.

Expand Down Expand Up @@ -54,7 +54,7 @@ This module helps in monitoring pod status for edged. Every second, using probes

## CRI for edged

Container Runtime Interface (CRI) – a plugin interface which enables edged to use a wide variety of container runtimes like Docker, containerd, CRI-O, etc., without the need to recompile. For more on how to configure KubeEdge for container runtimes, see [KubeEdge runtime configuration](../../../feature/cri).
Container Runtime Interface (CRI) – a plugin interface which enables edged to use a wide variety of container runtimes like Docker, containerd, CRI-O, etc., without the need to recompile. For more on how to configure KubeEdge for container runtimes, see [KubeEdge runtime configuration](../../../advanced/cri).

#### Why CRI for edged?
CRI support for multiple container runtimes in edged is needed in order to:
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/community/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The goal of the community is to develop a cloud native edge computing platform b

## Preparation

- Choose matched [golang](https://golang.org/dl) version and install:
- Choose matched [golang](https://go.dev/dl/) version and install:

| | Golang 1.11 | Golang 1.12 | Golang 1.13 | Golang 1.14 |
|-------------------------|-----------------|-----------------|-----------------|-----------------|
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/developer/device_crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ spec:

Mapper design details can be found [here](https://github.com/kubeedge/kubeedge/tree/master/docs/proposals/mapper-design.md#mapper-design)

An example of a mapper application created to support bluetooth protocol can be found [here](https://github.com/kubeedge/kubeedge/tree/master/mappers/bluetooth_mapper#bluetooth-mapper)
An example of a mapper application created to support bluetooth protocol can be found [here](https://github.com/kubeedge/mappers-go/tree/main/mappers/ble)


## Usage of Device CRD
Expand Down
3 changes: 3 additions & 0 deletions content/en/docs/developer/mappers/modbus.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,23 @@ The modbus mapper consists of the following four major modules :-
### Modbus Manager
Modbus Manager is a component which can perform an read or write action on modbus device. The following are the main responsibilities of this component:
a) When controller receives message of expected devicetwin value, Modbus Manager will connect to the device and change the registers to make actual state equal to expected.
b) When controller checks all the properties of devices, Modbus Manager will connect to the device and read the actual value in registers according to the dpl configuration.
### Devicetwin Manager
Devicetwin Manager is a component which can transfer the edge devicetwin message. The following are the main responsibilities of this component:
a) To receive the edge devicetwin message from edge mqtt broker and parse message.
b) To report the actual value of device properties in devicetwin format to the cloud.
### File Watcher
File Watcher is a component which can load dpl and mqtt configuration from configuration files.The following are the main responsibilities of this component:
a) To monitor the dpl configuration file. If this file changed, file watcher will reload the dpl configuration to the mapper.
b) To load dpl and mqtt configuration when mapper starts first time.
4 changes: 2 additions & 2 deletions content/en/docs/developer/test/unit_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ The purpose of this document is to give introduction about unit tests and to hel
## Unit Test

Read this [article](https://softwaretestingfundamentals.com/unit-testing/) for a simple introduction about unit tests and benefits of unit testing. Go has its own built-in package called testing and command called ```go test```.
For more detailed information on golang's builtin testing package read this [document](https://golang.org/pkg/testing/).
For more detailed information on golang's builtin testing package read this [document](https://pkg.go.dev/testing/).

## Mocks

The object which needs to be tested may have dependencies on other objects. To confine the behavior of the object under test, replacement of the other objects by mocks that simulate the behavior of the real objects is necessary.
Read this [article](https://medium.com/@piraveenaparalogarajah/what-is-mocking-in-testing-d4b0f2dbe20a) for more information on mocks.

GoMock is a mocking framework for Go programming language.
Read [godoc](https://godoc.org/github.com/golang/mock/gomock) for more information about gomock.
Read [godoc](https://pkg.go.dev/github.com/golang/mock/gomock) for more information about gomock.

Mock for an interface can be automatically generated using [GoMocks](https://github.com/golang/mock) mockgen package.

Expand Down
18 changes: 9 additions & 9 deletions content/en/docs/developer/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ This page contains a few commonly occurring questions.

## keadm init failed to download release

If you have issue about connection to github, please follow below guide with proxy before do setup, take `v1.4.0` as example:
If you have issue about connection to github, please follow below guide with proxy before do setup, take `v1.12.1` as example:

- download release pkgs from [release page](https://github.com/kubeedge/kubeedge/releases/tag/v1.4.0)
- download release pkgs from [release page](https://github.com/kubeedge/kubeedge/releases/tag/v1.12.1)
- download crds yamls matches the release version you downloaded, links as below:
- [devices_v1alpha1_device.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.4.0/build/crds/devices/devices_v1alpha2_device.yaml)
- [devices_v1alpha1_devicemodel.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.4.0/build/crds/devices/devices_v1alpha2_devicemodel.yaml)
- [cluster_objectsync_v1alpha1.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.4.0/build/crds/reliablesyncs/cluster_objectsync_v1alpha1.yaml)
- [objectsync_v1alpha1.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.4.0/build/crds/reliablesyncs/objectsync_v1alpha1.yaml)
- [devices_v1alpha1_device.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.12.1/build/crds/devices/devices_v1alpha2_device.yaml)
- [devices_v1alpha1_devicemodel.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.12.1/build/crds/devices/devices_v1alpha2_devicemodel.yaml)
- [cluster_objectsync_v1alpha1.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.12.1/build/crds/reliablesyncs/cluster_objectsync_v1alpha1.yaml)
- [objectsync_v1alpha1.yaml](https://raw.githubusercontent.com/kubeedge/kubeedge/v1.12.1/build/crds/reliablesyncs/objectsync_v1alpha1.yaml)
- put them under `/etc/kubeedge` as below:
```bash
$ tree -L 3
Expand All @@ -34,13 +34,13 @@ If you have issue about connection to github, please follow below guide with pro
│   └── reliablesyncs
│   ├── cluster_objectsync_v1alpha1.yaml
│   └── objectsync_v1alpha1.yaml
└── kubeedge-v1.4.0-linux-amd64.tar.gz
└── kubeedge-v1.12.1-linux-amd64.tar.gz

3 directories, 5 files

```

Then you can do setup without any network issue, `keadm` would detect them and not download again(make sure you specify `v1.4.0` with option `--kubeedge-version 1.4.0`).
Then you can do setup without any network issue, `keadm` would detect them and not download again(make sure you specify `v1.12.1` with option `--kubeedge-version v1.12.1`).

## Container keeps pending/ terminating

Expand All @@ -50,7 +50,7 @@ Then you can do setup without any network issue, `keadm` would detect them and n
4. Check the architecture of the node running `edgecore` and make sure that container image you are trying to run is of the same architecture.
For example, if you are running `edgecore` on Raspberry Pi 4, which is of `arm64v8` architecture, the nginx image to be executed would be `arm64v8/nginx` from the docker hub.

5. Also, check that the `podSandboxImage` is correctly set as defined in [Modification in edgecore.yaml](../../configuration/kubeedge#modification-in-edgecore-yaml).
5. Also, check that the `podSandboxImage` is correctly set as defined in [Modification in edgecore.yaml](../../setup/config#modification-in-edgecore-yaml).

6. If all of the above is correctly set, login manually to your edge node and run your docker image manually by

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/setup/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Verify the configurations before running `edgecore`
runtimeType: remote
```

5. If your runtime-type is remote, follow this guide [KubeEdge CRI Configuration](../../feature/cri) to setup KubeEdge with the remote/CRI based runtimes.
5. If your runtime-type is remote, follow this guide [KubeEdge CRI Configuration](../../advanced/cri) to setup KubeEdge with the remote/CRI based runtimes.



Expand Down
11 changes: 3 additions & 8 deletions content/en/docs/setup/keadm.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,9 @@ replicaset.apps/cloudcore-56b8454784 1 1 1 46s
```

**IMPORTANT NOTE:**
1. Set flags `--set key=value` for cloudcore helm chart could refer to [KubeEdge Cloudcore Helm Charts README.md](https://github.com/kubeedge/kubeedge/blob/master/manifests/charts/cloudcore/README.md).

2. You can start with one of Keadm’s built-in configuration profiles and then further customize the configuration
for your specific needs. Currently, the built-in configuration profile keyword is `version`. Refer to [version.yaml](https://github.com/kubeedge/kubeedge/blob/master/manifests/profiles/version.yaml) as `values.yaml`,
you can make your custom values file here, and add flags like `--profile version=v1.9.0 --set key=value` to use this profile.

`--external-helm-root` flag provides a feature function to install the external helm charts like edgemesh.

1. Set flags `--set key=value` for cloudcore helm chart could refer to [KubeEdge Cloudcore Helm Charts README.md](https://github.com/kubeedge/kubeedge/blob/master/manifests/charts/cloudcore/README.md).
2. You can start with one of Keadm’s built-in configuration profiles and then further customize the configuration for your specific needs. Currently, the built-in configuration profile keyword is `version`. Refer to [version.yaml](https://github.com/kubeedge/kubeedge/blob/master/manifests/profiles/version.yaml) as `values.yaml`, you can make your custom values file here, and add flags like `--profile version=v1.9.0 --set key=value` to use this profile. `--external-helm-root` flag provides a feature function to install the external helm charts like edgemesh.
3. `keadm init` deploy cloudcore in container mode, if you want to deploy cloudcore as binary, please ref [`keadm deprecated init`](#keadm-deprecated-init) below.

Example:
Expand Down Expand Up @@ -164,7 +159,7 @@ Run `keadm gettoken` in **cloud side** will return the token, which will be used
### Join Edge Node

#### keadm join
`keadm join` will install edgecore. It also provides a flag by which a specific version can be set. It will pull image `kubeedge/installation-package` from dockerhub and copy binary `edgecore` from container to hostpath, and then start `edgecore` as a system service.
`keadm join` will install edgecore. It also provides a flag by which a specific version can be set. It will pull image [kubeedge/installation-package](https://hub.docker.com/r/kubeedge/cloudcore) from dockerhub and copy binary `edgecore` from container to hostpath, and then start `edgecore` as a system service.

Example:

Expand Down
4 changes: 2 additions & 2 deletions content/zh/docs/architecture/edge/edged.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type: docs

EdgeD is an edge node module which manages pod lifecycle. It helps users to deploy containerized workloads or applications at the edge node. Those workloads could perform any operation from simple telemetry data manipulation to analytics or ML inference and so on. Using `kubectl` command line interface at the cloud side, users can issue commands to launch the workloads.

Several OCI-compliant runtimes are supported through the Container Runtime Interface (CRI). See [KubeEdge runtime configuration](../../../feature/cri) for more information on how to configure edged to make use of other runtimes.
Several OCI-compliant runtimes are supported through the Container Runtime Interface (CRI). See [KubeEdge runtime configuration](../../../advanced/cri) for more information on how to configure edged to make use of other runtimes.

There are many modules which work in tandem to achieve edged's functionalities.

Expand Down Expand Up @@ -54,7 +54,7 @@ This module helps in monitoring pod status for edged. Every second, using probes

## CRI for edged

Container Runtime Interface (CRI) – a plugin interface which enables edged to use a wide variety of container runtimes like Docker, containerd, CRI-O, etc., without the need to recompile. For more on how to configure KubeEdge for container runtimes, see [KubeEdge runtime configuration](../../../feature/cri).
Container Runtime Interface (CRI) – a plugin interface which enables edged to use a wide variety of container runtimes like Docker, containerd, CRI-O, etc., without the need to recompile. For more on how to configure KubeEdge for container runtimes, see [KubeEdge runtime configuration](../../../advanced/cri).

#### Why CRI for edged?
CRI support for multiple container runtimes in edged is needed in order to:
Expand Down
2 changes: 1 addition & 1 deletion content/zh/docs/community/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The goal of the community is to develop a cloud native edge computing platform b

## Preparation

- Choose matched [golang](https://golang.org/dl) version and install:
- Choose matched [golang](https://go.dev/dl/) version and install:

| | Golang 1.11 | Golang 1.12 | Golang 1.13 | Golang 1.14 |
|-------------------------|-----------------|-----------------|-----------------|-----------------|
Expand Down
2 changes: 1 addition & 1 deletion content/zh/docs/developer/device_crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ spec:

Mapper design details can be found [here](https://github.com/kubeedge/kubeedge/tree/master/docs/proposals/mapper-design.md#mapper-design)

An example of a mapper application created to support bluetooth protocol can be found [here](https://github.com/kubeedge/kubeedge/tree/master/mappers/bluetooth_mapper#bluetooth-mapper)
An example of a mapper application created to support bluetooth protocol can be found [here](https://github.com/kubeedge/mappers-go/tree/main/mappers/ble)


## Usage of Device CRD
Expand Down
3 changes: 3 additions & 0 deletions content/zh/docs/developer/mappers/modbus.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,23 @@ The modbus mapper consists of the following four major modules :-
### Modbus Manager
Modbus Manager is a component which can perform an read or write action on modbus device. The following are the main responsibilities of this component:
a) When controller receives message of expected devicetwin value, Modbus Manager will connect to the device and change the registers to make actual state equal to expected.
b) When controller checks all the properties of devices, Modbus Manager will connect to the device and read the actual value in registers according to the dpl configuration.
### Devicetwin Manager
Devicetwin Manager is a component which can transfer the edge devicetwin message. The following are the main responsibilities of this component:
a) To receive the edge devicetwin message from edge mqtt broker and parse message.
b) To report the actual value of device properties in devicetwin format to the cloud.
### File Watcher
File Watcher is a component which can load dpl and mqtt configuration from configuration files.The following are the main responsibilities of this component:
a) To monitor the dpl configuration file. If this file changed, file watcher will reload the dpl configuration to the mapper.
b) To load dpl and mqtt configuration when mapper starts first time.
4 changes: 2 additions & 2 deletions content/zh/docs/developer/test/unit_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ The purpose of this document is to give introduction about unit tests and to hel
## Unit Test

Read this [article](https://softwaretestingfundamentals.com/unit-testing/) for a simple introduction about unit tests and benefits of unit testing. Go has its own built-in package called testing and command called ```go test```.
For more detailed information on golang's builtin testing package read this [document](https://golang.org/pkg/testing/).
For more detailed information on golang's builtin testing package read this [document](https://pkg.go.dev/testing/).

## Mocks

The object which needs to be tested may have dependencies on other objects. To confine the behavior of the object under test, replacement of the other objects by mocks that simulate the behavior of the real objects is necessary.
Read this [article](https://medium.com/@piraveenaparalogarajah/what-is-mocking-in-testing-d4b0f2dbe20a) for more information on mocks.

GoMock is a mocking framework for Go programming language.
Read [godoc](https://godoc.org/github.com/golang/mock/gomock) for more information about gomock.
Read [godoc](https://pkg.go.dev/github.com/golang/mock/gomock) for more information about gomock.

Mock for an interface can be automatically generated using [GoMocks](https://github.com/golang/mock) mockgen package.

Expand Down
Loading

0 comments on commit 8b1d6d7

Please sign in to comment.