Disclosure of Invention
In view of the above, one or more embodiments of the present application are directed to a method, an apparatus, an electronic device, and a storage medium for managing system configuration items, so as to solve at least one of the above problems in the prior art.
In view of the above, one or more embodiments of the present application provide a system configuration item management method, including:
creating a configuration baseline of the system environment;
performing incremental comparison according to the configuration baseline and the trunk configuration item to determine a modification configuration item; wherein the backbone configuration item is generated according to a user;
synchronizing the modified configuration item to the system environment.
Optionally, the system environment includes: a development environment and a test environment; the backbone configuration item comprises: developing a backbone configuration item;
the incrementally comparing the configuration baseline with the trunk configuration item to determine a modification configuration item specifically includes:
acquiring development codes in the development environment and pushing the development codes to the test environment;
incrementally comparing the development configuration item with the development backbone configuration item to determine a modification configuration item for the test environment; wherein the development configuration item is determined from the development code and a configuration baseline of the development environment.
Optionally, the system environment further includes: checking and accepting the environment; the backbone configuration item further comprises: testing the backbone configuration item;
the incrementally comparing the development configuration item with the backbone configuration item to determine a modification configuration item of the test environment, and then:
pushing the modified configuration items of the development environment to the acceptance environment;
performing incremental comparison on a test configuration item and the test backbone configuration item to determine a modified configuration item of the acceptance environment; wherein the test configuration items are determined according to the configuration baseline of the test environment and the modification configuration items of the development environment.
Optionally, the system environment further includes: a production environment; the backbone configuration item further comprises: checking and accepting backbone configuration items;
the incrementally comparing the test configuration item with the backbone configuration item to determine a modified configuration item of the acceptance environment, and then further comprising:
and performing incremental comparison on the modified configuration items of the acceptance environment and the acceptance backbone configuration items to determine the modified configuration items of the production environment.
Optionally, the incrementally comparing the modified configuration item of the acceptance environment with the acceptance backbone configuration item to determine the modified configuration item of the production environment, and then further comprising:
sending the modified configuration item of the production environment to the production environment;
and carrying out change deployment on the production environment according to the modification configuration item of the production environment.
Optionally, the incrementally comparing the configuration baseline with the backbone configuration item to determine a modified configuration item, and then further comprising:
setting an identification baseline according to the modification configuration item; the identification baseline is associated with a code version number of the system environment.
Optionally, the synchronizing the modified configuration item to the system environment specifically includes:
judging whether to synchronize the modification configuration items of the test environment to the development environment and the acceptance environment according to a user;
if yes, synchronizing the modification configuration items of the test environment to the development environment, the test environment and the acceptance environment;
if not, synchronizing the modification configuration item of the test environment to the test environment.
Based on the same inventive concept, one or more embodiments of the present application further provide a system configuration item management apparatus, including:
a creation module configured to create a configuration baseline of the system environment;
a determining module configured to perform an incremental comparison with the backbone configuration item according to the configuration baseline to determine a modified configuration item; wherein the backbone configuration item is generated according to a user;
a synchronization module configured to synchronize the modified configuration item to the system environment.
Based on the same inventive concept, one or more embodiments of the present application further provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the system configuration item management method described in any one of the above items is implemented.
Based on the same inventive concept, one or more embodiments of the present application further propose a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the system configuration item management method of any one of the above.
As can be seen from the foregoing, one or more embodiments of the present application provide a system configuration item management method, including: creating a configuration baseline of the system environment; performing incremental comparison according to the configuration baseline and the trunk configuration item to determine a modification configuration item; wherein the backbone configuration item is generated according to a user; synchronizing the modified configuration item to the system environment. The method provided by the application creates the configuration base line for the system configuration item, can ensure that the configuration items with the same value are automatically synchronized among different system environments, and carries out base line management on the configuration items, ensures that the configuration items are completely matched with the source codes, and simultaneously utilizes the incremental comparison method for delivering the configuration items to the production environment for use, so that the system configuration item management process not only can record the current latest running state and the historical change track, but also can roll back to any historical version at any time through the configuration base line, thereby greatly reducing the system load and freeing a large amount of system storage space.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The use of "first," "second," and similar terms in one or more embodiments of the present application does not denote any order, quantity, or importance, but rather the terms are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
The applicant finds out through research that in the prior art, a system needs to load configuration items during running, such as calling ip addresses and ports of an external system, starting memory parameters needing to be loaded, timeout return time and the like, which are collectively referred to as system configuration items. In different operation environments, values corresponding to some configuration items to be loaded by the system are different, and in order to avoid call confusion between systems caused by connection of different environments with the same set of configuration management item tools, an independent configuration management item tool is established for the different environments and is used for managing configuration item information to be loaded when the environment system operates. Due to the one-to-one correspondence between different operating environments and configuration management item tools, system configuration is split at different research and development stages such as development, integration, system testing, verification, production and the like in the research and development process. Some configuration items having the same value need to be created manually and repeatedly in different environments. Meanwhile, the configuration item management tool can only record the current latest running state and the history change track, does not have a baseline like a code, and can roll back to any history version at any time. Configuration items delivered to the production environment from the development process also require project team members to manually record and organize, with the risk of human error and omission. Therefore, the configuration baseline is established in the system environment, the modified configuration items are determined according to the configuration baseline and the backbone configuration items generated by the user based on incremental comparison, and the modified configuration items are automatically synchronized to the system environment, so that the configuration items with the same value are automatically synchronized among different system environments, the configuration items are completely matched with the source codes, the current latest running state and the history change track can be recorded in the management process of the system configuration items, the configuration baseline can be rolled back to any history version at any time, the system load is greatly reduced, and a large amount of system storage space is saved.
Referring to fig. 1, a method for managing system configuration items according to one or more embodiments of the present application specifically includes the following steps:
s101: a configuration baseline of the system environment is created.
In this embodiment, a configuration baseline of a system environment is created, where the system environment includes a plurality of different environments, and the created configuration baseline is used as a backbone configuration item baseline. Configuration baselines are respectively created for different system environments, and then configuration branches with the same version numbers as the code branches need to be pulled from the configuration baselines of the system environments respectively.
In some optional embodiments, after receiving a research and development task, a user makes a version plan, determines a version number, selects an application program, enters the version number, automatically creates a corresponding code branch on a code warehouse according to the selection of the user, names the code branch according to a uniform specification, and then modifies the version number in a code file on the code branch, and automatically modifies the version number to the version number researched and developed at this time. And pulling the configuration branch from the configuration baseline of each system environment according to the version number.
S102: performing incremental comparison according to the configuration baseline and the trunk configuration item to determine a modification configuration item; wherein the backbone configuration item is generated according to a user.
In this embodiment, incremental comparison is performed according to the configuration baseline and the backbone configuration item, so as to determine a modified configuration item in each environment, where the backbone configuration item is generated according to a user. Specifically, a system environment, comprising: a development environment and a test environment; a backbone configuration item, comprising: backbone configuration items are developed. The method comprises the steps of firstly obtaining development codes in a development environment, pushing the development codes to a test environment, comparing base lines of a branch configuration item and a development trunk configuration item of a development environment of a current version, namely performing incremental comparison on the development configuration item and the development trunk configuration item, displaying a comparison difference value of the two, determining an incremental configuration item comparing the development configuration item and the development trunk configuration item, determining a modification configuration item of the test environment according to an incremental comparison result of the development configuration item and the development trunk configuration item, and synchronizing all or part of configuration information in the modification configuration item to the test environment according to selection of a user if the modification configuration item needs to be synchronized to the test environment. Wherein the development configuration items are determined according to the configuration baseline and the development code of the development environment.
In some optional embodiments, the system environment further comprises: checking and accepting the environment; and the backbone configuration item further comprises: testing the backbone configuration item; after determining the modification configuration items of the test environment, pushing the modification configuration items of the development environment and the test environment codes to an acceptance environment; the method comprises the steps of carrying out incremental comparison on a base line of a test branch configuration item and a test trunk configuration item of a current version, namely carrying out incremental comparison on the test branch configuration item and the test trunk configuration item, displaying a comparison difference value of the two, determining an incremental configuration item of a test environment compared with a modification configuration item and the test trunk configuration item, determining a modification configuration item of an acceptance environment according to an incremental comparison result of the test configuration item and the test trunk configuration item, and synchronizing all or part of configuration information in the modification configuration item to the acceptance environment according to selection of a user if the modification configuration item needs to be synchronized to the acceptance environment. The test configuration items are determined jointly according to the configuration baseline of the test environment, the modification configuration items of the development environment and the test environment codes.
In some optional embodiments, the system environment further comprises: a production environment; and the backbone configuration item further comprises: and checking and accepting the backbone configuration item. After the modified configuration items of the acceptance environment are determined, namely the acceptance test is finished, the modified configuration items of the acceptance environment and the base line of the acceptance main configuration items are subjected to incremental comparison, the difference value is displayed, the incremental configuration items compared with the modified configuration items of the acceptance environment and the acceptance main configuration items are determined, the modified configuration items of the production environment pushed to the production environment are determined after interaction with a user, and the corresponding values of the production environment are modified according to the modified configuration items of the production environment.
It should be noted that, after the modified configuration item of the production environment is determined, the incremental comparison result and the modified configuration item of the production environment are sent to the production environment, and the production environment is changed and deployed according to the modified configuration item of the production environment.
It should be noted that, the modified configuration items of the development environment are determined by developers according to development codes, after the modified configuration items of the development environment, the test environment, the acceptance environment and the production environment are determined, an identification baseline is set according to the modified configuration items, that is, a baseline with a current version number identification is printed on all the modified configuration items, and incremental configuration items in each environment are merged and updated to configuration baselines in each environment, wherein the identification baseline is associated with a code version number of a system environment, so that the purpose of rolling back to any historical version at any time according to the configuration baselines is achieved.
S103: synchronizing the modified configuration item to the system environment.
In this embodiment, the modification configuration item is synchronized to the system environment, specifically, the modification configuration item of the production environment is synchronized to the production environment, and the corresponding value in the production environment is modified according to the modification configuration item of the production environment; after receiving the modification configuration items of the development environment, the test environment and the acceptance environment, judging whether to synchronize the modification configuration items of the development environment to other system environments except the production environment according to the judgment of a user, and if so, synchronizing the modification configuration items of the development environment to the development environment, the test environment and the acceptance environment; if not, only the modified configuration items of the development environment are synchronized into the development environment.
In some optional embodiments, after receiving the modified configuration items of the development environment, the test environment and the acceptance environment, it needs to determine, according to a user, whether to synchronize the modified configuration items of the test environment to the other system environments except the production environment, and if so, synchronize the modified configuration items of the test environment to the development environment, the test environment and the acceptance environment; if not, only synchronizing the modification configuration items of the test environment into the test environment.
In some optional embodiments, after receiving the modified configuration items of the development environment, the test environment and the acceptance environment, it needs to determine, according to a user, whether to synchronize the modified configuration items of the acceptance environment to the rest system environments except the production environment, and if so, synchronize the modified configuration items of the acceptance environment to the development environment, the test environment and the acceptance environment; if not, only synchronizing the modified configuration items of the acceptance environment into the acceptance environment.
As can be seen from the foregoing, one or more embodiments of the present application provide a system configuration item management method, including: creating a configuration baseline of the system environment; performing incremental comparison according to the configuration baseline and the trunk configuration item to determine a modification configuration item; wherein the backbone configuration item is generated according to a user; synchronizing the modified configuration item to the system environment. The method provided by the application creates the configuration base line for the system configuration item, can ensure that the configuration items with the same value are automatically synchronized among different system environments, and carries out base line management on the configuration items, ensures that the configuration items are completely matched with the source codes, and simultaneously utilizes the incremental comparison method for delivering the configuration items to the production environment for use, so that the system configuration item management process not only can record the current latest running state and the historical change track, but also can roll back to any historical version at any time through the configuration base line, thereby greatly reducing the system load and freeing a large amount of system storage space. Moreover, the problem that the same data caused by splitting of the configuration tools among the system environments needs to be updated manually repeatedly is solved through an automatic pushing mode, the one-to-one correspondence between the codes and the system configurations is realized through a set of configuration version management method completely matched with the code versions, namely, a configuration base line is established, so that the configuration items can be traced back to the historical versions at any time like the codes, and the accurate configuration items delivered to production are obtained through incremental comparison between the base line and the configuration items of the system environment branches. The whole life cycle of software system research and development is run through, the same configuration items can be automatically synchronized to different environments, and the rolling back of the historical version is realized according to the baseline, so that the research and development efficiency is improved, meanwhile, the configuration risk is reduced, and the stable deployment and operation capability of the system is improved.
The foregoing description of specific embodiments has been presented in this application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same inventive concept, one or more embodiments of the present application further provide a system configuration item management apparatus, and referring to fig. 2, the system configuration item management apparatus includes:
a creation module configured to create a configuration baseline of the system environment;
a determining module configured to perform an incremental comparison with the backbone configuration item according to the configuration baseline to determine a modified configuration item; wherein the backbone configuration item is generated according to a user;
a synchronization module configured to synchronize the modified configuration item to the system environment.
In some optional embodiments, the system environment, comprises: a development environment and a test environment; the backbone configuration item comprises: developing a backbone configuration item;
the incrementally comparing the configuration baseline with the trunk configuration item to determine a modification configuration item specifically includes:
acquiring development codes in the development environment and pushing the development codes to the test environment;
incrementally comparing the development configuration item with the development backbone configuration item to determine a modification configuration item for the test environment; wherein the development configuration item is determined from the development code and a configuration baseline of the development environment.
In some optional embodiments, the system environment further comprises: checking and accepting the environment; the backbone configuration item further comprises: testing the backbone configuration item;
the incrementally comparing the development configuration item with the backbone configuration item to determine a modification configuration item of the test environment, and then:
pushing the modified configuration items of the development environment to the acceptance environment;
performing incremental comparison on a test configuration item and the test backbone configuration item to determine a modified configuration item of the acceptance environment; wherein the test configuration items are determined according to the configuration baseline of the test environment and the modification configuration items of the development environment.
In some optional embodiments, the system environment further comprises: a production environment; the backbone configuration item further comprises: checking and accepting backbone configuration items;
the incrementally comparing the test configuration item with the backbone configuration item to determine a modified configuration item of the acceptance environment, and then further comprising:
and performing incremental comparison on the modified configuration items of the acceptance environment and the acceptance backbone configuration items to determine the modified configuration items of the production environment.
In some optional embodiments, the incrementally comparing the modified configuration item of the acceptance environment with the acceptance backbone configuration item to determine the modified configuration item of the production environment further comprises:
sending the modified configuration item of the production environment to the production environment;
and carrying out change deployment on the production environment according to the modification configuration item of the production environment.
In some optional embodiments, the incrementally comparing the configuration baseline with the backbone configuration item to determine a modified configuration item further includes:
setting an identification baseline according to the modification configuration item; the identification baseline is associated with a code version number of the system environment.
In some optional embodiments, the synchronizing the modified configuration item to the system environment specifically includes:
judging whether to synchronize the modification configuration items of the test environment to the development environment and the acceptance environment according to a user;
if yes, synchronizing the modification configuration items of the test environment to the development environment, the test environment and the acceptance environment;
if not, synchronizing the modification configuration item of the test environment to the test environment.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the modules may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, one or more embodiments of the present specification further provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the system configuration item management method according to any of the above embodiments is implemented.
Fig. 3 is a schematic diagram illustrating a more specific hardware structure of a distribution device provided in this embodiment, where the distribution device may include: a processor 310, a memory 320, an input/output interface 330, a communication interface 340, and a bus 350. Wherein the processor 310, memory 320, input/output interface 330, and communication interface 340 are communicatively coupled to each other within the device via bus 350.
The processor 310 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 320 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 320 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 320 and called to be executed by the processor 310.
The input/output interface 330 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 340 is used for connecting a communication module (not shown in the figure) to implement communication interaction between the present device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 350 includes a path that transfers information between the various components of the device, such as processor 310, memory 320, input/output interface 330, and communication interface 340.
It should be noted that although the above-mentioned device only shows the processor 310, the memory 320, the input/output interface 330, the communication interface 340 and the bus 350, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Based on the same inventive concept, corresponding to any of the above-described embodiment methods, one or more embodiments of the present specification further provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the system configuration item management method according to any of the above-described embodiments.
Non-transitory computer readable storage media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the system configuration item management method according to any embodiment, and have the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the spirit of the present disclosure, features from the above embodiments or from different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments in this application as described above, which are not provided in detail for the sake of brevity.
It is intended that the one or more embodiments of the present application embrace all such alternatives, modifications and variations as fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of one or more embodiments of the present disclosure are intended to be included within the scope of the present disclosure.