CN114090020A - Method for configuring elements in multiple environments and electronic equipment - Google Patents

Method for configuring elements in multiple environments and electronic equipment Download PDF

Info

Publication number
CN114090020A
CN114090020A CN202111434297.9A CN202111434297A CN114090020A CN 114090020 A CN114090020 A CN 114090020A CN 202111434297 A CN202111434297 A CN 202111434297A CN 114090020 A CN114090020 A CN 114090020A
Authority
CN
China
Prior art keywords
environment
baseline
development
package
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.)
Pending
Application number
CN202111434297.9A
Other languages
Chinese (zh)
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202111434297.9A priority Critical patent/CN114090020A/en
Publication of CN114090020A publication Critical patent/CN114090020A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure provides a method for configuring elements in multiple environments and an electronic device, including: responding to a first deployment instruction corresponding to each environment, and respectively deploying first elements corresponding to each environment in a development environment, a test environment and a production environment; deploying a second element in the development environment in response to a second deployment instruction for the development environment; generating a baseline package from a second element deployed in the development environment in response to the baseline package creation instruction; and responding to the import instructions respectively corresponding to the test environment and the production environment, and importing baseline packets respectively in the test environment and the production environment, wherein the baseline packets are used for deploying second elements in the test environment and the production environment. In the scheme provided by the disclosure, when the elements to be deployed in each environment are the same, the elements can be synchronized to the test environment and the production environment in a baseline package mode, and the manual deployment of a user one by one is avoided.

Description

