A kind of Kubeedge edge computing framework offline automation deployment method

By employing an offline automated deployment method, the deployment process of Kubeedge is simplified, the issues of deployment complexity and network dependency are resolved, and rapid deployment and efficient scaling are achieved in network-constrained environments.

CN116185432BActive Publication Date: 2026-06-26CHENGDU UNIV OF INFORMATION TECH +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHENGDU UNIV OF INFORMATION TECH
Filing Date
2022-09-28
Publication Date
2026-06-26

Smart Images

  • Figure CN116185432B_ABST
    Figure CN116185432B_ABST
Patent Text Reader

Abstract

The application provides a kind of Kubeedge edge computing framework offline automation deployment method, comprising: step S1, download framework dependent package, specifically: respectively download the Linux system basic dependent package and Kubeedge cluster dependent package corresponding to the version of cloud server and edge device;Step S2, script;Step S3, edge automatic joining command generation program is written;Step S4, automatic deployment file is packed;Step S5, Kubeedge cloud automatic installation;Step S6, Kubeedge edge automatic joining.The application solves the problem that Kubeedge deployment process is complex and prone to errors during deployment, and the installation of Kubeedge cloud and the joining of edge can be completed by simple operation, without repeated operation each time the edge joins, which greatly reduces the deployment difficulty and improves the deployment efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing technology, and in particular to an offline automated deployment method for the Kubeedge edge computing framework. Background Technology

[0002] Cloud-edge collaborative computing is a crucial direction for the development of the modern internet. By distributing some computing tasks to the edge, closer to the device terminal, it reduces network transmission costs and cloud computing pressure, while improving task response speed. This has led to the widespread adoption of edge computing technology in the internet industry. Kubeedge, a cloud-native open-source edge computing framework developed by Huawei to facilitate collaboration between cloud, edge, and device, has been widely used across various fields due to its powerful cloud-edge collaboration capabilities. However, Kubeedge's deployment process is relatively cumbersome, relying on many basic environments. Errors can easily occur during deployment due to incompatibility of these environments. The deployment process is challenging for beginners, and when a large number of edge devices are added, a corresponding addition operation needs to be performed on each edge device—a tedious and repetitive task that wastes significant manpower and time. Therefore, a method that can automatically deploy Kubeedge offline and support rapid addition of different edge devices is essential.

[0003] Currently, only the KubeSphere container platform integrates Kubeedge automated deployment functionality. KubeSphere is a multi-tenant, distributed container platform built on Kubernetes, and its v3.1 version added deployment support for the edge computing framework Kubeedge. First, a server needs to be selected as the KubeSphere master node. On this server, install the Docker container engine, Harbor image repository, Kubernetes, network plugin, and the system environments that KubeSphere depends on. Then, install KubeSphere on this server. After installation, the server can provide management functions for the KubeSphere master node. Access the management interface, select "Cluster Management" in Platform Management, then select "Custom CRD," enter "clusterconfiguration" to search, select "Edit Configuration File" from the resource list in the search results, set the Kubeedge cloud node IP and other information, and Kubeedge will be automatically installed on this node. After installation, the "Edge Node" will appear in the node management section of the KubeSphere management interface. Add an edge node in the edge node management interface, set the node name and internal IP address, and then generate the Kubeedge edge installation command. Next, navigate to the edge node to be installed, pre-install Docker and configure KubeSphere related files, and then execute the Kubeedge edge installation command. During the Kubeedge installation process, the system will access the network to download the relevant installation packages, and then execute the edge addition command.

[0004] However, the method of automatically deploying Kubeedge through the KubeSphere container platform still has problems such as complex operation, high risk of failure, dependence on network environment and difficulty in expansion.

[0005] a) The pre-installation process is complex. Installing KubeSphere is an additional step before deploying Kubeedge. KubeSphere installation is complex, depends on underlying environments such as Kubernetes, and requires manual installation.

[0006] b) Increased risk of failure. Kubeedge deployed through the KubeSphere platform can only be managed on that platform, which increases the risk of service failure.

[0007] c) Network access is required. Installing Kubeedge Cloud and adding Kubeedge Edge on the KubeSphere platform require network access to download the relevant installation packages and dependency files. Offline deployment is not supported in clusters that cannot access external networks.

