CN113805960B - YAML-based server configuration method, device, terminal and storage medium - Google Patents

YAML-based server configuration method, device, terminal and storage medium Download PDF

Info

Publication number
CN113805960B
CN113805960B CN202110960602.1A CN202110960602A CN113805960B CN 113805960 B CN113805960 B CN 113805960B CN 202110960602 A CN202110960602 A CN 202110960602A CN 113805960 B CN113805960 B CN 113805960B
Authority
CN
China
Prior art keywords
configuration
firmware
template file
model
file
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.)
Active
Application number
CN202110960602.1A
Other languages
Chinese (zh)
Other versions
CN113805960A (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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110960602.1A priority Critical patent/CN113805960B/en
Publication of CN113805960A publication Critical patent/CN113805960A/en
Application granted granted Critical
Publication of CN113805960B publication Critical patent/CN113805960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44536Selecting among different versions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a server configuration method, a device, a terminal and a storage medium based on yaml, wherein the method comprises the following steps: defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs; the firmware configuration template files are subjected to folder grouping setting according to the model; obtaining a firmware configuration request of a client, analyzing model parameters, and searching a firmware configuration template file of a corresponding model from a folder group; and generating a configuration interface according to the searched firmware configuration template file, and providing the configuration interface for the client for server configuration. According to the invention, the model classification is isolated from the firmware configuration core logic through yaml language, and the firmware configuration service logic is realized through id association, so that the coupling degree of each part of the service logic is reduced, and the work of continuously increasing the model compatible codes during the development of the firmware is saved.

Description

Yaml-based server configuration method, device, terminal and storage medium
Technical Field
The invention belongs to the technical field of server testing, and particularly relates to a yaml-based server configuration method, device, terminal and storage medium.
Background
At present, a plurality of server projects adopt agile development models, the development iteration period is shortened, and the approval period is shortened. With the continuous increase of iteration versions, the functions are continuously enriched and perfected, and the functional points to be tested are increased. Moreover, these functional tests involve numerous test tools, such as SPECPU, MEMTEST and FIO, SPECPU being the CPU test tool, MEMTEST being the memory test tool, FIO being the pressure test tool.
With the increasing number of test function points, the required test steps are more and more complicated, and new test points are required to be compatible, so that the test time is long and all test items cannot be covered.
This is a disadvantage of the prior art, and therefore, in order to address the above-mentioned drawbacks of the prior art, it is necessary to provide a yaml-based server configuration method, apparatus, terminal, and storage medium.
Disclosure of Invention
Aiming at the defects that the prior server in the prior art has more and more testing function points, the required testing steps are more and more complicated, new testing points are required to be compatible constantly, the testing time is long, and all testing items cannot be covered, the invention provides a yaml-based server configuration method, a yaml-based server configuration device, a yaml-based server configuration terminal and a yaml-based storage medium, and aims to solve the technical problems.
In a first aspect, the present invention provides a yaml-based server configuration method, including the steps of:
s1, defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs;
s2, grouping and setting folders of the firmware configuration template file according to the model;
s3, acquiring a firmware configuration request of the client, analyzing model parameters, and searching a firmware configuration template file of a corresponding model from the folder group;
s4, generating a configuration interface according to the searched firmware configuration template file, and providing the configuration interface for the client for server configuration.
Further, the specific steps of step S1 are as follows:
s11, defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file, a BMC configuration template file and an FRU configuration template file;
s12, storing BIOS configuration items and configuration relations in a BIOS configuration template file, storing BMC configuration items and configuration relations in a BMC configuration template file, and storing FRU configuration items and configuration relations in an FRU configuration template file;
s13, representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation, and realizing cascade control of the configuration items through an ID. Firmware profiles include, but are not limited to, BIOS, BMC, and FRU profiles. And placing configuration items and relations among the configuration items in the respective firmware configuration template files so as to provide data support for the generation of the configuration interface.
Further, the specific steps of step S13 are as follows:
s131, setting a primary large configuration item in a firmware configuration template file;
s132, setting description and types of secondary configuration items under the primary large configuration items;
s133, setting a tertiary small configuration item name under the description and the type of the secondary configuration item;
s134, setting a command, a type, an ID, a PID and a QID of a four-level small configuration item under the name of the three-level small configuration item; wherein ID represents each configuration item per se, PID represents that the current configuration item is selectable when the parent node ID is selected, and QID represents that the current configuration item is selectable when the parent node ID is not selected. The firmware configuration template file summary includes, but is not limited to, the four-level configuration, the levels can be reduced or increased according to actual conditions in specific applications, and the relationship between the levels in configuration is established through ID, PID and QID.
Further, the types of the four-level small configuration items include a select type indicating that the current configuration item is a select type and a raw type indicating that the current configuration item is a text input type. The types of different configuration items can be flexibly selected and set according to the needs, and different requirements are met.
Further, the four-level small configuration items are also provided with a configuration item display mode, a configuration command and a corresponding relation between the configuration item display mode and the configuration command. The configuration item display mode, the configuration command and the corresponding relation thereof are used for guiding the specific type of the configuration item display in the configuration interface.
Further, the specific steps of step S2 are as follows:
s21, creating a model series folder, a model folder and a firmware version file layer by layer according to the model;
s22, naming the firmware version file by using a model and BMC version and BISO version. According to the grouping of the firmware configuration template files, the dependence of the firmware configuration function and the machine type is decoupled, so that the situation that the machine type compatible codes are continuously increased along with the increase of the machine type when the developer develops the firmware configuration can be avoided.
Further, the specific steps of step S21 are as follows:
s211, setting equipment as a primary folder;
s212, creating a manufacturer secondary folder under the primary folder;
s213, creating a model series three-level folder under the manufacturer two-level folder;
s214, creating a model four-level folder under the model series three-level folder;
s215, creating a firmware version file under the model four-level folder. In specific application, the folder is not limited to the four stages, and the folder level can be increased or decreased according to application requirements, so that the actual model application scene can be met.
Further, the specific steps of step S3 are as follows:
s31, intercepting a firmware configuration request initiated by a client through an HTTP protocol;
s32, analyzing model parameters from the client side component configuration request, and searching a firmware configuration template file of a corresponding model from the folder group by taking the model parameters as query items. When the client initiates a firmware configuration request, the client can search the corresponding firmware configuration template file only by providing model parameters.
Further, the specific steps of step S4 are as follows:
s41, generating a corresponding configuration interface according to the searched firmware configuration template file, and providing the configuration interface for the client;
s42, acquiring input of a user through a configuration interface of the client, and correspondingly configuring the server firmware. The configuration interface wants to provide options for firmware configuration of the corresponding model, receives input of a user, and realizes the firmware configuration.
In a second aspect, the present invention provides a yaml-based server configuration apparatus, comprising:
the configuration file definition module is used for defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs;
the configuration file grouping module is used for grouping the firmware configuration template files into folders according to the model;
the configuration file searching module is used for acquiring a firmware configuration request of the client, analyzing model parameters and searching a firmware configuration template file of a corresponding model from the folder group;
and the server configuration module is used for generating a configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client for server configuration.
Further, the profile definition module includes:
the firmware configuration template file definition unit is used for defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file, a BMC configuration template file and an FRU configuration template file;
the configuration item storage unit is used for storing BIOS configuration items and configuration relations in a BIOS configuration template file, BMC configuration items and configuration relations in a BMC configuration template file and FRU configuration items and configuration relations in an FRU configuration template file;
and the configuration item cascade control unit is used for representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation and realizing cascade control of the configuration items through ID.
Further, the configuration item cascade control unit includes:
the primary configuration item setting subunit is used for setting primary large configuration items in the firmware configuration template file;
a secondary configuration item setting subunit, configured to set a description and a type of the secondary configuration item under the primary large configuration item;
a three-level configuration item setting subunit for setting three-level small configuration item names under the description and the type of the two-level configuration items;
a four-level configuration item setting subunit, configured to set a command, a type, an ID, a PID, and a QID of the four-level small configuration item under the name of the three-level small configuration item; wherein ID represents each configuration item per se, PID represents that the current configuration item is selectable when the parent node ID is selected, and QID represents that the current configuration item is selectable when the parent node ID is not selected.
Further, the profile grouping module includes:
the folder grouping unit is used for creating a model series folder, a model folder and a firmware version file layer by layer according to the model;
and the firmware version file naming unit is used for naming the firmware version file by using a model plus a BMC version plus a BISO version.
Further, the folder grouping unit includes:
the primary folder setting subunit is used for setting equipment as a primary folder;
a secondary folder setting subunit, configured to create a vendor secondary folder under the primary folder;
the third-level folder setting subunit is used for creating a model series third-level folder under the manufacturer second-level folder;
the four-level folder setting subunit is used for creating a model four-level folder under the model series three-level folder;
and the firmware version file creation subunit is used for creating the firmware version file under the model four-level folder.
Further, the profile lookup module includes:
the firmware configuration request unit is used for intercepting a firmware configuration request initiated by the client through an HTTP protocol;
the firmware configuration template file searching unit is used for analyzing model parameters from the client side hardware configuration request, and searching the firmware configuration template file of the corresponding model from the folder group by taking the model parameters as query items.
Further, the server configuration module includes:
the configuration interface generating unit is used for generating a corresponding configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client;
the server firmware configuration unit is used for acquiring the input of a user through a configuration interface of the client and correspondingly configuring the server firmware.
In a third aspect, a terminal is provided, comprising a processor and a memory,
wherein the memory is for storing a computer program and the processor is for calling and running the computer program from the memory for causing the terminal to execute the method of the first aspect described above.
In a fourth aspect, there is provided a computer storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the first aspect described above.
The invention has the advantages that,
according to the yaml-based server configuration method, device, terminal and storage medium provided by the invention, the model classification and the firmware configuration core logic are isolated through yaml language, and the service logic of firmware configuration is realized in yaml files in an id association mode. Therefore, the original program logic is not required to be destroyed, the isolation of each part of the service logic is realized, the coupling degree between each part of the service logic is reduced, the reusability of the program is improved, and the development efficiency is improved. The invention saves the work that the research personnel continuously increases the codes compatible with the machine type along with the increase of the machine type when the firmware configuration is developed, simultaneously externally helps the firmware operation personnel to append the command of the firmware configuration in the software in real time, and provides guiding data for the subsequent firmware version upgrade.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
It can be seen that the present invention has outstanding substantial features and significant advances over the prior art, as well as the benefits of its implementation.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic flow chart of a yaml-based server configuration method of the present invention.
Fig. 2 is a schematic flow chart of a server configuration method based on yaml.
Fig. 3 is a flow chart of a server configuration method based on yaml according to the present invention.
Fig. 4 is a schematic diagram of a yaml-based server configuration apparatus of the present invention.
In the figure, a 1-profile definition module; 1.1-a firmware configuration template file definition unit; 1.2-configuration item storage unit; 1.3-configuration item cascade control unit; 2-a profile grouping module; 2.1-folder grouping unit; 2.2-firmware version file naming unit; 3-a configuration file searching module; 3.1-firmware configuration request unit; 3.2-a firmware configuration template file searching unit; 4-a server configuration module; 4.1-a configuration interface generation unit; 4.2-server firmware configuration unit.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
YAML is a programming language, its syntax is similar to other high-level languages, and can simply express data forms such as manifest, hash table, scalar, etc.
FRU, a short name for Field Replace Unit, field replaceable unit.
Example 1:
as shown in fig. 1, the present invention provides a server configuration method based on yaml, comprising the steps of:
s1, defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs;
s2, grouping and setting folders of the firmware configuration template file according to the model;
s3, acquiring a firmware configuration request of the client, analyzing model parameters, and searching a firmware configuration template file of a corresponding model from the folder group;
s4, generating a configuration interface according to the searched firmware configuration template file, and providing the configuration interface for the client for server configuration.
According to the invention, model classification is isolated from firmware configuration core logic through yaml language, and service logic of firmware configuration is realized in yaml file through id association. Therefore, the original program logic is not required to be destroyed, the isolation of each part of the service logic is realized, the coupling degree between each part of the service logic is reduced, the reusability of the program is improved, and the development efficiency is improved. The invention saves the work that the research personnel continuously increases the codes compatible with the machine type along with the increase of the machine type when the firmware configuration is developed, simultaneously externally helps the firmware operation personnel to append the command of the firmware configuration in the software in real time, and provides guiding data for the subsequent firmware version upgrade.
Example 2:
as shown in fig. 2, the present invention provides a server configuration method based on yaml, comprising the steps of:
s1, defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs; the method comprises the following specific steps:
s11, defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file, a BMC configuration template file and an FRU configuration template file;
s12, storing BIOS configuration items and configuration relations in a BIOS configuration template file, storing BMC configuration items and configuration relations in a BMC configuration template file, and storing FRU configuration items and configuration relations in an FRU configuration template file;
s13, representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation, and realizing cascade control of the configuration items through an ID;
s2, grouping and setting folders of the firmware configuration template file according to the model; the method comprises the following specific steps:
s21, creating a model series folder, a model folder and a firmware version file layer by layer according to the model;
s22, naming a firmware version file by using a model and BMC version and BISO version;
s3, acquiring a firmware configuration request of the client, analyzing model parameters, and searching a firmware configuration template file of a corresponding model from the folder group; the method comprises the following specific steps:
s31, intercepting a firmware configuration request initiated by a client through an HTTP protocol;
s32, analyzing model parameters from the client side component configuration request, and searching a firmware configuration template file of a corresponding model from the folder group by taking the model parameters as query items;
s4, generating a configuration interface according to the searched firmware configuration template file, and providing the configuration interface for a client for server configuration; the method comprises the following specific steps:
s41, generating a corresponding configuration interface according to the searched firmware configuration template file, and providing the configuration interface for the client;
s42, acquiring input of a user through a configuration interface of the client, and correspondingly configuring the server firmware.
Example 3:
as shown in fig. 3, the present invention provides a server configuration method based on yaml, comprising the steps of:
s1, defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs; the method comprises the following specific steps:
s11, defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file bios.yml, a BMC configuration template file bmc.yml and an FRU configuration template file fru.yml;
s12, storing BIOS configuration items and configuration relations in a BIOS configuration template file, storing BMC configuration items and configuration relations in a BMC configuration template file, and storing FRU configuration items and configuration relations in an FRU configuration template file;
s13, representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation, and realizing cascade control of the configuration items through an ID; the method comprises the following specific steps:
s131, setting a primary large configuration item in a firmware configuration template file;
s132, setting description and types of secondary configuration items under the primary large configuration items;
s133, setting a tertiary small configuration item name under the description and the type of the secondary configuration item;
s134, setting a command, a type, an ID, a PID and a QID of a four-level small configuration item under the name of the three-level small configuration item; wherein ID represents each configuration item, PID represents that the current configuration item is selectable when the ID of the father node is selected, QID represents that the current configuration item is selectable when the ID of the father node is not selected; wherein the types include a select type indicating that the current configuration item is a select type and a raw type indicating that the current configuration item is a text input type; the four-level small configuration items are also provided with a configuration item display mode, a configuration command and the corresponding relation between the configuration item display mode and the configuration command;
if pid can be set equal to 1, an element with id of 1 is selected, the element is only available, and qid can be set equal to 1, and an element with id of 1 is not selected, the element is only available;
s2, grouping and setting folders of the firmware configuration template file according to the model; the method comprises the following specific steps:
s21, creating a model series folder, a model folder and a firmware version file layer by layer according to the model; the method comprises the following specific steps:
s211, setting equipment as a primary folder;
s212, creating a manufacturer secondary folder under the primary folder;
s213, creating a model series three-level folder under the manufacturer two-level folder;
s214, creating a model four-level folder under the model series three-level folder;
s215, creating a firmware version file under the model four-level folder;
s22, naming a firmware version file by using a model and BMC version and BISO version;
for example: in the firmware configuration file hierarchy relationship of the general model/NF 5555/NF5555_1.1.1_2.2.2, NF5555 is a specific model, 1.1.1 in front of the firmware version file is a bmc version, and 2.2.2 in back is a bios version;
s3, acquiring a firmware configuration request of the client, analyzing model parameters, and searching a firmware configuration template file of a corresponding model from the folder group; the method comprises the following specific steps:
s31, intercepting a firmware configuration request initiated by a client through an HTTP protocol;
s32, analyzing model parameters from the client side component configuration request, and searching a firmware configuration template file of a corresponding model from the folder group by taking the model parameters as query items;
s4, generating a configuration interface according to the searched firmware configuration template file, and providing the configuration interface for a client for server configuration; the method comprises the following specific steps:
s41, generating a corresponding configuration interface according to the searched firmware configuration template file, and providing the configuration interface for the client;
s42, acquiring input of a user through a configuration interface of the client, and correspondingly configuring the server firmware.
Example 4:
as shown in fig. 4, the present invention provides a yaml-based server configuration apparatus, comprising:
the configuration file definition module 1 is used for defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs;
the configuration file grouping module 2 is used for grouping and setting the files of the firmware configuration template files according to the model;
the configuration file searching module 3 is used for acquiring the firmware configuration request of the client, analyzing model parameters, and searching the firmware configuration template file of the corresponding model from the folder group;
and the server configuration module 4 is used for generating a configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client for server configuration.
Example 5:
as shown in fig. 4, the present invention provides a yaml-based server configuration apparatus, comprising:
the configuration file definition module 1 is used for defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs; the profile definition module 1 includes:
the firmware configuration template file defining unit 1.1 is used for defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file, a BMC configuration template file and an FRU configuration template file;
the configuration item storage unit 1.2 is used for storing BIOS configuration items and configuration relations in a BIOS configuration template file, BMC configuration items and configuration relations in a BMC configuration template file, and FRU configuration items and configuration relations in an FRU configuration template file;
the configuration item cascade control unit 1.3 is used for representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation and realizing cascade control of the configuration items through an ID;
the configuration file grouping module 2 is used for grouping and setting the files of the firmware configuration template files according to the model; the profile grouping module 2 includes:
the folder grouping unit 2.1 is used for creating a model series folder, a model folder and a firmware version file layer by layer according to models;
a firmware version file naming unit 2.2, which is used for naming the firmware version file by using a model plus BMC version plus BISO version;
the configuration file searching module 3 is used for acquiring the firmware configuration request of the client, analyzing model parameters, and searching the firmware configuration template file of the corresponding model from the folder group; the profile lookup module 3 includes:
the firmware configuration request unit 3.1 is used for intercepting a firmware configuration request initiated by the client through an HTTP protocol;
the firmware configuration template file searching unit 3.2 is used for analyzing model parameters from the client side firmware configuration request, and searching the firmware configuration template file of the corresponding model from the folder group by taking the model parameters as query items;
the server configuration module 4 is used for generating a configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client for server configuration; the server configuration module 4 includes:
the configuration interface generating unit 4.1 is used for generating a corresponding configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client;
and the server firmware configuration unit 4.2 is used for acquiring the input of a user through a configuration interface of the client and correspondingly configuring the server firmware.
Example 6:
as shown in fig. 4, the present invention provides a yaml-based server configuration apparatus, comprising:
the configuration file definition module 1 is used for defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs;
the configuration file grouping module 2 is used for grouping and setting the files of the firmware configuration template files according to the model;
the configuration file searching module 3 is used for acquiring the firmware configuration request of the client, analyzing model parameters, and searching the firmware configuration template file of the corresponding model from the folder group;
and the server configuration module 4 is used for generating a configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client for server configuration.
Example 5:
as shown in fig. 4, the present invention provides a yaml-based server configuration apparatus, comprising:
the configuration file definition module 1 is used for defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs; the profile definition module 1 includes:
the firmware configuration template file defining unit 1.1 is used for defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file, a BMC configuration template file and an FRU configuration template file;
the configuration item storage unit 1.2 is used for storing BIOS configuration items and configuration relations in a BIOS configuration template file, BMC configuration items and configuration relations in a BMC configuration template file, and FRU configuration items and configuration relations in an FRU configuration template file;
the configuration item cascade control unit 1.3 is used for representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation and realizing cascade control of the configuration items through an ID; the configuration item cascade control unit 1.3 comprises:
the primary configuration item setting subunit is used for setting primary large configuration items in the firmware configuration template file;
a secondary configuration item setting subunit, configured to set a description and a type of the secondary configuration item under the primary large configuration item;
a three-level configuration item setting subunit for setting three-level small configuration item names under the description and the type of the two-level configuration items;
a four-level configuration item setting subunit, configured to set a command, a type, an ID, a PID, and a QID of the four-level small configuration item under the name of the three-level small configuration item; wherein ID represents each configuration item, PID represents that the current configuration item is selectable when the ID of the father node is selected, QID represents that the current configuration item is selectable when the ID of the father node is not selected;
the configuration file grouping module 2 is used for grouping and setting the files of the firmware configuration template files according to the model; the profile grouping module 2 includes:
the folder grouping unit 2.1 is used for creating a model series folder, a model folder and a firmware version file layer by layer according to models; the folder grouping unit 2.1 includes:
the primary folder setting subunit is used for setting equipment as a primary folder;
a secondary folder setting subunit, configured to create a vendor secondary folder under the primary folder;
the third-level folder setting subunit is used for creating a model series third-level folder under the manufacturer second-level folder;
the four-level folder setting subunit is used for creating a model four-level folder under the model series three-level folder;
the firmware version file creation subunit is used for creating a firmware version file under the model four-level folder;
a firmware version file naming unit 2.2, which is used for naming the firmware version file by using a model plus BMC version plus BISO version;
the configuration file searching module 3 is used for acquiring the firmware configuration request of the client, analyzing model parameters, and searching the firmware configuration template file of the corresponding model from the folder group; the profile lookup module 3 includes:
the firmware configuration request unit 3.1 is used for intercepting a firmware configuration request initiated by the client through an HTTP protocol;
the firmware configuration template file searching unit 3.2 is used for analyzing model parameters from the client side firmware configuration request, and searching the firmware configuration template file of the corresponding model from the folder group by taking the model parameters as query items;
the server configuration module 4 is used for generating a configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client for server configuration; the server configuration module 4 includes:
the configuration interface generating unit 4.1 is used for generating a corresponding configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client;
and the server firmware configuration unit 4.2 is used for acquiring the input of a user through a configuration interface of the client and correspondingly configuring the server firmware.
Example 7:
the invention provides a terminal, which comprises a processor and a memory;
wherein the memory is used for storing a computer program, and the processor is used for calling and running the computer program from the memory, so that the terminal executes the method described in the above embodiment 1, embodiment 2 or embodiment 3.
Example 7:
the present invention provides a storage medium having instructions stored therein which, when executed on a computer, cause the computer to perform the method described in embodiment 1, embodiment 2 or embodiment 3 above.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A yaml-based server configuration method, comprising the steps of:
s1, defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs; the specific steps of the step S1 are as follows:
s11, defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file, a BMC configuration template file and an FRU configuration template file;
s12, storing BIOS configuration items and configuration relations in a BIOS configuration template file, storing BMC configuration items and configuration relations in a BMC configuration template file, and storing FRU configuration items and configuration relations in an FRU configuration template file;
s13, representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation, and realizing cascade control of the configuration items through an ID;
s2, grouping and setting folders of the firmware configuration template file according to the model; the specific steps of the step S2 are as follows:
s21, creating a model series folder, a model folder and a firmware version file layer by layer according to the model;
s22, naming a firmware version file by using a model and BMC version and BISO version;
s3, acquiring a firmware configuration request of the client, analyzing model parameters, and searching a firmware configuration template file of a corresponding model from the folder group; the specific steps of the step S3 are as follows:
s31, intercepting a firmware configuration request initiated by a client through an HTTP protocol;
s32, analyzing model parameters from the client side component configuration request, and searching a firmware configuration template file of a corresponding model from the folder group by taking the model parameters as query items;
s4, generating a configuration interface according to the searched firmware configuration template file, and providing the configuration interface for a client for server configuration; the specific steps of the step S4 are as follows:
s41, generating a corresponding configuration interface according to the searched firmware configuration template file, and providing the configuration interface for the client;
s42, acquiring input of a user through a configuration interface of the client, and correspondingly configuring the server firmware.
2. The yaml-based server configuration method according to claim 1, wherein step S13 comprises the following steps:
s131, setting a primary large configuration item in a firmware configuration template file;
s132, setting description and types of secondary configuration items under the primary large configuration items;
s133, setting a tertiary small configuration item name under the description and the type of the secondary configuration item;
s134, setting a command, a type, an ID, a PID and a QID of a four-level small configuration item under the name of the three-level small configuration item; wherein ID represents each configuration item per se, PID represents that the current configuration item is selectable when the parent node ID is selected, and QID represents that the current configuration item is selectable when the parent node ID is not selected.
3. The yaml-based server configuration method according to claim 1, wherein the step S21 comprises the specific steps of:
s211, setting equipment as a primary folder;
s212, creating a manufacturer secondary folder under the primary folder;
s213, creating a model series three-level folder under the manufacturer two-level folder;
s214, creating a model four-level folder under the model series three-level folder;
s215, creating a firmware version file under the model four-level folder.
4. A yaml-based server configuration apparatus, comprising:
the configuration file definition module (1) is used for defining a firmware configuration template file in a yaml format, storing firmware configuration items and configuration relations in the firmware configuration template file, and establishing association between the configuration items through configuration item IDs; the configuration file definition module comprises:
the firmware configuration template file definition unit is used for defining a firmware configuration template file in a yaml format, wherein the firmware configuration template file comprises a BIOS configuration template file, a BMC configuration template file and an FRU configuration template file;
the configuration item storage unit is used for storing BIOS configuration items and configuration relations in a BIOS configuration template file, BMC configuration items and configuration relations in a BMC configuration template file and FRU configuration items and configuration relations in an FRU configuration template file;
the configuration item cascade control unit is used for representing configuration items of different levels in a firmware configuration template file in a yaml format through indentation and realizing cascade control of the configuration items through an ID;
the configuration file grouping module (2) is used for grouping and setting the files of the firmware configuration template according to the model; the configuration file grouping module comprises:
the folder grouping unit is used for creating a model series folder, a model folder and a firmware version file layer by layer according to the model;
the firmware version file naming unit is used for naming the firmware version file by adding a BMC version and a BISO version of the model;
the configuration file searching module (3) is used for acquiring a firmware configuration request of the client, analyzing model parameters and searching a firmware configuration template file of a corresponding model from the folder group; the configuration file searching module comprises:
the firmware configuration request unit is used for intercepting a firmware configuration request initiated by the client through an HTTP protocol;
the firmware configuration template file searching unit is used for analyzing model parameters from the client side hardware configuration request, and searching the firmware configuration template file of the corresponding model from the folder group by taking the model parameters as query items;
the server configuration module (4) is used for generating a configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client for server configuration; the server configuration module includes:
the configuration interface generating unit is used for generating a corresponding configuration interface according to the searched firmware configuration template file and providing the configuration interface for the client;
the server firmware configuration unit is used for acquiring the input of a user through a configuration interface of the client and correspondingly configuring the server firmware.
5. A terminal comprising a processor and a memory;
wherein the memory is adapted to store a computer program and the processor is adapted to call and run the computer program from the memory to cause the terminal to perform the method of any of the preceding claims 1-3.
6. A storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the method of any of the preceding claims 1-3.
CN202110960602.1A 2021-08-20 2021-08-20 YAML-based server configuration method, device, terminal and storage medium Active CN113805960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110960602.1A CN113805960B (en) 2021-08-20 2021-08-20 YAML-based server configuration method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110960602.1A CN113805960B (en) 2021-08-20 2021-08-20 YAML-based server configuration method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113805960A CN113805960A (en) 2021-12-17
CN113805960B true CN113805960B (en) 2023-12-22

Family

ID=78941692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110960602.1A Active CN113805960B (en) 2021-08-20 2021-08-20 YAML-based server configuration method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113805960B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065314A (en) * 2021-03-26 2021-07-02 山东英信计算机技术有限公司 BIOS hardware adaptation method and device based on XML file format

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10656935B2 (en) * 2015-10-13 2020-05-19 Home Box Office, Inc. Maintaining and updating software versions via hierarchy

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113065314A (en) * 2021-03-26 2021-07-02 山东英信计算机技术有限公司 BIOS hardware adaptation method and device based on XML file format

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Improvement and Evaluation of a Method to Manage Multiple Types of Logs;Akihiro Tomono等;《IEEE Xplore》;全文 *
基于代码片段复用的安卓应用组装技术研究;朱亚迪;吴毅坚;赵文耘;;计算机应用与软件(11);全文 *

Also Published As

Publication number Publication date
CN113805960A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
US11789715B2 (en) Systems and methods for transformation of reporting schema
CN109117363B (en) Test case generation method and device and server
CN110399169B (en) BIOS option modification method, device, equipment and readable storage medium
US20090049438A1 (en) Method for Optimizing Migration of Software Applications to Address Needs
US11036491B1 (en) Identifying and resolving firmware component dependencies
CN110188135B (en) File generation method and equipment
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
US20200371902A1 (en) Systems and methods for software regression detection
CN113918637A (en) BPMN2.0 specification-based process engine platform creation method and system
CN111399828A (en) Model-driven logic device modeling method and terminal
US20090037878A1 (en) Web Application Development Tool
CN113535141A (en) Database operation code generation method and device
CN112579461A (en) Assertion processing method, system and storage medium
CN111831536A (en) Automatic testing method and device
Eghbali et al. De-hallucinator: Iterative grounding for llm-based code completion
CN113805960B (en) YAML-based server configuration method, device, terminal and storage medium
CN117009248A (en) Machine learning model testing method and device, electronic equipment and storage medium
CN113495723B (en) Method, device and storage medium for calling functional component
CN116204550A (en) Database query statement optimization method, storage medium and device
CN114819631A (en) Multitask visualization method and device, computer equipment and storage medium
CN114064712A (en) Data access method and device, electronic equipment and computer readable storage medium
CN112685379A (en) Data organization method, system and device and storage medium
CN112311931B (en) Method and device for processing contact information at terminal and electronic equipment
CN110806967A (en) Unit testing method and device
CN112148710B (en) Micro-service library separation method, system and 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