Method for configuring elements in multiple environments and electronic equipment
Technical Field
The present disclosure relates to big data platform technology, and more particularly, to a method and an electronic device for configuring components in multiple environments.
Background
When an application is developed in a big data platform, research and development personnel develop in a development environment and configure elements related to the application, such as database information to be operated in the big data environment, how to collect business data into collection operation in the big data environment, how to display visualization operation of a report form, and the like.
After the application is developed in the development environment, the application needs to be deployed in the test environment, and the element associated with the application needs to be deployed in the test environment, so that the application is tested in the test environment, and if the test is passed, the application and the associated element need to be deployed in the production environment to interface with the real service scene.
However, the number of elements to be deployed is large, and generally reaches hundreds or even thousands, and in the prior art, the elements are deployed by developers, which is tedious in steps and prone to errors.
Disclosure of Invention
The present disclosure provides a method for configuring components in multiple environments and an electronic device, so as to solve the problems of complex steps for deploying components and high error probability in the prior art.
A first aspect of the present disclosure is to provide a method of configuring an element in a plurality of environments, the configured element comprising a first element and a second element; the first element is different in a plurality of environments, and the second element is not different in different environments;
the method comprises the following steps:
responding to a first deployment instruction corresponding to each environment, and respectively deploying first elements corresponding to each environment in a development environment, a test environment and a production environment;
deploying the second element in the development environment in response to a second deployment instruction for the development environment;
generating a baseline package from the second element deployed in the development environment in response to a baseline package creation instruction;
and responding to an import instruction corresponding to the test environment and the production environment respectively, and importing the baseline packet in the test environment and the production environment respectively, wherein the baseline packet is used for deploying the second element in the test environment and the production environment.
Another aspect of the present disclosure is to provide an apparatus for configuring an element in a plurality of environments, the configured element including a first element and a second element; the first element is different in a plurality of environments, and the second element is not different in different environments;
the device comprises:
the first deployment unit is used for responding to a first deployment instruction corresponding to each environment and deploying first elements corresponding to each environment in a development environment, a test environment and a production environment respectively;
a second deployment unit to deploy the second element in the development environment in response to a second deployment instruction for the development environment;
a baseline package generation unit for generating a baseline package from the second element deployed in the development environment in response to a baseline package creation instruction;
and the baseline packet importing unit is used for responding to importing instructions respectively corresponding to a test environment and a production environment, importing the baseline packets respectively in the test environment and the production environment, and deploying the second element in the test environment and the production environment.
Yet another aspect of the present disclosure is to provide an apparatus for configuring an element in a plurality of environments, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of configuring elements in a plurality of environments as described in the first aspect above.
Yet another aspect of the present disclosure is to provide a computer readable storage medium having stored thereon a computer program to be executed by a processor to implement the method of configuring elements in multiple environments as described in the above first aspect.
Yet another aspect of the present disclosure is to provide a computer program product comprising a computer program which, when executed by a processor, implements a method of configuring elements in multiple environments as described in the first aspect above.
The method for configuring the elements in multiple environments and the electronic equipment provided by the disclosure have the technical effects that:
the present disclosure provides a method of configuring elements in multiple environments and an electronic device, the configured elements including a first element and a second element; the first element has differences in a plurality of environments and the second element has no differences in different environments; the method comprises the following steps: responding to a first deployment instruction corresponding to each environment, and respectively deploying first elements corresponding to each environment in a development environment, a test environment and a production environment; deploying a second element in the development environment in response to a second deployment instruction for the development environment; generating a baseline package from a second element deployed in the development environment in response to the baseline package creation instruction; and responding to the import instructions respectively corresponding to the test environment and the production environment, and importing baseline packets respectively in the test environment and the production environment, wherein the baseline packets are used for deploying second elements in the test environment and the production environment. In the scheme provided by the disclosure, when the elements to be deployed in each environment are the same, the elements can be synchronized to the test environment and the production environment in a baseline package mode, and the manual deployment of a user one by one is avoided, so that the element deployment speed is increased, and the problem of deployment errors can be avoided.
Drawings
FIG. 1 is a schematic diagram of a platform shown in an exemplary embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating a method of configuring elements in multiple environments in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 is a flow diagram illustrating a method of configuring elements in multiple environments in accordance with another exemplary embodiment of the present disclosure;
FIG. 4 is a first interface schematic shown in an exemplary embodiment of the present disclosure;
FIG. 5 is a second interface schematic shown in an exemplary embodiment of the present disclosure;
FIG. 6 is a third interface schematic shown in an exemplary embodiment of the present disclosure;
FIG. 7 is a fourth interface schematic shown in an exemplary embodiment of the present disclosure;
FIG. 8 is a block diagram illustrating an apparatus for configuring components in multiple environments in accordance with an exemplary embodiment of the present disclosure;
FIG. 9 is a schematic block diagram of an apparatus for configuring components in multiple environments, according to another exemplary embodiment of the present disclosure;
fig. 10 is a block diagram of an apparatus for configuring elements in multiple environments according to an exemplary embodiment of the present disclosure.
Detailed Description
During application development, an application contains run code, and application configurations for different environments. In the conventional application development, generally, all running codes are compiled and packaged into an application package, and then the application package and the configuration corresponding to the environment are put into production to the corresponding environment through a deployment script.
After the application is developed in the development environment, the application needs to be deployed in the test environment, and the element associated with the application needs to be deployed in the test environment, so that the application is tested in the test environment, and if the test is passed, the application and the associated element need to be deployed in the production environment to interface with the real service scene.
However, the number of elements to be deployed is large, and generally reaches hundreds or even thousands, and in the prior art, the elements are deployed by developers, which is tedious in steps and prone to errors.
In order to solve the technical problem, in the scheme provided by the present disclosure, elements having differences in different environments are deployed in each environment, respectively, and for elements having no differences in different environments, a baseline packet may be generated according to the elements in the production environment, and the elements are deployed in other environments by the baseline packet, thereby reducing the complexity of deploying the elements.
Fig. 1 is a schematic diagram of a platform shown in an exemplary embodiment of the present disclosure.
As illustrated in fig. 1, a development environment, a test environment, and a production environment are provided in the platform. A developer may configure an element 11 in a development environment and develop an application 12 in that environment.
The elements 11 of the configuration include a first element 111 and a second element 112, the first element 111 has differences in a plurality of environments, and the second element 112 has no differences in different environments.
Since the environment is different, the first element 111 is different, and therefore, the first element 111 can be deployed in a development environment, a test environment, and a production environment, respectively.
And the second element 112 is also the same in different environments, the baseline packet 13 may be generated according to the second element 112, and then the baseline packet 13 is synchronized to the test environment and the production environment, so that the second element 112 is introduced into the test environment and the production environment, thereby completing the deployment of the elements.
Fig. 2 is a flow diagram illustrating a method for configuring elements in multiple environments in accordance with an exemplary embodiment of the present disclosure.
As shown in fig. 2, the present disclosure provides a method of configuring elements in multiple environments, comprising:
step 201, responding to a first deployment instruction corresponding to each environment, and respectively deploying first elements corresponding to each environment in a development environment, a test environment and a production environment.
Wherein, a user can deploy a first element in each environment, the first element refers to an element having difference in each environment. For example, the information of the data source may be set in a development environment, may be set in a test environment, and may be set in a production environment.
For example, a user may operate in the development environment to deploy a first element corresponding to the development environment, for example, the user may click a button for element deployment in the development environment, so as to send a first deployment instruction in the development environment, and then deploy the first element in the development environment.
For another example, the user may operate in the test environment to deploy the first element corresponding to the test environment, for example, the user may click a key for element deployment in the test environment, so as to send the first deployment instruction in the test environment, and then deploy the first element in the test environment.
For another example, the user may operate in the production environment to deploy the first element corresponding to the production environment, for example, the user may click a button for element deployment in the production environment, so as to send the first deployment instruction in the production environment, and then deploy the first element in the production environment.
Specifically, the first element may include a data source, an acquisition source, and a scheduling resource. The data source refers to a source of data required by the application, the acquisition source refers to a source when the application acquires data, and the scheduling resource refers to information of a resource which can be scheduled by the application.
In different environments, the first element is also different. For example, the data sources in the development environment are different from the data sources in the testing environment.
At step 202, a second element is deployed in the development environment in response to a second deployment instruction for the development environment.
According to the scheme, only the second elements are required to be deployed in the development environment, and the second elements do not need to be deployed in other environments one by one.
The user may deploy the second element in the development environment, for example, a button for deploying the second element may be clicked in the development environment, and then the second element to be added may be set in the development environment.
In an alternative embodiment, the user may also deploy the first and second elements together in the development environment, e.g., add elements in the development environment, which may include the first and second elements.
The second element may be, for example, a database table structure, metadata, custom development scripts, or the like. These elements are the same in different environments.
In response to the baseline package creation instruction, a baseline package is generated from a second element deployed in the development environment, step 203.
The user may also generate a baseline package in the development environment, for example, may click an instruction to create the baseline package, and then send the baseline package creation instruction to the platform.
Specifically, the platform may display applications in which a baseline package may be created, the user may select one of the applications as desired, the platform may display elements included in the applications, the user may select a second element therein, and the baseline package may be generated according to the second elements.
Further, the platform may associate the relationship between the baseline identifier and each second element according to a selection operation of the user, and when the baseline packet needs to be generated, the platform may generate the baseline packet according to the second element associated with the baseline identifier, for example, the elements may be compressed into one file to obtain the baseline packet.
And 204, responding to the import instructions respectively corresponding to the test environment and the production environment, and importing baseline packets respectively in the test environment and the production environment, wherein the baseline packets are used for deploying second elements in the test environment and the production environment.
In practical application, a user can import the baseline package in the test environment and the production environment respectively, so as to deploy the second element in the test environment and the production environment.
The user can click the import key in the test environment of the platform, so that the user can import the baseline packet generated in step 203.
Specifically, the platform may decompress the baseline packet, thereby obtaining information of each second element included in the baseline packet, and then deploy each second element to the test environment.
Further, the user may click an import button in the production environment of the platform, thereby allowing the user to import the baseline package generated in step 203 therein.
Specifically, the platform may decompress the baseline package, thereby obtaining information of each second element included in the baseline package, and then proceed to deploy each second element into the production environment.
Through the implementation mode, the elements included in the baseline package can be rapidly deployed in a test environment and a production environment without being configured one by a user, so that the element deployment speed is increased, and the problem of deployment errors can be avoided.
The present disclosure provides a method of configuring an element in a plurality of environments, the configured element comprising a first element and a second element; the first element has differences in a plurality of environments and the second element has no differences in different environments; the method comprises the following steps: responding to a first deployment instruction corresponding to each environment, and respectively deploying first elements corresponding to each environment in a development environment, a test environment and a production environment; deploying a second element in the development environment in response to a second deployment instruction for the development environment; generating a baseline package from a second element deployed in the development environment in response to the baseline package creation instruction; and responding to the import instructions respectively corresponding to the test environment and the production environment, and importing baseline packets respectively in the test environment and the production environment, wherein the baseline packets are used for deploying second elements in the test environment and the production environment. In the scheme provided by the disclosure, when the elements to be deployed in each environment are the same, the elements can be synchronized to the test environment and the production environment in a baseline package mode, and the manual deployment of a user one by one is avoided, so that the element deployment speed is increased, and the problem of deployment errors can be avoided.
Fig. 3 is a flowchart illustrating a method of configuring elements in multiple environments according to another exemplary embodiment of the present disclosure.
As shown in fig. 3, the present disclosure provides a method of configuring elements in multiple environments, comprising:
step 301, responding to the first deployment instruction corresponding to each environment, deploying the first elements corresponding to each environment in the development environment, the test environment, and the production environment respectively.
Wherein, step 301 is similar to the implementation manner of step 201.
Specifically, the first element includes any one of the following elements:
data source, collection source, scheduling resource.
If the first element comprises a data source, the names of the data sources deployed in a development environment, a test environment and a production environment are the same;
if the first element comprises an acquisition source, the names of the acquisition sources deployed in the development environment, the test environment and the production environment are the same;
if the first element comprises the scheduling resource, the names of the scheduling resources deployed in the development environment, the test environment and the production environment are the same.
In this way, although each data source configured in each environment is different, the data source name is the same, so that when the application performs data processing based on the configured data source name, the corresponding data source can be called.
In this way, although each acquisition source configured in each environment is different, the names of the acquisition sources are the same, so that when the application performs data processing based on the configured acquisition source names, the corresponding acquisition sources can be called.
In this way, although each scheduling resource configured in each environment is different, the scheduling resource names are the same, so that when data processing is performed by applying the configured scheduling resource names, the corresponding scheduling resource can be called.
In step 302, a second element is deployed in the development environment in response to a second deployment instruction for the development environment.
The second element includes any one of the following elements:
database table structure, metadata, collection operation, integrated development operation, custom development script, data set, report form, and query service.
The database table structure is associated with a data source, one data source can be associated with a plurality of database table structures, and data in the data source can be stored through the database table structures.
Specifically, metadata refers to attribute data describing data in a data source, such as a format when the data is stored.
Further, the collection operation includes configuration information of collection operations such as batch pushing, batch pulling, streaming pushing, streaming pulling and the like.
In actual application, the integrated development operation includes information such as a workflow, basic information, resource allocation, condition allocation and the like.
The user-defined development script, the data set, the report, the query service and the like can be set by the user according to requirements.
Step 303, responsive to a baseline package creation instruction in the development environment, obtains an operational application.
The user may click on an instruction to create a baseline package in the development environment of the platform, and then send the baseline package creation instruction to the platform. The platform may retrieve the operational application in response to the instruction.
Specifically, each environment in the platform may have a component, and each component may include each element.
Furthermore, interfaces can be arranged in each component, and the platform can acquire information of the operable applications through the interfaces and display the operable applications. For example, component a may have an interface, and the platform may call the interface to obtain information about the operational applications corresponding to component a, and the operational applications may call the elements in component a.
The platform can call the first interface in each component, so that the operable application corresponding to each component can be acquired through the first interface.
Step 304, responding to an application selection instruction in the operable application, and acquiring component content corresponding to the selected application; wherein the component content includes a second element deployed in the development environment.
After the operational applications are displayed in the platform, the user can select the applications in the operational applications, and then the application selection instruction is sent to the platform. After receiving the application selection instruction, the platform may obtain component content corresponding to the selected application.
For example, if the user selects an operational application, the platform may obtain component content in each component corresponding to the operational application, where the component content includes a second element deployed in the development environment. For example, an operational application can invoke an element in component A, B, C, the platform can then retrieve the component content of component A, C, C and display the element in component A, B, C.
Specifically, each component may be provided with a second interface, and the platform may call the second interface in each component, so as to obtain component content corresponding to each component through the second interface. For example, if component a includes 5 second elements, the platform may obtain the 5 second elements in component a if the user selects component a.
Fig. 4 is a first interface schematic diagram shown in an exemplary embodiment of the present disclosure.
As shown in FIG. 4, a user may operate in the platform, triggering the platform to create a baseline package. Specifically, the name of the baseline packet may be set, an application to which the baseline packet belongs may be selected, and other information, such as a release plan, a baseline description, and the like, may be added.
Step 305, in response to a second element selection instruction in the component content, generating a baseline package from the selected second element.
After the second elements are displayed in the platform, the user may select a second element among the second elements, thereby sending a second element selection instruction to the platform. After the platform receives the second element selection instruction, the base thread packet can be generated according to the selected second element. For example, if the user selects 8 second elements from among 10 second elements, the platform may generate a baseline package from the 8 second elements.
The second element is the same element deployed in each environment, and therefore, these elements can be synchronized from the development environment into the test environment, the production environment, through the generated baseline package.
Furthermore, each assembly can be provided with a third interface, the platform can call the third interface in each assembly, and the third interface is used for associating the baseline packet identification with the selected second element in each assembly. For example, if the user selects 3 second elements of the component a, the platform may associate the baseline packet identifier with the association relationship between the 3 second elements according to the third interface set in the component a.
In practical application, the platform can also generate a baseline packet according to the association relationship. For example, the user may click a button that exports a baseline package, causing the platform to generate a baseline package from the second element associated with the baseline package identification.
In an optional implementation manner, the platform may further obtain information of a data source deployed in the development environment, and process the information of the data source by using an interface of a component to which the data source belongs to generate a data source serialization file; the data source serialization file comprises name information of the data source and script information corresponding to the data source, and the script information comprises information used for updating the script file of the data source.
Although the data sources are different in different environments, the names of the data sources in the different environments are the same, and the user can also set script files for updating the data sources for the data sources, wherein the script files for updating the data sources in the different environments are the same.
Therefore, the platform can also generate a data source serialization file according to the information of the data sources, wherein the data source serialization file comprises name information of the data sources and script information corresponding to the data sources, and the script information comprises information of a script file used for updating the data sources, such as a path of the script file.
Wherein, when generating a baseline package, the platform can create a baseline package folder. For example, if the user clicks a baseline package export button on the platform, the platform may create a baseline package folder.
Specifically, a baseline information file is created in the baseline package folder, and the baseline information file is used for recording information of a baseline package. For example, identification information of the baseline packet, generation time, and the like may be recorded.
And further, processing each second element by using an interface of the assembly to which the second element associated with the baseline packet identifier belongs to generate an element serialization file of each second element. An interface used for generating the serialized file can be further arranged in the component to which the second element belongs, and the platform can call the interface in the component to generate the serialized file of the element for the selected second element in the component.
In practical application, the platform can also store the element serialization file and the data source serialization file into the baseline package folder, and compress the baseline package folder to obtain the baseline package.
The obtained baseline packet comprises an element serialization file, a data source serialization file and a baseline information file. These files are the same in different environments. Thus, these files may be synchronized through the baseline package to reduce the number of times the elements are manually deployed.
The element serialization file includes any one of the following files:
metadata serialization files (which may be metadata \ json files, for example), serialization files for updating script files of data sources (which may be ddl \ sql files, for example), collection job serialization files (which may be collectionjson files, for example), integration development job serialization files (which may be integration json files, for example), report serialization files (which may be reports json files, for example), query service serialization files (which may be dataservice json files, for example).
Fig. 5 is a second interface schematic shown in an exemplary embodiment of the present disclosure.
As shown in FIG. 5, a user may operate in the platform, select a component, and an element in the component. Such as elements in component data sources, such as elements in acquisition tasks, etc.
In this embodiment, the data source is the first element, but the names of the data sources in different environments are the same, and the user may also set a script file for updating the data sources for each data source, the script files for updating the data sources in different environments being the same. Thus, a user may select a data source and generate a data source serialization file using information for the data source.
And step 306, responding to the import instructions respectively corresponding to the test environment and the production environment, acquiring the serialized files from the baseline packet, and verifying the serialized files.
After the baseline packages are exported, they may also be imported into the test environment and the production environment. For example, a user may click an instruction to import a baseline packet in a test environment of the platform, and then send an import instruction corresponding to the test environment to the platform. For another example, the user may click an instruction to import the baseline packet in the production environment of the platform, and then send an import instruction corresponding to the production environment to the platform.
After receiving the import instruction, the platform can acquire each serialized file from the baseline packet. The serialization file can be a data source serialization file or an element serialization file.
Specifically, the platform may also verify each serialized file. For example, the serialized files may be files encrypted by MD5, and the platform may verify the serialized files according to the interfaces of the components corresponding to each serialized file. For example, if one of the serialized files is generated from an element in component a, the platform may call the verification interface of component a to verify the serialized file to determine whether the serialized file is complete.
The platform can lead the serialized files passing the verification into a test environment and a production environment respectively, so that the deployment of the elements is completed.
And 307, importing the verified serialized file into the test environment by using the interface of the component corresponding to the serialized file in the test environment.
Further, when the serialization file is imported into the test environment, the platform can call an import interface in the component to import the serialization file into the test environment. For example, if the serialized file is generated according to an element in the component a, the platform may call an import interface of the component a in the test environment, and import the serialized file into the test environment, so as to deploy an element corresponding to the serialized file in the test environment.
After generating the baseline package, the user may also export the baseline package from the platform and import the exported baseline package into the test environment and the production environment.
Fig. 6 is a third interface schematic shown in an exemplary embodiment of the present disclosure.
As shown in fig. 6, the user may operate in the platform to select a baseline package to be downloaded.
And 308, importing the verified serialized file into the production environment by using the interface of the component corresponding to the serialized file in the production environment.
In actual application, when the serialization file is imported into the production environment, the platform can call an import interface in the component to import the serialization file into the production environment. For example, if the serialized file is generated from an element in component a, the platform may call an import interface of component a in the production environment, and import the serialized file into the production environment, thereby deploying the element corresponding to the serialized file in the production environment.
Through the scheme, the same second elements in each environment, the same name information of the data source in each environment and the script information corresponding to the data source can be compressed into the baseline packet, so that the data information can be respectively deployed into the test environment and the production environment through the baseline packet. With the deployment mode, a user only needs to deploy the elements in the development environment once, and does not need to deploy the elements in the test environment and the production environment.
Fig. 7 is a fourth interface schematic shown in an exemplary embodiment of the present disclosure.
As shown in fig. 7, a user may operate in the platform to upload a baseline package, and then import the uploaded baseline package into a test environment and a development environment of the platform.
Fig. 8 is a schematic structural diagram of an apparatus for configuring elements in multiple environments according to an exemplary embodiment of the disclosure.
The elements of the arrangement include a first element and a second element; the first element is different in a plurality of environments, and the second element is not different in different environments;
as shown in fig. 8, the present disclosure provides an apparatus 800 for configuring elements in multiple environments, comprising:
a first deployment unit 810, configured to respond to a first deployment instruction corresponding to each environment, and deploy first elements corresponding to each environment in a development environment, a test environment, and a production environment, respectively;
a second deployment unit 820 for deploying the second element in the development environment in response to a second deployment instruction for the development environment;
a baseline package generation unit 830 for generating a baseline package from the second element deployed in the development environment in response to a baseline package creation instruction;
a baseline packet importing unit 840, configured to respond to import instructions corresponding to a test environment and a production environment, and import the baseline packets in the test environment and the production environment, respectively, where the baseline packets are used to deploy the second element in the test environment and the production environment.
The present disclosure provides an apparatus for configuring an element in a plurality of environments, the configured element comprising a first element and a second element; the first element has differences in a plurality of environments and the second element has no differences in different environments; the device comprises: the first deployment unit is used for responding to a first deployment instruction corresponding to each environment and deploying first elements corresponding to each environment in a development environment, a test environment and a production environment respectively; a second deployment unit for deploying a second element in the development environment in response to a second deployment instruction for the development environment; a baseline package generation unit for generating a baseline package from a second element deployed in the development environment in response to a baseline package creation instruction; and the baseline packet importing unit is used for responding to importing instructions respectively corresponding to the test environment and the production environment, importing baseline packets respectively in the test environment and the production environment, and the baseline packets are used for deploying second elements in the test environment and the production environment. In the scheme provided by the disclosure, when the elements to be deployed in each environment are the same, the elements can be synchronized to the test environment and the production environment in a baseline package mode, and the manual deployment of a user one by one is avoided, so that the element deployment speed is increased, and the problem of deployment errors can be avoided.
Fig. 9 is a schematic structural diagram of an apparatus for configuring elements in multiple environments according to another exemplary embodiment of the present disclosure.
As shown in fig. 9, the present disclosure provides an apparatus 900 for configuring elements in multiple environments, and on the basis of the embodiment shown in fig. 8, in an alternative implementation, the first element includes any one of the following elements:
a data source, an acquisition source and scheduling resources;
if the first element comprises the data source, names of the data sources deployed in the development environment, the test environment and the production environment by the first deployment unit 810 are the same;
if the first element includes the collection source, names of the collection sources deployed in the development environment, the test environment, and the production environment by the first deployment unit 810 are the same;
if the first element includes the scheduling resource, the names of the scheduling resources deployed in the development environment, the test environment, and the production environment by the first deployment unit 810 are the same.
In an alternative embodiment, the second element comprises any one of the following elements:
database table structure, metadata, collection operation, integrated development operation, custom development script, data set, report form, and query service.
In an optional embodiment, the baseline packet generating unit 830 includes:
an application acquisition module 831 for acquiring an operable application in response to a baseline package creation instruction in a development environment;
a content acquiring module 832, configured to acquire component content corresponding to the selected application in response to an application selection instruction in the operational application; wherein the component content comprises a second element deployed in the development environment;
a generating module 833, configured to generate a baseline package according to the selected second element in response to the second element selection instruction in the component content.
In an optional implementation manner, the application obtaining module 831 is specifically configured to invoke a first interface, and obtain the operable application through the first interface;
and/or the content obtaining module 832 is specifically configured to invoke a second interface, and obtain, through the second interface, component content corresponding to the selected application;
and/or the generating module 833 is specifically configured to invoke a third interface, determine an association relationship between a baseline packet identifier and the second element through the third interface, and generate the baseline packet.
In an optional implementation, the generating module 833 is further configured to:
acquiring information of a data source deployed in the development environment, and processing the information of the data source by using an interface of a component to which the data source belongs to generate a data source serialization file; the data source serialization file comprises name information of a data source and script information corresponding to the data source, wherein the script information comprises information for updating a script file of the data source;
the generating module 833 is specifically configured to:
creating a baseline package folder;
creating a baseline information file in the baseline packet folder, wherein the baseline information file is used for recording the information of the baseline packet;
processing each second element by utilizing an interface of a component to which the second element associated with the baseline packet identifier belongs to generate an element serialization file of each second element;
and storing the element serialization file and the data source serialization file into the baseline package folder, and compressing the baseline package folder to obtain the baseline package.
In an alternative embodiment, the component serialization file comprises any one of the following files:
metadata serialization files, serialization files for updating script files of data sources, collection operation serialization files, integrated development operation serialization files, report form serialization files and query service serialization files.
In an alternative embodiment, the baseline packet importing unit 840 includes:
the verification module 841 is configured to acquire a serialized file from the baseline packet and verify the serialized file;
a first import module 842, configured to import the verified serialized file into the test environment by using an interface of a component corresponding to the serialized file in the test environment;
a second import module 843, configured to import the verified serialized file into the production environment by using an interface of a component corresponding to the serialized file in the production environment.
Fig. 10 is a block diagram of an apparatus for configuring elements in multiple environments according to an exemplary embodiment of the present disclosure.
As shown in fig. 10, the present embodiment provides an apparatus for configuring elements in a plurality of environments, including:
a memory 101;
a processor 102; and
a computer program;
wherein the computer program is stored in the memory 101 and configured to be executed by the processor 102 to implement any of the methods of configuring elements in multiple environments as described above.
The present embodiments also provide a computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement any of the methods for configuring elements in multiple environments as described above.
The present embodiments also provide a computer program comprising program code for performing any of the above-described methods for configuring elements in multiple environments when the computer program is run by a computer.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. A method of configuring an element in a plurality of environments, wherein the element being configured comprises a first element and a second element; the first element is different in a plurality of environments, and the second element is not different in different environments;
the method comprises the following steps:
responding to a first deployment instruction corresponding to each environment, and respectively deploying first elements corresponding to each environment in a development environment, a test environment and a production environment;
deploying the second element in the development environment in response to a second deployment instruction for the development environment;
generating a baseline package from the second element deployed in the development environment in response to a baseline package creation instruction;
and responding to an import instruction corresponding to the test environment and the production environment respectively, and importing the baseline packet in the test environment and the production environment respectively, wherein the baseline packet is used for deploying the second element in the test environment and the production environment.
2. The method of claim 1, wherein the first element comprises any one of:
a data source, an acquisition source and scheduling resources;
if the first element comprises the data source, names of the data sources deployed in the development environment, the test environment and the production environment are the same;
if the first element comprises the acquisition source, the names of the acquisition sources deployed in the development environment, the test environment and the production environment are the same;
if the first element comprises the scheduling resource, the names of the scheduling resource deployed in the development environment, the test environment and the production environment are the same.
3. The method of claim 1, wherein the second element comprises any one of:
database table structure, metadata, collection operation, integrated development operation, custom development script, data set, report form, and query service.
4. The method of any one of claims 1-3, wherein generating a baseline package from the second element deployed in the development environment in response to a baseline package creation instruction comprises:
responding to a baseline package creating instruction in a development environment, and acquiring an operable application;
responding to an application selection instruction in the operable application, and acquiring component content corresponding to the selected application; wherein the component content comprises a second element deployed in the development environment;
in response to a second element selection instruction in the component content, a baseline package is generated from the selected second element.
5. The method of claim 4,
the obtaining an operational application, comprising:
calling a first interface, and acquiring the operable application through the first interface;
and/or, the obtaining component content corresponding to the selected application comprises:
calling a second interface, and acquiring component content corresponding to the selected application through the second interface;
and/or, generating a baseline packet according to the selected second element comprises:
and calling a third interface, determining the incidence relation between the baseline packet identification and the second element through the third interface, and generating the baseline packet.
6. The method of claim 4, further comprising:
acquiring information of a data source deployed in the development environment, and processing the information of the data source by using an interface of a component to which the data source belongs to generate a data source serialization file; the data source serialization file comprises name information of a data source and script information corresponding to the data source, wherein the script information comprises information for updating a script file of the data source;
the generating a baseline packet according to the selected second element includes:
creating a baseline package folder;
creating a baseline information file in the baseline packet folder, wherein the baseline information file is used for recording the information of the baseline packet;
processing each second element by utilizing an interface of a component to which the second element associated with the baseline packet identifier belongs to generate an element serialization file of each second element;
and storing the element serialization file and the data source serialization file into the baseline package folder, and compressing the baseline package folder to obtain the baseline package.
7. The method of claim 6, wherein the component serialization file comprises any one of:
metadata serialization files, serialization files for updating script files of data sources, collection operation serialization files, integrated development operation serialization files, report form serialization files and query service serialization files.
8. The method of claim 1, wherein said importing the baseline package in the test environment and the production environment, respectively, comprises:
acquiring a serialized file from the baseline packet, and checking the serialized file;
importing the serialized files which pass the verification into the test environment by utilizing interfaces of components corresponding to the serialized files in the test environment;
and importing the serialized files passing the verification into the production environment by utilizing the interfaces of the components corresponding to the serialized files in the production environment.
9. An apparatus for deploying an element in a plurality of environments, wherein the deployed element comprises a first element and a second element; the first element is different in a plurality of environments, and the second element is not different in different environments;
the device comprises:
the first deployment unit is used for responding to a first deployment instruction corresponding to each environment and deploying first elements corresponding to each environment in a development environment, a test environment and a production environment respectively;
a second deployment unit to deploy the second element in the development environment in response to a second deployment instruction for the development environment;
a baseline package generation unit for generating a baseline package from the second element deployed in the development environment in response to a baseline package creation instruction;
and the baseline packet importing unit is used for responding to importing instructions respectively corresponding to a test environment and a production environment, importing the baseline packets respectively in the test environment and the production environment, and deploying the second element in the test environment and the production environment.
10. An apparatus for configuring components in multiple environments, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-8.
11. A computer-readable storage medium, having stored thereon a computer program,
the computer program is executed by a processor to implement the method according to any one of claims 1 to 8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
CN202111434297.9A 2021-11-29 2021-11-29 Method for configuring elements in multiple environments and electronic equipment Pending CN114090020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111434297.9A CN114090020A (en) 2021-11-29 2021-11-29 Method for configuring elements in multiple environments and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111434297.9A CN114090020A (en) 2021-11-29 2021-11-29 Method for configuring elements in multiple environments and electronic equipment

