CN117931218A - Soft load installation method, device, electronic device and storage medium - Google Patents
Soft load installation method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN117931218A CN117931218A CN202410095735.0A CN202410095735A CN117931218A CN 117931218 A CN117931218 A CN 117931218A CN 202410095735 A CN202410095735 A CN 202410095735A CN 117931218 A CN117931218 A CN 117931218A
- Authority
- CN
- China
- Prior art keywords
- soft load
- host
- load
- soft
- installation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
本申请实施例提供了一种软负载的安装方法、装置、电子设备及计算机可读存储介质,涉及软件工程中的灰度发布技术领域。该方法包括:展示软负载管理界面,软负载管理界面包括第一输入框;响应于第一输入框输入软负载安装包标识、安装脚本参数信息和主机标识,从对象存储工具中下载软负载安装包标识对应的软负载安装包,并将软负载安装包发送至主机标识对应的主机,软负载安装包包括软负载的第一安装脚本;根据安装脚本参数信息修改第一安装脚本,获得软负载的第二安装脚本;指示主机执行第二安装脚本,安装软负载。本申请实施例通过终端指示主机执行第二安装脚本,安装软负载,实现了软负载的自动安装,提高软负载安装过程的效率。
The embodiment of the present application provides a method, device, electronic device and computer-readable storage medium for installing a soft load, and relates to the field of grayscale release technology in software engineering. The method includes: displaying a soft load management interface, the soft load management interface includes a first input box; in response to the first input box, inputting a soft load installation package identifier, installation script parameter information and a host identifier, downloading a soft load installation package corresponding to the soft load installation package identifier from an object storage tool, and sending the soft load installation package to a host corresponding to the host identifier, the soft load installation package including a first installation script for the soft load; modifying the first installation script according to the installation script parameter information to obtain a second installation script for the soft load; instructing the host to execute the second installation script to install the soft load. The embodiment of the present application instructs the host to execute the second installation script and install the soft load through the terminal, thereby realizing the automatic installation of the soft load and improving the efficiency of the soft load installation process.
Description
技术领域Technical Field
本申请涉及灰度发布技术领域,具体而言,本申请涉及一种软负载自动安装方法、装置、电子设备及计算机可读存储介质The present application relates to the field of grayscale release technology. Specifically, the present application relates to a method, device, electronic device and computer-readable storage medium for automatic installation of soft loads.
背景技术Background technique
升级服务器中的应用时,需要将应用源码或程序包上传到服务器,然后停止掉老版本服务,再启动新版本。但是这种简单的发布方式存在两个问题,一方面,在新版本升级过程中,服务是暂时中断的,另一方面,如果新版本有问题,升级失败,回滚起来也非常麻烦,容易造成更长时间的服务不可用。When upgrading applications on the server, you need to upload the application source code or package to the server, then stop the old version service and start the new version. However, this simple release method has two problems. On the one hand, the service is temporarily interrupted during the new version upgrade process. On the other hand, if there is a problem with the new version and the upgrade fails, it is very troublesome to roll back, which can easily cause longer service unavailability.
灰度发布是解决上述问题的一种发布方式,在灰度发布开始后,先启动一个新版本应用,但是并不直接将流量切过来,而是测试人员对新版本进行线上测试,如果没有问题,那么可以将少量的用户流量导入到新版本上,当确认新版本运行良好后,再逐步将更多的流量导入到新版本上,直到将全部的流量都切换到新版本上,最后关闭剩下的老版本服务,完成灰度发布,如果在灰度发布过程中发现了新版本有问题,立即将流量切回老版本上,这样,就会将负面影响控制在最小范围内。Grayscale release is a release method to solve the above problems. After the grayscale release begins, a new version of the application is started first, but the traffic is not directly switched over. Instead, the tester conducts an online test on the new version. If there is no problem, a small amount of user traffic can be imported to the new version. When it is confirmed that the new version runs well, more traffic is gradually imported to the new version until all traffic is switched to the new version. Finally, the remaining old version services are closed to complete the grayscale release. If a problem is found in the new version during the grayscale release process, the traffic is immediately switched back to the old version. In this way, the negative impact will be controlled to a minimum.
现有技术中通过基于软件的负载均衡(软负载)来实现灰度发布,但当前主流的技术方案,都是人工手动安装部署软负载,耗费时间长,安装效率低,并且容易出现因操作错误导致安装失败的问题。In the prior art, grayscale release is achieved through software-based load balancing (soft load), but the current mainstream technical solutions are all manual installation and deployment of soft load, which is time-consuming, has low installation efficiency, and is prone to installation failures due to operational errors.
发明内容Summary of the invention
本申请实施例了一种软负载的安装方法、装置、电子设备和计算机可读存储介质,可以解决现有技术的上述问题。技术方案如下:The embodiments of the present application provide a method, device, electronic device and computer-readable storage medium for installing a soft load, which can solve the above-mentioned problems of the prior art. The technical solution is as follows:
根据本申请实施例的第一个方面,提供了一种软负载的安装方法,该方法包括:According to a first aspect of an embodiment of the present application, a method for installing a soft load is provided, the method comprising:
展示软负载管理界面,所述软负载管理界面包括第一输入框;Displaying a soft load management interface, wherein the soft load management interface includes a first input box;
响应于所述第一输入框输入软负载安装包标识、安装脚本参数信息和主机标识,从对象存储工具中下载所述软负载安装包标识对应的所述软负载安装包,并将所述软负载安装包发送至所述主机标识对应的主机,所述软负载安装包包括软负载的第一安装脚本;In response to inputting a soft load installation package identifier, installation script parameter information, and a host identifier in the first input box, downloading the soft load installation package corresponding to the soft load installation package identifier from the object storage tool, and sending the soft load installation package to the host corresponding to the host identifier, wherein the soft load installation package includes a first installation script of the soft load;
根据所述安装脚本参数信息修改所述第一安装脚本,获得所述软负载的第二安装脚本;Modify the first installation script according to the installation script parameter information to obtain a second installation script for the soft load;
指示所述主机执行所述第二安装脚本,安装所述软负载。Instruct the host to execute the second installation script to install the soft load.
根据本申请实施例的第二个方面,提供了一种软负载的安装装置,该装置包括:According to a second aspect of an embodiment of the present application, a soft load installation device is provided, the device comprising:
展示模块,用于展示软负载管理界面,所述软负载管理界面包括第一输入框;A display module, used to display a soft load management interface, wherein the soft load management interface includes a first input box;
响应模块,用于响应于所述第一输入框输入软负载安装包标识、安装脚本参数信息和主机标识,根据所述软负载安装包标识、安装脚本参数信息和所述主机标识,从对象存储工具中下载所述软负载安装包标识对应的所述软负载安装包到所述主机标识对应的主机,所述软负载安装包包括软负载的第一安装脚本;a response module, configured to respond to the input of a soft load installation package identifier, installation script parameter information, and a host identifier in the first input box, and download the soft load installation package corresponding to the soft load installation package identifier from the object storage tool to the host corresponding to the host identifier according to the soft load installation package identifier, the installation script parameter information, and the host identifier, wherein the soft load installation package includes a first installation script of the soft load;
获得模块,用于根据所述安装脚本参数信息修改所述第一安装脚本,获得所述软负载的第二安装脚本;An obtaining module, used to modify the first installation script according to the installation script parameter information to obtain a second installation script of the soft load;
指示模块,用于指示所述主机执行所述第二安装脚本,安装所述软负载。An instruction module is used to instruct the host to execute the second installation script to install the soft load.
根据本申请实施例的第三个方面,提供了一种电子设备,该电子设备包括存储器、处理器及存储在存储器上的计算机程序,处理器执行计算机程序以实现上述方法的步骤。According to a third aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the above method.
根据本申请实施例的第四个方面,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述方法的步骤。According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
根据本申请实施例的第五个方面,提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现上述方法的步骤。According to a fifth aspect of an embodiment of the present application, a computer program product is provided, including a computer program, which implements the steps of the above method when the computer program is executed by a processor.
本申请实施例提供的技术方案带来的有益效果是:The beneficial effects of the technical solution provided by the embodiment of the present application are:
通过展示软负载管理界面,向运维人员提供第一输入框,以使得运维人员能够在明确需要在第一输入框中输入需要安装的软负载对应的软负载安装包标识,需要安装软负载的主机的主机标识,以及软负载的安装脚本参数信息;通过对第一输入框中输入的软负载安装包标识、安装脚本参数信息和主机标识进行响应,下载软负载安装包标识对应的软负载安装包,并将软负载安装包发送到主机标识对应的主机上,使得不用手动操作主机下载软负载安装包,提高下载软负载安装包的效率;通过第一输入框中的安装脚本参数信息修改软负载安装包中的第一安装脚本生成第二安装脚本;通过指示主机执行第二安装脚本,使得主机通过执行第二安装脚本,安装软负载,从而不用手动执行安装命令实现安装软负载,提高软负载安装过程的效率。By displaying the soft load management interface, a first input box is provided to the operation and maintenance personnel, so that the operation and maintenance personnel can clearly enter the soft load installation package identifier corresponding to the soft load to be installed, the host identifier of the host on which the soft load needs to be installed, and the installation script parameter information of the soft load in the first input box; by responding to the soft load installation package identifier, the installation script parameter information and the host identifier entered in the first input box, the soft load installation package corresponding to the soft load installation package identifier is downloaded, and the soft load installation package is sent to the host corresponding to the host identifier, so that there is no need to manually operate the host to download the soft load installation package, thereby improving the efficiency of downloading the soft load installation package; modifying the first installation script in the soft load installation package through the installation script parameter information in the first input box to generate a second installation script; by instructing the host to execute the second installation script, the host installs the soft load by executing the second installation script, thereby achieving the installation of the soft load without manually executing the installation command, thereby improving the efficiency of the soft load installation process.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
图1为本申请实施例提供的实现软负载的安装的系统架构示意图;FIG1 is a schematic diagram of a system architecture for implementing soft load installation provided in an embodiment of the present application;
图2为本申请实施例提供的一种软负载的安装方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a method for installing a soft load provided in an embodiment of the present application;
图3为本申请实施例提供的一种软负载的文件列表示意图;FIG3 is a schematic diagram of a file list of a soft load provided in an embodiment of the present application;
图4为本申请实施例提供的一种修改负载均衡软件的配置文件的流程示意图;FIG4 is a schematic diagram of a flow chart of modifying a configuration file of a load balancing software provided in an embodiment of the present application;
图5为本申请实施例提供的另一种软负载的安装方法的流程示意图;FIG5 is a schematic diagram of a flow chart of another method for installing a soft load provided in an embodiment of the present application;
图6为本申请实施例提供的一种软负载的安装方法的交互式流程示意图;FIG6 is a schematic diagram of an interactive flow of a method for installing a soft load provided in an embodiment of the present application;
图7为本申请实施例提供的另一种软负载的安装方法的交互式流程示意图;FIG7 is a schematic diagram of an interactive flow chart of another method for installing a soft load provided in an embodiment of the present application;
图8为本申请实施例提供的一种软负载的安装装置的结构示意图;FIG8 is a schematic structural diagram of a soft load installation device provided in an embodiment of the present application;
图9为本申请实施例提供的一种软负载的安装电子设备的结构示意图。FIG. 9 is a schematic diagram of the structure of an electronic device for installing a soft load provided in an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请中的附图描述本申请的实施例。应理解,下面结合附图所阐述的实施方式,是用于解释本申请实施例的技术方案的示例性描述,对本申请实施例的技术方案不构成限制。The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请实施例所使用的术语“包括”以及“包含”是指相应特征可以实现为所呈现的特征、信息、数据、步骤、操作、元件和/或组件,但不排除实现为本技术领域所支持其他特征、信息、数据、步骤、操作、元件、组件和/或它们的组合等。应该理解,当我们称一个元件被“连接”或“耦接”到另一元件时,该一个元件可以直接连接或耦接到另一元件,也可以指该一个元件和另一元件通过中间元件建立连接关系。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的术语“和/或”指示该术语所限定的项目中的至少一个,例如“A和/或B”可以实现为“A”,或者实现为“B”,或者实现为“A和B”。It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and/or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and/or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and/or" used herein indicates at least one of the items defined by the term, for example, "A and/or B" may be implemented as "A", or as "B", or as "A and B".
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application more clear, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
首先对本申请涉及的几个名词进行介绍和解释:First, several terms involved in this application are introduced and explained:
灰度发布:在生产环境稳定集群之外,额外部署一个小规模的灰度集群,并通过流量控制,将部分流量引入到灰度集群,进行生产全量发布前的灰度验证。如果验证失败,可立刻将所有流量切回原本存在的稳定集群,取消灰度发布过程。如果验证成功,则将新版本进行全量发布升级至生产环境稳定集群,即将所有流量引入新版本中,完成灰度发布过程。Grayscale release: In addition to the stable cluster in the production environment, deploy a small-scale grayscale cluster and introduce part of the traffic into the grayscale cluster through traffic control to perform grayscale verification before full production release. If the verification fails, all traffic can be immediately switched back to the existing stable cluster to cancel the grayscale release process. If the verification succeeds, the new version will be fully released and upgraded to the stable cluster in the production environment, that is, all traffic will be introduced into the new version to complete the grayscale release process.
一个产品,如果需要快速迭代开发上线,又要保证质量,保证刚上线的系统,一旦出现问题那么可以很快的控制影响面,就需要设计一套灰度发布系统。灰度发布系统的作用在于,可以根据自己的配置,来将用户的流量导到新上线的系统上,来快速验证新的功能修改,而一旦出问题,也可以马上的恢复。If a product needs to be developed and launched quickly and the quality needs to be guaranteed, and the newly launched system needs to be able to quickly control the impact of any problems, then a grayscale release system needs to be designed. The grayscale release system can direct user traffic to the newly launched system according to its own configuration to quickly verify new functional modifications, and can also be restored immediately if problems occur.
灰度发布是指在软件版本发布过程中,能够平滑过渡的一种发布方式。假设当前软件版本是A,新的软件版本是B,当软件开发公司对某个软件进行版本升级发布时,服务器控制一部分用户继续使用版本A,另一部分用户开始使用版本B;如果用户在使用版本B的过程中没有出现异常,则逐步将所有用户都迁移到版本B。这种逐渐过渡发布的方式可以保证整体系统的稳定。Grayscale release refers to a release method that can smoothly transition during the software version release process. Assuming that the current software version is A and the new software version is B, when the software development company upgrades and releases a certain software version, the server controls some users to continue using version A, while other users start using version B; if there are no abnormalities when users use version B, all users will be gradually migrated to version B. This gradual transition release method can ensure the stability of the overall system.
灰度路由规则是一种在软件发布过程中逐步将新版本推送给一部分用户的策略。灰度路由规则可以根据不同的条件来决定哪些用户能够接收到新版本,以确保新版本的稳定性和可靠性。Grayscale routing rules are a strategy for gradually pushing new versions to a subset of users during the software release process. Grayscale routing rules can determine which users can receive the new version based on different conditions to ensure the stability and reliability of the new version.
负载均衡(Load Balance):其含义就是指将负载(工作任务)进行平衡、分摊到多个操作单元上进行运行,例如FTP服务器、Web服务器、企业核心应用服务器和其它主要任务服务器等,从而协同完成工作任务。负载均衡构建在原有网络结构之上,它提供了一种透明且廉价有效的方法扩展服务器和网络设备的带宽、加强网络数据处理能力、增加吞吐量、提高网络的可用性和灵活性。Load Balance: It means to balance the load (work tasks) and distribute them to multiple operation units, such as FTP servers, Web servers, enterprise core application servers and other major task servers, so as to complete the work tasks in a coordinated manner. Load balancing is built on the original network structure. It provides a transparent, cheap and effective method to expand the bandwidth of servers and network devices, enhance network data processing capabilities, increase throughput, and improve network availability and flexibility.
软负载:指软件负载均衡,在系统服务器上安装相应负载均衡软件,进行相关的配置,达到均衡负载的目的,它基于特定的使用环境、配置简单、使用灵活、成本较低,能够解决大部分需求问题,常用的软件有:Nginx。Soft load: refers to software load balancing. Install the corresponding load balancing software on the system server and make relevant configurations to achieve the purpose of load balancing. It is based on a specific usage environment, has simple configuration, flexible use, and low cost. It can solve most demand problems. Commonly used software includes: Nginx.
硬负载:指硬件负载均衡,是直接在服务器和外部网络间安装负载均衡设备,常用的硬件设备有:F5。Hard load: refers to hardware load balancing, which is to install a load balancing device directly between the server and the external network. Commonly used hardware devices include: F5.
Nginx:是一个高性能的超文本传输协议(Hypertext Transfer Protocol,HTTP)和反向代理服务器,也是一个IMAP/POP3/SMTP代理服务器,是使用最为广泛的HTTP软负载均衡器,高效的性能、稳定性、丰富的功能集、示例配置文件和低系统资源的消耗。采用的是反向代理技术,代理服务器来接受Internet上的连接请求,然后将请求转发给内部网络上的服务器,并将从服务器上得到的结果返回给Internet上请求连接的客户端,此时代理服务器对外就表现为一个服务器。反向代理负载均衡技术是把将来自internet上的连接请求以反向代理的方式动态地转发给内部网络上的多台服务器进行处理,从而达到负载均衡的目的。Nginx: It is a high-performance Hypertext Transfer Protocol (HTTP) and reverse proxy server, as well as an IMAP/POP3/SMTP proxy server. It is the most widely used HTTP soft load balancer, with high performance, stability, rich feature set, sample configuration files and low system resource consumption. It uses reverse proxy technology. The proxy server accepts connection requests from the Internet, then forwards the requests to the server on the internal network, and returns the results obtained from the server to the client requesting the connection on the Internet. At this time, the proxy server appears to the outside as a server. Reverse proxy load balancing technology is to dynamically forward connection requests from the Internet to multiple servers on the internal network in a reverse proxy manner for processing, thereby achieving the purpose of load balancing.
OpenResty(也称为ngx_openresty)是一个基于Nginx的全功能Web应用服务器,它将Nginx与一组附加模块和Lua脚本语言集成在一起,以提供高性能的Web应用程序开发和扩展性。OpenResty (also known as ngx_openresty) is a full-featured web application server based on Nginx that integrates Nginx with a set of additional modules and the Lua scripting language to provide high-performance web application development and scalability.
Lua:是一种轻量小巧的脚本语言,用标准C语言编写并以源代码形式开放,其设计目的是为了嵌入应用程序中,从而为应用程序提供灵活的扩展和定制功能。Lua: It is a lightweight scripting language written in standard C language and open in source code form. It is designed to be embedded in applications to provide flexible expansion and customization capabilities for applications.
Java安全通道(Java Secure Channel,JSch)是一个纯Java实现的SSH2客户端,用于连接SSH服务器。它提供了与SSH服务器进行通信的功能,包括文件传输、执行远程命令、获取远程服务器的信息等。使用JSch,可以在Java应用程序中与SSH服务器进行交互,实现远程命令执行、文件传输等功能。它支持多种SSH协议版本,并且提供了丰富的API,使得与SSH服务器的通信变得简单而强大。Java Secure Channel (JSch) is a pure Java SSH2 client for connecting to SSH servers. It provides functions for communicating with SSH servers, including file transfer, remote command execution, and remote server information acquisition. Using JSch, you can interact with SSH servers in Java applications to implement remote command execution, file transfer, and other functions. It supports multiple SSH protocol versions and provides a rich API, making communication with SSH servers simple and powerful.
本申请提供的软负载的安装方法、装置、电子设备、计算机可读存储介质以及计算机程序产品,旨在解决现有技术的如上技术问题。The soft load installation method, device, electronic device, computer-readable storage medium and computer program product provided in the present application are intended to solve the above technical problems in the prior art.
下面通过对几个示例性实施方式的描述,对本申请实施例的技术方案以及本申请的技术方案产生的技术效果进行说明。需要指出的是,下述实施方式之间可以相互参考、借鉴或结合,对于不同实施方式中相同的术语、相似的特征以及相似的实施步骤等,不再重复描述。The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
图1为本申请实施例提供的实现软负载的安装的系统架构示意图,其中,该实施环境包括终端101和主机102。终端101和主机102能够通过有线或无线通信方式进行直接或间接地连接,本申请实施例对此不进行限制。1 is a schematic diagram of a system architecture for implementing the installation of a soft load provided in an embodiment of the present application, wherein the implementation environment includes a terminal 101 and a host 102. The terminal 101 and the host 102 can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application.
在一些实施例中,终端101是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表、智能语音交互设备、智能家电、车载终端等,但并不局限于此。主机102可以为linux主机,也可以为虚拟机,但并不局限于此。终端101安装有软负载管理程序,软负载管理程序的可视化界面为软负载管理界面,软负载管理界面包括第一输入框,用于输入软负载安装包标识、安装脚本参数信息和主机102的主机标识,终端101将第一输入框中的软负载安装包标识对应的软负载安装包下载到本地,然后将软负载安装包发送至主机102,终端101能够根据第一输入框中的安装脚本参数信息对主机102中软负载安装包中的第一安装脚本进行修改,生成第二安装脚本,并向主机102发送执行第二安装脚本的命令,使得主机102安装软负载。In some embodiments, the terminal 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. The host 102 can be a Linux host or a virtual machine, but is not limited thereto. The terminal 101 is installed with a soft load management program, and the visual interface of the soft load management program is a soft load management interface. The soft load management interface includes a first input box for inputting a soft load installation package identifier, installation script parameter information, and a host identifier of the host 102. The terminal 101 downloads the soft load installation package corresponding to the soft load installation package identifier in the first input box to the local computer, and then sends the soft load installation package to the host 102. The terminal 101 can modify the first installation script in the soft load installation package in the host 102 according to the installation script parameter information in the first input box, generate a second installation script, and send a command to execute the second installation script to the host 102, so that the host 102 installs the soft load.
本领域技术人员可以知晓,上述终端的数量可以更多或更少。比如上述终端可以仅为一个,或者上述终端为几十个或几百个,或者更多数量。本申请实施例对终端的数量和设备类型不加以限定。Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiment of the present application does not limit the number of terminals and device types.
在一些实施例中,主机102是独立的物理主机,也能够是多个物理主机构成的主机集群或者分布式系统,还能够是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、内容分发网络(Content Delivery Network,CDN)以及大数据和人工智能平台等基础云计算服务的云主机。主机102用于为支持图像采集的应用程序提供后台服务。在一些实施例中,主机102承担主要计算工作,终端101承担次要计算工作;或者,主机102承担次要计算工作,终端101承担主要计算工作;或者,主机102和终端101二者之间采用分布式计算架构进行协同计算。In some embodiments, the host 102 is an independent physical host, or a host cluster or distributed system composed of multiple physical hosts, or a cloud host that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The host 102 is used to provide background services for applications that support image acquisition. In some embodiments, the host 102 undertakes the main computing work and the terminal 101 undertakes the secondary computing work; or, the host 102 undertakes the secondary computing work and the terminal 101 undertakes the main computing work; or, the host 102 and the terminal 101 use a distributed computing architecture for collaborative computing.
例如,本申请实施例中的软负载的安装方法可以由终端来完成。下面以终端为执行主体来对本申请实施例中的方案进行说明。For example, the installation method of the soft load in the embodiment of the present application can be completed by the terminal. The following describes the solution in the embodiment of the present application with the terminal as the execution subject.
本申请实施例中提供了一种内容推荐方法,如图2所示,该方法包括S101、S102、S103和S104。An embodiment of the present application provides a content recommendation method, as shown in FIG. 2 , the method includes S101 , S102 , S103 and S104 .
S101、展示软负载管理界面,该软负载管理界面包括第一输入框。S101. Display a soft load management interface, where the soft load management interface includes a first input box.
在本申请实施例中,终端展示的软负载管理界面上包括第一输入框,当运维人员想要在主机上安装软负载时,在软负载管理界面的第一输入框中输入该软负载对应的软负载安装包标识和主机的主机标识,软负载安装包标识可以为软负载安装包的版本号,主机标识可以为主机的IP,为实现主机能够自动的安装软负载,在第一输入框中输入安装脚本参数信息,使得主机能够根据该安装脚本参数信息,进行软负载的安装。在一些实施例中若主机需要用户名和密码登录,主机标识还包括主机的用户名和密码。In an embodiment of the present application, the soft load management interface displayed by the terminal includes a first input box. When the operation and maintenance personnel want to install the soft load on the host, the soft load installation package identifier corresponding to the soft load and the host identifier of the host are entered in the first input box of the soft load management interface. The soft load installation package identifier can be the version number of the soft load installation package, and the host identifier can be the IP address of the host. In order to enable the host to automatically install the soft load, the installation script parameter information is entered in the first input box, so that the host can install the soft load according to the installation script parameter information. In some embodiments, if the host requires a user name and password to log in, the host identifier also includes the user name and password of the host.
S102、响应于所述第一输入框输入软负载安装包标识、安装脚本参数信息和主机标识,从对象存储工具中下载所述软负载安装包标识对应的所述软负载安装包,并将所述软负载安装包发送至所述主机标识对应的主机,所述软负载安装包包括软负载的第一安装脚本。S102, in response to inputting a soft load installation package identifier, installation script parameter information and a host identifier in the first input box, downloading the soft load installation package corresponding to the soft load installation package identifier from the object storage tool, and sending the soft load installation package to the host corresponding to the host identifier, wherein the soft load installation package includes a first installation script for the soft load.
在本申请实施例中,终端获取运维人员在第一输入框中输入软负载安装包标识、安装脚本参数信息和主机标识信息后,从对象存储工具中下载该软负载安装包标识对应的软负载安装包,并将该软负载安装包发送至主机标识对应的主机。在本申请实施例中,对象存储工具可以为MonIo,终端通过调用对象存储工具的HTTP接口下载软负载安装包,终端通过调用JSch接口,将下载的软负载安装包下载到主机上。In an embodiment of the present application, after the terminal obtains the soft load installation package identifier, installation script parameter information, and host identifier information input by the operation and maintenance personnel in the first input box, the terminal downloads the soft load installation package corresponding to the soft load installation package identifier from the object storage tool, and sends the soft load installation package to the host corresponding to the host identifier. In an embodiment of the present application, the object storage tool may be MonIo, and the terminal downloads the soft load installation package by calling the HTTP interface of the object storage tool, and the terminal downloads the downloaded soft load installation package to the host by calling the JSch interface.
在本申请实施例中,软负载管理界面包括主机标识选择按钮、软负载安装包标识选择按钮以及安装脚本参数信息的选择按钮,运维人员在第一输入框中输入信息的方式可以为编辑输入或点击输入,还可以是两种输入方式的结合。In an embodiment of the present application, the soft load management interface includes a host identification selection button, a soft load installation package identification selection button, and an installation script parameter information selection button. The operation and maintenance personnel can enter information in the first input box by editing input or clicking input, or by a combination of the two input methods.
作为一种可选实施例,终端下载软负载安装包后,该软负载安装包能够在终端中进行存储,当需要对其他主机进行安转软负载时,不需要终端从对象存储工具中再次下载,提高对多个主机安装软负载的效率。As an optional embodiment, after the terminal downloads the soft load installation package, the soft load installation package can be stored in the terminal. When the soft load needs to be installed on other hosts, the terminal does not need to download it again from the object storage tool, thereby improving the efficiency of installing soft loads on multiple hosts.
S103、根据安装脚本参数信息修改第一安装脚本,获得软负载的第二安装脚本。S103: Modify the first installation script according to the installation script parameter information to obtain a second installation script of the soft load.
考虑到现有技术在安装软负载时需要手动执行安装命令,过程繁琐造成安装软负载效率低的问题,在本申请实施例中,软负载安装包中包含第一安装脚本,并通过第一输入框中的安装脚本参数信息修改第一安装脚本。通过调用JSch接口,根据安装脚本参数信息修改第一安装脚本,将修改后的第一安装脚本作为第二安装脚本。通过第二安装脚本使得主机自动执行安装过程,不需要手动执行安装命令。Considering that the prior art requires manual execution of installation commands when installing soft loads, the cumbersome process causes the problem of low efficiency in installing soft loads. In an embodiment of the present application, the soft load installation package includes a first installation script, and the first installation script is modified by the installation script parameter information in the first input box. By calling the JSch interface, the first installation script is modified according to the installation script parameter information, and the modified first installation script is used as the second installation script. The second installation script enables the host to automatically execute the installation process without manually executing the installation command.
S104、指示主机执行第二安装脚本,安装所述软负载。S104: Instruct the host to execute a second installation script to install the soft load.
在本申请实施例中,终端通过调用Jhch接口向所述主机下发启动指令,指示主机执行第二安装脚本,实现在主机上安装软负载。通过第一输入框中的安装脚本参数信息生成第二安装脚本,实现软负载的自动安装。同时,根据本申请实施例中的软负载的安装方法,还能够用于对主机中的待更新软负载进行更新以及实现对多个主机进行安装软负载。In the embodiment of the present application, the terminal sends a startup instruction to the host by calling the Jhch interface, instructing the host to execute the second installation script to install the soft load on the host. The second installation script is generated by the installation script parameter information in the first input box to achieve automatic installation of the soft load. At the same time, according to the soft load installation method in the embodiment of the present application, it can also be used to update the soft load to be updated in the host and to install the soft load on multiple hosts.
通过展示软负载管理界面,向运维人员提供第一输入框,以使得运维人员能够在明确需要在第一输入框中输入需要安装的软负载对应的软负载安装包标识,需要安装软负载的主机的主机标识,以及软负载的安装脚本参数信息;通过对第一输入框中输入的软负载安装包标识、安装脚本参数信息和主机标识进行响应,下载软负载安装包标识对应的软负载安装包,并将软负载安装包发送到主机标识对应的主机上,使得不用手动操作主机下载软负载安装包,提高下载软负载安装包的效率;通过第一输入框中的安装脚本参数信息修改软负载安装包中的第一安装脚本生成第二安装脚本;通过指示主机执行第二安装脚本,使得主机通过执行第二安装脚本,安装软负载,从而不用手动执行安装命令实现安装软负载,提高软负载安装过程的效率。By displaying the soft load management interface, a first input box is provided to the operation and maintenance personnel, so that the operation and maintenance personnel can clearly enter the soft load installation package identifier corresponding to the soft load to be installed, the host identifier of the host on which the soft load needs to be installed, and the installation script parameter information of the soft load in the first input box; by responding to the soft load installation package identifier, the installation script parameter information and the host identifier entered in the first input box, the soft load installation package corresponding to the soft load installation package identifier is downloaded, and the soft load installation package is sent to the host corresponding to the host identifier, so that there is no need to manually operate the host to download the soft load installation package, thereby improving the efficiency of downloading the soft load installation package; modifying the first installation script in the soft load installation package through the installation script parameter information in the first input box to generate a second installation script; by instructing the host to execute the second installation script, the host installs the soft load by executing the second installation script, thereby achieving the installation of the soft load without manually executing the installation command, thereby improving the efficiency of the soft load installation process.
在上述实施例的基础上,作为一种可选实施例,本申请实施例中的软负载安装包中包括负载均衡软件和配置管理程序,负载均衡软件用于负载均衡,配置管理程序用于对软负载进行注册;Based on the above embodiment, as an optional embodiment, the soft load installation package in the embodiment of the present application includes load balancing software and a configuration management program, the load balancing software is used for load balancing, and the configuration management program is used to register the soft load;
指示主机执行第二安装脚本,安装软负载,包括指示主机执行第二安装脚本的启动命令,并启动配置管理程序和负载均衡软件;Instructing the host to execute the second installation script to install the soft load, including instructing the host to execute a startup command of the second installation script and start a configuration management program and a load balancing software;
启动配置管理程序和负载均衡软件,之后还包括:Start with configuration management program and load balancing software, followed by:
S201、接收主机通过配置管理程序发送的软负载的注册信息,注册信息包括主机标识;S201, receiving registration information of a soft load sent by a host through a configuration management program, where the registration information includes a host identifier;
S202、根据注册信息对软负载进行注册;S202, registering the soft load according to the registration information;
S203、在软负载管理界面展示注册信息。S203: Display the registration information on the soft load management interface.
在本申请实施例中,终端向主机下发执行第二安装脚本的执行指令后,主机响应该执行指令,执行第二安装脚本,在第二安装脚本中包括启动命令,通过该启动命令,主机能够启动软负载安装包中的配置管理程序和负载均衡软件,在本申请实施例中,该负载均衡软件为OpenResty,该配置管理程序为Golong语言编写的程序,能够获取软负载的注册信息,修改软负载的配置文件。In an embodiment of the present application, after the terminal sends an execution instruction to execute the second installation script to the host, the host responds to the execution instruction and executes the second installation script. The second installation script includes a startup command. Through the startup command, the host can start the configuration management program and load balancing software in the soft load installation package. In an embodiment of the present application, the load balancing software is OpenResty, and the configuration management program is a program written in the Golong language, which can obtain the registration information of the soft load and modify the configuration file of the soft load.
在本申请实施例中,启动该配置管理程序后创建出该配置管理程序的配置文件和脚本文件,其中脚本文件可以为Lua语言编写的脚本文件,同时将终端的标识写入该脚本文件,终端的标识可以是终端的IP,以使得改配置管理程序能够根据终端的IP,调用终端的HTTP接口。在本申请实施例中,可以先启动配置管理程序,再启动负载均衡软件,负载均衡软件启动完成,则软负载所需的全部配置信息设置完毕,即实现了软负载的安装。In the embodiment of the present application, after starting the configuration management program, a configuration file and a script file of the configuration management program are created, wherein the script file can be a script file written in Lua language, and the terminal identifier is written into the script file, and the terminal identifier can be the IP of the terminal, so that the configuration management program can call the HTTP interface of the terminal according to the IP of the terminal. In the embodiment of the present application, the configuration management program can be started first, and then the load balancing software can be started. After the load balancing software is started, all the configuration information required by the soft load is set, that is, the installation of the soft load is realized.
在本申请实施例中,主机启动负载均衡软件后,配置管理程序通过终端的标识信息,调用终端的HTTP接口,将软负载的注册信息发送至终端。终端接收主机通过配置管理程序发送的注册信息,该注册信息中包括主机标识,通过注册信息对该软负载进行注册,注册可以是终端中创建该软负载的注册信息,注册内容包括软负载所在主机的主机标识。In the embodiment of the present application, after the host starts the load balancing software, the configuration management program calls the HTTP interface of the terminal through the identification information of the terminal and sends the registration information of the soft load to the terminal. The terminal receives the registration information sent by the host through the configuration management program, and the registration information includes the host identification. The soft load is registered through the registration information. The registration can be the registration information of the soft load created in the terminal, and the registration content includes the host identification of the host where the soft load is located.
在本申请实施例中,终端对软负载进行注册后,通过软负载管理界面展示注册信息,以使得运维人员能够查看注册信息。In an embodiment of the present application, after the terminal registers the soft load, the registration information is displayed through the soft load management interface so that the operation and maintenance personnel can view the registration information.
在本申请实施例中,配置管理程序向终端发送注册信息是实时发送的,即主机通过配置管理程序以预设的时间段持续发送注册信息到终端,终端根据实时接收到的注册信息,更新软负载管理界面的注册信息,因此本申请实施例中的终端能够同步软负载的注册信息,以使得运维人员能够根据注册信息对软负载进行管理。In an embodiment of the present application, the configuration management program sends registration information to the terminal in real time, that is, the host continuously sends registration information to the terminal through the configuration management program at a preset time period, and the terminal updates the registration information of the soft load management interface according to the registration information received in real time. Therefore, the terminal in the embodiment of the present application can synchronize the registration information of the soft load, so that the operation and maintenance personnel can manage the soft load according to the registration information.
同时,本申请实施例中的终端能够接收到多个主机上的软负载的注册信息,同时能够展示多个主机上的软负载的注册信息,方便运维人员通过终端管理多台主机上的软负载。At the same time, the terminal in the embodiment of the present application can receive the registration information of the soft loads on multiple hosts, and can display the registration information of the soft loads on multiple hosts, which is convenient for operation and maintenance personnel to manage the soft loads on multiple hosts through the terminal.
本申请实施例,通过指示主机先后启动配置管理程序和负载均衡软件,生成了安装软负载所需的所有脚本文件和配置文件,实现了软负载的安装;同时考虑到运维人员向主机输入查询命令才能查看到软负载的注册信息的问题,接收配置管理程序发送的软负载的注册信息,对软负载进行注册,并将注册信息展示在软负载管理界面上,使得运维人员直观的获取该软负载的注册信息,不需要人工输入查询命令。In the embodiment of the present application, by instructing the host to start the configuration management program and the load balancing software in sequence, all script files and configuration files required for installing the soft load are generated, thereby realizing the installation of the soft load; at the same time, considering the problem that the operation and maintenance personnel can only view the registration information of the soft load by entering a query command to the host, the registration information of the soft load sent by the configuration management program is received, the soft load is registered, and the registration information is displayed on the soft load management interface, so that the operation and maintenance personnel can intuitively obtain the registration information of the soft load without manually entering a query command.
在上述各实施例的基础上,作为一种可选实施例,软负载管理界面还包括第二输入框,第二输入框用于输入灰度路由规则,输入灰度路由规则用于指示主机执行灰度发布任务,灰度发布任务存储在终端中,配置管理程序还用于修改负载均衡软件的配置文件;Based on the above embodiments, as an optional embodiment, the soft load management interface further includes a second input box, the second input box is used to input the grayscale routing rule, the input grayscale routing rule is used to instruct the host to execute the grayscale release task, the grayscale release task is stored in the terminal, and the configuration management program is also used to modify the configuration file of the load balancing software;
在软负载管理界面展示注册信息,之后还包括:The registration information is displayed on the soft load management interface, followed by:
S301、响应第二输入框输入灰度路由规则,将第二输入框中的灰度路由规则发送至主机的配置管理程序,以使得主机通过配置管理程序修改负载均衡软件的配置文件,以及通过负载均衡软件按照灰度路由规则执行灰度发布任务。S301. In response to inputting grayscale routing rules in the second input box, the grayscale routing rules in the second input box are sent to the configuration management program of the host, so that the host can modify the configuration file of the load balancing software through the configuration management program, and execute the grayscale publishing task according to the grayscale routing rules through the load balancing software.
在本申请实施例中,软负载管理界面还包括第二输入框,通过第二输入框,接收运维人员编写的灰度路由规则,需要理解的是,本申请实施例中的软负载能够基于负载均衡的功能实现灰度发布的任务,而具体的灰度发布方式根据灰度路由规则确定。In an embodiment of the present application, the soft load management interface also includes a second input box, through which the grayscale routing rules written by the operation and maintenance personnel are received. It should be understood that the soft load in the embodiment of the present application can realize the task of grayscale release based on the load balancing function, and the specific grayscale release method is determined according to the grayscale routing rules.
现有技术中运维人员需要手动将灰度路由规则写入到软负载的配置文件中,手动修改效率低,且容易出错。在本申请实施例中,配置管理程序具有修改软负载配置文件的功能,即配置管理程序还能够修改负载均衡软件的配置文件。In the prior art, the operation and maintenance personnel need to manually write the grayscale routing rules into the configuration file of the soft load, and the manual modification is inefficient and prone to errors. In the embodiment of the present application, the configuration management program has the function of modifying the soft load configuration file, that is, the configuration management program can also modify the configuration file of the load balancing software.
在本申请实施例中,终端对软负载进行注册,将注册信息展示在软负载管理界面,运维人员为使软负载执行灰度发布任务,在软负载管理界面的第二输入框中输入对应的灰度路由规则。终端响应于第二输入框中的灰度路由规则,将灰度路由规则下发到主机上的配置管理程序,配置管理程序根据接收到的灰度路由规则,修改负载均衡软件的配置文件。在本申请实施例中,终端通过调用HTTP接口,实现将灰度路由规则下发到配置管理程序,负载均衡软件可以为为OpenResty,OpenResty的配置文件为nginx.conf文件,配置管理程序通过软负载中的lua脚本文件修改软负载nginx的配置文件。In an embodiment of the present application, the terminal registers the soft load and displays the registration information on the soft load management interface. In order for the soft load to perform the grayscale release task, the operation and maintenance personnel enter the corresponding grayscale routing rules in the second input box of the soft load management interface. The terminal responds to the grayscale routing rules in the second input box and sends the grayscale routing rules to the configuration management program on the host. The configuration management program modifies the configuration file of the load balancing software according to the received grayscale routing rules. In an embodiment of the present application, the terminal sends the grayscale routing rules to the configuration management program by calling the HTTP interface. The load balancing software can be OpenResty, and the configuration file of OpenResty is the nginx.conf file. The configuration management program modifies the configuration file of the soft load nginx through the lua script file in the soft load.
在上述各实施例的基础上,作为一种可选实施例,本申请实施例中的将第二输入框中的灰度路由规则发送至主机的配置管理程序,之前还包括:Based on the above embodiments, as an optional embodiment, the configuration management program for sending the grayscale routing rule in the second input box to the host in the embodiment of the present application also includes:
S401、根据灰度发布任务指示主机通过配置管理程序修改负载均衡软件的配置文件,并建立灰度发布任务与主机中软负载的对应关系。S401. Instruct the host to modify the configuration file of the load balancing software through the configuration management program according to the grayscale publishing task, and establish a corresponding relationship between the grayscale publishing task and the soft load in the host.
在本申请实施例中,通过建立发布任务和主机中软负载的对应关系,使得终端能够将灰度路由规则下发至对应的软负载中的配置管理程序。根据灰度发布任务指示主机通过配置管理程序修改负载均衡软件的配置文件,例如,In the embodiment of the present application, by establishing a corresponding relationship between the publishing task and the soft load in the host, the terminal can send the grayscale routing rules to the configuration management program in the corresponding soft load. According to the grayscale publishing task, the host is instructed to modify the configuration file of the load balancing software through the configuration management program, for example,
如图3所,其示例性的示出了本申请实施例提供的软负载的文件列表,其中main.go为配置管理程序,openresty为本申请实施例中的负载均衡软件,nginx.conf为openresty的配置文件,start.sh为本申请实施例中的第二安装脚本,其余文件为本申请实施例中配置管理程序的lua脚本和负载均衡软件的配置文件的配置修改模版。As shown in Figure 3, it exemplarily shows the file list of the soft load provided in the embodiment of the present application, wherein main.go is the configuration management program, openresty is the load balancing software in the embodiment of the present application, nginx.conf is the configuration file of openresty, start.sh is the second installation script in the embodiment of the present application, and the remaining files are configuration modification templates of the lua script of the configuration management program and the configuration file of the load balancing software in the embodiment of the present application.
如图4所示,其示例性的示出了本申请实施例提供配置管理程序修改负载均衡软件的配置文件的流程示意图,从图4中可以看出,配置管理程序根据灰度发布任务中的系统应用信息,修改负载均衡软件的配置文件中的servername属性,根据灰度发布任务中的应用上下文配置信息修改负载均衡软件的配置文件中的location模块,根据灰度发布任务中的route路由配置中的rule规则配置、upstream上游配置及应用域名domain信息修改负载均衡软件的配置文件中的upstream模块。As shown in Figure 4, it exemplarily shows a flow chart of the configuration management program provided in an embodiment of the present application to modify the configuration file of the load balancing software. It can be seen from Figure 4 that the configuration management program modifies the servername attribute in the configuration file of the load balancing software according to the system application information in the grayscale release task, modifies the location module in the configuration file of the load balancing software according to the application context configuration information in the grayscale release task, and modifies the upstream module in the configuration file of the load balancing software according to the rule configuration in the route routing configuration in the grayscale release task, the upstream configuration and the application domain name domain information.
需要理解的是,终端中可以存储多个灰度发布任务,并且可以有多个安装软负载的主机,因此建立灰度发布任务与软负载的对应关系,终端能够在发送灰度发布任务对应的灰度路由规则时,确定下发至对应软负载中的配置管理程序。It should be understood that multiple grayscale release tasks can be stored in the terminal, and there can be multiple hosts with soft loads installed. Therefore, a correspondence between the grayscale release tasks and the soft loads is established. The terminal can determine the configuration management program sent to the corresponding soft load when sending the grayscale routing rules corresponding to the grayscale release tasks.
在上述各实施例的基础上,作为一种可选实施例,注册信息还包括软负载对应的软负载标识、软负载的架构类型、主机的节点类型和软负载的状态,软负载的架构类型包括集群架构、主备架构和单机架构,主机的节点类型包括集群节点、主节点、备节点和单机节点;Based on the above embodiments, as an optional embodiment, the registration information also includes a soft load identifier corresponding to the soft load, an architecture type of the soft load, a node type of the host, and a status of the soft load. The architecture type of the soft load includes a cluster architecture, an active-standby architecture, and a stand-alone architecture. The node type of the host includes a cluster node, a master node, a standby node, and a stand-alone node.
注册信息中的软负载标识、软负载架构类型与主机的节点类型是主机从安装脚本参数信息中得到的。The soft load identifier, soft load architecture type and host node type in the registration information are obtained by the host from the installation script parameter information.
在本申请实施例中,终端接收配置管理程序发送的注册信息,该注册信息中包括软负载的软负载标识,软负载的架构类型,主机的节点类型和软负载的状态。其中软负载的软负载标识是该软负载的唯一编码用于终端和主机交互过程中识别该软负载,该编码可以是字符串类型,软负载的架构类型包括集群架构、主备架构和单机架构,主机的节点类型包括集群节点、主节点、备节点和单机节点,软负载的状态分为可用状态和不可用状态。需要理解的是,主机的节点类型取决于软负载的架构类型,若软负载的架构类型为集群架构,则主机的节点类型为集群节点,若软负载的架构类型为主备架构,则主机的节点类型为主节点或备节点,若软负载的架构类型为单击架构,则主机的节点类型为单击节点。In an embodiment of the present application, the terminal receives registration information sent by the configuration management program, and the registration information includes a soft load identifier of the soft load, an architecture type of the soft load, a node type of the host, and a status of the soft load. The soft load identifier of the soft load is a unique code of the soft load used to identify the soft load during the interaction between the terminal and the host. The code can be a string type. The architecture type of the soft load includes a cluster architecture, a master-slave architecture, and a stand-alone architecture. The node type of the host includes a cluster node, a master node, a standby node, and a stand-alone node. The status of the soft load is divided into an available state and an unavailable state. It should be understood that the node type of the host depends on the architecture type of the soft load. If the architecture type of the soft load is a cluster architecture, the node type of the host is a cluster node. If the architecture type of the soft load is a master-slave architecture, the node type of the host is a master node or a standby node. If the architecture type of the soft load is a single-click architecture, the node type of the host is a single-click node.
在本申请实施例中,运维人员输入至第一输入框中的安装脚本参数信息包括软负载的软负载标识、软负载的架构类型、、终端的标识、主机的主机标识、主机的节点类型。运维人员的输入方式可以为编辑输入和点击输入中的至少一者,软负载管理界面有相关的安装脚本参数信息的选择按钮。In the embodiment of the present application, the installation script parameter information input by the operation and maintenance personnel into the first input box includes the soft load identifier of the soft load, the architecture type of the soft load, the identifier of the terminal, the host identifier of the host, and the node type of the host. The input method of the operation and maintenance personnel can be at least one of edit input and click input, and the soft load management interface has a selection button for the relevant installation script parameter information.
需要理解的是配置管理程序获取注册信息是通过预置的脚本文件实现的,主机执行该脚本文件使得配置管理程序可以从安装脚本参数信息中获得软负载标识、软负载的架构类型、主机的节点类型等信息,并且配置管理程序中包含查看软负载的状态的查询命令,因此还可以获得软负载的状态信息,因此通过安装脚本参数信息获得第二安装脚本,可以实现终端和主机之间的共用参数信息的统一。It should be understood that the configuration management program obtains registration information through a preset script file. The host executes the script file so that the configuration management program can obtain the soft load identifier, the architecture type of the soft load, the node type of the host and other information from the installation script parameter information. The configuration management program includes a query command for viewing the status of the soft load, so the status information of the soft load can also be obtained. Therefore, by obtaining the second installation script through the installation script parameter information, the shared parameter information between the terminal and the host can be unified.
本申请实施例通过接收安装脚本参数信息,并根据安装脚本参数信息生成第二安装脚本,使得主机上的配置管理程序能够获知软负载标识,软负载的架构类型主机标识和主机的节点类型等信息,通过将注册信息展示在软负载管理界面上,使得运维人员能够根据注册信息将灰度发布任务与软负载进行对应,即对于某个灰度发布任务,运维人员可以根据软负载管理界面上的多个软负载的注册信息确定出一个软负载,将该灰度发布任务与该软负载建立对应关系。同时,考虑到现有技术需要运维人员在主机中输入查询命令才能获取软负载的状态,使得获取软负载的状态的效率低的问题。因此本申请实施例中的注册信息包括软负载的状态,通过配置管理程序获取软负载的状态信息,将软负载的状态信息在软负载管理界面上进行展示,若软负载的状态为不可用,运维人员可以检查该软负载是否出现故障,若确定出现故障,则进行及时处理,例如重新安装软负载到主机上。The embodiment of the present application receives the installation script parameter information and generates the second installation script according to the installation script parameter information, so that the configuration management program on the host can obtain the soft load identification, the architecture type host identification of the soft load and the node type of the host, and the registration information is displayed on the soft load management interface, so that the operation and maintenance personnel can correspond the gray release task with the soft load according to the registration information, that is, for a certain gray release task, the operation and maintenance personnel can determine a soft load according to the registration information of multiple soft loads on the soft load management interface, and establish a corresponding relationship between the gray release task and the soft load. At the same time, considering that the prior art requires the operation and maintenance personnel to enter a query command in the host to obtain the status of the soft load, the efficiency of obtaining the status of the soft load is low. Therefore, the registration information in the embodiment of the present application includes the status of the soft load, and the status information of the soft load is obtained by the configuration management program, and the status information of the soft load is displayed on the soft load management interface. If the status of the soft load is unavailable, the operation and maintenance personnel can check whether the soft load has a fault. If it is determined that a fault occurs, timely processing is performed, such as reinstalling the soft load to the host.
在上述各实施例的基础上,作为一种可选实施例,本申请实施例中的软负载管理界面包括第三输入框,第三输入框用于输入预先制作的软负载安装包和对应的软负载安装包标识;Based on the above embodiments, as an optional embodiment, the soft load management interface in the embodiment of the present application includes a third input box, and the third input box is used to input a pre-made soft load installation package and a corresponding soft load installation package identifier;
从对象存储工具中下载软负载安装包标识对应的软负载安装包,之前还包括:Download the soft load installation package corresponding to the soft load installation package identifier from the object storage tool, which also includes:
S601、响应于第三输入框输入的软负载安装包和对应的软负载安装包标识,将软负载安装包和对应的软负载安装包标识存储至对象存储工具中。S601. In response to the soft load installation package and the corresponding soft load installation package identifier input in the third input box, store the soft load installation package and the corresponding soft load installation package identifier in an object storage tool.
在本申请实施例中,预先制作软负载安装包,将软负载安装包上传至对象存储工具中。预先制作的软负载安装包中包括OpenResty、用Golang语言编写的配置管理程序以及第一安装脚本文件。In an embodiment of the present application, a soft load installation package is pre-made and uploaded to an object storage tool. The pre-made soft load installation package includes OpenResty, a configuration management program written in Golang language, and a first installation script file.
在本申请实施例中,软负载管理界面还包括第三输入框,该第三输入框用于运维人员输入预先制作的软负载安装包和对应的软负载安装包标识。终端响应于第三输入框中的软负载安装包和对应的软负载安装包标识,通过调用对象存储工具的HTTP接口,将该软负载安装包和软负载安装包标识上传至对象存储工具,以使得对象存储工具对软负载安装包和对应的软负载安装包标识进行存储。In an embodiment of the present application, the soft load management interface further includes a third input box, and the third input box is used for the operation and maintenance personnel to input a pre-made soft load installation package and a corresponding soft load installation package identifier. The terminal responds to the soft load installation package and the corresponding soft load installation package identifier in the third input box, and uploads the soft load installation package and the soft load installation package identifier to the object storage tool by calling the HTTP interface of the object storage tool, so that the object storage tool stores the soft load installation package and the corresponding soft load installation package identifier.
本申请实施例,通过制作包括负载均衡软件和配置管理程序的软负载安装包,在终端和主机的交互过程中实现软负载的安装、注册和执行灰度发布任务;通过将制作的软负载均衡软件上传至对象存储工具而不是直接存储在终端,节约了终端存储空间;同时在存储软负载安装包时保存了对应的软负载安装包标识,使得终端能够根据第一输入框中的软负载安装包标识,下载对应的软负载安装包。In the embodiment of the present application, a soft load installation package including a load balancing software and a configuration management program is produced, thereby realizing the installation, registration and execution of grayscale release tasks of the soft load during the interaction between the terminal and the host; the terminal storage space is saved by uploading the produced soft load balancing software to an object storage tool instead of directly storing it in the terminal; and at the same time, the corresponding soft load installation package identifier is saved when storing the soft load installation package, so that the terminal can download the corresponding soft load installation package according to the soft load installation package identifier in the first input box.
在上述各实施例的基础上,作为一种可选实施例,本申请实施例中指指示主机执行第二安装脚本的启动命令,启动配置管理程序和负载均衡软件,包括:Based on the above embodiments, as an optional embodiment, the embodiment of the present application refers to instructing the host to execute the startup command of the second installation script to start the configuration management program and the load balancing software, including:
S701、指示主机根据第二安装脚本的启动命令,判断是否存在正在运行的待更新配置管理程序;S701, instructing the host to determine whether there is a configuration management program to be updated that is running according to the startup command of the second installation script;
若存在正在运行的待更新配置管理程序,则停止运行待更新配置管理程序,启动配置管理程序;If there is a configuration management program to be updated that is running, then the configuration management program to be updated is stopped and the configuration management program is started;
若不存在正在运行的待更新配置管理程序,则启动配置管理程序;If there is no configuration management program to be updated that is running, start the configuration management program;
S702、指示主机根据第二安装脚本的启动命令,判断是否存在正在运行的待更新负载均衡软件;S702, instructing the host to determine whether there is any load balancing software to be updated that is running according to the startup command of the second installation script;
若存在正在运行的待更新配置管理程序,则停止运行待更新配置管理程序,启动配置管理程序;If there is a configuration management program to be updated that is running, then the configuration management program to be updated is stopped and the configuration management program is started;
若不存在正在运行的待更新配置管理程序,则启动配置管理程序。If there is no configuration management program to be updated that is running, the configuration management program is started.
在本申请实施例中,当主机根据第二安装脚本启动配置管理程序和负载均衡软件时,为防止之前主机安装过其他版本的软负载,且其他版本中的配置管理程序即待更新配置管理程序和负载均衡软件即待更新负载均衡软件正在运行,导致配置管理程序和负载均衡软件因重复启动导致系统故障的问题,在本申请实施例中,首先判断是否存在正在运行的待更新配置管理程序和正在运行的待更新负载均衡软件。In an embodiment of the present application, when the host starts the configuration management program and the load balancing software according to the second installation script, in order to prevent the problem that the host has previously installed other versions of the soft load, and the configuration management program in other versions, i.e., the configuration management program to be updated and the load balancing software, i.e., the load balancing software to be updated, are running, resulting in system failure due to repeated startup of the configuration management program and the load balancing software, in an embodiment of the present application, it is first determined whether there is a running configuration management program to be updated and a running load balancing software to be updated.
在本申请实施例中,若主机中存在正在运行的待更新配置管理程序,则主机根据第二安装脚本中的启动命令先停止运行待更新配置管理程序,然后启动配置管理程序,若主机中不存在正在运行的待更新配置管理程序,则主机直接启动待更新配置管理程序,可以通过启动命令中的“ps-ef|grep”和“kill”指令停止运行待更新配置管理程序,通过启动命令中的“./main>ops.log&”指令启动配置管理程序。In an embodiment of the present application, if there is a configuration management program to be updated running in the host, the host first stops running the configuration management program to be updated according to the startup command in the second installation script, and then starts the configuration management program. If there is no configuration management program to be updated running in the host, the host directly starts the configuration management program to be updated. The configuration management program to be updated can be stopped by the "ps-ef|grep" and "kill" instructions in the startup command, and the configuration management program can be started by the "./main>ops.log&" instruction in the startup command.
在本申请实施例中,若主机中存在正在运行的待更新负载均衡软件,则主机根据第二安装脚本中的启动命令先停止运行待更新负载均衡软件,然后启动负载均衡软件,可以通过启动命令中的“./nginx-s stop”指令停止正在运行的待更新负载均衡软件,可以通过启动命令中的“./nginx”启动负载均衡软件。In an embodiment of the present application, if there is a load balancing software to be updated running in the host, the host first stops running the load balancing software to be updated according to the startup command in the second installation script, and then starts the load balancing software. The running load balancing software to be updated can be stopped by the "./nginx-s stop" instruction in the startup command, and the load balancing software can be started by the "./nginx" in the startup command.
需要理解的是,当主机中不存在正在运行的待更新配置管理程序和待更新负载均衡软件时,也可以执行第二安装脚本中的启动命令中的停止运行待更新配置管理程序和待更新负载均衡软件的指令,只是此时的指令不起作用。It should be understood that when there is no configuration management program to be updated and load balancing software to be updated running in the host, the instructions to stop running the configuration management program to be updated and the load balancing software to be updated in the startup command in the second installation script can also be executed, but the instructions at this time have no effect.
在本申请实施例中,启动命令中停止运行待更新配置管理程序的指令与启动配置管理程序指令中间包括等待预设时间指令,可以理解的是,主机执行停止运行待更新配置管理程序后不能直接启动配置管理程序,需要等待主机关闭运行待更新配置管理程序的进程和删除待更新配置管理程序的配置文件。同样的,在启动命令中停止运行待更新负载均衡软件的指令与启动负载均衡软件指令中间也包括等待预设时间指令,用于主机关闭运行待更新负载均衡软件的进行和删除待更新负载均衡软件的配置文件。另外,在启动命令中的启动配置管理程序的指令和停止运行待更新负载均衡软件的指令中间也包括等待预设时间指令,满足生成配置管理程序的配置文件和脚本文件的时间要求,例如,若预设时间为2秒,则指令可以为“sleep2”。In an embodiment of the present application, the startup command includes a wait preset time instruction between the instruction to stop running the configuration management program to be updated and the instruction to start the configuration management program. It can be understood that the host cannot directly start the configuration management program after executing to stop running the configuration management program to be updated, and needs to wait for the host to shut down the process of running the configuration management program to be updated and delete the configuration file of the configuration management program to be updated. Similarly, the startup command also includes a wait preset time instruction between the instruction to stop running the load balancing software to be updated and the instruction to start the load balancing software, which is used for the host to shut down the process of running the load balancing software to be updated and delete the configuration file of the load balancing software to be updated. In addition, the startup command also includes a wait preset time instruction between the instruction to start the configuration management program and the instruction to stop running the load balancing software to be updated to meet the time requirements for generating the configuration file and script file of the configuration management program. For example, if the preset time is 2 seconds, the instruction can be "sleep2".
本申请实施例,根据安装脚本参数信息获得的第二安装脚本,能够实现负载均衡软件和配置管理程序的启停,通过在启动软负载中的配置管理程序和负载均衡软件之前判断主机中是否存在待更新配置管理程序和待更新负载均衡软件,避免了重复启动配置管理程序和负载均衡软件导致的系统故障的发生。In the embodiment of the present application, the second installation script obtained according to the installation script parameter information can realize the start and stop of the load balancing software and the configuration management program. By judging whether there are configuration management programs and load balancing software to be updated in the host before starting the configuration management program and the load balancing software in the soft load, the occurrence of system failures caused by repeated starting of the configuration management program and the load balancing software is avoided.
如图5所示,其示例性的示出了本申请实施例提供的另一种软负载的安装方法的流程示意图,由终端执行,具体如下:As shown in FIG5 , it exemplarily shows a flow chart of another method for installing a soft load provided in an embodiment of the present application, which is executed by a terminal, and is specifically as follows:
S801、展示软负载管理界面,软负载管理界面包括第一输入框、第二输入框和第三输入框;S801, displaying a soft load management interface, where the soft load management interface includes a first input box, a second input box, and a third input box;
S802、响应于所述第三输入框输入的软负载安装包和对应的软负载安装包标识,将所述软负载安装包和对应的软负载安装包标识存储至对象存储工具中;S802: In response to the soft load installation package and the corresponding soft load installation package identifier input in the third input box, store the soft load installation package and the corresponding soft load installation package identifier in an object storage tool;
S803、响应于所述第一输入框输入软负载安装包标识、安装脚本参数信息和主机标识,从对象存储工具中下载所述软负载安装包标识对应的所述软负载安装包;S803: In response to inputting a soft load installation package identifier, installation script parameter information, and a host identifier in the first input box, downloading the soft load installation package corresponding to the soft load installation package identifier from the object storage tool;
S804、将软负载安装包发送至主机标识对应的主机,软负载安装包包括软负载的第一安装脚本;S804, sending the soft load installation package to the host corresponding to the host identifier, where the soft load installation package includes a first installation script of the soft load;
S805、根据安装脚本参数信息修改第一安装脚本,获得软负载的第二安装脚本;S805, modifying the first installation script according to the installation script parameter information to obtain a second installation script for the soft load;
S806、指示主机执行第二安装脚本,指示主机执行第二安装脚本的启动命令,并启动配置管理程序和负载均衡软件,安装软负载;S806, instructing the host to execute the second installation script, instructing the host to execute the startup command of the second installation script, and starting the configuration management program and the load balancing software, and installing the soft load;
S807、接收主机通过配置管理程序发送的软负载的注册信息,注册信息包括主机标识;S807, receiving registration information of the soft load sent by the host through the configuration management program, where the registration information includes a host identifier;
S808、根据注册信息对软负载进行注册,在软负载管理界面展示注册信息;S808, registering the soft load according to the registration information, and displaying the registration information on the soft load management interface;
S809、根据灰度发布任务指示主机通过配置管理程序修改负载均衡软件的配置文件,并建立灰度发布任务与主机中软负载的对应关系;S809, instructing the host to modify the configuration file of the load balancing software through the configuration management program according to the grayscale release task, and establishing a corresponding relationship between the grayscale release task and the soft load in the host;
S810、响应第二输入框输入灰度路由规则,将第二输入框中的灰度路由规则发送至主机的配置管理程序,以使得主机通过配置管理程序修改负载均衡软件的配置文件,以及通过负载均衡软件按照灰度路由规则执行灰度发布任务。S810. In response to inputting grayscale routing rules in the second input box, the grayscale routing rules in the second input box are sent to the configuration management program of the host, so that the host modifies the configuration file of the load balancing software through the configuration management program, and executes the grayscale publishing task according to the grayscale routing rules through the load balancing software.
需要说明的是,本申请实施例中的软负载的安装方法,除了用于灰度发布任务,还可以解决其他基于软负载进行的任务,例如蓝绿发布。It should be noted that the soft load installation method in the embodiment of the present application can not only be used for grayscale release tasks, but also solve other tasks based on soft loads, such as blue-green release.
如图6所示,其示例性的示出了本申请实施例提供的一种软负载的安装方法的交互式流程示意图。在终端中安装有软负载管理软件,该软件包括软负载管理界面也称为web端和软负载管理程序也称作server端,软负载管理界面在终端上进行显示,软负载管理程序在终端上运行,本申请实施例中的配置管理程序调用终端HTTP接口可以是调佣负载管理程序的HTTP接口,主机通过执行第二安装脚本启动配置管理程序和负载均衡软件,负载均衡软件能够进行流量分配具有负载均衡功能,用于灰度发布任务。As shown in Figure 6, it exemplarily shows an interactive flow diagram of a method for installing a soft load provided in an embodiment of the present application. Soft load management software is installed in the terminal, and the software includes a soft load management interface also called a web end and a soft load management program also called a server end. The soft load management interface is displayed on the terminal, and the soft load management program runs on the terminal. The configuration management program in the embodiment of the present application calls the terminal HTTP interface, which can be an HTTP interface for calling the load management program. The host starts the configuration management program and the load balancing software by executing the second installation script. The load balancing software can perform traffic distribution and has a load balancing function, which is used for grayscale release tasks.
具体地,如图6所示,软负载管理程序接收到软负载管理界面发送的软负载安装标识、主机标识和安装脚本参数信息,在对象存储工具中下载软负载安装包,将下载的软负载安装包发送到主机,并修改主机中软负载安装包的第一安装脚本,将修改后的第一安装脚本记为第二安装脚本,指示主机执行第二安装脚本,主机接收到软负载管理程序的指示,执行第二安装脚本,分别启动配置管理程序和负载均衡软件,配置管理程序被启动后,实时发送软负载的注册信息到软负载管理程序,软负载管理程序接收到注册信息,对软负载进行注册,并将注册信息发送至软负载管理界面,软负载管理界面展示注册信息,接收运维人员在页面编辑的灰度路由规则,将灰度路由规则发送至软负载管理程序,软负载管理程序将接收到的灰度路由规则发送至配置管理程序,配置管理程序根据灰度路由规则修改负载均衡软件的配置文件,此时负载均衡软件能够实现对应的灰度发布任务。Specifically, as shown in Figure 6, the soft load management program receives the soft load installation identifier, host identifier and installation script parameter information sent by the soft load management interface, downloads the soft load installation package in the object storage tool, sends the downloaded soft load installation package to the host, and modifies the first installation script of the soft load installation package in the host, records the modified first installation script as the second installation script, and instructs the host to execute the second installation script. The host receives the instruction of the soft load management program, executes the second installation script, and starts the configuration management program and the load balancing software respectively. After the configuration management program is started, the registration information of the soft load is sent to the soft load management program in real time. The soft load management program receives the registration information, registers the soft load, and sends the registration information to the soft load management interface. The soft load management interface displays the registration information, receives the grayscale routing rules edited by the operation and maintenance personnel on the page, and sends the grayscale routing rules to the soft load management program. The soft load management program sends the received grayscale routing rules to the configuration management program. The configuration management program modifies the configuration file of the load balancing software according to the grayscale routing rules. At this time, the load balancing software can implement the corresponding grayscale release task.
如图7所示,其示例性的示出了本申请实施例中的另一种软负载的安装方法的交互式流程示意图。在本申请实施例中,灰度管控显示模块包括软负载管理界面,灰度管控服务模块包括终端中的软负载管理程序,负载均衡模块包括主机。灰度管控显示模块将主机标识、软负载安装包标识和安装脚本参数信息发送至灰度管控服务模块,灰度管控服务模块下载软负载安装包后,将软负载安装包发送到负载均衡模块,并根据安装脚本参数信息修改第一安装脚本,指示负载均衡模块执行第二安装脚本,负载均衡模块执行安装脚本,启动配置管理程序和负载均衡程序,将软负载的注册信息发送至灰度管控服务模块,灰度管控服务模块根据注册信息对软负载进行注册,并发送注册信息到灰度管控显示模块,灰度管控显示模块显示接收到的注册信息。本申请实施例提供了一种软负载的安装装置,如图8所示,该软负载的安装装置可以包括:展示模块901、响应模块902、获得模块903和指示模块904,其中,As shown in FIG. 7 , it exemplarily shows an interactive flow chart of another method for installing a soft load in an embodiment of the present application. In an embodiment of the present application, the grayscale control and display module includes a soft load management interface, the grayscale control and display module includes a soft load management program in a terminal, and the load balancing module includes a host. The grayscale control and display module sends the host identifier, the soft load installation package identifier, and the installation script parameter information to the grayscale control and display module. After the grayscale control and display module downloads the soft load installation package, it sends the soft load installation package to the load balancing module, and modifies the first installation script according to the installation script parameter information, instructs the load balancing module to execute the second installation script, and the load balancing module executes the installation script, starts the configuration management program and the load balancing program, and sends the registration information of the soft load to the grayscale control and display module. The grayscale control and display module registers the soft load according to the registration information, and sends the registration information to the grayscale control and display module. The grayscale control and display module displays the received registration information. An embodiment of the present application provides a soft load installation device, as shown in FIG. 8 , the soft load installation device may include: a display module 901, a response module 902, an acquisition module 903, and an indication module 904, wherein,
展示模块901,用于展示软负载管理界面,软负载管理界面包括第一输入框;A display module 901 is used to display a soft load management interface, where the soft load management interface includes a first input box;
响应模块902,用于响应于第一输入框输入软负载安装包标识、安装脚本参数信息和主机标识,从对象存储工具中下载软负载安装包标识对应的软负载安装包,并将软负载安装包发送至主机标识对应的主机,软负载安装包包括软负载的第一安装脚本;A response module 902 is used to respond to the input of the soft load installation package identifier, installation script parameter information and host identifier in the first input box, download the soft load installation package corresponding to the soft load installation package identifier from the object storage tool, and send the soft load installation package to the host corresponding to the host identifier, wherein the soft load installation package includes a first installation script of the soft load;
获得模块903,用于根据安装脚本参数信息修改第一安装脚本,获得软负载的第二安装脚本;An acquisition module 903 is used to modify the first installation script according to the installation script parameter information to obtain a second installation script of the soft load;
指示模块904,用于指示主机执行第二安装脚本,安装软负载。The instruction module 904 is used to instruct the host to execute the second installation script to install the soft load.
本申请实施例的装置可执行本申请实施例所提供的方法,其实现原理相类似,本申请各实施例的装置中的各模块所执行的动作是与本申请各实施例的方法中的步骤相对应的,对于装置的各模块的详细功能描述具体可以参见前文中所示的对应方法中的描述,此处不再赘述。The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
在一个可选实施例中提供了一种电子设备,如图9所示,图9所示的电子设备4000包括:处理器4001和存储器4003。其中,处理器4001和存储器4003相连,如通过总线4002相连。可选地,电子设备4000还可以包括收发器4004,收发器4004可以用于该电子设备与其他电子设备之间的数据交互,如数据的发送和/或数据的接收等。需要说明的是,实际应用中收发器4004不限于一个,该电子设备4000的结构并不构成对本申请实施例的限定。In an optional embodiment, an electronic device is provided, as shown in FIG. 9 , the electronic device 4000 shown in FIG. 9 includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and/or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
处理器4001可以是CPU(Central Processing Unit,中央处理器),通用处理器,DSP(Digital Signal Processor,数据信号处理器),ASIC(Application SpecificIntegrated Circuit,专用集成电路),FPGA(Field Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器4001也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等。Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
总线4002可包括一通路,在上述组件之间传送信息。总线4002可以是PCI(Peripheral Component Interconnect,外设部件互连标准)总线或EISA(ExtendedIndustry Standard Architecture,扩展工业标准结构)总线等。总线4002可以分为地址总线、数据总线、控制总线等。为便于表示,图9中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG9 only uses one thick line to represent, but does not mean that there is only one bus or one type of bus.
存储器4003可以是ROM(Read Only Memory,只读存储器)或可存储静态信息和指令的其他类型的静态存储设备,RAM(Random Access Memory,随机存取存储器)或者可存储信息和指令的其他类型的动态存储设备,也可以是EEPROM(Electrically ErasableProgrammable Read Only Memory,电可擦可编程只读存储器)、CD-ROM(Compact DiscRead Only Memory,只读光盘)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质、其他磁存储设备、或者能够用于携带或存储计算机程序并能够由计算机读取的任何其他介质,在此不做限定。The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
存储器4003用于存储执行本申请实施例的计算机程序,并由处理器4001来控制执行。处理器4001用于执行存储器4003中存储的计算机程序,以实现前述方法实施例所示的步骤。The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
其中,电子设备包可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图9所示的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。The electronic device package may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG9 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
本申请实施例提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现前述方法实施例的步骤及相应内容。与现有技术相比可实现:通过展示软负载管理界面,向运维人员提供第一输入框,以使得运维人员能够在明确需要在第一输入框中输入需要安装的软负载对应的软负载安装包标识,需要安装软负载的主机的主机标识,以及软负载的安装脚本参数信息;通过对第一输入框中输入的软负载安装包标识、安装脚本参数信息和主机标识进行响应,下载软负载安装包标识对应的软负载安装包,并将软负载安装包发送到主机标识对应的主机上,使得不用手动操作主机下载软负载安装包,提高下载软负载安装包的效率;通过第一输入框中的安装脚本参数信息修改软负载安装包中的第一安装脚本生成第二安装脚本;通过指示主机执行第二安装脚本,使得主机通过执行第二安装脚本,安装软负载,从而不用手动执行安装命令实现安装软负载,提高软负载安装过程的效率。The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented. Compared with the prior art, it can be implemented as follows: by displaying a soft load management interface, a first input box is provided to the operation and maintenance personnel, so that the operation and maintenance personnel can clearly enter the soft load installation package identifier corresponding to the soft load to be installed, the host identifier of the host on which the soft load needs to be installed, and the installation script parameter information of the soft load in the first input box; by responding to the soft load installation package identifier, the installation script parameter information and the host identifier entered in the first input box, the soft load installation package corresponding to the soft load installation package identifier is downloaded, and the soft load installation package is sent to the host corresponding to the host identifier, so that the host does not need to manually operate the host to download the soft load installation package, thereby improving the efficiency of downloading the soft load installation package; modifying the first installation script in the soft load installation package through the installation script parameter information in the first input box to generate a second installation script; by instructing the host to execute the second installation script, the host installs the soft load by executing the second installation script, thereby installing the soft load without manually executing the installation command, thereby improving the efficiency of the soft load installation process.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
本申请实施例还提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时可实现前述方法实施例的步骤及相应内容。与现有技术相比可实现:通过展示软负载管理界面,向运维人员提供第一输入框,以使得运维人员能够在明确需要在第一输入框中输入需要安装的软负载对应的软负载安装包标识,需要安装软负载的主机的主机标识,以及软负载的安装脚本参数信息;通过对第一输入框中输入的软负载安装包标识、安装脚本参数信息和主机标识进行响应,下载软负载安装包标识对应的软负载安装包,并将软负载安装包发送到主机标识对应的主机上,使得不用手动操作主机下载软负载安装包,提高下载软负载安装包的效率;通过第一输入框中的安装脚本参数信息修改软负载安装包中的第一安装脚本生成第二安装脚本;通过指示主机执行第二安装脚本,使得主机通过执行第二安装脚本,安装软负载,从而不用手动执行安装命令实现安装软负载,提高软负载安装过程的效率。The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor. Compared with the prior art, it can be achieved that: by displaying a soft load management interface, a first input box is provided to the operation and maintenance personnel, so that the operation and maintenance personnel can clearly enter the soft load installation package identifier corresponding to the soft load to be installed, the host identifier of the host on which the soft load needs to be installed, and the installation script parameter information of the soft load in the first input box; by responding to the soft load installation package identifier, the installation script parameter information and the host identifier entered in the first input box, the soft load installation package corresponding to the soft load installation package identifier is downloaded, and the soft load installation package is sent to the host corresponding to the host identifier, so that the host does not need to manually operate the host to download the soft load installation package, thereby improving the efficiency of downloading the soft load installation package; modifying the first installation script in the soft load installation package through the installation script parameter information in the first input box to generate a second installation script; by instructing the host to execute the second installation script, the host installs the soft load by executing the second installation script, thereby installing the soft load without manually executing the installation command, thereby improving the efficiency of the soft load installation process.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”、“1”、“2”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除图示或文字描述以外的顺序实施。The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
应该理解的是,虽然本申请实施例的流程图中通过箭头指示各个操作步骤,但是这些步骤的实施顺序并不受限于箭头所指示的顺序。除非本文中有明确的说明,否则在本申请实施例的一些实施场景中,各流程图中的实施步骤可以按照需求以其他的顺序执行。此外,各流程图中的部分或全部步骤基于实际的实施场景,可以包括多个子步骤或者多个阶段。这些子步骤或者阶段中的部分或全部可以在同一时刻被执行,这些子步骤或者阶段中的每个子步骤或者阶段也可以分别在不同的时刻被执行。在执行时刻不同的场景下,这些子步骤或者阶段的执行顺序可以根据需求灵活配置,本申请实施例对此不限制。It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios at the execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
以上所述仅是本申请部分实施场景的可选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请的方案技术构思的前提下,采用基于本申请技术思想的其他类似实施手段,同样属于本申请实施例的保护范畴。The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410095735.0A CN117931218A (en) | 2024-01-23 | 2024-01-23 | Soft load installation method, device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410095735.0A CN117931218A (en) | 2024-01-23 | 2024-01-23 | Soft load installation method, device, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117931218A true CN117931218A (en) | 2024-04-26 |
Family
ID=90750350
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410095735.0A Pending CN117931218A (en) | 2024-01-23 | 2024-01-23 | Soft load installation method, device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117931218A (en) |
-
2024
- 2024-01-23 CN CN202410095735.0A patent/CN117931218A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9311161B2 (en) | Automatically configured management service payloads for cloud IT services delivery | |
US9274843B2 (en) | Multi-redundant switchable process pooling for cloud it services delivery | |
US10298678B2 (en) | Omnichannel approach to application sharing across different devices | |
WO2017088388A1 (en) | Method and system for upgrading sdk of application | |
US20120233299A1 (en) | Managing configurations of system management agents in a distributed environment | |
CN108196915A (en) | Code process method, equipment and storage medium based on application container engine | |
WO2019029451A1 (en) | Method for publishing mobile applications and electronic apparatus | |
CN111045940B (en) | Software automated testing method, device, architecture, server and storage medium | |
CN114924751A (en) | Method and device for distributing service access request flow | |
CN112579447A (en) | Browser testing method and device | |
US12210443B2 (en) | Multi-client orchestrated automated testing platform | |
US12079651B2 (en) | Serverless application function execution | |
CN113296828B (en) | Method, server and system for releasing application | |
CN110119279B (en) | Application and upgrading method and device thereof | |
CN112597134B (en) | Configuration method, device, electronic equipment and medium of distributed configuration center | |
CN114157658A (en) | Mirror image warehouse deployment method and device, electronic equipment and computer readable medium | |
CN113434384B (en) | Pressure testing method and device | |
CN117931218A (en) | Soft load installation method, device, electronic device and storage medium | |
CN111897565A (en) | Data processing method, device and equipment based on Internet of things | |
CN115756544A (en) | A device updating method, device, electronic device and storage medium | |
CN113821430B (en) | Multi-service testing method and device | |
CN112882741A (en) | Application management system and method | |
CN115485661A (en) | Resource processing method and device, electronic equipment and storage medium | |
CN113495747B (en) | Gray scale release method and device | |
CN112988170B (en) | Application display method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |