[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113867778A - Method and device for generating mirror image file, electronic equipment and storage medium - Google Patents

Method and device for generating mirror image file, electronic equipment and storage medium Download PDF

Info

Publication number
CN113867778A
CN113867778A CN202111112025.7A CN202111112025A CN113867778A CN 113867778 A CN113867778 A CN 113867778A CN 202111112025 A CN202111112025 A CN 202111112025A CN 113867778 A CN113867778 A CN 113867778A
Authority
CN
China
Prior art keywords
target
task
configuration
image file
image
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.)
Granted
Application number
CN202111112025.7A
Other languages
Chinese (zh)
Other versions
CN113867778B (en
Inventor
张宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111112025.7A priority Critical patent/CN113867778B/en
Publication of CN113867778A publication Critical patent/CN113867778A/en
Application granted granted Critical
Publication of CN113867778B publication Critical patent/CN113867778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method and a device for generating an image file, electronic equipment and a storage medium. Wherein, the method comprises the following steps: receiving an image file generation request, wherein the image file generation request carries a configuration requirement item for configuring a target image task; acquiring target configuration resources meeting the configuration requirement items from a target resource library, and generating a target mirror image task according to the configuration requirement items and the target configuration resources; acquiring target execution parameters corresponding to the target mirroring task; and executing the target image task according to the target execution parameters to obtain a target image file. According to the method and the device, the configuration demand items in the mirror image file generation request are extracted, the configuration resources meeting the configuration demand items are dynamically matched from the target resource library, then the mirror image file is automatically generated based on the configuration resources, manual participation is not needed, and the generation efficiency of the mirror image file is improved.

Description

Method and device for generating mirror image file, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating an image file, an electronic device, and a storage medium.
Background
Operating systems serve as the foundation platform for modern computer technology. Plays a crucial role in the field of computer technology. The primary mode of operation of the operating system is built on hardware. The function and the working state of the hardware can be flexibly scheduled. Provides a platform for upper application software. Based on the platform, the upper application software can shield the difference of different hardware platforms. And normal operation of the application software is realized. In the context of current applications, the diversity of operating systems is increasingly important. Such as edge operating systems, which are required to adapt to different edge devices. Such as a server operating system, may require different operating system feature support. For example, IO intensive may require different characteristics of some cores, etc. It becomes important that operating systems be able to be customized to accommodate different operating system application scenarios.
Especially in the current cloud computing context, different virtual machines may have different requirements for operating system images. For example, the A operating system needs a fixed combination of version 4.18 kernel and python2.7 source for the upper level program to run, the B operating system needs 3.10 kernel and python3.9 source, etc. If the manner in which the source is configured after the operating system is run is used. Manual intervention is required. However, in a manual participation manner, a configuration file writing error or a configuration source inconsistency occurs, which causes an error report situation, and finally reduces the generation efficiency of the image file.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present application provides a method and an apparatus for generating an image file, an electronic device, and a storage medium.
According to an aspect of an embodiment of the present application, there is provided a method for generating an image file, including:
receiving an image file generation request, wherein the image file generation request carries a configuration requirement item for configuring a target image task;
acquiring target configuration resources meeting the configuration requirement items from a target resource library, and generating a target mirror image task according to the configuration requirement items and the target configuration resources;
acquiring target execution parameters corresponding to the target mirroring task;
and executing the target image task according to the target execution parameters to obtain a target image file.
Further, the configuration requirement item includes: target software requirements and target image types;
the obtaining of the target configuration resource satisfying the configuration requirement item from the target resource library includes:
acquiring a target software package meeting the requirement of the target software from a target resource library, and acquiring target software configuration parameters corresponding to the target mirror image type, wherein the target resource library comprises: a plurality of software packages with different versions and software configuration parameters corresponding to each image type;
and determining the target software package and the target software configuration parameters as the target configuration resources.
Further, before obtaining a target software package satisfying the software requirement from a target repository and obtaining target software configuration parameters corresponding to the image type, the method further includes:
calling an initial resource library, wherein the initial resource library comprises a plurality of different basic software packages;
acquiring an extension configuration request, wherein the extension configuration request carries at least one extension software package;
reading attribute information corresponding to the extension software package;
and under the condition that the attribute information is configured correctly, adding the extension software package to the initial resource library to obtain the target resource library.
Further, after generating a target mirroring task according to the mirroring configuration requirement and the target configuration resource, the method further includes:
storing the target mirroring task to a database;
wherein storing the target mirroring task to a database comprises:
acquiring the security level of the target mirroring task;
encrypting the target mirror image task under the condition that the security level is greater than a preset level to obtain an encrypted target mirror image task;
and storing the encrypted target mirror image task to the database.
Further, the obtaining of the target execution parameter corresponding to the target mirroring task includes:
generating at least one parameter item corresponding to the target mirroring task according to a preset rule, wherein the parameter item comprises: task priority and file generation time;
and under the condition that the triggering operation acting on the parameter item is detected, reading the parameter value corresponding to the parameter item, and determining the parameter value as the target execution parameter.
Further, the executing the target image task according to the target execution parameter to obtain a target image file includes:
and sending the target image task and the target execution parameters to a target operating system so that the target operating system executes the target image task according to the target execution parameters to obtain a target image file.
Further, the sending the target image task and the target execution parameter to a target operating system includes:
acquiring a mirror image task list, wherein the mirror image task list comprises at least one mirror image task to be sent to a target operating system and execution parameters corresponding to the mirror image task;
comparing the target execution parameter with the execution parameter to obtain a comparison result;
and sending the target image task and the target execution parameter to a target operating system under the condition that the comparison result meets a preset task scheduling condition.
According to still another aspect of the embodiments of the present application, there is provided an apparatus for generating an image file, including:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving an image file generation request, and the image file generation request carries a configuration requirement item for configuring a target image task;
the generating module is used for acquiring the target configuration resource meeting the configuration requirement item from a target resource library and generating a target mirror image task according to the configuration requirement item and the target configuration resource;
the acquisition module is used for acquiring target execution parameters corresponding to the target mirroring task;
and the execution module is used for executing the target image task according to the target execution parameters to obtain a target image file.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method and the device, the configuration demand items in the mirror image file generation request are extracted, the configuration resources meeting the configuration demand items are dynamically matched from the target resource library, then the mirror image file is automatically generated based on the configuration resources, manual participation is not needed, and the generation efficiency of the mirror image file is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a method for generating an image file according to an embodiment of the present application;
fig. 2 is a flowchart of a method for generating an image file according to another embodiment of the present application;
fig. 3 is a flowchart of a method for generating an image file according to another embodiment of the present application;
fig. 4 is a block diagram of an apparatus for generating an image file according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a method and a device for generating an image file, electronic equipment and a storage medium. The method provided by the embodiment of the invention can be applied to any required electronic equipment, for example, the electronic equipment can be electronic equipment such as a server and a terminal, and the method is not particularly limited herein, and is hereinafter simply referred to as electronic equipment for convenience in description.
According to an aspect of an embodiment of the present application, an embodiment of a method for generating an image file is provided. Fig. 1 is a flowchart of a method for generating an image file according to an embodiment of the present application, and as shown in fig. 1, the method includes:
step S11, receiving an image file generation request, where the image file generation request carries a configuration requirement item for configuring a target image task.
In the embodiment of the application, an operating system receives an image file generation request uploaded or input by a user, and extracts configuration requirement items from the image file generation request, where the configuration requirement items include: target software requirements and target image type. The target software requirements may be software requirements and software version requirements, and the target image types include: minimized mirror, server base mirror, or desktop version mirror, where each mirror type corresponds to a different configuration parameter of the software.
In the embodiment of the application, only the user needs to set the configuration requirement item in the mirror image file generation request, and the user does not need to manually deploy the configuration resource, so that the generation efficiency of the mirror image file is improved, and a basis is provided for the subsequent automatic generation of the mirror image file.
And step S12, acquiring the target configuration resource of the configuration requirement item which is satisfied from the target resource library, and generating the target mirror image task according to the configuration requirement item and the target configuration resource.
In the embodiment of the present application, in order to implement automatic configuration of configuration resources, a target resource library is set, where the target resource library includes: a plurality of different types of base software packages and a plurality of different types of extension software packages, the base software packages may be: bash, perl, python, yum and other software packages, if the operating system does not have a basic software package, normal file construction cannot be carried out; the extension software package is deployed by a user according to the requirement. In addition, the target repository further comprises: and the software configuration parameters corresponding to each image type are the configuration parameters corresponding to the minimized image, the configuration parameters corresponding to the basic image of the server or the configuration parameters corresponding to the desktop image.
It should be noted that, for a base software package of the same type or an extension software package of the same type in the target repository, the software package can be adapted to operating systems of different configurations by setting software packages of multiple software versions.
In this embodiment of the application, the step S12 of obtaining the target configuration resource of the satisfied configuration requirement item from the target resource library includes the following steps a1-a 2:
step A1, obtaining the target software package meeting the target software requirement from the target resource library, and obtaining the target software configuration parameters corresponding to the target image type.
In an embodiment of the present application, the target software requirements include: and therefore, the corresponding software package is obtained from the target resource library according to the software name requirement, and the target software package of the corresponding version is obtained according to the software version requirement. And then acquiring corresponding target software configuration parameters from the target resource library according to the target mirror image type.
Step A2, the target software package and the target software configuration parameters are determined as the target configuration resources.
In the embodiment of the application, the corresponding target software package and the target software configuration parameters are obtained from the target resource library according to the configuration requirement items, so that the corresponding resources are automatically configured according to the configuration requirement items, manual compiling of configuration files is not needed, the generation process of the image files is simplified, and the generation efficiency of the image files is indirectly improved.
In the embodiment of the application, after the target software package and the target software configuration parameters are obtained, the target mirror image task is generated according to the configuration requirement item and the target configuration resources. The target mirror image task is generated, so that subsequent maintenance is facilitated.
Step S13, obtaining a target execution parameter corresponding to the target mirroring task.
In the embodiment of the present application, in step S13, obtaining target execution parameters corresponding to the target mirroring task includes the following steps B1-B2:
step B1, generating at least one parameter item corresponding to the target mirroring task according to a preset rule, wherein the parameter item comprises: task priority and file generation time.
In the embodiment of the application, after a target image task is generated, at least one parameter item is configured for the target image task according to a preset rule, where the parameter item may be a task priority and a file generation time, where the task priority is used to determine an execution sequence of the target image task, and the file production time is used to indicate the latest generation time of an image file or indicate a generation period of the image file.
And step B2, under the condition that the triggering operation corresponding to the parameter item is detected to exist, reading the parameter value corresponding to the parameter item, and determining the parameter value as the target execution parameter.
In the embodiment of the application, after the parameter item is generated, the parameter item is displayed, and if it is detected that a trigger operation acting on the parameter item corresponds exists, it is determined that a user has input a parameter value corresponding to the parameter item, where the trigger operation may be a saving operation triggered after the user completes inputting, and the like. Therefore, in the case that the triggering operation acting on the parameter item is detected, the parameter value corresponding to the parameter item is read, and the parameter value is determined as the target execution parameter.
And step S14, executing the target image task according to the target execution parameters to obtain a target image file.
In this embodiment of the present application, step S14, executing the target image task according to the target execution parameter, to obtain the target image file, includes: and sending the target image task and the target execution parameters to the target operating system so that the target operating system executes the target image task according to the target execution parameters to obtain a target image file.
In the embodiment of the application, the sending of the target image task and the target execution parameters to the target operating system comprises the following steps C1-C3:
step C1, obtaining a mirror image task list, where the mirror image task list includes at least one mirror image task to be sent to the target operating system and an execution parameter corresponding to the mirror image task.
In the embodiment of the present application, the image task list stores the unexecuted image tasks, that is, the image tasks to be sent to the target operating system, and in addition, the image task list includes execution parameters corresponding to each image task, such as task priority and file generation time.
And step C2, comparing the target execution parameters with the execution parameters to obtain a comparison result.
In the embodiment of the application, the comparison result is obtained by comparing the target image parameter with the execution parameters of each image task in the image task list, such as the priority of the comparison task and the generation time of the comparison file.
And step C3, sending the target image task and the target execution parameter to the target operating system under the condition that the comparison result meets the preset task scheduling condition.
In the embodiment of the present application, the comparison result that satisfies the preset scheduling condition includes: the task priority is greater than or equal to the highest priority in the mirroring tasks in the mirroring task list, and/or the file generation time is less than or equal to the minimum file generation time in the mirroring task list. Therefore, the requirement of immediate execution of the target image task can be determined, and the target image task and the target execution parameters are sent to the target operating system.
In another embodiment of the application, when the comparison result does not meet the preset scheduling condition, the target mirroring task is stored in the mirroring task list, and under the condition that the target mirroring task is stored in the mirroring task list, the storage position of the target mirroring task in the mirroring task list is determined according to the task priority and the file generation time, and the target mirroring task is stored in the corresponding storage position.
According to the method and the device, the configuration demand items in the mirror image file generation request are extracted, the configuration resources meeting the configuration demand items are dynamically matched from the target resource library, then the mirror image file is automatically generated based on the configuration resources, manual participation is not needed, and the generation efficiency of the mirror image file is improved.
In the process of implementing the present application, the inventor also finds that automatic construction cannot be realized when configuring related resources for generating the image file. Each time a human involvement is required to configure, for example: output path, format, etc. However, manual configuration file writing mainly has the following problems:
(1) configuration files are easily overlooked. Because the configuration file is complex. The image generation time is long, if the configuration file is found to be configured wrongly or missing. Reconfiguration is required.
(2) The profile readability is poor. The problem of hiding some configuration file configuration errors during the configuration process may not be discovered in time. There is no way to visualize the presentation.
(3) The configuration file requires manual maintenance. There is no way to maintain uniformity. The configuration files are due to plain text files stored on the operating system. Manual copying of the file is required for maintenance. If there are more profiles or different configurations need to be distinguished. The maintenance difficulty is large. Manual maintenance of the profile is relatively cumbersome.
Based on this, another embodiment of the present application provides a method for generating an image file, and fig. 2 is a flowchart of the method for generating an image file provided in the embodiment of the present application, and as shown in fig. 2, the method includes the following steps S21-S22:
step S21, call an initial resource library, where the initial resource library includes a plurality of different basic software packages.
In the embodiment of the present application, the initial repository includes a plurality of different types of basic software packages, and each type of basic software package further includes a plurality of different versions. Wherein the initial software package may be: bash, perl, python, yum, and the like.
Step S22, obtaining an extended configuration request, where the extended configuration request carries at least one extended software package.
In the embodiment of the application, when a user needs to configure an initial resource library, a plurality of extension software packages need to be configured, and then the extension software packages are carried in an extension configuration request and the extension configuration request is sent to a target operating system.
And step S23, reading the attribute information corresponding to the extension software package.
In the embodiment of the present application, the attribute information of the extension software package may be source information, configuration information, storage path, and the like of the software package.
And step S24, adding the extension software package to the initial resource library to obtain the target resource library under the condition that the attribute information configuration is correct.
In the embodiment of the application, the extension software package belongs to a software package customized by a user, and the purpose is to enable the user to generate an image file by using the software package after the user manufactures the software package. Therefore, after the user uploads the extension software package, the attribute information of the extension software package is firstly analyzed. And determining that the configuration of the extension software package is correct. And caching the extended software package. If the configuration is wrong, the extension software package is not effective, and the service cannot be provided subsequently.
In the embodiment of the application, the special requirements of the user can be supported through the target resource library. For example, a user needs to print a specified version in docker or a version which is uploaded to the extension software package by the user, and specific configuration resources selected by the user based on the characteristics are generated during storage. Mainly comprising a comps file, a varients file and a lorax configuration file.
In the process of implementing the present application, the inventor also finds that, in the generation process of the existing image file, the task cannot be executed at regular time, that is, the result cannot be constructed according to the task query. And copying the file system only after the iso generating task of the pungi is completed.
Based on this, in the embodiment of the present application, after a target mirroring task is generated according to mirroring configuration requirements and target configuration resources, a storage method of the mirroring task is further provided, where the method includes: and storing the target mirroring task to a database.
In the embodiment of the present application, storing the target mirroring task in the database specifically includes the following steps:
and E1, acquiring the security level of the target image task.
And E2, encrypting the target mirror image task to obtain the encrypted target mirror image task under the condition that the security level is higher than the preset level.
And step E3, storing the encrypted target image task to a database.
In this embodiment of the present application, the security level of the target mirroring task may be configured by the user after the target mirroring task is generated. The security level is used to indicate the importance of the target mirroring task. Therefore, under the condition that the security level is higher than the preset security level, the key corresponding to the security level is obtained according to the security level, the key is used for encrypting the target mirror image task, the encrypted target mirror image task is obtained, and the encrypted target mirror image task is stored in the database.
In the embodiment of the application, the mirror image process can be traced by the operating system by storing the mirror image task generated each time. Compared with the traditional mode of generating the mirror image, after the generation is finished, the output is placed on the file system of the operating system and needs to be manually copied and maintained. According to the embodiment of the application, the maintenance can be performed through the database when the task is generated and finished each time. Therefore, historical tasks can be inquired, the generation process of the operating system mirror image can be traced, and task planning can be realized.
Fig. 4 is a block diagram of an apparatus for generating an image file according to an embodiment of the present disclosure, where the apparatus may be implemented as part of or all of an electronic device through software, hardware, or a combination of the two. As shown in fig. 4, the apparatus includes:
the receiving module 41 is configured to receive an image file generation request, where the image file generation request carries a configuration requirement item for configuring a target image task.
And the generating module 42 is configured to obtain the target configuration resource of the configuration requirement item that is satisfied from the target resource library, and generate the target mirroring task according to the configuration requirement item and the target configuration resource.
And an obtaining module 43, configured to obtain a target execution parameter corresponding to the target mirroring task.
And the execution module 44 is configured to execute the target image task according to the target execution parameter to obtain a target image file.
In the embodiment of the present application, the configuration requirement item includes: target software requirements and target image types;
in this embodiment of the present application, the generating module 42 is configured to obtain a target software package meeting software requirements from a target resource library, and obtain a target software configuration parameter corresponding to a mirror image type, where the target resource library includes: a plurality of software packages with different versions and software configuration parameters corresponding to each image type; and determining the software version and the software configuration parameters as target configuration resources.
In this embodiment of the present application, the apparatus for generating an image file further includes: the configuration module is used for calling an initial resource library, wherein the initial resource library comprises a plurality of different basic software packages; acquiring an extended configuration request, wherein the extended configuration request carries at least one extended software package; reading attribute information corresponding to the extension software package; and under the condition that the attribute information is configured correctly, adding the extension software package to the initial resource library to obtain a target resource library.
In this embodiment of the present application, the apparatus for generating an image file further includes: the storage module is used for storing the target mirror image task to the database;
the storage module is specifically used for acquiring the security level of the target mirroring task; under the condition that the security level is greater than the preset level, encrypting the target mirror image task to obtain an encrypted target mirror image task; and storing the encrypted target mirror image task to a database.
In this embodiment of the present application, the obtaining module 43 is configured to generate at least one parameter item corresponding to the target mirroring task according to a preset rule, where the parameter item includes: task priority and file generation time; and under the condition that the triggering operation acting on the parameter item is detected, reading the parameter value corresponding to the parameter item, and determining the parameter value as the target execution parameter.
In this embodiment of the present application, the execution module 44 is configured to send the target image task and the target execution parameter to the target operating system, so that the target operating system executes the target image task according to the target execution parameter to obtain the target image file.
In this embodiment of the present application, the execution module 44 is configured to obtain a mirror task list, where the mirror task list includes at least one mirror task to be sent to a target operating system and an execution parameter corresponding to the mirror task; comparing the target execution parameters with the execution parameters to obtain a comparison result; and sending the target image task and the target execution parameter to the target operating system under the condition that the comparison result meets the preset task scheduling condition.
An embodiment of the present application further provides an electronic device, as shown in fig. 5, the electronic device may include: the system comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above embodiments when executing the computer program stored in the memory 1503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the instructions cause the computer to perform the method for generating an image file described in any one of the above embodiments.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for generating an image file according to any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for generating an image file, comprising:
receiving an image file generation request, wherein the image file generation request carries a configuration requirement item for configuring a target image task;
acquiring target configuration resources meeting the configuration requirement items from a target resource library, and generating a target mirror image task according to the configuration requirement items and the target configuration resources;
acquiring target execution parameters corresponding to the target mirroring task;
and executing the target image task according to the target execution parameters to obtain a target image file.
2. The method of claim 1, wherein the configuration requirement items comprise: target software requirements and target image types;
the obtaining of the target configuration resource satisfying the configuration requirement item from the target resource library includes:
acquiring a target software package meeting the requirement of the target software from a target resource library, and acquiring target software configuration parameters corresponding to the target mirror image type, wherein the target resource library comprises: a plurality of software packages with different versions and software configuration parameters corresponding to each image type;
and determining the target software package and the target software configuration parameters as the target configuration resources.
3. The method of claim 2, wherein before obtaining the target software package satisfying the target software requirement from the target repository and obtaining the target software configuration parameters corresponding to the target image type, the method further comprises:
calling an initial resource library, wherein the initial resource library comprises a plurality of different basic software packages;
acquiring an extension configuration request, wherein the extension configuration request carries at least one extension software package;
reading attribute information corresponding to the extension software package;
and under the condition that the attribute information is configured correctly, adding the extension software package to the initial resource library to obtain the target resource library.
4. The method of claim 1, wherein after generating a target mirroring task based on the mirroring configuration needs and the target configuration resources, the method further comprises:
storing the target mirroring task to a database;
wherein storing the target mirroring task to a database comprises:
acquiring the security level of the target mirroring task;
encrypting the target mirror image task under the condition that the security level is greater than a preset level to obtain an encrypted target mirror image task;
and storing the encrypted target mirror image task to the database.
5. The method according to claim 1, wherein the obtaining of the target execution parameter corresponding to the target mirroring task comprises:
generating at least one parameter item corresponding to the target mirroring task according to a preset rule, wherein the parameter item comprises: task priority and file generation time;
and under the condition that the triggering operation acting on the parameter item is detected, reading the parameter value corresponding to the parameter item, and determining the parameter value as the target execution parameter.
6. The method of claim 1, wherein executing the target image task according to the target execution parameters to obtain a target image file comprises:
and sending the target image task and the target execution parameters to a target operating system so that the target operating system executes the target image task according to the target execution parameters to obtain a target image file.
7. The method of claim 6, wherein sending the target image task and the target execution parameters to a target operating system comprises:
acquiring a mirror image task list, wherein the mirror image task list comprises at least one mirror image task to be sent to a target operating system and execution parameters corresponding to the mirror image task;
comparing the target execution parameter with the execution parameter to obtain a comparison result;
and sending the target image task and the target execution parameter to a target operating system under the condition that the comparison result meets a preset task scheduling condition.
8. An apparatus for generating an image file, comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving an image file generation request, and the image file generation request carries a configuration requirement item for configuring a target image task;
the generating module is used for acquiring the target configuration resource meeting the configuration requirement item from a target resource library and generating a target mirror image task according to the configuration requirement item and the target configuration resource;
the acquisition module is used for acquiring target execution parameters corresponding to the target mirroring task;
and the execution module is used for executing the target image task according to the target execution parameters to obtain a target image file.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1-7 by executing a program stored on a memory.
CN202111112025.7A 2021-09-18 2021-09-18 Image file generation method and device, electronic equipment and storage medium Active CN113867778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111112025.7A CN113867778B (en) 2021-09-18 2021-09-18 Image file generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111112025.7A CN113867778B (en) 2021-09-18 2021-09-18 Image file generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113867778A true CN113867778A (en) 2021-12-31
CN113867778B CN113867778B (en) 2024-08-16

Family

ID=78993232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111112025.7A Active CN113867778B (en) 2021-09-18 2021-09-18 Image file generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113867778B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032739A (en) * 2023-10-07 2023-11-10 之江实验室 Mirror image generation method, system, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902770A (en) * 2012-09-26 2013-01-30 东软集团股份有限公司 Method and system for assembling mirror image files
CN107463427A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 The acquisition methods and device of a kind of VME operating system type and version
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN110825392A (en) * 2019-10-31 2020-02-21 北京深之度科技有限公司 Customization method, batch deployment method and batch deployment system of operating system
CN112612489A (en) * 2020-12-16 2021-04-06 北京梆梆安全科技有限公司 Software upgrade package construction method and device and electronic equipment
CN112637365A (en) * 2021-01-06 2021-04-09 Oppo广东移动通信有限公司 Terminal resource issuing and acquiring method and device and electronic equipment
CN113254033A (en) * 2021-05-28 2021-08-13 浪潮电子信息产业股份有限公司 Master disk file generation method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902770A (en) * 2012-09-26 2013-01-30 东软集团股份有限公司 Method and system for assembling mirror image files
CN107463427A (en) * 2017-06-29 2017-12-12 北京北信源软件股份有限公司 The acquisition methods and device of a kind of VME operating system type and version
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN110825392A (en) * 2019-10-31 2020-02-21 北京深之度科技有限公司 Customization method, batch deployment method and batch deployment system of operating system
CN112612489A (en) * 2020-12-16 2021-04-06 北京梆梆安全科技有限公司 Software upgrade package construction method and device and electronic equipment
CN112637365A (en) * 2021-01-06 2021-04-09 Oppo广东移动通信有限公司 Terminal resource issuing and acquiring method and device and electronic equipment
CN113254033A (en) * 2021-05-28 2021-08-13 浪潮电子信息产业股份有限公司 Master disk file generation method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117032739A (en) * 2023-10-07 2023-11-10 之江实验室 Mirror image generation method, system, storage medium and electronic equipment
CN117032739B (en) * 2023-10-07 2024-01-09 之江实验室 Mirror image generation method, system, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113867778B (en) 2024-08-16

Similar Documents

Publication Publication Date Title
CN108153670B (en) Interface testing method and device and electronic equipment
CN107896162B (en) Deployment method and device of monitoring system, computer equipment and storage medium
US11294661B2 (en) Updating a code file
CN110569035A (en) Code compiling method, device, equipment and storage medium of software development project
US11461679B2 (en) Message management using machine learning techniques
US20150242200A1 (en) Re-configuration in cloud computing environments
EP2629205A1 (en) Multi-entity test case execution workflow
CN113448862B (en) Software version testing method and device and computer equipment
US9513997B2 (en) Test data management
CN111143023A (en) Resource changing method and device, equipment and storage medium
CN113330419A (en) Equipment application installation method and device
US12112154B2 (en) Automated software deployment techniques
CN113867778B (en) Image file generation method and device, electronic equipment and storage medium
CN110674153B (en) Data consistency detection method and device and electronic equipment
CN112506590A (en) Interface calling method and device and electronic equipment
CN112433783A (en) Configuration method and related equipment
CN111722994A (en) Task request response method and device
WO2019233454A1 (en) Chain code upgrading method and device
US20170078509A1 (en) Information processing system and information processing method
US11757976B2 (en) Unified application management for heterogeneous application delivery
TWI759096B (en) Building and deployment system and method of shared software solution and computer readable medium
CN112765188A (en) Configuration information processing method, configuration management system, electronic device, and storage medium
CN114500268A (en) Deployment method, device, server and storage medium of chart resource
CN113326052A (en) Method and device for upgrading service component, computer equipment and storage medium
CN113886215A (en) Interface test method, device and storage medium

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
GR01 Patent grant
GR01 Patent grant