Publications (1)

Publication Number Publication Date
CN114090020A true CN114090020A (en) 2022-02-25

Family

ID=80305426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111434297.9A Pending CN114090020A (en) 2021-11-29 2021-11-29 Method for configuring elements in multiple environments and electronic equipment

Country Status (1)

Country Link
CN (1) CN114090020A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8225281B1 (en) * 2009-02-04 2012-07-17 Sprint Communications Company L.P. Automated baseline deployment system
CN110888649A (en) * 2018-09-10 2020-03-17 阿里巴巴集团控股有限公司 Application deployment method, application baseline creation method and device
CN111399865A (en) * 2020-04-21 2020-07-10 贵州新致普惠信息技术有限公司 Method for automatically constructing target file based on container technology
CN112015438A (en) * 2020-07-29 2020-12-01 烽火通信科技股份有限公司 Lightweight containerized distributed system based on infrastructure and deployment method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8225281B1 (en) * 2009-02-04 2012-07-17 Sprint Communications Company L.P. Automated baseline deployment system
CN110888649A (en) * 2018-09-10 2020-03-17 阿里巴巴集团控股有限公司 Application deployment method, application baseline creation method and device
CN111399865A (en) * 2020-04-21 2020-07-10 贵州新致普惠信息技术有限公司 Method for automatically constructing target file based on container technology
CN112015438A (en) * 2020-07-29 2020-12-01 烽火通信科技股份有限公司 Lightweight containerized distributed system based on infrastructure and deployment method

