Detailed Description
In order that the manner in which the invention may be better understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," "initial," "intermediate," "candidate," "alternative," "target," and the like in the description and claims of the invention and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
With the development of cloud computing and containerization technologies, the manner in which software is deployed has shifted from traditional physical servers to more flexible cloud environments and container platforms. The manual software deployment method belongs to one-time static deployment, and has the defects of 1) poor adaptability, such as low response speed to environmental change, incapability of quickly adjusting deployment strategies and difficulty in adapting to new service requirements or hardware changes, 2) low efficiency, such as that manual configuration and debugging occupy a large amount of time and human resources, low deployment efficiency and easiness in error, and 3) low intelligence, such as incapability of automatically optimizing resource configuration according to real-time running conditions of software, and resource waste or performance bottleneck.
Fig. 1 is a schematic flow chart of a software deployment method provided by the invention, and the embodiment is applicable to simple, efficient and high-stability software deployment and software deployment work under a complex service scene adjustment, and can automatically determine a preferred deployment scheme aiming at different application scenes, improve deployment efficiency and service quality, monitor and feed back data of the software in real time, and dynamically adjust deployment strategies. The method may be performed by a software deploying apparatus provided by the present invention, which may be implemented in hardware and/or software, and in a specific embodiment, the apparatus may be integrated in an electronic device. The following embodiment will be described taking the example of the integration of the apparatus in an electronic device, and referring to fig. 1, the method specifically includes the following steps:
S101, determining system parameters of software to be deployed and environment parameters of candidate deployment environments.
The software to be deployed may be understood as software that needs to be deployed, for example, a software product or a software component that has been developed and has not yet been installed and configured into a corresponding running environment (server, client device, cloud platform, etc.), and needs to be deployed. The system parameters of the software to be deployed can be understood as attribute information of the software, are used for configuring the software running environment, controlling the software behaviors and ensuring the compatibility of the software and a target system, can guide how the software interacts with hardware, an operating system, a database, a network and other resources, ensure that the software can run correctly in the target environment, meet business requirements and ensure safety, are key parts in the software deployment process, and directly influence the performance, the function and the stability of the software. The candidate deployment environment can be understood as a potential deployment environment which has software deployment conditions and meets the software operation requirements, but is not finally selected, the candidate deployment environment is usually required to be evaluated, tested and compared to determine whether the candidate deployment environment is suitable for the operation of the software, the most suitable environment is selected for the software deployment, and the reasonable deployment environment selection can improve the operation efficiency, the safety and the maintainability of the software and reduce the deployment risk. The environmental parameters of the candidate deployment environment may be understood as attribute information of the candidate deployment environment, for example, various environmental parameters of the candidate deployment environment, in order to evaluate and determine an environment suitable for deploying the software to be deployed.
The software to be deployed can be understood as a key transition stage from development to online in the life cycle of the software, and the deployment process needs careful planning and execution to ensure that the software can run smoothly and meet business requirements. The software to be deployed is usually a software version with online conditions after the development team is subjected to the stages of demand analysis, design, coding, test and the like, and can be a brand new software product or an updated version of the existing software (function enhancement, bug repair and the like). The system parameters of the software to be deployed mainly include hardware resource-related parameters, operating system-related parameters, network-related parameters, database-related parameters, software running parameters, and security-related parameters, and the hardware resource-related parameters include, but are not limited to, central processing unit (Central Processing Unit, CPU) usage restrictions, memory allocation, disk space, and Input/Output (I/O) configuration. Operating system related parameters include, but are not limited to, operating system version compatibility, system permissions, environment variables, and system service dependencies. Network-related parameters include, but are not limited to, network protocol (Internet Protocol, IP) addresses, ports, network protocols, firewall settings, and domain name resolution. Database-related parameters include, but are not limited to, database connection information, database type, data table structure, and performance parameters. Software operating parameters include, but are not limited to, log configuration, performance tuning parameters, function switches, internationalization and localization settings. Security related parameters include, but are not limited to, user authentication, authorization, encryption configuration, and access control. The system parameters of the software to be deployed can ensure the compatibility, the safety and the service requirement of the software.
The number of the software to be deployed is at least one, the number of the candidate deployment environments is at least one, the system parameters of different software to be deployed are different, the environment parameters of different candidate deployment environments are also different, and determining the system parameters of the software to be deployed and the environment parameters of the candidate deployment environments can be understood as acquiring attribute information of each software to be deployed and attribute information of each candidate deployment environment so as to match a proper deployment environment for each software to be deployed. When a plurality of software to be deployed are provided, the software to be deployed can be ordered according to the generation time, the deployment emergency degree and the software importance degree of the software to be deployed, and then the deployment environments are matched one by one. It is worth noting that the matching work can be executed in parallel, that is, the matching deployment environments are matched for a plurality of software to be deployed in parallel, so that the software deployment efficiency is improved.
In one embodiment, determining system parameters of the software to be deployed and environment parameters of the candidate deployment environment includes determining a system type, a system version, a system dependent item version, a database type and configuration conditions of the software to be deployed using an environment-aware device, and determining hardware specification parameters, network conditions, server status and security policies of the candidate deployment environment using an environment-aware device or a historical software deployment record.
The environment-aware device may be understood as a device that obtains relevant parameters of a software deployment job, where the device may obtain relevant information of the software as well as relevant information of the deployment environment. The system parameters of the software to be deployed include, but are not limited to, the system type, system version, system dependent item version, database type, and configuration conditions of the software to be deployed. The environmental parameters of the candidate deployment environment include, but are not limited to, hardware specification parameters, network conditions, server status, and security policies of the candidate deployment environment.
The system type of the software to be deployed can be understood as the type or architecture form of the software to be deployed, and is used for determining information such as the running mode of the software to be deployed, the deployment requirement, the interaction mode of the software and the environment, and the like. The system version of the software to be deployed can be understood as the version phase in which the software to be deployed itself is located. A system dependency of software to be deployed can be understood as an external component, library or service on which the software to be deployed depends during execution or deployment, the dependency being the basis for normal operation of the software and having to be installed and configured correctly in the deployment environment, e.g. an application based on programming language a requires a specific version of programming language a interpreter and a series of programming language a packages. The version of the system dependency of the software to be deployed can be understood as the version stage of the system dependency itself, the type of the Database of the software to be deployed can be understood as the type of the Database management system (Database MANAGEMENT SYSTEM, DBMS) on which the software to be deployed depends in the running process, and the configuration condition of the software to be deployed can be understood as the configuration requirements of hardware, software, network, security and other aspects which must be satisfied in order to ensure that the software can run normally in the software deployment process. The system parameters of the software to be deployed are used for representing various running requirements of the software to be deployed, the environment-aware equipment can interact with the software to be deployed to obtain comprehensive system parameters of the software to be deployed, and the environment to be deployed is better matched with the deployment environment.
Hardware specification parameters of a candidate deployment environment may be understood as detailed technical indicators describing performance and capacity characteristics of the candidate deployment environment (server, virtual machine, cloud instance, etc.), including but not limited to CPU core number, CPU thread number, CPU main frequency, CPU architecture, CPU cache, memory capacity, memory type, memory frequency, memory channel number, storage capacity, and storage read and write speed. The network conditions of the candidate deployment environment may be understood as describing the relevant parameters and characteristics of the network infrastructure of the candidate deployment environment (server, virtual machine, cloud instance, etc.), which directly affect the communication efficiency, data transmission speed, security of the software, and the interaction capability of the software with other systems, and thus the network conditions must be carefully evaluated in selecting the deployment environment to ensure that they meet the running requirements of the software. Network conditions of the candidate deployment environment include, but are not limited to, forgotten architecture, subnet partitioning, virtual local area network configuration, upstream bandwidth, downstream bandwidth, internal bandwidth, network delay, network jitter, interface type, interface rate, network management address, domain name resolution service configuration, and load case. The server state of a candidate deployment environment may be understood as a state parameter describing an existing server of the candidate deployment environment (server, virtual machine, cloud instance, etc.), including but not limited to the current operating conditions of the server, resource usage, health status, whether similar services exist or conflicting services. The security policy of the candidate deployment environment may be understood as describing software deployment security assurance rules and software running security assurance rules of the candidate deployment environment (server, virtual machine, cloud instance, etc.), including but not limited to firewall rules, access control lists, access control, and identity verification. The environment parameters of the candidate deployment environment can fully represent the performance conditions of the candidate deployment environment and the personalized distinction of each environment so as to screen the deployment environment for the software to be deployed in a targeted manner, and the maximum utilization of resources is realized on the premise of ensuring the safe and stable operation of the software. The environment parameters of the candidate deployment environments can be determined through interaction between the environment sensing equipment and the candidate deployment environments, when a software deployment record exists, the environment sensing equipment is proved to acquire the environment parameters of each deployment environment, the environment parameters of the candidate deployment environments can also be determined according to the historical software deployment record, the workload of the environment sensing equipment is reduced, and the determination efficiency of the environment parameters of the candidate deployment environments is improved.
For example, in a Web application deployment scenario, the environment-aware device determines that the operating system of the server is Ubuntu 20.04LTS, the memory is 32GB, the CPU is 8 cores, and the current network delay is less than 5ms, where the environment parameters of the candidate deployment environment are considered to be network delay less than 5ms, memory is 32GB, the CPU8 cores, and the operating system is Ubuntu 20.04LTS.
S102, processing system parameters of software to be deployed and environment parameters of candidate deployment environments by using a pre-trained deployment scheme decision model to obtain a target deployment environment and a target deployment scheme.
The pre-trained deployment scheme decision model may be understood as an algorithm for determining a deployment environment and a deployment scheme of the software to be deployed according to system parameters of the software to be deployed and environment parameters of candidate deployment environments, the target deployment environment may be understood as an environment suitable for or preferred for deploying the software to be deployed, and the target deployment scheme may be understood as a mode suitable for or preferred for deploying the software to be deployed to the target deployment environment.
The system parameters of the software to be deployed and the environment parameters of the candidate deployment environment are processed by utilizing a pre-trained deployment scheme decision model to obtain a target deployment environment and a target deployment scheme, wherein the system parameters of the software to be deployed and the environment parameters of the candidate deployment environment can be input into the deployment scheme decision model, the deployment scheme decision model carries out multi-dimensional evaluation and resolution on the input parameters, and the target deployment environment and the target deployment scheme are output. The deployment scheme decision model can also be used for determining optimal collocation according to the association relation between the system parameters of the software to be deployed and the environment parameters of the candidate deployment environments, namely, the candidate deployment environments (corresponding to the target deployment environments) which are most suitable for each software to be deployed, and the low-cost and high-efficiency software deployment scheme (corresponding to the target deployment scheme) between the two is designed in a targeted manner.
In one embodiment, the method comprises the steps of processing system parameters of software to be deployed and environment parameters of candidate deployment environments to obtain a target deployment environment and a target deployment scheme, determining matching information of the environment parameters of the candidate deployment environments and the system parameters of the software to be deployed, screening the target deployment environment of the software to be deployed from the candidate deployment environments according to preset matching conditions and matching information, and determining the target deployment scheme based on application characteristics of the software to be deployed and the environment parameters of the target deployment environment.
The matching information can be understood as the matching degree of the candidate deployment environment and the software to be deployed, which is quantized data after comprehensive evaluation, specifically, the matching degree of the candidate deployment environment which can safely and stably operate the software to be deployed and has less resource waste and the software to be deployed is higher, the smaller the resource waste is, the higher the matching degree is, the matching degree of the candidate deployment environment which can safely and stably operate the software to be deployed and has more resource waste and the software to be deployed is medium, and the matching degree of the candidate deployment environment which cannot safely and stably operate the software to be deployed and the software to be deployed is low. The purpose of the arrangement is to quantify the screening mode of the target deployment environment and improve the determination accuracy of the target deployment environment.
Specifically, the preset matching condition may be understood as an indication of screening the target deployment environment from the candidate deployment environments in combination with the matching result, for example, screening the candidate deployment environment with the highest matching degree as the target deployment environment, screening one or more candidate deployment environments with the highest matching requirement as the target deployment environment, and the like, which is not limited in the present invention. Different software has different characteristics, certain differences may exist in the deployment mode, the application characteristics of the software to be deployed can be understood as the characteristic requirements of the software to be deployed, and the target deployment scheme is determined by combining the application characteristics of the software to be deployed and the environmental parameters of the target deployment environment, so that the personalized exclusive deployment scheme of the software to be deployed can be made, and the software deployment quality is ensured. For example, if there are multiple similar application instances (i.e., software to be deployed) in the target deployment environment, the target deployment scenario may recommend sharing certain resources to save cost, and if high concurrent access needs are detected, the target deployment scenario may suggest configuring the load balancer and additional compute nodes. Notably, the invention needs to consider factors such as safety, compliance and the like, and ensure the feasibility and safety of the target deployment scheme.
Further, the target deployment scheme is determined based on the application characteristics of the software to be deployed and the environmental parameters of the target deployment environment, wherein the target deployment scheme comprises a high-performance deployment mode when the application characteristics of the software to be deployed meet the high-computation-power standard and the hardware resources of the target deployment environment meet the high-execution-power standard, a multi-thread deployment mode when the application characteristics of the software to be deployed meet the high concurrency standard and the deployment request processing time is smaller than a preset time threshold, and an encryption deployment mode when the application characteristics of the software to be deployed meet the sensitive application conditions.
The high computational power standard is used for evaluating the hardware resource requirement of the software to be deployed, the application characteristic of the software to be deployed accords with the high computational power standard, which means that the software to be deployed needs higher hardware resources, the high execution power standard is met by the hardware resources of the target deployment environment, which means that the hardware resources of the target deployment environment are sufficient, for example, if an operating system of each node in a cluster of the target deployment environment is Ubuntu 20.04LTS, all the nodes are provided with 8GB random access memory (Random Access Memory, RAM) and 4-core CPU, the network bandwidth of the target deployment environment is sufficient, and the hardware resources accord with the high execution power standard. A high performance deployment may be understood as a software deployment that prioritizes computing power. The application characteristics of the software to be deployed conform to the high concurrency standard, which means that the software to be deployed does not work in a single thread, and there is a concurrency demand, and the fact that the processing time of the deployment request is smaller than the preset time threshold means that the processing time of a single request of the software is shorter, and the multi-thread deployment mode can be understood as a software deployment mode taking multiple processes as the priority measurement index so as to properly promote the number of copies. The application characteristics of the software to be deployed conform to the sensitive application conditions, which can be understood that the software to be deployed designs security sensitive data, needs data protection, and the encryption deployment mode can be understood as a deployment mode which designs network security enhancement measures, including but not limited to enabling secure transport layer protocol (Transport Layer Security, TLS) encryption and limiting access rights of an application programming interface (Application Programming Interface, API).
The method and the system also consider factors such as compatibility and cost effectiveness when determining the target deployment scheme, and consider the compatibility to be understood as checking the compatibility between the software to be deployed and the deployment environment, so that the software package and the service required by the software to be deployed are ensured to be installed in the target deployment environment, and all dependence items cannot collide. Considering cost effectiveness can be understood as calculating the cost of different options (combination of deployment environment and deployment solution), selecting the most cost effective solution, reducing deployment costs. In addition, if the most suitable deployment environment has similar application running, it may be recommended to increase the number of copies to distribute the load, or set a horizontal auto-expansion policy to automatically increase the number of instances during the peak traffic period, so as to ensure the running state of the software.
S103, deploying the software to be deployed to a target deployment environment based on the target deployment scheme.
In particular, deploying software to be deployed to a target deployment environment based on a target deployment scenario may be understood as deploying the software to be deployed to the target deployment environment for use by a user according to instructions and steps of the target deployment scenario, including, but not limited to, the installation order, installation location, and installation manner of various software association packages.
The deployment work is performed by the executor, and different deployment modes can be provided for different service scenes. For example, in a containerized environment, an executor may create new computing units or scale existing controllers through an API, and in a virtual machine environment, initiate new instances or modify the configuration of existing instances through the cloud provider's API. Each deployment mode has the characteristics, and different deployment modes are adopted according to different conditions, so that the deployment efficiency and the software service quality can be ensured.
In one embodiment, the step S103 specifically comprises the steps of determining a deployment mode of an application to be deployed based on deployment requirements of the software to be deployed, deployment rules of a target deployment environment and an application scene of the target deployment scheme, determining an intermediate deployment environment based on environment parameters of the target deployment environment, deploying the software to be deployed to the intermediate deployment environment by using the target deployment scheme and the deployment mode of the application to be deployed, operating the software to be deployed for a preset time period, acquiring operation parameters of the software to be deployed, and deploying the software to be deployed to the target deployment environment by using the target deployment scheme and the deployment mode of the application to be deployed when the operation parameters of the software to be deployed meet safe operation conditions.
The deployment requirement of the software to be deployed can be understood as the personalized deployment requirement carried by the software to be deployed, the deployment rule of the target deployment environment can be understood as the personalized deployment characteristic of the target deployment environment, and the application scene of the target deployment scheme can be understood as the service corresponding to the target deployment scheme. The deployment requirements of the software to be deployed, the deployment rules of the target deployment environment and the application scene of the target deployment scheme may have corresponding relations with the deployment modes, and the deployment modes of the application to be deployed are indicated. Specifically, different deployment requirements, deployment rules and application scenes correspond to different deployment modes, for example, the situation that new and old versions coexist is applicable to a bluish-green deployment mode, the situation that old versions are gradually replaced is applicable to a rolling update mode, and penetration popularization is applicable to a canary release mode. The blue-green deployment mode is to prepare a new version of the application in a separate environment, and switch traffic to the new version immediately after verification is error-free, which minimizes downtime. The rolling update mode is to replace only a part of the examples each time, so that the whole process always has a part of examples in a working state, and the rolling update mode is suitable for applications which cannot bear long-time shutdown. The canary release mode gradually pushes the new version application to a small part of user groups, and decides whether to comprehensively popularize after observing the group performance, so that the canary release mode is suitable for a large-scale internet platform, is convenient for testing new functions under the condition that most user experiences are not affected, finishes upgrading on the premise of not interrupting service, and can also timely find problems and roll back to a stable version.
Before deployment, although the software is verified by the development environment and the test environment, the software is not yet operated in the actual production environment, and a certain difference may exist between the target deployment environment and the development and test environments, for example, a hardware configuration, an operating system version, a network environment and the like, so that compatibility and stability of the software in the actual operation environment need to be verified by the same environment as the target deployment environment. The intermediate deployment environment is an environment for verifying the performance of the software, can be the same as or an idle candidate deployment environment with the target deployment environment, and can also be a virtual environment generated by simulating various parameters of the target deployment environment, and the invention is not limited to the environment.
The preset duration can be understood as a preset life cycle running time, and after the software to be deployed runs for the preset duration, the obtained running parameters have reference values, so that the characteristics of stability, safety and the like of the software to be deployed can be represented. The safe operation condition can be understood as a basis for judging whether the software to be deployed is operated safely and stably, when the operation parameter of the software to be deployed accords with the safe operation condition, the software to be deployed is proved to be operated safely and stably in the intermediate deployment environment, no abnormality exists, the software to be deployed can be deployed to the target deployment environment, and the deployment mode is the same as that of the intermediate deployment environment and is not described herein.
Furthermore, when the operation parameters of the software to be deployed do not accord with the safe operation conditions, the invention also determines the abnormal operation parameters, determines the adjustment deployment scheme of the software to be deployed based on the abnormal operation parameters and the parameter types of the abnormal operation parameters, and executes the adjustment deployment scheme of the software to be deployed so as to complete the deployment work of the software to be deployed.
The abnormal operation parameters are understood to be operation data which does not conform to safety and compliance, and the parameter types of the abnormal operation parameters are used for representing the types of the abnormal operation data, including, but not limited to, overlong response time, rising error rate, performance problems, safety events, configuration errors and insufficient resources. The invention sets different software deployment flow adjustment modes aiming at different types of anomalies, and has the advantages of being capable of solving the anomalies in a targeted way, improving the stability and reliability of software deployment work, enhancing the self-recovery capability of a software deployment system and better serving users.
The method includes the steps of automatically expanding cluster scale when service is unavailable due to rapid increase of traffic, notifying a development team to repair and rollback to a previous stable version due to problems caused by code defects so as to maintain daily use of users, automatically triggering a re-evaluation flow when monitoring indexes show that response time is overlong or error rate is increased, immediately taking protection measures such as temporarily blocking an IP address, enhancing identity verification strength and the like when potential security threats (distributed denial of service attacks (Distributed Denial of Service, DDoS), malicious login attempts and the like) are detected, sending alarm information to an administrator so as to process the security threats in time, automatically correcting configuration errors (port conflicts, path inequality and the like) when configuration errors occur (such as automatically changing service monitoring ports or adjusting file paths so as to ensure successful execution of deployment work, and suggesting to increase more computing resources or optimize existing resource allocation to prevent performance degradation if the resource utilization rate is detected to reach a threshold (CPU utilization rate exceeds 90%, CPU utilization rate exceeds 85% and the like).
Fig. 2 is a schematic diagram of a software deployment manner provided in the present invention, where the software in fig. 2 represents software to be deployed, an environment awareness module is configured to obtain system parameters of the software to be deployed and environment parameters of a candidate deployment environment, and only a decision engine is configured to determine a target deployment environment and a target deployment scheme, and an executor is configured to execute software deployment work. The monitoring feedback module is used for executing detection and adjustment tasks after software deployment work and transmitting deployment information to the control platform, and can also receive deployment tasks issued by the control platform.
According to the technical scheme, the system parameters of the software to be deployed and the environment parameters of the candidate deployment environments are analyzed by using the deployment scheme decision model, the deployment environments and the deployment schemes of the software to be deployed are automatically determined, the software to be deployed is deployed to the corresponding environments according to the determined schemes, the efficiency and the accuracy of the software deployment work are effectively improved, the difficulty of the software deployment work is reduced, and the use experience of users is improved.
Fig. 3 is a flow chart of another software deployment method provided by the present invention, and on the basis of the foregoing embodiment, a preferred software deployment method is provided, specifically, as shown in fig. 3, the method includes:
S201, determining the system type, the system version, the system dependent item version, the database type and the configuration condition of the software to be deployed by using the environment-aware device.
S202, determining hardware specification parameters, network conditions, server states and security policies of candidate deployment environments by using environment-aware equipment or historical software deployment records.
S203, determining matching information of environment parameters of the candidate deployment environment and system parameters of the software to be deployed, and screening a target deployment environment of the software to be deployed from the candidate deployment environment according to preset matching conditions and matching information.
S204, determining a target deployment scheme based on the application characteristics of the software to be deployed and the environmental parameters of the target deployment environment.
S205, determining a deployment mode of the application to be deployed based on the deployment requirement of the software to be deployed, the deployment rule of the target deployment environment and the application scene of the target deployment scheme.
S206, determining an intermediate deployment environment based on the environment parameters of the target deployment environment, and deploying the software to be deployed to the intermediate deployment environment by using the target deployment scheme and the deployment mode of the application to be deployed.
S207, running the software to be deployed for a preset time period, and acquiring running parameters of the software to be deployed.
S208, when the operation parameters of the software to be deployed meet the safe operation conditions, deploying the software to be deployed to a target deployment environment by using a target deployment scheme and a deployment mode of the application to be deployed.
Fig. 4 is a schematic structural diagram of a software deploying device provided by the invention. As shown in fig. 4, the apparatus includes a parameter determination module 301, a scenario determination module 302, and a software deployment module 303.
The parameter determining module 301 is configured to determine a system parameter of software to be deployed and an environment parameter of a candidate deployment environment.
The solution determining module 302 is configured to process, by using a pre-trained deployment solution decision model, system parameters of software to be deployed and environment parameters of a candidate deployment environment, to obtain a target deployment environment and a target deployment solution.
The software deployment module 303 is configured to deploy the software to be deployed to the target deployment environment based on the target deployment scheme.
Optionally, the parameter determining module 301 is specifically configured to determine, by using the environment-aware device, a system type, a system version, a system dependency version, a database type, and a configuration condition of software to be deployed, and determine, by using the environment-aware device or a historical software deployment record, a hardware specification parameter, a network condition, a server state, and a security policy of the candidate deployment environment.
Optionally, the solution determining module 302 is specifically configured to determine matching information of environment parameters of the candidate deployment environment and system parameters of the software to be deployed, screen a target deployment environment of the software to be deployed from the candidate deployment environment according to preset matching conditions and matching information, and determine a target deployment solution based on application features of the software to be deployed and the environment parameters of the target deployment environment.
Optionally, the scheme determining module 302 is specifically configured to determine that the target deployment scheme is a high-performance deployment mode when the application features of the software to be deployed meet the high-computational-power standard and the hardware resources of the target deployment environment meet the high-execution-power standard, determine that the target deployment scheme is a multi-thread deployment mode when the application features of the software to be deployed meet the high concurrency standard and the processing time of the deployment request is less than a preset time threshold, and determine that the target deployment scheme is an encryption deployment mode when the application features of the software to be deployed meet the sensitive application conditions.
Optionally, the software deployment module 303 is specifically configured to determine a deployment mode of an application to be deployed based on a deployment requirement of the software to be deployed, a deployment rule of a target deployment environment and an application scenario of a target deployment scheme, determine an intermediate deployment environment based on an environmental parameter of the target deployment environment, deploy the software to be deployed to the intermediate deployment environment by using the target deployment scheme and the deployment mode of the application to be deployed, operate the software to be deployed for a preset duration, and obtain an operation parameter of the software to be deployed, and deploy the software to the target deployment environment by using the target deployment scheme and the deployment mode of the application to be deployed when the operation parameter of the software to be deployed meets a safe operation condition.
Optionally, the software deployment module 303 is further configured to determine an abnormal operation parameter when the operation parameter of the software to be deployed does not conform to the safe operation condition, determine an adjustment deployment scheme of the software to be deployed based on the abnormal operation parameter and the parameter type of the abnormal operation parameter, and execute the adjustment deployment scheme of the software to be deployed to complete the deployment work of the software to be deployed.
The software deployment device provided by the embodiment can execute the software deployment method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 5 is a schematic structural diagram of an electronic device provided by the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a Memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a random access Memory (also referred to as random access Memory, random Access Memory, RAM) 13, etc., in which the Memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including an input unit 16, such as a keyboard, mouse, etc., an output unit 17, such as various types of displays, speakers, etc., a storage unit 18, such as a magnetic disk, optical disk, etc., and a communication unit 19, such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a software deployment method.
In some embodiments, the software deployment method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the software deployment method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the software deployment method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with the user, for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form (including acoustic input, speech input, or tactile input).
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server) or that includes a middleware component (e.g., an application server) or that includes a front-end component through which a user can interact with an implementation of the systems and techniques described here, or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), a blockchain network, and the Internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
In an embodiment, the invention also includes a computer program product comprising a computer program which, when executed by a processor, implements the software deployment method of any of the embodiments of the invention.
Computer program product in the implementation, the computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language and also comprising a conventional procedural programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.