[0008] d) Difficulty in expansion. Because it is deployed on the KubeSphere platform, it is more difficult to extend the functionality of Kubeedge according to domain business needs, and it is not possible to directly modify Kubeedge. Summary of the Invention

[0009] This invention addresses the shortcomings of the current Kubeedge edge computing framework, such as complex deployment process, susceptibility to errors, difficulty for beginners in setting up the framework, and the need for repetitive operations each time an edge is added. It provides an offline automated deployment method for the Kubeedge edge computing framework.

[0010] The present invention adopts the following technical solution:

[0011] A method for offline automated deployment of the Kubeedge edge computing framework includes: Step S1, downloading framework dependency packages, specifically: downloading the corresponding versions of Linux system basic dependency packages and Kubeedge cluster dependency packages for the cloud server and edge devices respectively; Step S2, writing scripts, specifically: writing the cloud-install script cloud-install.sh and the edge-install script edge-install.sh; Step S3, writing an edge-install command generation program; Step S4, packaging the automatic deployment files, specifically: creating the cloud-install directory and the edge-install directory edge-install within the cloud-install directory; Step S5, Kubeedge cloud-installation; Step S6, Kubeedge edge-installation; wherein, Step S6 includes: Step S6-1, generating edge-installation commands: entering the access address of the edge-installation command generation program in the local browser, entering the name of the newly added edge on the webpage, and clicking generate commands; Step S6-2, executing the edge-installation commands.

[0012] Preferably, step S1 includes: step S1-1, downloading cloud deployment dependency packages, specifically: downloading the system basic environment installation package: using shell commands to download the system basic environment installation package to a folder, and then packaging it into an environment.tar.gz compressed package; downloading the Kubernetes installation package: using shell commands to download the Kubernetes installation package to a folder, and then packaging it into a k8s.tar.gz compressed package; packaging Kubernetes related images: after installing k8s, using docker commands to save the related images, and then packaging them into a k8s-master.tar compressed package; downloading Kubeedge dependency files: downloading the Kubeedge source code package, extracting the required Kubeedge dependency files, and then packaging them into a kubeedge.tar.gz compressed package; downloading the jdk1.8 installation package: renaming the downloaded jdk1.8 installation package to jdk.tar.gz.

[0013] Preferably, step S1 further includes: step S1-2, downloading edge deployment dependency packages, specifically: downloading the system basic environment installation package: using shell commands to download the system basic environment installation package to a folder, and then packaging it into an environment.tar.gz compressed package; packaging Kubeedge dependency files: extracting dependency files from the Kubeedge source code package. The keadm file needs to be modified and recompiled after modifying the official Kubeedge source code. Specifically, modify the file keadm / cmd / keadm / app / cmd / util / rpminstaller.go, comment out yum-yinstall epel-release and yum-y installmosquitto, and then execute the command make all WHAT=keadm in the main directory of the source code to obtain the keadm file. Finally, package the Kubeedge dependency files into a kubeedge.tar.gz compressed package.

[0014] Preferably, step S2 includes: step S2-1, writing a cloud-based automatic installation script, specifically: step S2-1-1, checking parameters; step S2-1-2, checking system version; step S2-1-3, disabling the swap partition; step S2-1-4, disabling the firewall and SELinux; step S2-1-5, installing the basic system environment; step S2-1-6, installing the Docker container engine; step S2-1-7, installing the Harbor image repository; step S2-1-8, installing the Java environment; step S2-1-9, installing Kubernetes; step S2-1-10, installing the Kubeedge cloud; step S2-1-11, packaging the edge automatic addition files; step S2-1-12, starting the edge automatic addition command generation program.

[0015] Preferably, step S2 further includes: step S2-2, writing an automatic edge addition script, specifically: step S2-2-1, checking the system version; step S2-2-2, disabling the swap partition; step S2-2-3, disabling the firewall and SELinux; step S2-2-4, installing the basic system environment; step S2-2-5, installing the Docker container engine; step S2-2-6, connecting to the cloud Harbor image repository; step S2-2-7, adding the Kubeedge edge to the cloud.