Similar Documents

Publication Publication Date Title
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
CN108415832B (en) Interface automation test method, device, equipment and storage medium
CN110851356B (en) Selenium-based Web application automatic test framework and construction method and system thereof
CN109302522B (en) Test method, test device, computer system, and computer medium
CN108287694B (en) Application program construction method, system, computer device and storage medium
US7165191B1 (en) Automated verification of user interface tests on low-end emulators and devices
CN111159049B (en) Automatic interface testing method and system
CN109783388B (en) UI (user interface) automatic testing method and device and electronic equipment
US20140181793A1 (en) Method of automatically testing different software applications for defects
CN105095059B (en) A kind of method and apparatus of automatic test
CN108628748B (en) Automatic test management method and automatic test management system
US20150347281A1 (en) Automation testing using descriptive maps
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN109902017A (en) A kind of method and terminal based on RobotFramework test Dubbo interface
CN110674083B (en) Workflow migration method, device, equipment and computer readable storage medium
CN110888818A (en) Test case configuration system and method, automatic test system and method
US8046638B2 (en) Testing of distributed systems
CN110659198A (en) Application program test case execution method and device and software test system
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN110471857A (en) The automatic test approach and device of artificial intelligence model performance capability
CN111124892B (en) Automatic testing method and system based on command line
CN115658529A (en) Automatic testing method for user page and related equipment
CN109739704A (en) A kind of interface test method, server-side and computer readable storage medium
CN107357721B (en) Method and device for testing system
CN114996127A (en) Intelligent test method and system for solid state disk firmware module

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