A deployment method, device, electronic device and medium based on Python language
Through the automated deployment method, the computer is intelligently determined and the installation status is monitored in real time, which solves the problem of low configuration efficiency of the Python programming language environment, achieves fast and accurate multi-computer environment deployment, and improves the efficiency of software development support.
Patent Information
- Application Number
- CN202410773684.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-17
AI Technical Summary
In the existing technology, the configuration of the Python programming language environment relies on manual deployment, resulting in large-scale environment configuration being inefficient and error-prone, and unable to meet the needs of fast and efficient software development.
Provides an automated deployment method based on Python language. By obtaining deployment requests, intelligently determines the computer to be configured, performs customized service configuration, and monitors the installation status in real time, reducing manual operations and improving configuration efficiency and accuracy.
It achieves fast and accurate multi-computer environment deployment, reduces manual error rates, improves the support efficiency of Python language software development, simplifies the configuration process, and avoids configuration problems caused by version mismatch and other human errors.
Smart Images

Figure CN118331592B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a deployment method, device, electronic device and medium based on Python language. Background Art
[0002] With the advancement of technology, people's demand for software functions is also increasing, which has prompted developers to innovate and launch more innovative and practical software applications to meet the diverse needs of users in work, life and study. However, before software development, a crucial link is the reasonable configuration of the computer environment.
[0003] In the process of software development, a stable and efficient development environment is the key to ensure smooth software development. As a programming language, Python needs to rely on a specific environment to run, including the operating system, Python interpreter, and related libraries and dependencies. Therefore, before using Python for programming, it is particularly important to configure the computer environment professionally and carefully to ensure that Python can run normally and stably. However, when configuring the environment, it mainly relies on manual deployment. For large-scale environment configuration, manual deployment requires detailed configuration each time, which takes a long time and leads to low configuration efficiency.
[0004] Therefore, there is an urgent need for a Python-based deployment method, device, electronic device and medium that can solve the above-mentioned technical problems. Summary of the invention
[0005] The present application provides a deployment method, device, electronic device and medium based on Python language. The method automatically configures multiple computers according to deployment requests, and monitors the installation status of multiple nodes in real time. When the installation status of multiple nodes is completed, it is confirmed that the environment deployment is completed, which reduces manual operations and reduces the error rate, thereby solving the problem of low work configuration efficiency due to the fact that deployment can only rely on manual deployment.
[0006] In a first aspect, the present application provides a deployment method based on the Python language, which is applied to a cloud server, and the method includes: obtaining a deployment request for an environment, the deployment request is used to install a development environment cluster package; determining multiple computers to be configured according to the deployment request; performing customized service configuration on the multiple computers to obtain customization information; determining a first configuration file corresponding to a first computer according to the customization information, and downloading the first configuration file to the first computer, the first computer being any one of the multiple computers; obtaining the installation status corresponding to multiple nodes, one node corresponding to one computer; if the installation status corresponding to the multiple nodes are all completed, confirming that the environment deployment has been completed, so as to carry out software development in the Python language.
[0007] By adopting the above technical solution, a deployment request of the environment is obtained, and multiple computers to be configured are determined according to the deployment request. The computers to be configured are determined intelligently to avoid errors that may occur when manually selecting computers, and then customized service configurations are performed on the multiple computers to obtain customized information. The first configuration file is then downloaded to the first computer without manual operation, saving manual operation time, and real-time monitoring of the installation status of multiple nodes. The progress of the deployment can be understood in real time through monitoring. When the installation status of multiple nodes is completed, it is confirmed that the environment deployment has been completed, which provides good support for subsequent Python language software development, avoids manual inspection of the status of each node, and improves the overall deployment efficiency.
[0008] Optionally, before obtaining the deployment request of the environment, the method also includes: obtaining a system configuration request sent by a user; detecting system information according to the system configuration request to obtain target information; if the target information is normal configuration prompt information, configuring the basic environment according to preset configuration rules to obtain basic environment configuration information; and obtaining a deployment request based on the basic environment configuration information.
[0009] By adopting the above technical solution, the system configuration request sent by the user is obtained, the system information is detected according to the system configuration request, and the target information is obtained. When the target information is the normal configuration prompt information, the basic environment is automatically configured according to the preset configuration rules, thereby avoiding the tediousness and errors of manual configuration of the basic environment, improving the efficiency and accuracy of the configuration, and after the basic environment configuration is completed, the deployment request is obtained according to the basic environment configuration information to improve the user experience.
[0010] Optionally, the system information is detected according to the system configuration request to obtain the target information; specifically including: obtaining first version information, the first version information is the version information corresponding to the system information; obtaining second version information from the system configuration request, and determining whether the first version information is the same as the second version information; if the first version information is the same as the second version information, obtaining the target information according to the first version information.
[0011] By adopting the above technical solution, the version information corresponding to the system information, that is, the first version information, is obtained, and then the second version information is obtained from the system configuration request sent by the user. The first version information and the second version information are compared. When the first version information and the second version information are the same, it is confirmed that the version used when configuring the environment is a normal version, which helps to avoid configuration errors caused by version mismatch, improves configuration accuracy, and provides users with an efficient configuration experience.
[0012] Optionally, the basic environment is configured according to preset configuration rules to obtain basic environment configuration information; specifically including: determining the second computer according to the target identification information; obtaining system configuration parameters corresponding to the second computer, the system configuration parameters including mandatory access control system parameters, computer command parameters and dynamic daemon parameters, the system configuration parameters being the basic environment; configuring the system configuration parameters according to preset configuration rules to obtain basic environment configuration information.
[0013] By adopting the above technical solution, the second computer is determined according to the target identification information, and the system configuration parameters corresponding to the second computer are obtained. The system configuration parameters include mandatory access control system parameters, computer command parameters, dynamic daemon parameters and other aspects. These parameters together constitute the basic environment. The system configuration parameters are then configured according to preset configuration rules to automate the configuration process, reduce the complexity of the configuration, and improve the efficiency of the configuration.
[0014] Optionally, before performing customized service configuration on multiple computers and obtaining customized information, the method also includes: obtaining a target file from a cloud server, where the target file is a file stored in the cloud server, and the target file includes a target installation file and a script file; obtaining a historical installation file of a third computer according to the script file; determining whether the historical installation file is consistent with the target installation file; if the historical installation file is inconsistent with the target installation file, uninstalling the historical installation file; after uninstalling the historical installation file, installing the target installation file to the third computer.
[0015] By adopting the above technical solution, the target file is obtained from the cloud server, the historical installation file of the third computer is obtained according to the script file, and the historical installation file is compared with the target installation file. When the historical installation file is inconsistent with the target installation file, the historical installation file will be uninstalled to ensure that the old version of the file is completely cleared and will not conflict with the new version of the file, thereby ensuring the smooth progress of the installation process. After uninstalling the historical installation file, the target installation file is installed on the third computer to avoid unnecessary operations.
[0016] Optionally, customized service configuration is performed on multiple computers to obtain customized information; specifically including: obtaining a first number of functions corresponding to the target file; determining whether the first number is the same as the second number, the second number being the total number of corresponding computers; when the first number is the same as the second number, confirming that one computer corresponds to one function, and generating customized information based on the first number of functions.
[0017] By adopting the above technical solution, a first number of functions corresponding to the target file is obtained, and then the total number of computers corresponding to the target file, that is, the second number, is obtained. The first number and the second number are compared. When the first number is the same as the second number, it is confirmed that one computer corresponds to one function, and customization information is automatically generated according to the first number of functions. The automatic generation of customization information reduces the workload of manual configuration, optimizes resource allocation, and thereby improves the accuracy and efficiency of configuration.
[0018] Optionally, customized service configuration is performed on multiple computers to obtain customized information; specifically including: obtaining multiple permission levels corresponding to the target file; obtaining a first permission level, the first permission level being the security level corresponding to the fourth computer; determining whether the first permission level is greater than or equal to a second permission level, the second permission level being the permission level corresponding to a second configuration file, the second configuration file being any one of the target files; if the first permission level is greater than or equal to the second permission level, confirming that the second configuration file is assigned to the fourth computer to generate customized information.
[0019] By adopting the above technical solution, multiple permission levels corresponding to the target file are obtained, the permission level corresponding to the fourth computer, that is, the first permission level, is obtained, and then the second permission level corresponding to the second configuration file is obtained. The first permission level is compared with the second permission level. When the first permission level is greater than or equal to the second permission level, it is confirmed that the second configuration file can be allocated to the fourth computer. Customized information is automatically generated based on the permission comparison result. Based on a strict allocation process, it is ensured that only computers that meet the permission level requirements can obtain specific configuration files, which helps to prevent potential security risks.
[0020] In a second aspect of the present application, a deployment device based on Python language is provided, the device is a cloud server, and the cloud server includes an acquisition unit, a processing unit and a confirmation unit; the acquisition unit acquires a deployment request of the environment, and the deployment request is used to install a development environment cluster package; the processing unit determines multiple computers to be configured according to the deployment request; customized service configuration is performed on the multiple computers to obtain customization information; a first configuration file corresponding to a first computer is determined according to the customization information, and the first configuration file is downloaded to the first computer, the first computer is any one of the multiple computers; the installation status corresponding to multiple nodes is obtained, and one node corresponds to one computer; the confirmation unit confirms that the environment deployment has been completed if the installation status corresponding to the multiple nodes are all completed, so as to carry out software development in Python language.
[0021] Optionally, the acquisition unit is used to obtain a system configuration request sent by a user; the processing unit is used to detect the system information according to the system configuration request to obtain target information; if the target information is normal configuration prompt information, the basic environment is configured according to preset configuration rules to obtain basic environment configuration information; the acquisition unit is used to obtain a deployment request based on the basic environment configuration information.
[0022] Optionally, the acquisition unit is used to obtain first version information, where the first version information is version information corresponding to the system information; the processing unit is used to obtain second version information from the system configuration request, and determine whether the first version information is the same as the second version information; if the first version information is the same as the second version information, the target information is obtained according to the first version information.
[0023] Optionally, the processing unit is used to determine the second computer based on the target identification information; the acquisition unit is used to obtain system configuration parameters corresponding to the second computer, the system configuration parameters include mandatory access control system parameters, computer command parameters and dynamic daemon parameters, and the system configuration parameters are the basic environment; the system configuration parameters are configured according to preset configuration rules to obtain basic environment configuration information.
[0024] Optionally, the acquisition unit is used to obtain a target file from a cloud server, where the target file is a file stored in the cloud server, and the target file includes a target installation file and a script file; the acquisition unit is used to obtain a historical installation file of a third computer based on the script file; the processing unit is used to determine whether the historical installation file is consistent with the target installation file; if the historical installation file is inconsistent with the target installation file, the historical installation file is uninstalled; after uninstalling the historical installation file, the target installation file is installed on the third computer.
[0025] Optionally, the acquisition unit is used to acquire a first number of functions corresponding to the target file; the processing unit is used to determine whether the first number is the same as the second number, the second number being the total number corresponding to the computers; the confirmation unit is used to confirm that one computer corresponds to one function when the first number is the same as the second number, and generate customized information based on the first number of functions.
[0026] Optionally, the acquisition unit is used to obtain multiple permission levels corresponding to the target file; the acquisition unit is used to obtain a first permission level, which is the security level corresponding to the fourth computer; the processing unit is used to determine whether the first permission level is greater than or equal to a second permission level, which is the permission level corresponding to a second configuration file, and the second configuration file is any file in the target file; the confirmation unit is used to confirm that the second configuration file is assigned to the fourth computer if the first permission level is greater than or equal to the second permission level, so as to generate customized information.
[0027] In a third aspect of the present application, an electronic device is provided, which includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory, so that an electronic device executes any one of the methods described above in the present application.
[0028] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any one of the above methods of the present application is executed.
[0029] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0030] 1. Obtain the deployment request of the environment, determine multiple computers to be configured according to the deployment request, intelligently determine the computers to be configured, avoid errors that may occur when manually selecting computers, and then customize the service configuration of multiple computers to obtain customized information, and then download the first configuration file to the first computer. No manual operation is required, saving manual operation time, and real-time monitoring of the installation status of multiple nodes. The progress of the deployment can be understood in real time through monitoring. When the installation status of multiple nodes is completed, it is confirmed that the environment deployment has been completed, which provides good support for subsequent Python language software development, avoids manual inspection of the status of each node, and improves the overall deployment efficiency.
[0031] 2. Obtain the system configuration request sent by the user, detect the system information according to the system configuration request, and obtain the target information. When the target information is the normal configuration prompt information, automatically configure the basic environment according to the preset configuration rules to avoid the tediousness and errors of manual configuration of the basic environment, improve the efficiency and accuracy of the configuration, and after the basic environment configuration is completed, obtain the deployment request according to the basic environment configuration information to improve the user experience.
[0032] 3. Obtain the version information corresponding to the system information, that is, the first version information, and then obtain the second version information from the system configuration request sent by the user, and compare the first version information with the second version information. When the first version information is the same as the second version information, it is confirmed that the version used in the configuration environment is a normal version, which helps to avoid configuration errors caused by version mismatch, improve configuration accuracy, and provide users with an efficient configuration experience.
[0033] 4. Determine the second computer based on the target identification information, and obtain the system configuration parameters corresponding to the second computer. The system configuration parameters include mandatory access control system parameters, computer command parameters, dynamic daemon parameters and other aspects. These parameters together constitute the basic environment. Then, the system configuration parameters are configured according to preset configuration rules to automate the configuration process, reduce the complexity of configuration, and improve the efficiency of configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a schematic diagram of the structure of a deployment method based on Python language provided in an embodiment of the present application;
[0035] Figure 2 This is a first flow chart of a deployment method based on Python language provided in an embodiment of the present application;
[0036] Figure 3 This is a second flow chart of a deployment method based on Python language provided in an embodiment of the present application;
[0037] Figure 4 It is a schematic diagram of the structure of a deployment device based on Python language provided in an embodiment of the present application;
[0038] Figure 5 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.
[0039] Explanation of the reference numerals: 401, acquisition unit; 402, processing unit; 403, confirmation unit; 500, electronic device; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION
[0040] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0041] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0042] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0043] With the advancement of technology, people's demand for software functions is also increasing, which has prompted developers to innovate and launch more innovative and practical software applications to meet the diverse needs of users in work, life and study. However, before software development, a crucial link is the reasonable configuration of the computer environment.
[0044] In the process of software development, a stable and efficient development environment is the key to ensure smooth software development. As a programming language, Python needs to rely on a specific environment to run, including the operating system, Python interpreter, and related libraries and dependencies. Therefore, before using Python for programming, it is particularly important to configure the computer environment professionally and carefully to ensure that Python can run normally and stably. However, when configuring the environment, it mainly relies on manual deployment. For large-scale environment configuration, manual deployment requires detailed configuration each time, which takes a long time and leads to low configuration efficiency.
[0045] Therefore, how to change the way of configuring the environment that can only rely on manual deployment, resulting in low work efficiency, is an urgent problem to be solved. The embodiment of the present application provides a deployment method based on Python language, which is applied to a cloud server. The cloud server of the present application refers to a platform for deploying computer devices for Python language software development. Figure 1 is a schematic diagram of a deployment method based on Python language provided in an embodiment of the present application, such as Figure 1 As shown, the deployment scheme of the present application mainly involves the interaction between the cloud server 101 and multiple computers 102. Multiple computers 102 can be understood as a cluster composed of multiple computers. The user can send a deployment request to the cloud server through one of the computers. At this time, the deployment request sent by the user does not refer to a request for deployment and configuration of a single computer, but a request for deployment and configuration of all computers in the cluster. The cloud server receives the deployment request sent by the user and starts to perform corresponding processing. The cloud server 101 deploys multiple computers 102 based on the automated process, and then distributes corresponding configuration files to multiple computers based on customized information, and monitors the installation status of each scenic spot in real time. One node corresponds to one computer. If the installation status of each node is in a completed state. It is confirmed that the production environment of multiple computers 102 has been deployed, so that subsequent Python language software development can be carried out.
[0046] like Figure 2 As shown, Figure 2 This is a flow chart of a deployment method based on Python language provided in an embodiment of the present application, refer to Figure 2 The method includes the following steps S201-S206.
[0047] S201: Obtain a deployment request for the environment, where the deployment request is used to install a development environment cluster package.
[0048] In the above S201, after the cloud server receives the deployment request sent by the user, the deployment request refers to the instruction that the user needs to install the development environment cluster package in the computer, and the development environment cluster package refers to K3Smaster, which is a key component in the K3s cluster. K3s is a lightweight, easy-to-install and manage distribution of Kubernetes, which is particularly suitable for edge computing environments. K3s simplifies the deployment process and reduces the demand for hardware resources by packaging the core components of Kubernetes into a single binary file. Since this application is to form a cluster with multiple computers, when the cloud server receives the deployment request sent by the user, the deployment request is to deploy and configure all computers in the cluster, rather than deploying and configuring a single computer in the cluster.
[0049] In addition, before the cloud server obtains the deployment request of the environment, it is necessary to determine whether the basic environment of the computer is in a set state. If the basic environment of the computer is in a set state, the development environment cluster package is installed in the set basic environment. Specifically, it includes: obtaining the system configuration request sent by the user; detecting the system information according to the system configuration request to obtain the target information; if the target information is a normal configuration prompt information, the basic environment is configured according to the preset configuration rules to obtain the basic environment configuration information; according to the basic environment configuration information, the deployment request is obtained. Specifically, the user can send a system configuration request to the cloud server through the user interface. After receiving the system configuration request, the cloud server analyzes the system configuration request and obtains the detailed information to be configured. The detailed information includes detection services, preparation services, and infrastructure services. According to the system configuration request, the system information is detected. At this time, the system information includes the computer's IP information, CPU framework information, operating system ID information, and version information corresponding to the system information. In addition to the system information, the computer's processor, memory, and disk are also detected respectively. After the detection is completed, the target information is obtained. The target information may be a normal configuration prompt information, indicating that the system corresponding to the current computer has met the user's configuration requirements and no additional configuration operations are required. The target information may also be a configuration exception prompt information, indicating that the system corresponding to the current computer does not meet the user's configuration requirements in some aspects and needs to be adjusted accordingly. When the target information is a normal configuration prompt information, it means that the current system has met the user's configuration requirements, but some basic environment configuration work is required to ensure that the system can run stably and efficiently. The configuration task can be automatically completed based on the preset configuration rules, and multiple parameters of the basic environment configuration can be obtained, and then multiple preset configuration parameters can be set in advance. Subsequently, one parameter corresponds to a preset configuration parameter, that is, the current parameter is modified to the preset configuration parameter, and the basic environment configuration information is completed. After confirming that the basic environment configuration information of the computer has been completed, the user sends a deployment request based on the basic environment configuration information. The deployment request is used to trigger the cloud server to automatically install the development environment cluster package.
[0050] Further, if the system information is version information, the version information is detected and the target information is obtained according to the detection result. Specifically, it includes: obtaining the first version information, the first version information is the version information corresponding to the system information; obtaining the second version information from the system configuration request, and judging whether the first version information is the same as the second version information; if the first version information is the same as the second version information, the target information is obtained according to the first version information. Specifically, after the cloud server obtains the system information, one computer corresponds to one system information, and the cloud server obtains the version information corresponding to the system information, that is, the first version information. The first version information can be obtained by the version number stored in the system, or by querying a specific file or database to obtain the version data. After obtaining the first version information, the corresponding version information in the system configuration request sent by the user is obtained, that is, the second version information, and the second version information can also be understood as the version information that the computer needs to correspond to when the environment is configured. It is judged whether the first version information is the same as the second version information, and the purpose of the comparison is to confirm whether the version of the current system is consistent with the version required when the environment is configured. When the first version information is the same as the second version information, it is confirmed that the first version information does not need to be upgraded, and then the target information is generated according to the first version information. Since the first version information is the same as the second version information, the target information at this time is the normal configuration prompt information.
[0051] In addition, when the first version information is different from the second version information, it is confirmed that additional steps need to be taken to handle the version difference. It can be handled by upgrading or downgrading the version, and the version update operation can be automatically performed to solve the problem of version mismatch. After confirming that the system information is detected correctly, the processor, memory and disk must be tested. By testing the number of processor cores, when the number of processor cores does not meet the requirements, the configuration error prompt is confirmed to prompt the user to handle it in time. By testing the size of the memory, when the memory does not meet the requirements, the configuration error prompt is confirmed to prompt the user to handle it in time. By testing the size of the disk, when the disk does not meet the requirements, the configuration error prompt is confirmed to prompt the user to handle it in time.
[0052] Further, how to configure the basic environment according to the preset configuration rules to obtain the basic environment configuration information; specifically including: determining the second computer according to the target identification information; obtaining the system configuration parameters corresponding to the second computer, the system configuration parameters include mandatory access control system parameters, computer command parameters and dynamic daemon parameters, and the system configuration parameters are the basic environment; configuring the system configuration parameters according to the preset configuration rules to obtain the basic environment configuration information. Specifically, when it is determined that the target information is a normal configuration prompt information, the basic environment of each computer needs to be configured, and the basic environment of each computer can be configured in turn. The second computer can be determined according to the target identification information. The target identification information is a unique identifier of a computer specified by the user. According to the target identification information, the corresponding computer, i.e., the second computer, can be located. After determining the second computer, the system configuration parameters corresponding to the second computer are obtained. At this time, the system configuration parameters include access control system parameters, computer command parameters and dynamic daemon parameters. The access control system parameters refer to the mandatory access control system. It provides a more fine-grained and flexible security policy to protect the security of the system and data by implementing access control at the operating system kernel level. Selinux reduces the risk of system attacks by limiting the access of processes, users and applications to system resources. Computer command parameters refer to Ulimit, which is a computer command used to set the resources used by the shell startup process. It provides multiple parameter forms, such as setting hard resource limits, setting soft resource limits, and displaying all current resource limits. Through this command, users can limit the resources used by the shell startup process, thereby preventing the process from consuming too many system resources. Dynamic daemon parameters refer to dynamic daemons used to manage network firewalls. Firewalld is a dynamic daemon used to manage network firewalls in Linux distributions. It provides a command line and a graphical user interface for configuring and managing system firewall rules. Firewalld uses iptables, ip6tables, ebtables, and nftables as backends to process network packets. Its main function is to protect the system from unauthorized access and attacks, divide network areas and services by changing firewall rules in real time, define different access rights, and apply firewall rules to specific IP addresses, subnets, or ports. Selinux, Ulimit, and Firewalld all play an important role in protecting system security, managing process resources, and controlling network access, and are indispensable security and management tools in computer systems.After obtaining the system configuration parameters corresponding to the second computer, the system configuration parameters are configured according to the preset configuration work. The preset configuration rules are pre-established configuration parameters. The number of preset system configuration parameters is determined according to the number of system configuration parameters, that is, the configuration method corresponding to the system configuration parameters is set in advance, and then the corresponding preset system configuration parameters are called based on different system configuration parameters for replacement. After the configuration is completed, the basic environment configuration information is generated.
[0053] For example, when deploying, you need to install K3SMaster, K3SWorkerTask, HelmInstallTask, StorageTask, and IngressTask in the computer one by one. This application takes the installation of K3Smaster as an example to illustrate the deployment process. At this time, the development environment cluster package is K3Smaster. If the system configuration parameter is an access control parameter, the access control parameter is closed, and the access control file is uploaded to the cloud server, and the access control file is executed. That is, turn off Selinux: upload the selinux.sh file to the cloud server and execute the .sh file. If the system configuration parameter is a computer command parameter, modify the original configuration in the computer command parameter, that is, modify the / etc / security / limits.conf configuration to '* soft nofile 65535', '* hard nofile 65535', '* softnproc 65535', '* hard nproc 65535'. If the system configuration parameter is a dynamic daemon parameter, upload the dynamic daemon file to the cloud server and execute the dynamic daemon file. Close Firewalld, upload the firewalld.sh file to the cloud server, and execute the .sh file. Therefore, the target identification information determines the computer, obtains the system configuration parameters corresponding to the computer, and configures it according to the preset configuration rules to achieve automatic configuration and management of the computer's basic environment and reduce the risk of human error. Since there are multiple computers, the basic environment of multiple computers needs to be configured in sequence based on the above method to generate basic environment configuration information.
[0054] S202: Determine multiple computers to be configured according to the deployment request.
[0055] In the above S202, after obtaining the deployment request, the cloud server determines multiple computers to be configured according to the deployment request, that is, the number of computers to be configured in the cluster. Each computer needs to be specifically configured to meet the installation requirements of the development environment cluster package.
[0056] S203: Perform customized service configuration on multiple computers to obtain customized information.
[0057] In the above S203, after multiple computers are determined according to the deployment request, customized service configuration can be performed based on the hardware and software environment of each computer to obtain customized information. However, before customized service configuration is performed on multiple computers to obtain customized information, the method also includes: obtaining a target file from a cloud server, the target file is a file stored in the cloud server, and the target file includes a target installation file and a script file; obtaining a historical installation file of a third computer according to the script file; determining whether the historical installation file is consistent with the target installation file; if the historical installation file is inconsistent with the target installation file, uninstalling the historical installation file; after uninstalling the historical installation file, installing the target installation file to the third computer.
[0058] Specifically, it is necessary to confirm that the basic environment configuration information corresponding to the third computer has been completed, and then upload the target installation file and script file stored locally to the cloud server by creating a cloud server working directory. In addition to the target installation file and script file, the locally configured file must also be uploaded to the cloud server. At this time, the local refers to the device for environment configuration. Since the target installation file, script file and other files are stored in the cloud server. Multiple computers establish a connection with the cloud server, and the security of the connection can be ensured through identity authentication and authorization mechanisms. Obtain the target file from the cloud server, the target file includes a script file and a target installation file, and the target file is a file collection that packages the script file and the target installation file. After obtaining the target file, parse the script file, obtain the historical installation file on the third computer according to the script file, and the cloud server locates the location where the historical installation file is stored on the third computer according to the instructions in the script. When obtaining the historical installation file, the cloud server may need to perform some permission checks and authentication operations to ensure that only authorized people can access and modify these files. After obtaining the historical installation file, it is determined whether the target installation file is consistent with the historical installation file, which can be determined by comparing the file's version number, size, hash value and other attributes. When the target installation file is inconsistent with the historical installation file, the historical installation file in the third computer needs to be uninstalled to clear the old version of the file and configuration. The uninstallation process may include steps such as stopping related services, deleting files, and cleaning up registry entries. During the uninstallation process, the system needs to ensure the correctness and security of the operation to avoid unnecessary damage to the system or data loss. After the historical installation file in the third computer is uninstalled, the target installation file is installed in the third computer. The installation process may include steps such as stopping related services, deleting files, and cleaning up registry entries. During the uninstallation process, the system needs to ensure the correctness and security of the operation to avoid unnecessary damage to the system or data loss. After the installation is completed, the cloud server will also perform some subsequent verification and testing to ensure that the target installation file has been successfully installed and can work normally. At this time, installation refers to starting to execute the installation of the target installation file. If the historical installation file is the same as the target installation file, in order to ensure that the historical installation file cannot be used, the historical installation file can also be uninstalled, and then the target installation file can be installed. If there is no historical installation file in the third computer, there is no need to uninstall the third computer, and the installation of the target installation file can be started directly.
[0059] Furthermore, it is determined that when installing the target installation file on multiple computers in sequence, customized service configurations need to be performed on multiple computers to obtain customized information, that is, how to reasonably allocate the resources stored in the cloud server, so that the resources allocated to multiple computers are in a balanced state. This application provides two ways to generate customized information, one is to generate corresponding customized information based on functions, and the other is to generate corresponding customized information based on permission levels. Next, how to generate customized information in the two ways will be introduced in turn.
[0060] The first method is to configure customized services for multiple computers to obtain customized information; specifically, it includes: obtaining the first number of functions corresponding to the target file; judging whether the first number is the same as the second number, the second number is the total number of computers; when the first number is the same as the second number, it is confirmed that one computer corresponds to one function, and customized information is generated according to the first number of functions. Specifically, after the cloud server obtains the target file, the cloud server divides the target file based on the function, and then obtains the first number of functions. The cloud server obtains the total number of computers, that is, the second number, and the second number can be understood as the number corresponding to multiple computers. By comparing the first number and the second number, it is judged whether there are enough computers to carry these functions, or whether there are some computers that are not assigned any functions. This matching check ensures the reasonable allocation and utilization of resources. When the first number is the same as the second number, it is confirmed that each computer corresponds to one function. This one-to-one allocation method simplifies the configuration process, so that each computer has a clear functional responsibility, and improves the clarity and maintainability of the system. Then, customized information is automatically generated based on the first number of functions. The customized information may include configuration parameters, software installation lists, and service settings for each computer to ensure that each computer can correctly perform the corresponding functions. Automatically generating customized information reduces the workload of manual configuration and improves the accuracy of configuration. By comparing the first number of functions and the second number, and adopting a one-to-one allocation method when the numbers are the same, resource allocation can be optimized to avoid waste of resources (such as too many computers without assigned functions) or insufficient resources (such as insufficient number of computers to support all functions), thereby ensuring the effective use of resources.
[0061] For example, the target files are divided into 5 according to function, that is, the first number is 5, and the total number of computers for this environment configuration is 5, that is, the second number is 5. When the first number is the same as the second number, one computer corresponds to one function. At this time, the customization information assigns a file corresponding to one function to one computer.
[0062] In addition, when the first number is different from the second number, it is confirmed that there is an unreasonable resource allocation. In order to ensure the reasonable allocation of resources, the target file can be reasonably allocated according to the number of computers, that is, the target file can be evenly distributed to multiple computers to jointly complete the installation of the target file. The core purpose of load balancing is to optimize resource usage and improve the processing capacity of the cloud server.
[0063] The second method is to configure customized services for multiple computers to obtain customized information; specifically including: obtaining multiple permission levels corresponding to the target file; obtaining the first permission level, the first permission level is the security level corresponding to the fourth computer; judging whether the first permission level is greater than or equal to the second permission level, the second permission level is the permission level corresponding to the second configuration file, and the second configuration file is any file in the target file; if the first permission level is greater than or equal to the second permission level, confirm that the second configuration file is assigned to the fourth computer to generate customized information. Specifically, after the cloud server obtains the target file, it performs a detailed permission level analysis on the target file. The target file includes multiple files, and each file can be assigned a different permission level according to security requirements. The higher the security level, the higher the corresponding permission level. The permission level is set based on the security level to distinguish the potential impact of the file on the cloud server. The permission level can be a hierarchical system, such as low, medium and high, or a specific numerical range. The cloud server obtains the security level of any one of the multiple computers, and takes the acquisition of the security level of the fourth computer as an example for explanation. The first permission level corresponding to the fourth computer is obtained. The first permission level is obtained by comprehensive evaluation based on factors such as the computer's hardware configuration, operating system version, installed security software, and network management strategy. The security level can also be evaluated by querying the computer's security policy database, and then the first permission level of the fourth computer is obtained. The first permission level reflects the computer's security protection capability and the tolerance of potential risks. When obtaining the second permission level corresponding to the second configuration file, the second configuration file is any file in the target file, and the first permission level is compared to see whether it is greater than or equal to the second permission level. The purpose of the comparison is to ensure that only when the computer's security level is high enough, the high-permission-level file is allowed to be allocated. When the first permission level is greater than or equal to the second permission level, it means that the security protection capability of the fourth computer is strong enough to run the second configuration file safely, then the second configuration file is allocated to the fourth computer, and then the second configuration file is allocated to the fourth computer to generate customized information, the customized information includes the file installation path and the configuration instruction, and is used to guide the automated deployment tool to correctly deploy the second configuration file to the fourth computer. According to the above steps, the cloud server can ensure that when the file is allocated to the computer, the computer's security level and the file's permission level are taken into account, thereby avoiding potential security risks and helping to improve security.
[0064] In addition, when the first permission level is less than the second permission level, it is confirmed that the fourth computer does not meet the allocation requirements of the second configuration file, and it is necessary to obtain any computer other than the fourth computer, and then obtain the permission level corresponding to the computer, and compare the permission level with the second permission level, and then generate customized information based on the comparison result.
[0065] Furthermore, according to the above two methods, customized service configuration can be performed based on the hardware conditions of each computer, and then customized information is generated according to the configuration, and the customized information records the specific configuration file of each computer in detail.
[0066] S204: Determine a first configuration file corresponding to the first computer according to the customization information, and download the first configuration file to the first computer, where the first computer is any one of the multiple computers.
[0067] In the above S204, after the cloud server obtains the customization information, it determines the configuration file corresponding to each computer according to the customization information. Taking the first computer as an example, the cloud server obtains the customization information corresponding to the first computer. At this time, the customization information corresponding to the first computer is the first configuration file corresponding to the first computer. The first configuration file is obtained from the cloud server, and the first configuration file is downloaded from the cloud server to the first computer so that the first computer can install the first configuration file. The first configuration file includes the settings and parameters required for the computer to run the development environment cluster package. According to the above method, the configuration files of other computers in the multiple computers are downloaded in turn and installed in the corresponding computers.
[0068] S205: Obtain installation status corresponding to multiple nodes, where one node corresponds to one computer.
[0069] In the above S205, after confirming that multiple computers have downloaded the corresponding configuration files in sequence, the cloud server can monitor the installation status of each node by monitoring. Since there are multiple computers, multiple computers are understood as multiple nodes, so one computer corresponds to one node. The installation status of multiple nodes is obtained respectively, and the installation status includes installing, installation completed, and installation failed. This step is to ensure that all computers have successfully installed the development environment cluster package.
[0070] S206: If the installation statuses corresponding to the multiple nodes are all in the completed status, it is confirmed that the environment deployment has been completed so as to carry out software development in the Python language.
[0071] In the above S206, the cloud server obtains the installation status corresponding to multiple nodes. If the installation status corresponding to multiple nodes is completed, it is confirmed that the environment deployment has been completed. It means that all computers have successfully installed the development environment cluster package, and all settings and parameters for running the tool have been configured. After the environment deployment is completed, the cloud server can carry out software development in Python language. The completion of the environment deployment at this time is to facilitate the subsequent software development based on Python language. Since all computers have installed the development environment cluster package and configured the corresponding environment, developers can use Python language for software development on these computers, and use the functions of the development environment cluster package to optimize and improve the performance of the software.
[0072] Furthermore, when the installation statuses corresponding to multiple nodes are incomplete, the installation statuses of the respective nodes need to be checked in sequence, so as to timely discover the computers on which the installation is incomplete, and analyze the status of the incomplete installation.
[0073] When traditional manual deployment is done, the entire installation process needs to be deployed manually. In large-scale environment configuration, manual deployment will lead to a long deployment time and prone to errors. When the technical solution of the present application is used to deploy the environment, the environment deployment of the development environment cluster package can be automatically completed through the automated script, and the necessary support and guarantee for the software development of the Python language can be provided, greatly reducing the time of manual intervention. Based on the deployment request sent by the user, the operation is automatically performed according to the preset script and process, reducing the errors caused by human operation errors, and further ensuring the stability and reliability of the system. Automatically detect version updates and detection errors during the deployment process to avoid the occurrence of human errors. For projects that need to be updated frequently, automated deployment can shorten the deployment time, improve the overall deployment efficiency, and save the time of configuration personnel. Automated deployment ensures the consistency and repeatability of each deployment by using standardized scripts and processes. This can avoid the problem of inconsistent deployment results caused by different personnel operations or different environmental influences, and ensure that each deployment can achieve the expected effect.
[0074] like Figure 3As shown, the cloud server receives the system configuration request sent by the user and starts to deploy. During the deployment, the system information needs to be checked. If the check is correct, the basic environment configuration will be entered. If there is an abnormality in the detection result, it is necessary to handle it according to the abnormal prompt so that it can return to start the deployment later. After the basic environment configuration is completed, the basic environment is obtained, and then the installation of the execution file is started. If the file installation is completed, the application is entered. At this time, the application means that the environment configuration is completed, and it can be developed based on the configured environment, and then the deployment is ended. If the file installation is in an unfinished state, it returns to the basic environment so that the file installation of each computer can be monitored in turn to complete the file installation.
[0075] The present application also provides a deployment device based on Python language. Figure 4 This is a schematic diagram of a deployment device based on Python language provided in an embodiment of the present application. Figure 4 The device is a cloud server, which includes an acquisition unit 401, a processing unit 402 and a confirmation unit 403.
[0076] The acquisition unit 401 acquires a deployment request of an environment, where the deployment request is used to install a development environment cluster package.
[0077] Processing unit 402 determines multiple computers to be configured according to the deployment request; performs customized service configuration on the multiple computers to obtain customization information; determines a first configuration file corresponding to a first computer according to the customization information, and downloads the first configuration file to the first computer, where the first computer is any one of the multiple computers; obtains the installation status corresponding to the multiple nodes, where one node corresponds to one computer.
[0078] Confirmation unit 403, if the installation statuses corresponding to the multiple nodes are all in the completed status, confirm that the environment deployment has been completed so as to carry out software development in Python language.
[0079] In a possible implementation, the acquisition unit 401 is used to acquire a system configuration request sent by a user; the processing unit 402 is used to detect system information according to the system configuration request to obtain target information; if the target information is normal configuration prompt information, the basic environment is configured according to preset configuration rules to obtain basic environment configuration information; the acquisition unit 401 is used to acquire a deployment request based on the basic environment configuration information.
[0080] In a possible implementation, the acquisition unit 401 is used to acquire first version information, where the first version information is version information corresponding to the system information; the processing unit 402 is used to acquire second version information from the system configuration request, and to determine whether the first version information is the same as the second version information; if the first version information is the same as the second version information, the target information is obtained according to the first version information.
[0081] In one possible implementation, the processing unit 402 is used to determine the second computer based on the target identification information; the acquisition unit 401 is used to obtain system configuration parameters corresponding to the second computer, the system configuration parameters include mandatory access control system parameters, computer command parameters and dynamic daemon parameters, and the system configuration parameters are the basic environment; the system configuration parameters are configured according to preset configuration rules to obtain basic environment configuration information.
[0082] In a possible implementation, the acquisition unit 401 is used to acquire a target file from a cloud server, where the target file is a file stored in the cloud server, and the target file includes a target installation file and a script file; the acquisition unit 401 is used to acquire a historical installation file of a third computer based on the script file; the processing unit 402 is used to determine whether the historical installation file is consistent with the target installation file; if the historical installation file is inconsistent with the target installation file, the historical installation file is uninstalled; after uninstalling the historical installation file, the target installation file is installed to the third computer.
[0083] In one possible implementation, the acquisition unit 401 is used to acquire a first number of functions corresponding to the target file; the processing unit 402 is used to determine whether the first number is the same as the second number, where the second number is the total number corresponding to the computers; the confirmation unit 403 is used to confirm that one computer corresponds to one function when the first number is the same as the second number, and to generate customized information based on the first number of functions.
[0084] In one possible implementation, the acquisition unit 401 is used to acquire multiple permission levels corresponding to the target file; the acquisition unit 401 is used to acquire the first permission level, which is the security level corresponding to the fourth computer; the processing unit 402 is used to determine whether the first permission level is greater than or equal to the second permission level, which is the permission level corresponding to the second configuration file, and the second configuration file is any file in the target file; the confirmation unit 403 is used to confirm that the second configuration file is assigned to the fourth computer if the first permission level is greater than or equal to the second permission level, so as to generate customized information.
[0085] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0086] The present application also discloses an electronic device. Figure 5 , Figure 5 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0087] The communication bus 502 is used to realize the connection and communication between these components.
[0088] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.
[0089] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0090] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application requests; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0091] Among them, the memory 505 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area. Instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. can be stored; the data storage area can store data involved in the above-mentioned various method embodiments, etc. The memory 505 can also be optionally at least one storage device located away from the aforementioned processor 501.
[0092] like Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program deployed based on the Python language.
[0093] exist Figure 5In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 501 can be used to call the application deployed based on the Python language stored in the memory 505. When executed by one or more processors, the electronic device executes one or more methods described in the above embodiments.
[0094] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0095] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0096] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0100] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, it will be easy for those skilled in the art to think of other embodiments of the present disclosure. This application is intended to cover any variation, use or adaptive change of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure.
Claims
1. A deployment method based on Python language, characterized in that: Applied in a cloud server, the method includes: Obtaining a deployment request for the environment, wherein the deployment request is used to install a development environment cluster package; Determining a plurality of computers to be configured according to the deployment request; Obtaining a target file, wherein the target file is a file stored in the cloud server, and the target file includes a target installation file and a script file; obtaining a historical installation file of a third computer according to the script file; determining whether the historical installation file is consistent with the target installation file; if the historical installation file is inconsistent with the target installation file, uninstalling the historical installation file; after uninstalling the historical installation file, installing the target installation file to the third computer; Customized service configuration is performed on the plurality of computers to obtain customized information; the customized service configuration is performed on the plurality of computers to obtain customized information, specifically comprising: obtaining a first number of functions corresponding to the target file; determining whether the first number is the same as a second number, the second number being the total number corresponding to the computers; when the first number is the same as the second number, confirming that one computer corresponds to one function, and generating the customized information according to the first number of functions; Determine a first configuration file corresponding to a first computer according to the customization information, and download the first configuration file to the first computer, where the first computer is any one of the multiple computers; The installation status corresponding to the multiple nodes is obtained, where one node corresponds to one computer; if the installation status corresponding to the multiple nodes are all completed, it is confirmed that the environment deployment has been completed so as to carry out software development in the Python language.
2. The method according to claim 1, characterized in that Before obtaining the deployment request of the environment, the method further includes: Get the system configuration request sent by the user; Detecting system information according to the system configuration request to obtain target information; If the target information is configuration normal prompt information, the basic environment is configured according to the preset configuration rules to obtain basic environment configuration information; The deployment request is obtained according to the basic environment configuration information.
3. The method according to claim 2, characterized in that The detecting the system information according to the system configuration request to obtain the target information specifically includes: Obtaining first version information, where the first version information is version information corresponding to the system information; Acquire second version information from the system configuration request, and determine whether the first version information is the same as the second version information; If the first version information is the same as the second version information, the target information is obtained according to the first version information.
4. The method according to claim 2, characterized in that: The basic environment is configured according to the preset configuration rules to obtain basic environment configuration information; specifically including: determining a second computer according to the target identification information; Acquire system configuration parameters corresponding to the second computer, the system configuration parameters including mandatory access control system parameters, computer command parameters and dynamic daemon parameters, the system configuration parameters being the basic environment; The system configuration parameters are configured according to the preset configuration rules to obtain the basic environment configuration information.
5. The method according to claim 1, characterized in that The customized service configuration is performed on the plurality of computers to obtain customized information; specifically comprising: Obtaining multiple permission levels corresponding to the target file; Obtaining a first permission level, where the first permission level is a security level corresponding to the fourth computer; determining whether the first permission level is greater than or equal to a second permission level, where the second permission level is a permission level corresponding to a second configuration file, where the second configuration file is any one of the target files; If the first permission level is greater than or equal to the second permission level, confirming to distribute the second configuration file to the fourth computer to generate the customized information.
6. A deployment device based on Python language, characterized in that: The device is a cloud server, and the cloud server comprises an acquisition unit (401), a processing unit (402) and a confirmation unit (403); The acquisition unit (401) acquires a deployment request of an environment, wherein the deployment request is used to install a development environment cluster package; The processing unit (402) determines a plurality of computers to be configured according to the deployment request; obtains a target file, the target file being a file stored in the cloud server, the target file including a target installation file and a script file; Acquire a historical installation file of a third computer according to the script file; determine whether the historical installation file is consistent with the target installation file; if the historical installation file is inconsistent with the target installation file, uninstall the historical installation file; After uninstalling the historical installation file, installing the target installation file to the third computer; performing customized service configuration on the plurality of computers to obtain customized information; The customized service configuration is performed on the plurality of computers to obtain the customized information, specifically comprising: obtaining a first number of functions corresponding to the target file; determining whether the first number is the same as a second number, the second number being the total number of the computers; when the first number is the same as the second number, confirming that one computer corresponds to one function, and generating the customized information according to the first number of functions; Determine a first configuration file corresponding to a first computer according to the customization information, and download the first configuration file to the first computer, where the first computer is any one of the multiple computers; obtain installation status corresponding to multiple nodes, where one node corresponds to one computer; The confirmation unit (403) confirms that the environment deployment has been completed if the installation statuses corresponding to the plurality of nodes are all in the completed status, so as to carry out the software development in Python language.
7. An electronic device, characterized in that: The electronic device (500) comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device (500) executes the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that:The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 5 is performed.