[0016] Preferably, step S3 includes: Step S3-1, writing a front-end interface, which includes an edge name input box and a generate command button. After inputting the edge name, clicking the generate command will output the edge auto-add command in the form of a pop-up box; Step S3-2, writing a back-end program, which obtains the edge names that have been added to the cloud from Kubeedge, determines whether the input edge name is duplicated, and if it is duplicated, gives a prompt. If it is not duplicated, it obtains the server's IP address and the Kubeedge cloud token. Finally, it generates the edge auto-add command based on the edge name, IP address and token value and returns it to the front-end interface for display; Step S3-3, packaging the edge auto-add command generation program and exporting the program as a create-order.jar package.

[0017] Preferably, step S4 includes: step S4-1, copying the cloud-based automatic deployment file; step S4-2, copying the edge-added file; and step S4-3, packaging the automatic deployment file.

[0018] Preferably, step S5 includes: step S5-1, uploading the automatic deployment file; step S5-2, executing the cloud-based automatic installation script.

[0019] In summary, the present invention has at least the following beneficial effects:

[0020] This invention effectively solves the problems of complex deployment processes and the susceptibility to errors during deployment of Kubeedge. It allows for simple operations to complete the installation of Kubeedge in the cloud and the addition of edge devices, eliminating the need for repetitive operations each time an edge device is added. This greatly reduces deployment difficulty and improves deployment efficiency. Furthermore, this invention is based entirely on the native Kubeedge installation process, requiring no additional programs. This saves resources, reduces consumption, and avoids impacting the expansion of Kubeedge. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram illustrating the steps of the offline automated deployment method for the Kubeedge edge computing framework involved in this invention.

[0023] Figure 2 This is a table illustrating the dependent programs and their corresponding installation packages involved in the cloud deployment of this invention.

[0024] Figure 3 This is a table showing the dependent programs and their corresponding installation packages for edge deployment involved in this invention.

[0025] Figure 4 and Figure 5 This is a schematic diagram of the cloud-based automatic installation script execution flowchart involved in this invention.

[0026] Figure 6 and Figure 7 This is a schematic diagram of the edge-automatic script execution flowchart involved in this invention. Detailed Implementation

[0027] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0028] The following disclosure provides many different implementations or examples for carrying out different structures of the embodiments of the present invention. To simplify the disclosure of the embodiments of the present invention, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the embodiments of the present invention. Furthermore, reference numerals and / or reference letters may be repeated in different examples of the embodiments of the present invention; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed.

[0029] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0030] like Figure 1 As shown, this embodiment provides an offline automated deployment method for the Kubeedge edge computing framework, including:

[0031] Step S1: Download the framework dependency packages, specifically:

[0032] Download the corresponding versions of the Linux system base dependency packages and Kubeedge cluster dependency packages for the cloud server and edge device, respectively.

[0033] Step S1-1: Download the cloud deployment dependency packages. Cloud deployment requires pre-downloading of the following installation packages: Figure 2 As shown, specifically:

[0034] Download the system basic environment installation package: Use shell commands to download the system basic environment installation package to a folder, and then package it into an environment.tar.gz compressed file;

[0035] Download the Kubernetes installation package: Use shell commands to download the Kubernetes installation package to a folder, and then package it into a k8s.tar.gz compressed file;

[0036] Package Kubernetes-related images: After installing k8s, use the docker command to save the relevant images, and then package them into a k8s-master.tar compressed file;

[0037] Download Kubeedge dependency files: Download the Kubeedge source code package, extract the required Kubeedge dependency files, and then package them into a kubeedge.tar.gz compressed file;

[0038] Download the JDK 1.8 installation package: Rename the downloaded JDK 1.8 installation package to jdk.tar.gz.

[0039] Step S1-2: Download edge deployment dependency packages. Add the necessary pre-downloaded installation packages to the edge deployment list, such as... Figure 3As shown, specifically:

[0040] Download the system basic environment installation package: Use shell commands to download the system basic environment installation package to a folder, and then package it into an environment.tar.gz compressed file;

[0041] Package Kubeedge dependency files: Extract the dependency files from the Kubeedge source code package. The keadm file needs to be modified and recompiled after modifying the official Kubeedge source code. Specifically, modify the file keadm / cmd / keadm / app / cmd / util / rpminstaller.go, comment out yum -y install epel-release and yum -y install mosquitto, then execute the command make all WHAT=keadm in the main directory of the source code to obtain the keadm file. Finally, package the Kubeedge dependency files into a kubeedge.tar.gz compressed package.

