github.com/midokura/kubeedge@v1.2.0-mido.0/build/edge/README_zh.md (about)

     1  ## 使用容器部署kubeedge的边缘节点
     2  
     3  此方式将在容器中运行 edge 端和mqtt broker,所以需要确认 docker engine 监听在
     4  `/var/run/docker.sock`,这个之后需要挂载到容器中。
     5  
     6  + 检查容器运行环境
     7    ```
     8    cd $GOPATH/src/github.com/kubeedge/kubeedge/build/edge
     9    ./run_daemon.sh prepare
    10    ```
    11  
    12  + 设置容器参数
    13  
    14    以下参数如果不用修改则无需设置
    15  
    16    | 参数名称            | 默认值                       | 备注                     |
    17    | ------------------- | ---------------------------- | ------------------------ |
    18    | cloudhub            | 0.0.0.0:10000                |                          |
    19    | edgename            | edge-node                    |                          |
    20    | edgecore_image     | kubeedge/edgecore:latest     |                          |
    21    | arch                | amd64                        | 可选值:amd64 \| arm64v8 \| arm32v7 \| i386 \| s390x |
    22    | qemu_arch           | x86_64                       | 可选值:x86_64 \| aarch64 \| arm \| i386 \| s390x  |
    23    | certpath            | /etc/kubeedge/certs          |                          |
    24    | certfile            | /etc/kubeedge/certs/edge.crt |                          |
    25    | keyfile             | /etc/kubeedge/certs/edge.key |                          |
    26  
    27    ```shell
    28    ./run_daemon.sh set \
    29            cloudhub=0.0.0.0:10000 \
    30            edgename=edge-node \
    31            edgecore_image="kubeedge/edgecore:latest" \
    32            arch=amd64 \
    33            qemu_arch=x86_64 \
    34            certpath=/etc/kubeedge/certs \
    35            certfile=/etc/kubeedge/certs/edge.crt \
    36            keyfile=/etc/kubeedge/certs/edge.key 
    37    ````
    38  
    39  + 编译容器镜像
    40  
    41    ```
    42    ./run_daemon.sh build
    43    ```
    44  
    45  + **(可选)** 如果edge的性能不够,可以在cloud上交叉编译edge的镜像,在edge端加载镜像
    46    - 设置CPU类型
    47  
    48      ```
    49      ./run_daemon.sh set arch=arm64v8 qemu_arch=aarch64
    50      ```
    51  
    52    - 编译镜像
    53      ```
    54      ./run_daemon.sh build
    55      ```
    56  
    57    - 保存镜像
    58      ```
    59      ./run_daemon.sh save
    60      ```
    61  
    62  + 启动容器
    63    ```
    64    ./run_daemon.sh up
    65    ```