Software deployment method and device in offline environment, computer equipment and medium
By obtaining software requirements and target environment information in an offline environment, finding and pulling deployment media, the problem of inefficient media management in traditional software deployment methods is solved, and efficient and accurate software deployment is achieved.
Patent Information
- Application Number
- CN202411791959.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional software deployment methods have problems such as inefficiency, error-prone and inability to automatically generate deployment packages in media management, resulting in deployment complexity and uncertainty.
Provides a software deployment method in an offline environment. By obtaining the software requirement version and the key elements of the target environment, finding and pulling the deployment media details, pulling dependent media from multiple media sources, and packaging it with preset scripts to generate a deployment package, and finally passing it offline to the deployment object.
Efficient and accurate software deployment is achieved, reducing manual operations and improving deployment automation and consistency.
Smart Images

Figure CN119645427A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of software deployment, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for software deployment in an offline environment. Background Art
[0002] In the field of software deployment, especially for large and complex software systems such as cloud bases, the deployment process often involves multiple types and quantities of media. The management and coordination of these media are crucial to ensure the successful deployment of software systems. However, traditional deployment methods have many pain points in media management.
[0003] First, in terms of making and pulling deployment packages, traditional methods mainly rely on manual search and collection. This method is not only inefficient, but also requires a large amount of information to be checked and is prone to errors. More importantly, it cannot uniformly match and automatically generate deployment packages according to actual needs. This results in the need to manually adjust deployment packages during the deployment process, which increases the complexity and uncertainty of deployment.
[0004] It can be seen that traditional software deployment methods cannot achieve efficient and accurate software deployment. Summary of the invention
[0005] Based on this, it is necessary to provide an efficient and accurate software deployment method, apparatus, computer device, storage medium and computer program product in an offline environment to address the above technical problems.
[0006] In a first aspect, the present application provides a method for software deployment in an offline environment. The method comprises:
[0007] Obtain input software requirement versions and key elements of the target environment;
[0008] Searching for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements;
[0009] Pull dependent media from multiple media sources according to the target deployment media detailed information;
[0010] Packing the pulled dependent media and preset scripts to generate a deployment package, wherein the preset scripts are used to perform software automatic deployment operations;
[0011] The deployment package is delivered to the deployment object in an offline manner.
[0012] In one embodiment, before searching for detailed information of the target deployment medium in a preset deployment medium library according to the input software requirement version and key elements of the target environment, the method further includes:
[0013] Obtain media deployment plan data;
[0014] extracting software versions, target environment key elements, and deployment media details from the media deployment plan data;
[0015] The software version, the target environment key elements and the deployment medium detailed information are stored in association to generate a deployment medium library.
[0016] In one embodiment, searching for target deployment media detailed information in a preset deployment media library according to the input software requirement version and target environment key elements includes:
[0017] Generate a query statement according to the input software requirement version and target environment key elements, wherein the target environment key elements include target hardware architecture, target operating system version and target storage type;
[0018] Access a preset deployment media library and search for target deployment media detailed information based on the query statement.
[0019] In one embodiment, packaging the pulled dependent media and the preset script to generate a deployment package includes:
[0020] Obtaining preset scripts, the preset scripts including deployment platform image and deployment platform image one-key startup script, deployment script, deployment auxiliary service script, and deployment agent image and deployment agent image one-key startup script;
[0021] Select a packaging tool based on the preset script and the type of dependent media to be pulled;
[0022] The pulled dependent media and preset scripts are packaged by the packaging tool to generate a deployment package.
[0023] In one embodiment, pulling dependent media from multiple media sources according to the target deployment media detailed information includes:
[0024] Parsing the target deployment medium detailed information to obtain a list of dependent media, version requirements, and media source addresses required for the deployment medium;
[0025] Determine multiple media sources according to the required dependent media list, version requirements, and media source addresses;
[0026] Based on the required dependent media list, version requirements, and media source addresses, dependent media are pulled from the determined multiple media sources through a preset media pulling script.
[0027] In one of the embodiments, the multiple media sources include image repositories, s3 services, public and private yum sources, git repositories, deployment platform image sources, and proxy image sources.
[0028] In a second aspect, the present application also provides a software deployment device in an offline environment. The device comprises:
[0029] Data input module, used to obtain the input software requirement version and key elements of the target environment;
[0030] A query module, used to search for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements;
[0031] A data pulling module, used for pulling dependent media from multiple media sources according to the target deployment media detailed information;
[0032] A packaging module, used to package the pulled dependent media and preset scripts to generate a deployment package, wherein the preset script is used to perform software automatic deployment operations;
[0033] The offline sending module is used to transmit the deployment package to the deployment object in an offline manner.
[0034] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0035] Obtain input software requirement versions and key elements of the target environment;
[0036] Searching for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements;
[0037] Pull dependent media from multiple media sources according to the target deployment media detailed information;
[0038] Packing the pulled dependent media and preset scripts to generate a deployment package, wherein the preset scripts are used to perform software automatic deployment operations;
[0039] The deployment package is delivered to the deployment object in an offline manner.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0041] Obtain input software requirement versions and key elements of the target environment;
[0042] Searching for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements;
[0043] Pull dependent media from multiple media sources according to the target deployment media detailed information;
[0044] Packing the pulled dependent media and preset scripts to generate a deployment package, wherein the preset scripts are used to perform software automatic deployment operations;
[0045] The deployment package is delivered to the deployment object in an offline manner.
[0046] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0047] Obtain input software requirement versions and key elements of the target environment;
[0048] Searching for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements;
[0049] Pull dependent media from multiple media sources according to the target deployment media detailed information;
[0050] Packing the pulled dependent media and preset scripts to generate a deployment package, wherein the preset scripts are used to perform software automatic deployment operations;
[0051] The deployment package is delivered to the deployment object in an offline manner.
[0052] The software deployment method, device, computer equipment, storage medium and computer program product in the offline environment obtain the input software requirement version and target environment key elements; search for target deployment media detailed information in the preset deployment media library according to the input software requirement version and target environment key elements, and the deployment media library stores deployment media detailed information corresponding to different software versions and different target environment key elements; pull dependent media from multiple media sources according to the target deployment media detailed information; package the pulled dependent media and preset scripts to generate a deployment package, and the preset script is used to perform software automatic deployment operations; and pass the deployment package to the deployment object in an offline manner. During the whole process, the deployment media detailed information is automatically searched, and the deployment package is automatically packaged with the preset script to generate a deployment package. When deployment is required, the preset script in the deployment package can be directly executed to realize software deployment without excessive manual operations. Therefore, the whole solution can realize efficient and accurate software deployment in an offline environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 An application environment diagram of a software deployment method in an offline environment in an embodiment;
[0054] Figure 2 A flowchart of a software deployment method in an offline environment in an embodiment;
[0055] Figure 3 A flowchart of a software deployment method in an offline environment in another embodiment;
[0056] Figure 4 A flowchart of a software deployment method in an offline environment in one of the specific application examples;
[0057] Figure 5 A schematic diagram of the composition of the target software dependent media source;
[0058] Figure 6 This is a schematic diagram of the composition of the deployment package;
[0059] Figure 7 A schematic diagram of the one-click script startup composition;
[0060] Figure 8 A schematic diagram of the technical architecture of a software deployment method in an offline environment in another specific application example;
[0061] Fig. 9 It is a structural block diagram of a software deployment device in an offline environment in an embodiment;
[0062] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] The software deployment method in an offline environment provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network, and the server 104 is connected to the external deployment object. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 sends a software deployment request to the server 104, and the service 104 responds to the request and obtains the input software requirement version and the key elements of the target environment; according to the input software requirement version and the key elements of the target environment, the target deployment medium details are searched in the preset deployment medium library, and the deployment medium details corresponding to different software versions and different target environment key elements are stored in the deployment medium library; according to the target deployment medium details, dependent media are pulled from multiple media sources; the pulled dependent media and the preset script are packaged to generate a deployment package, and the preset script is used to perform the software automatic deployment operation; the deployment package is delivered to the deployment object in an offline manner. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0065] In one embodiment, Figure 2 As shown, a method for software deployment in an offline environment is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, and the following steps are included:
[0066] S100: Obtain input software requirement version and key elements of the target environment.
[0067] The software requirement version refers to the software version specified by the user or system, which determines the specific content of the software to be deployed. The key elements of the target environment can include the type and version of the operating system, hardware configuration, network configuration, etc., all of which will affect the deployment method and compatibility of the software. Specifically, this can be done through a user interaction interface (such as command line tools, graphical user interfaces, etc.). The user needs to enter the software version he wants to deploy (for example, software V1.2.3) and the key elements of the target environment (such as operating system type, version, CPU architecture, etc.).
[0068] S200: searching for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium detailed information corresponding to different software versions and different target environment key elements is stored in the deployment medium library.
[0069] The deployment media library is a pre-built and maintained database or file system that stores detailed information about deployment media corresponding to different software versions and key elements of different target environments. This information may include software installation packages, dependent libraries, configuration files, etc. After receiving the required software version and key elements of the target environment input by the user, the server searches the deployment media library for detailed information about the target deployment media that matches these inputs. If a match is found, the server proceeds to the next step; if no match is found, the server may prompt the user to enter additional information or manually prepare the deployment media. Specifically, the deployment media library supports dynamic updates, allowing administrators to add deployment media information corresponding to new software versions or environmental elements. It provides search and filtering functions to help users quickly find the required deployment media information.
[0070] S300: Pull dependent media from multiple media sources according to target deployment media detailed information.
[0071] The media source can be a server on the network, local storage, or other place where the required dependent media can be obtained. Dependent media specifically refers to all the required files and components determined based on the target deployment media details. Once the target deployment media details are determined, the server will pull the required dependent media from multiple media sources (such as internal servers, external mirror sites, cloud storage, etc.). These dependent media may include software installation packages, library files, patches, etc. To ensure the integrity and security of the dependent media, the server may perform verification and validation during the pulling process. For example, the server may check the hash value or signature of the file to ensure that they have not been tampered with.
[0072] S400: Packing the pulled dependent media and the preset script to generate a deployment package, where the preset script is used to perform the software automatic deployment operation.
[0073] After pulling all dependent media, the server will package them with the preset script into a deployment package. The packaging process involves compression, encryption, signing and other operations to ensure the security and integrity of the deployment package. This preset script contains the instructions and logic required to perform automatic software deployment operations. For example, the script may include steps such as unzipping the installation package, configuring environment variables, running the installation program, and performing subsequent configuration. These steps will ensure that the software can be correctly installed and configured in the target environment. Specifically, the preset script is a script that needs to be set, which can include multiple types of sub-scripts. When the preset script is executed, the software deployment operation will be automatically performed.
[0074] S500: Delivering the deployment package to the deployment object in an offline manner.
[0075] The server delivers the deployment package to the deployment object (such as the target server, virtual machine, etc.) through offline methods (such as physical media such as USB drives, optical disks, SD cards, or file sharing within the local area network). After receiving the deployment package, the deployment object installs and configures the software according to the instructions of the preset script. Furthermore, the server also provides deployment progress monitoring and logging functions to help users understand the status and results of the deployment process. It supports automatic verification and testing functions after deployment to ensure that the software runs correctly in the target environment.
[0076] The software deployment method in an offline environment of the present application obtains the input software requirement version and the key elements of the target environment; searches for the target deployment media detailed information in the preset deployment media library according to the input software requirement version and the key elements of the target environment, and the deployment media detailed information corresponding to different software versions and different target environment key elements is stored in the deployment media library; pulls dependent media from multiple media sources according to the target deployment media detailed information; packages the pulled dependent media and preset scripts to generate a deployment package, and the preset scripts are used to perform software automatic deployment operations; and delivers the deployment package to the deployment object in an offline manner. During the whole process, the deployment media detailed information is automatically searched, and the deployment package is automatically packaged with the preset script to generate a deployment package. When deployment is required, the preset script in the deployment package can be directly executed to realize software deployment without excessive manual operations. Therefore, the whole solution can realize efficient and accurate software deployment in an offline environment.
[0077] In one embodiment, if Figure 3 As shown, before S200, it also includes:
[0078] S120: Acquire media deployment plan data.
[0079] Obtain media deployment plan data from sources such as configuration files, databases, or user input. The media deployment plan data may contain multiple software versions, key elements of the target environment, and corresponding deployment media details. Specifically, the server can provide a user-friendly interface or tool to help users easily enter and edit media deployment plan data. Supports importing media deployment plan data from multiple sources, such as CSV files, Excel files, etc.
[0080] S140: Extracting software versions, target environment key elements, and deployment media detailed information from the media deployment plan data.
[0081] Parse the media deployment plan data and extract the software version, target environment key elements and corresponding deployment media details in each entry. The deployment media details may include the software installation package path, dependency library list, configuration file path, etc. Furthermore, data verification and cleaning functions can be provided here to ensure that the extracted information is accurate. Custom extraction rules are supported to adapt to media deployment plan data in different formats.
[0082] S160: The software version, the key elements of the target environment, and the detailed information of the deployment media are stored in association with each other to generate a deployment media library.
[0083] The extracted software versions, target environment key elements, and deployment media details are stored in association to form a deployment media library. The deployment media library is a database, file system, or cloud storage service that is used to store and manage this associated information. Furthermore, the server can provide backup and recovery functions for the deployment media library to ensure data security and availability. The deployment media library can be indexed and searched to quickly find the required deployment media information.
[0084] After the deployment media library is generated, in subsequent operations, the user enters the required software requirement version and target environment key elements through the command line interface, graphical user interface, or configuration file. The server receives the input and performs preliminary verification. The server searches for matching deployment media details in the generated deployment media library based on the input software requirement version and target environment key elements. If a matching entry is found, the corresponding deployment media details are extracted; otherwise, the user may be prompted to enter additional information or manually prepare the deployment media.
[0085] In one embodiment, searching for target deployment media details in a preset deployment media library according to the input software requirement version and target environment key elements includes:
[0086] Step 1: Generate a query statement based on the input software requirement version and key elements of the target environment. The key elements of the target environment include the target hardware architecture, target operating system version, and target storage type.
[0087] The user enters the required software version (for example, V1.2.3) and key elements of the target environment (such as the target hardware architecture x86_64, the target operating system version Ubuntu 20.04, and the target storage type SSD). Based on this input information, the server generates a query statement for finding detailed information of the target deployment media in the deployment media library. The query statement may use SQL, NoSQL query language, or other database query language. The query statement should contain fields and conditions corresponding to the required software version and key elements of the target environment.
[0088] Step 2: Access the preset deployment media library and search for target deployment media details based on the query statement.
[0089] The server accesses the preset deployment media library (which may be a database, file system, or cloud storage service). Use the generated query statement to perform query operations in the deployment media library. The query results will return the deployment media details that match the target software requirement version and key elements of the target environment.
[0090] In one embodiment, packaging the pulled dependent media and the preset script to generate a deployment package includes:
[0091] Step 1: Get the preset scripts, which include deployment platform image and deployment platform image one-click start script, deployment script, deployment auxiliary service script, deployment agent image and deployment agent image one-click start script.
[0092] Preset scripts are a set of scripts used for automated deployment, including but not limited to deployment platform images and one-click startup scripts, deployment scripts, deployment auxiliary service scripts, and deployment agent images and one-click startup scripts. These scripts may be stored in the form of files in the local file system, version control system, or remote storage service. The server obtains these scripts from the specified location and ensures their integrity and availability. Specifically, the deployment platform image and one-click startup scripts are used to prepare and start the deployment platform environment; the deployment script contains instructions for actually performing software installation, configuration, and startup; the deployment auxiliary service scripts include startup and configuration scripts for auxiliary services such as database initialization and message queue configuration; the deployment agent image and one-click startup scripts are used to start and manage deployment agents when needed. These agents are used to speed up the deployment process or handle specific deployment tasks.
[0093] Step 2: Select a packaging tool based on the preset script and the type of dependent media to be pulled.
[0094] The choice of packaging tool depends on the type of preset script (such as Shell script, Python script, etc.) and the type of dependent media pulled (such as binary files, configuration files, library files, etc.). Common packaging tools include tar, zip, gzip, 7-Zip, etc., which can handle different types of files and directory structures. The server selects the appropriate packaging tool based on this information and configures the corresponding packaging parameters.
[0095] Step 3: Use a packaging tool to package the pulled dependent media and preset scripts to generate a deployment package.
[0096] The server uses the selected packaging tool to package the pulled dependent media and preset scripts into a single deployment package. The packaging process may involve file compression, encryption, signing and other operations to ensure the security and integrity of the deployment package. After packaging is completed, the server generates a deployment package containing all necessary files and scripts, which can be used for subsequent offline deployment.
[0097] In one embodiment, pulling dependent media from multiple media sources according to target deployment media details includes:
[0098] Step 1: Parse the target deployment media details to obtain the dependent media list, version requirements, and media source address required by the deployment media.
[0099] The server first parses the target deployment media details, which are usually contained in one or more entries in the deployment media library. The parsing process includes extracting the list of dependent media required for the deployment media, version requirements, and the media source address. The list of dependent media may include various software packages, library files, configuration files, etc. The version requirements ensure that the pulled dependent media is compatible with the target software version and environmental factors. The media source address can be a URL (Uniform Resource Locator), a file system path, or other form of locator to indicate the location of the dependent media.
[0100] Step 2: Determine multiple media sources based on the required dependent media list, version requirements, and media source addresses.
[0101] Based on the parsed dependent media list, version requirements, and media source addresses, the server determines multiple possible media sources, which may include internal software warehouses, external mirror sites, cloud storage services, third-party libraries, etc. The server can select the optimal media source combination based on factors such as network conditions, media source reliability and speed.
[0102] Step 3: Pull dependent media from the determined multiple media sources based on the required dependent media list, version requirements, and media source addresses and using a preset media pulling script.
[0103] The server uses a preset media pull script (which may be a shell script, Python script, etc.) to pull dependent media from multiple identified media sources. The media pull script contains logic to handle access methods, authentication, error handling, etc. for different media sources. The pull process may involve downloading files, verifying integrity (such as through checksums), decompressing, etc. The server ensures that the pulled dependent media meets version requirements and dependencies, and stores it locally or in a specified location for subsequent use.
[0104] In one embodiment, the multiple media sources include image repositories, s3 services, public and private yum sources, git repositories, deployment platform image sources, and proxy image sources.
[0105] Image repositories are usually used to store and distribute software packages, container images, etc. In software deployment, image repositories can be used as the main source of dependency media to provide tested and verified software package versions. Common image repositories include container image repositories such as Docker Hub and Quay.io. S3 service (such as Amazon S3) is an object storage service that provides high scalability, data availability, security and performance. In software deployment, S3 service can be used to store and distribute dependency media such as large files, configuration files, and binary files. Through S3 service, users can easily access and manage dependency media stored in the cloud. Public yum sources provide a large number of open source software packages; private yum sources allow users to create and manage their own software package repositories for distributing internally developed software packages or customized software package versions. Git is a distributed version control system that is widely used for code management in software development. In software deployment, Git repositories can be used as one of the sources of dependency media to store and distribute source code, configuration files, scripts, etc. Through Git repositories, users can easily obtain the latest code and configuration files and ensure that they are consistent with the software version. The deployment platform image source refers to a warehouse used to store and distribute deployment platform images. The deployment platform image usually contains the operating system, middleware, tool chain and other components required for deployment. Through the deployment platform image source, users can easily obtain and deploy a complete deployment environment. The proxy image source refers to an intermediate server used to cache and distribute dependent media. In software deployment, the proxy image source can speed up the process of pulling dependent media, reduce network latency and bandwidth consumption, and through the proxy image source, users can also safely distribute and manage dependent media in the intranet environment.
[0106] To explain the technical solution of the software deployment method in an offline environment in detail, a specific application example will be used to describe it. Figure 4As shown, the software deployment method in the offline environment of this application includes the following steps:
[0107] 1. Maintain and deploy the media library
[0108] Maintain the software version, key elements of the target environment, and the corresponding deployment media source, sub-version, orchestration dependency, address path, etc. The media source here includes not only deployment scripts, software dependency media, and deployment auxiliary services, but also software requirements, different deployment platforms corresponding to the target environment, and deployment agents. The composition diagram is shown in Figure 5.
[0109] 2. Automatically generate software deployment packages
[0110] The user enters the required software version and key elements of the target environment on the deployment management platform. The deployment management platform automatically searches the database, pulls dependent media from various source addresses, and automatically generates the required deployment package, which includes deployment scripts, software dependent media, deployment auxiliary services, deployment platform and its one-click startup script. The composition diagram is shown in Figure 6.
[0111] 3. Offline delivery deployment package
[0112] Depending on the offline environment, users can use USB flash drives, file transfers, VPN (Virtual Private Network) channels, etc. to transfer the deployment package to the client or target host.
[0113] 4. Start the deployment platform with one click
[0114] The user opens the deployment package and executes the one-key startup script, which includes a sub-script for starting the deployment platform, a sub-script for initializing the deployment platform (loading the target software deployment script and dependent media), and a sub-script for starting the deployment platform auxiliary services (database, log, cache). The composition of the script is shown in the attached Figure 7 This step starts the deployment platform and automatically loads the target software deployment media in the target environment.
[0115] 5. Start and complete software deployment
[0116] Users can start and complete software deployment conveniently on demand. During the deployment process, the deployment platform can pull up and shut down the deployment agent as needed to complete the deployment action.
[0117] In another specific application example, Figure 8 As shown, the software deployment method in the offline environment of this application includes the following steps:
[0118] 1) Maintain the target software (iStack cloud management platform, iBox platform, oms operation and maintenance platform, etc.) required version, key elements of the target environment, including hardware architecture, operating system version, storage type, etc., and corresponding deployment media details on the iStack deployment management platform. In particular, the deployment here includes matching software requirements, the deployment platform of the target environment, the deployment agent and its one-click startup script.
[0119] 2) Enter the required software version and key elements of the target environment in the iStack deployment management platform. The deployment management platform starts the background task, pulls dependent media from the image repository, s3 service, public and private yum source, git repository, deployment platform image source and proxy image source, and automatically generates the deployment package required for deployment.
[0120] 3) Depending on the offline environment of different customers, use USB flash drive, file transfer, VPN channel and other methods to transfer the deployment package to the client or target host.
[0121] 4) Open the deployment package on the client or target host, execute the one-click startup script, start the target software (iStack cloud management platform, iBox box platform, oms operation and maintenance platform, etc.) supporting deployment platform, and automatically load the deployment script of the target software and install dependent media, ready for deployment.
[0122] 5) Complete the target software deployment, acceptance test and formal delivery of the target software in a wizard-like and visual manner.
[0123] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0124] Based on the same inventive concept, the embodiment of the present application also provides an offline environment software deployment device for implementing the above-mentioned offline environment software deployment method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in the embodiments of one or more offline environment software deployment devices provided below can refer to the above-mentioned limitations on the offline environment software deployment method, and will not be repeated here.
[0125] In one embodiment, Fig. 9 As shown, a software deployment device in an offline environment is provided, comprising:
[0126] The data input module 100 is used to obtain the input software requirement version and key elements of the target environment;
[0127] The query module 200 is used to search for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements. The deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements;
[0128] The data pulling module 300 is used to pull dependent media from multiple media sources according to the target deployment media detailed information;
[0129] The packaging module 400 is used to package the pulled dependent media and the preset script to generate a deployment package, and the preset script is used to perform the software automatic deployment operation;
[0130] The offline sending module 500 is used to deliver the deployment package to the deployment object in an offline manner.
[0131] In one embodiment, the query module 200 is also used to obtain media deployment plan data; extract software version, target environment key elements and deployment media detailed information from the media deployment plan data; store the software version, target environment key elements and deployment media detailed information in an associated manner to generate a deployment media library.
[0132] In one embodiment, the query module 200 is also used to generate a query statement based on the input software requirement version and key elements of the target environment, where the key elements of the target environment include the target hardware architecture, the target operating system version, and the target storage type; access a preset deployment media library to search for detailed information on the target deployment media based on the query statement.
[0133] In one of the embodiments, the packaging module 400 is also used to obtain preset scripts, which include deployment platform images and deployment platform image one-key startup scripts, deployment scripts, deployment auxiliary service scripts, and deployment agent images and deployment agent image one-key startup scripts; select a packaging tool based on the preset scripts and the type of dependent media pulled; and use the packaging tool to package the pulled dependent media and preset scripts to generate a deployment package.
[0134] In one of the embodiments, the data pulling module 300 is also used to parse the target deployment media detailed information, obtain the dependent media list, version requirements, and media source address required for the deployment media; determine multiple media sources based on the required dependent media list, version requirements, and media source address; based on the required dependent media list, version requirements, and media source address, and through a preset media pulling script, pull dependent media from the determined multiple media sources.
[0135] In one embodiment, the multiple media sources include image repositories, s3 services, public and private yum sources, git repositories, deployment platform image sources, and proxy image sources.
[0136] Each module in the software deployment device in the above-mentioned offline environment can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0137] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store preset data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a software deployment method in an offline environment is implemented.
[0138] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0139] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned software deployment method in an offline environment when executing the computer program.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned software deployment method in an offline environment is implemented.
[0141] In one embodiment, a computer program product is provided, including a computer program, which implements the above-mentioned software deployment method in an offline environment when executed by a processor.
[0142] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0144] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A software deployment method in an offline environment, characterized in that: The method comprises: Obtain input software requirement versions and key elements of the target environment; Searching for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements; Pull dependent media from multiple media sources according to the target deployment media detailed information; Packing the pulled dependent media and preset scripts to generate a deployment package, wherein the preset scripts are used to perform software automatic deployment operations; The deployment package is delivered to the deployment object in an offline manner.
2. The method according to claim 1, characterized in that Before searching for detailed information of the target deployment medium in the preset deployment medium library according to the input software requirement version and the key elements of the target environment, the method further includes: Obtain media deployment plan data; extracting software versions, target environment key elements, and deployment media details from the media deployment plan data; The software version, the target environment key elements and the deployment medium detailed information are stored in association to generate a deployment medium library.
3. The method according to claim 1, characterized in that The step of searching for detailed information of the target deployment medium in a preset deployment medium library according to the input software requirement version and key elements of the target environment includes: Generate a query statement according to the input software requirement version and target environment key elements, wherein the target environment key elements include target hardware architecture, target operating system version and target storage type; Access a preset deployment media library and search for target deployment media detailed information based on the query statement.
4. The method according to claim 1, characterized in that The step of packaging the pulled dependent media and the preset script to generate a deployment package includes: Obtaining preset scripts, the preset scripts including deployment platform image and deployment platform image one-key startup script, deployment script, deployment auxiliary service script, and deployment agent image and deployment agent image one-key startup script; Select a packaging tool based on the preset script and the type of dependent media to be pulled; The pulled dependent media and preset scripts are packaged by the packaging tool to generate a deployment package.
5. The method according to claim 1, characterized in that Pulling dependent media from multiple media sources according to the target deployment media detailed information includes: Parsing the target deployment medium detailed information to obtain a list of dependent media, version requirements, and media source addresses required for the deployment medium; Determine multiple media sources according to the required dependent media list, version requirements, and media source addresses; Based on the required dependent media list, version requirements, and media source addresses, dependent media are pulled from the determined multiple media sources through a preset media pulling script.
6. The method according to claim 1, characterized in that The multiple media sources include image repositories, s3 services, public and private yum sources, git repositories, deployment platform image sources, and proxy image sources.
7. A software deployment device in an offline environment, characterized in that: The device comprises: Data input module, used to obtain the input software requirement version and key elements of the target environment; A query module, used to search for target deployment medium detailed information in a preset deployment medium library according to the input software requirement version and target environment key elements, wherein the deployment medium library stores deployment medium detailed information corresponding to different software versions and different target environment key elements; A data pulling module, used for pulling dependent media from multiple media sources according to the target deployment media detailed information; A packaging module, used to package the pulled dependent media and preset scripts to generate a deployment package, wherein the preset script is used to perform software automatic deployment operations; The offline sending module is used to transmit the deployment package to the deployment object in an offline manner.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.