[0042] Step S2: Write scripts, specifically: write the cloud-install.sh script for automatic cloud installation and the edge-install.sh script for automatic edge installation.

[0043] Step S2-1: Write a cloud-based automatic installation script, such as... Figure 4 and Figure 5 As shown, it specifically includes:

[0044] Step S2-1-1: Check the parameters, specifically:

[0045] Check if the IP address is correctly entered into the script. If not, terminate the script and display the message "IP address parameter missing". If the IP address is correctly entered, continue execution.

[0046] Step S2-1-2: Check the system version, specifically:

[0047] Get the version of the execution system, determine whether the system is supported, if not, terminate the script and prompt "This system version is not supported", if it is supported, select the command corresponding to the system version and continue execution;

[0048] Step S2-1-3: Disable the swap partition, specifically as follows:

[0049] Execute the commands to temporarily close the swap partition and to permanently close it, respectively.

[0050] Step S2-1-4: Disable the firewall and SELinux, specifically:

[0051] First, disable the system's built-in firewall. Then, check if SELinux is disabled. If it is not disabled, execute the temporary and permanent disable commands respectively. If it is disabled, display the message "SELinux is disabled".

[0052] Step S2-1-5: Install the basic system environment, specifically as follows:

[0053] The script checks if the system's basic environment meets the requirements. If it does, it continues with subsequent operations. Otherwise, it checks if the environment installation package environment.tar.gz exists. If it doesn't exist, the script terminates and displays a message saying "Information installation package is missing." If it does exist, the script extracts the system's basic environment installation package and executes the installation commands vim, wget, net-tools, httpd, and epel-release in sequence. Then, it replaces the default port in the httpd file with a custom port, sets httpd to start automatically on boot, and starts httpd. Finally, it grants executable permissions to the script edge-install.sh in the edge-install directory and places this directory in the httpd directory exposed to the outside world, so that edge devices can pull dependent files when they are added.

[0054] Step S2-1-6: Install the Docker container engine, specifically:

[0055] The script checks if Docker is already installed. If it is, it continues with the following operations; otherwise, it checks if the installation package docker-20.10.0.tgz exists. If it does not exist, the script terminates and displays the message "Docker installation package is missing". If it exists, the script extracts the installation package, copies the Docker directory to the / usr / bin / directory, creates a Docker configuration file and adds configuration information, adds the Docker service to the system, grants the Docker service executable permissions, reloads the configuration file, sets Docker to start automatically, and starts the Docker service. Finally, it places docker-compose in the / usr / local / bin directory and creates a docker-compose symbolic link.

[0056] Step S2-1-7: Install the Harbor image repository, specifically as follows:

[0057] The script checks if Harbor is already installed. If so, it continues with the following steps. Otherwise, it checks if the Harbor installation package `harborv1.10.10.tgz` exists. If it doesn't exist, the script terminates and displays a message saying "Harbor installation package is missing." If it exists, it generates a CA certificate private key and CA certificate, then generates the server certificate, and then generates an x509v3 extension file. This x509v3 file is used to generate a certificate for the Harbor server. The server certificate and key are then copied to the ` / data / cert / ` folder on the Harbor server. `harbor.od.com(IP).crt` is converted to `harbor.od.com(IP).cert` for Docker to use. A Docker certificate folder is created, and the server certificate, key, and CA file are copied to the Docker certificate folder on the Harbor server. Docker is then restarted. Finally, the Harbor installation package is extracted to the ` / usr / local / ` directory, Harbor configurations are reset, and the Harbor installation command is executed. After installation, the Harbor service is added to the system, set to start automatically on boot, and then started Harbor.

[0058] Step S2-1-8: Install the Java environment, specifically as follows:

[0059] The script checks if Docker is installed. If it is, it continues with the following steps. Otherwise, it checks if the Java installation package jdk.tar.gz exists. If it does not exist, the script terminates and displays the message "Missing Java installation package". If it exists, it creates the / java directory, extracts jdk.tar.gz to the / java directory, enters the java directory, renames the extracted directory to jdk1.8, adds the Java environment variable to / etc / profile, and makes the environment variable effective.

[0060] Step S2-1-9: Install Kubernetes, specifically as follows:

[0061] The script checks if Kubernetes is already installed. If it is, it continues with the following operations; otherwise, it checks if the installation package k8s.tar.gz and the related image package k8s-master.tar exist. If they do not exist, the script terminates and displays the message "Missing Kubernetes dependency package". If they exist, it extracts the image package and the installation package, loads the relevant image, and then executes the installation commands kubectl-1.21.2, kubeadm-1.21.2, and kubelet-1.21.2 in sequence. It sets kubelet to start automatically on boot and finally initializes Kubernetes using kubeadm. After initialization, it checks if kube-flannel.yaml exists. If it does not exist, the script terminates and displays the message "flannel network plugin". If it exists, it loads the flannel network plugin.

[0062] Step S2-1-10: Install Kubeedge cloud service, specifically:

[0063] The script checks if Kubeedge is already installed. If it is, it continues with the following operations; otherwise, it checks if the Kubeedge installation package kubeedge.tar.gz exists. If it does not exist, the script terminates and displays the message "Missing Kubeedge installation package". If it exists, it creates the directories / etc / kubeedge and / kubeedge / deploy, then extracts the installation package, copies the Kubeedge cloud-related files to the previously created directories, grants executable permissions to the keadm file, initializes the Kubeedge cloud using keadm, and finally obtains the Kubeedge cloud token and saves it to a file.

[0064] Step S2-1-11: Automatically add files to the packaging edge, specifically:

[0065] Place the Harbor certificate in the edge-install file directory and automatically add the files in the directory to the edge-install. Then package the files in the directory into edge-install.tar.gz and save it in the edge-install directory.

[0066] Step S2-1-12: Start the edge automatic command generation program, specifically as follows:

[0067] The script checks if the command generation program is automatically added to the edge. If it is not found, the script terminates and displays the message "Command generation program is missing". If it is found, the command generation program is started and the corresponding port on the server is opened.

[0068] Step S2-2: Write a script to automatically add edges, such as... Figure 6 and Figure 7As shown, it specifically includes:

[0069] Step S2-2-1: Check the system version, specifically:

[0070] Get the version of the execution system, determine whether the system is supported, if not, terminate the script and prompt "This system version is not supported", if it is supported, select the command corresponding to the system version and continue execution;

[0071] Step S2-2-2: Disable the swap partition, specifically as follows:

[0072] Execute the commands to temporarily close the swap partition and to permanently close it, respectively.

[0073] Step S2-2-3: Disable the firewall and SELinux, specifically:

[0074] First, disable the system's built-in firewall. Then, check if SELinux is disabled. If it is not disabled, execute the temporary and permanent disable commands respectively. If it is disabled, display the message "SELinux is disabled".

[0075] Step S2-2-4: Install the basic system environment, specifically as follows:

[0076] Determine if the system's basic environment meets the requirements. If it does, continue with the subsequent operations. Otherwise, check if the environment installation package environment.tar.gz exists. If it does not exist, terminate the script and prompt "Information installation package is missing". If it exists, decompress the environment installation package and execute the installation commands vim, wget, net-tools, epel-release, and mosquitto in sequence.

[0077] Step S2-2-5: Install the Docker container engine, specifically as follows:

[0078] The script checks if Docker is already installed. If it is, it continues with the following operations; otherwise, it checks if the installation package docker-20.10.0.tgz exists. If it does not exist, the script terminates and displays the message "Docker installation package is missing". If it exists, the script extracts the installation package, copies the Docker directory to the / usr / bin / directory, creates a Docker configuration file and adds configuration information, adds the Docker service to the system, grants the Docker service executable permissions, reloads the configuration file, sets Docker to start automatically, and starts the Docker service. Finally, it places docker-compose in the / usr / local / bin directory and creates a docker-compose symbolic link.

[0079] Step S2-2-6: Connect to the cloud-based Harbor image repository, specifically as follows:

[0080] Check if the Harbor certificate exists. If it does not exist, terminate the script and display the message "Harbor certificate is missing". If it exists, create the directory / etc / docker / certs.d / {cloud IP}:{harbor port} and then copy the Harbor certificate to that directory.

[0081] Step S2-2-7: Add Kubeedge to the cloud, specifically as follows:

[0082] The script checks if a Kubeedge environment already exists. If it does, it deletes the original Kubeedge environment. Then, it checks if the Kubeedge installation package kubeedge.tar.gz exists. If it doesn't exist, it terminates the script and displays the message "Missing Kubeedge installation package". If it does exist, it creates the directories / etc / kubeedge and / kubeedge / deploy, then extracts the installation package, copies the Kubeedge cloud-related files to the previously created directories, grants executable permissions to the keadm file, and uses keadm to add the Kubeedge edge to the cloud.

[0083] Step S3: Write an edge automatic addition command generation program.

[0084] Step S3-1: Write the front-end interface, which includes an edge name input box and a generate command button. After entering the edge name and clicking the generate command, the command will be automatically added to the edge in the form of a pop-up box.

[0085] Step S3-2: Write a backend program. The program obtains the names of edges that have been added to the cloud from Kubeedge, determines whether the input edge name is duplicated, and if it is duplicated, it gives a prompt. If it is not duplicated, it obtains the server's IP address and the Kubeedge cloud token. Finally, it generates an automatic edge addition command based on the edge name, IP address and token value and returns it to the front-end interface for display.

[0086] Step S3-3: Automatically add the command generation program to the packaging edge and export the program as a create-order.jar package.

[0087] Step S4: Package the automatic deployment files, specifically as follows:

[0088] Create a cloud-install directory for automatic cloud deployment, and then create an edge-install directory within the cloud-install directory for automatic edge deployment.

[0089] Step S4-1: Copy the cloud-based automatic deployment files, specifically:

[0090] Copy the cloud deployment dependency installation package from step S1-1 to the directory cloud-install, then copy the cloud automatic installation script cloud-install.sh from step S2-1 to the directory cloud-install, and finally copy the edge automatic addition command generator create-order.jar package from step S3-3 to the directory cloud-install.

[0091] Step S4-2: Automatically add the copied edges to the file, specifically:

[0092] Copy the edge dependency installation package from step S1-2 to the edge-install directory, and then copy the edge auto-add script edge-install.sh from step S2-2 to the edge-install directory;

[0093] Step S4-3: Package the automatic deployment files, specifically as follows:

[0094] Package all files under the directory cloud-install into cloud-install.tar.gz.

[0095] Step S5: Kubeedge will install automatically from the cloud.

[0096] Step S5-1: Upload the automatic deployment file, specifically:

[0097] Upload the automated deployment file cloud-install.tar.gz from step S4-3 to the cloud server;

[0098] Step S5-2: Execute the cloud-based automatic installation script, specifically as follows:

[0099] Unzip the cloud-install.tar.gz file, enter the unzipped cloud-install directory, and execute step S2-1, the cloud-install automatic installation script cloud-install.sh.

[0100] Step S6: Kubeedge edges are automatically added.

[0101] Step S6-1: Generate the command to automatically add edges, specifically:

[0102] Enter the access address of the command generator for automatically adding the edge in step S3 in your local browser, enter the name of the newly added edge on the webpage, and click Generate Command;

[0103] Step S6-2: Execute the automatic edge addition command, specifically as follows:

[0104] Copy the generated edge auto-join command to the edge device that needs to be joined to the Kubeedge cloud and execute it. First, access the cloud to download the edge auto-join file edge-install.tar.gz corresponding to the edge system version in step S2-1-11. Then, decompress the file, enter the decompressed directory and execute the edge auto-join script edge-install.sh in step S2-2.

[0105] In summary, the key point of this invention is:

[0106] 1) Supports deployment of Kubeedge in network-constrained environments.

[0107] Conventional Kubeedge installation requires access to external networks to download dependencies, and some programs need to be downloaded from overseas networks. This invention makes it possible to deploy Kubeedge in restricted networks, supporting simple operations in local area networks that cannot access external networks and in one-way networks where edge devices can only access cloud servers, so that a complete Kubeedge framework can be quickly built.

[0108] 2) Step S1-2 involves modifying and recompiling the source code of the program added to the Kubeedge edge.

[0109] This invention modifies the source code of the program added to the Kubeedge edge, removes its network environment check, skips the installation of Kubeedge dependencies, and automatically obtains the information of the installed Kubeedge dependencies and replaces the corresponding dependency information.

[0110] 3) In step S2, the scripts are automatically installed in the cloud and automatically added at the edge.

[0111] When installing Kubeedge using this invention, you only need to execute the automatic cloud installation script on the cloud server to be installed to complete the automatic deployment of Kubeedge in the cloud, avoiding complex network problems and saving the tedious steps of manually setting up dependent environments.

[0112] 4) In step S3, the command generation program is automatically added to the edge.

[0113] By executing the cloud-generated automatic edge joining command on the edge device, the Kubeedge edge can be joined. This avoids the complex and repetitive edge joining operation on many edge devices, and uses the corresponding edge joining method in the system environment that automatically identifies the edge device to avoid errors during the joining process. This greatly improves the deployment efficiency of Kubeedge edges.

[0114] 5) Dynamic addition of edge nodes

[0115] When using this invention to build a Kubeedge cluster, there is no need to determine the edge devices in advance. When adding a new edge device, you only need to place it in a network environment that can access the cloud server and execute the edge automatic addition command on it. This provides a fast edge dynamic expansion capability.

[0116] The embodiments described above are for illustrative purposes only and are not intended to limit the invention. Therefore, any changes in numerical values ​​or substitutions of equivalent elements should still fall within the scope of this invention.

[0117] The above detailed description will enable those skilled in the art to understand that the present invention can indeed achieve the aforementioned objectives and has complied with the provisions of the Patent Law.

[0118] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the invention. The above descriptions are merely preferred embodiments of the invention and are not intended to limit the invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the invention should be included within the scope of protection of the invention.

[0119] It should be noted that the above description of the process is for illustrative purposes only and does not limit the scope of this specification. Those skilled in the art can make various modifications and changes to the process under the guidance of this specification. However, these modifications and changes remain within the scope of this specification.

[0120] The basic concepts have been described above. Obviously, for those skilled in the art who have read this application, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore, such modifications, improvements, and corrections still fall within the spirit and scope of the exemplary embodiments of this application.

[0121] Furthermore, this application uses specific terms to describe its embodiments. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic related to at least one embodiment of this application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different positions in this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of this application can be appropriately combined.

[0122] Furthermore, those skilled in the art will understand that aspects of this application can be described and illustrated through several patentable types or situations, including any new and useful combination of processes, machines, products, or substances, or any new and useful improvements thereof. Therefore, aspects of this application can be implemented entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. All of the above hardware or software can be referred to as a “unit,” “module,” or “system.” Furthermore, aspects of this application can take the form of a computer program product embodied in one or more computer-readable media, wherein computer-readable program code is contained therein.

[0123] The computer program code required for the operation of each part of this application can be written in any one or more programming languages, including object-oriented programming languages ​​such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, and Python; general programming languages ​​such as C; Visual Basic, Fortran2103, Perl, COBOL2102, PHP, and ABAP; dynamic programming languages ​​such as Python, Ruby, and Groovy; or other programming languages. This program code can run entirely on the user's computer, or as a standalone software package on the user's computer, or partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer via any network, such as a local area network (LAN) or wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as Software as a Service (SaaS).

[0124] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of numbers and letters, or other names described in this application are not intended to limit the order of the processes and methods of this application. Although some currently considered useful embodiments of the invention have been discussed in the foregoing disclosure by way of various examples, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments; rather, the claims are intended to cover all modifications and equivalent combinations that conform to the substance and scope of the embodiments of this application. For example, although the implementation of the various components described above can be embodied in a hardware device, it can also be implemented as a purely software solution, such as an installation on an existing server or mobile device.

[0125] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments of the invention, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this approach of the present application should not be construed as reflecting an intention that the claimed subject matter requires more features than expressly recited in each claim. Rather, the subject of the invention should possess fewer features than in any single embodiment described above.

Claims

1. A method for offline automated deployment of the Kubeedge edge computing framework, characterized in that, include: Step S1: Download the framework dependency packages, specifically: Download the corresponding versions of the Linux system base dependency packages and Kubeedge cluster dependency packages for the cloud server and edge device, respectively; Step S2: Write the script, specifically as follows: Write the cloud-install.sh script for automatic cloud installation and the edge-install.sh script for automatic edge installation; Step S3: Write an edge automatic addition command generation program; Step S4: Package the automatic deployment files, specifically as follows: Create a cloud-install directory for automatic deployment, and then create an edge-install directory within the cloud-install directory for automatic addition. Step S5: Kubeedge will automatically install from the cloud. Step S6: Kubeedge edges are automatically added; Step S6 includes: Step S6-1: Generate the automatic edge addition command: Enter the access address of the S3 automatic edge addition command generator in your local browser, enter the name of the newly added edge on the webpage, and click Generate Command; Step S6-2: Execute the edge auto-add command; Step S2 includes: Step S2-1, writing a cloud-based automatic installation script, specifically: Step S2-1-1: Check parameters; Step S2-1-2: Check the system version; Step S2-1-3: Disable the swap partition; Step S2-1-4: Turn off the firewall and SELinux; Step S2-1-5: Install the basic system environment; Step S2-1-6: Install the Docker container engine; Step S2-1-7: Install the Harbor image repository; Step S2-1-8: Install the Java environment; Step S2-1-9: Install Kubernetes; Step S2-1-10: Install Kubeedge cloud service; Step S2-1-11: Automatically add files to the packaging edge; Step S2-1-12: Start the edge automatic command generation program; Step S2 further includes: Step S2-2, writing an automatic edge addition script, specifically: Step S2-2-1: Check the system version; Step S2-2-2: Disable the swap partition; Step S2-2-3: Turn off the firewall and SELinux; Step S2-2-4: Install the basic system environment; Step S2-2-5: Install the Docker container engine; Step S2-2-6: Connect to the cloud-based Harbor image repository; Step S2-2-7: Add Kubeedge edge to the cloud; Step S3 includes: Step S3-1: Write the front-end interface, which includes an edge name input box and a generate command button. After entering the edge name and clicking the generate command, the command will be automatically added to the edge in the form of a pop-up box. Step S3-2: Write a backend program. The program obtains the names of edges that have been added to the cloud from Kubeedge, determines whether the input edge name is duplicated, and if it is duplicated, it gives a prompt. If it is not duplicated, it obtains the server's IP address and the Kubeedge cloud token. Finally, it generates an automatic edge addition command based on the edge name, IP address and token value and returns it to the front-end interface for display. Step S3-3: Automatically add the command generation program to the packaging edge and export the program as a create-order.jar package.

2. The offline automated deployment method for the Kubeedge edge computing framework according to claim 1, characterized in that, Step S1 includes: Step S1-1, downloading the cloud deployment dependency package, specifically: Download the system basic environment installation package: Use shell commands to download the system basic environment installation package to a folder, and then package it into an environment.tar.gz compressed file; Download the Kubernetes installation package: Use shell commands to download the Kubernetes installation package to a folder, and then package it into a k8s.tar.gz compressed file; Package Kubernetes-related images: After installing k8s, use the docker command to save the relevant images, and then package them into a k8s-master.tar compressed file; Download Kubeedge dependency files: Download the Kubeedge source code package, extract the required Kubeedge dependency files, and then package them into a kubeedge.tar.gz compressed file; Download the JDK 1.8 installation package: Rename the downloaded JDK 1.8 installation package to jdk.tar.gz.

3. The offline automated deployment method for the Kubeedge edge computing framework according to claim 2, characterized in that, Step S1 also includes: Step S1-2, downloading the edge deployment dependency package, specifically: Download the system basic environment installation package: Use shell commands to download the system basic environment installation package to a folder, and then package it into an environment.tar.gz compressed file; Package Kubeedge dependency files: Extract the dependency files from the Kubeedge source code package. The keadm file needs to be modified and recompiled after modifying the official Kubeedge source code. Specifically, modify the file keadm / cmd / keadm / app / cmd / util / rpminstaller.go, comment out yum -y install epel-release and yum -y install mosquitto, then execute the command make all WHAT=keadm in the main source code directory to obtain the keadm file. Finally, package the Kubeedge dependency files into a kubeedge.tar.gz compressed package.

4. The offline automated deployment method for the Kubeedge edge computing framework according to claim 1, characterized in that, Step S4 includes: Step S4-1: Copy the cloud-based automatic deployment files; Step S4-2: Automatically add the copied edge to the file; Step S4-3: Package the automatic deployment files.

5. The offline automated deployment method for the Kubeedge edge computing framework according to claim 4, characterized in that, Step S5 includes: Step S5-1: Upload the automatic deployment file; Step S5-2: Execute the cloud-based automatic installation script.