CN114968267A - Service deployment method, device, electronic equipment and storage medium - Google Patents

Service deployment method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114968267A
CN114968267A CN202110218050.7A CN202110218050A CN114968267A CN 114968267 A CN114968267 A CN 114968267A CN 202110218050 A CN202110218050 A CN 202110218050A CN 114968267 A CN114968267 A CN 114968267A
Authority
CN
China
Prior art keywords
service
deployment
environment
container
program code
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
CN202110218050.7A
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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202110218050.7A priority Critical patent/CN114968267A/en
Publication of CN114968267A publication Critical patent/CN114968267A/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

Landscapes

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

Abstract

The application provides a service deployment method, a service deployment device, electronic equipment and a storage medium, which are applied to the technical field of computers, wherein the method comprises the following steps: obtaining a service deployment file, wherein the service deployment file at least comprises: environment static variables and service program code; changing the static variables of the environment according to the deployment environment parameters of the front end; adding the changed environment static variables and the service program codes to a network service container; the network service container is launched to execute the service program code in a deployment environment of the front end. According to the scheme, the changeable environment static variables are set in the service deployment file, so that the environment static variables are adaptively adjusted according to parameters of a required deployment environment during service deployment, the service program code can normally run in the deployment environment, the service deployment file for development of different front-end deployment environments is not needed, the service deployment cost is reduced, and the deployment efficiency of the service deployment file in different deployment environments is improved.

Description

Service deployment method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a service deployment method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of network technologies, more and more network service providers are transforming to more efficient network service architectures to realize rapid development and deployment of services, and development frameworks with separated front and back ends have become the mainstream direction of service system development due to the characteristics of light weight and high efficiency.
Vue is widely used as a set of progressive development framework for constructing user interface, which is not only easy to use, but also provides the function of integrating various third-party libraries or projects, and is very suitable for the development of large network service system.
However, since all the service items developed under the vue framework need to be compiled first and then deployed at the front end, and part of variables in the same service item under different deployment environments are different, the same service item needs to be repeatedly developed each time the service item is adapted to different deployment environments, which greatly increases the cost required by service deployment and reduces the efficiency of service deployment.
Disclosure of Invention
In view of this, embodiments of the present application provide a service deployment method, an apparatus, an electronic device, and a storage medium, which are used to solve the problems that, in the prior art, when a service is deployed, a deployment file needs to be specially developed for the same service in deployment environments adapted to different front ends, the cost required by service deployment is increased, and the efficiency of service deployment is reduced.
A first aspect of the present application provides a service deployment method, applied to a front end, the method including:
obtaining a service deployment file, wherein the service deployment file at least comprises: environment static variables and service program code;
changing the environment static variable according to the deployment environment parameter of the front end;
adding the changed environment static variable and the service program code to a network service container;
the web services container is launched to execute the service program code in a deployment environment of the front end.
Optionally, the deployment environment parameters include at least: the network address and the domain name of the front end, and the environment static variables at least comprise: a service access identifier; the changing the environment static variable by the deployment environment parameter adapted to the front end includes:
generating an access identifier of the front end according to the network address and the domain name;
and changing the service access identification into the access identification of the front end.
Optionally, after the starting the web service container, the method further includes:
when a service request sent by a client according to the service access identifier is received, executing the service program code through the network service container to acquire service information;
and sending the service information to the client.
Optionally, the executing the service program code by the network service container to obtain service information includes:
executing the service program code through the network service container to enable the network service container to obtain service information from a backend interface address, wherein the backend interface address is obtained based on a reverse proxy policy of the network service container or the environment static variable.
Optionally, before the starting the web service container, the method further includes:
receiving container adjustment information input for the web service container;
and changing the reverse proxy strategy of the network service container according to the container adjustment information.
Optionally, the obtaining the service deployment file includes:
receiving a service deployment data packet sent by a deployment terminal, wherein the deployment terminal is in communication connection with at least two front ends;
and decapsulating the service deployment data packet to obtain a service deployment file.
Optionally, the adding the changed environment static variable and the service program code to the network service container includes:
and copying the changed environment static variables and the service program codes into a static directory of a network service container, wherein the network service container is constructed in advance after the deployment environment of the front end is generated.
According to a second aspect of the present application, there is provided a service deployment apparatus, applied to a front end, the apparatus including:
an obtaining module configured to obtain a service deployment file, the service deployment file including at least: environment static variables and service program code;
an update module configured to change the environmental static variable in response to a deployment environment parameter of the front end;
a deployment module configured to add the changed environment static variables and the service program code to a network service container;
a launch module configured to launch the web services container to execute the service program code in a deployment environment of the front end.
Optionally, the deployment environment parameters include at least: the network address and the domain name of the front end, and the environment static variables at least comprise: a service access identifier; the update module further configured to:
generating an access identifier of the front end according to the network address and the domain name;
and changing the service access identification into the access identification of the front end.
Optionally, the apparatus further comprises:
a service providing module configured to:
when a service request sent by a client according to the service access identifier is received, executing the service program code through the network service container to acquire service information;
and sending the service information to the client.
Optionally, the service providing module is further configured to:
executing the service program code through the network service container to enable the network service container to obtain service information from a backend interface address, wherein the backend interface address is obtained based on a reverse proxy policy of the network service container or the environment static variable.
Optionally, the deployment module is further configured to:
receiving container adjustment information input for the web service container;
and changing the reverse proxy strategy of the network service container according to the container adjustment information.
Optionally, the obtaining module is further configured to:
receiving a service deployment data packet sent by a deployment terminal, wherein the deployment terminal is in communication connection with at least two front ends;
and decapsulating the service deployment data packet to obtain a service deployment file.
Optionally, the deployment module is further configured to:
and copying the changed environment static variables and the service program codes into a static directory of a network service container, wherein the network service container is constructed in advance after the deployment environment of the front end is generated.
According to a third aspect of the present application, there is provided an electronic device, comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the service deployment method of the first aspect.
According to a fourth aspect of the present application, there is provided a computer non-transitory readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the service deployment method of the first aspect described above.
To prior art, this application possesses following advantage:
according to the service deployment method, the service deployment device, the electronic equipment and the storage medium, the changeable environment static variable is set in the service deployment file, so that the environment static variable is adaptively adjusted according to parameters of a required deployment environment during service deployment, service program codes can normally run in the deployment environment, the service deployment file for development of different front-end deployment environments is not needed, the service deployment cost is reduced, and the deployment efficiency of the service deployment file in different deployment environments is improved.
The above description is only an overview of the technical solutions of the present application, and the present application may be implemented in accordance with the content of the description so as to make the technical means of the present application more clearly understood, and the detailed description of the present application will be given below in order to make the above and other objects, features, and advantages of the present application more clearly understood.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating steps of a service deployment method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of another method for deploying services according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating steps of a further method for deploying services according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a service deployment method according to an embodiment of the present application;
fig. 5 is a block diagram illustrating a service deployment apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 is a flowchart of steps of a service deployment method provided in an embodiment of the present application, which is applied to a front end, and the method includes:
step 101, obtaining a service deployment file, wherein the service deployment file at least comprises: environment static variables and service program code.
In the embodiment of the application, the front end refers to a server for acquiring service information from the back end in response to a service request of the client and providing the service information to the client, and a service architecture with separated front and back ends can effectively reduce the load pressure of the server. The service deployment file refers to a program file required for deploying the service at the front end, and the program file contains service program codes describing the operation logic of the service front end. The environment static variable refers to environment configuration information required by the service program code at runtime. It should be noted that, in the prior art, the environment configuration information is directly written in the service program code when the service deployment file is compiled, so that the service deployment file is adapted to the deployment environment information contained in the service deployment file and can only perform service deployment on the corresponding front-end server, and it is impossible to implement that for the deployment environments of different front-end servers, the environment information must be specially developed and adjusted for different deployment environments. The embodiment of the application sets the environment deployment information in the service deployment file in a configurable variable form, so that the dynamic adjustment of the environment deployment information can be realized by adapting to different deployment environments.
In practical application, a static configuration file can be added under a public directory of a service deployment file to set a variable deployment environment variable for configuration, the static file for setting the deployment environment variable does not need to be compiled and set for different deployment environments during development, and the static file is directly copied as a static deployment file after the service deployment file is compiled.
In practical applications, the deployment environment in the front-end server in the embodiment of the present application may be constructed based on architectures such as vue (a progressive Java Script architecture for constructing a user interface), node (a Java Script architecture based on a V8 engine), and the like, and thus the service deployment file may also be developed based on an architecture that is the same as the architecture for constructing the environment in the front-end server.
And 102, changing the environment static variable according to the deployment environment parameter of the front end.
In the embodiment of the present application, the deployment environment parameter is parameter information related to a deployment environment, for example: type, version, device model, functional interface address, etc. of the deployment environment. The front-end server develops the service deployment file and then calls local deployment environment parameters to adaptively change the environment static variables. Specifically, the front-end server may preset a change policy for changing the environmental static variable according to the deployment environment parameter, for example: the deployment environment function interface address is added to a response call function address in the environment static variable, or a device is performed on a data transmission upper limit value in the environment static variable according to the memory size of the deployment environment, and the like.
And 103, adding the changed environment static variable and the service program code to a network service container.
In the embodiment of the present application, a web service container (web container) refers to a service program for accommodating and running a service program code, for example, a Tomcat container in JAVA, an nginx proxy service container, and the like, and a plurality of web service containers may be provided in one front-end server, so that the same front-end server may provide multiple web servers at the same time. In the application, the location where the technical scheme is executed can be used for collecting and deploying the parameters in the network service container, namely the network service container.
After the change of the environment static variable is completed, the changed environment static variable and the service program code can be directly added to the static directory of the network service container, so that the setting of the service deployment file on the front end is completed.
Step 104, starting the network service container to execute the service program code in the deployment environment of the front end.
In the embodiment of the application, after the service deployment file is added to the network service container, the network service container can be started, so that the network service container executes the service program code, in the running process of the service program code, the changed environment static variable can be directly extracted from the static file of the network service container, and as the environment static variable is adjusted to adapt to the deployment environment parameter of the front end, the service program code can run normally in the deployment environment of the front end, and the condition that the service program code cannot run normally due to the incompatibility of the environment static variable with the current deployment environment is avoided, so that the service deployment file is compiled for multiple times for one time, and the service deployment file special for developing is not required to adapt to the deployment environments of different front ends. It should be noted that, in the embodiment of the present application, a static variable is used to set an environment variable in a service deployment file, rather than a dynamic variable, because the dynamic variable requires interaction between a front-end server and a back-end server to obtain a true value of the dynamic variable, and before the service is deployed in the front-end service, the front-end server cannot interact with the back-end server, so that the purpose that the environment variable cannot be obtained during the deployment process cannot be achieved when the environment variable needs to be adaptively adjusted during the deployment process in the embodiment of the present application. Furthermore, the changed environment static variable is obtained from the static file of the network service container, and the network service container cannot interact with the back-end server before the service deployment is completed, so that if the changed environment static variable exists in the dynamic file, before the service deployment is completed, the network service container cannot interact with the back-end server, and therefore the changed environment static variable cannot be obtained, and the purpose that the environment variable needs to be adaptively adjusted in the service deployment process in the embodiment of the application cannot be achieved.
According to the service deployment method provided by the embodiment of the application, the changeable environment static variable is set in the service deployment file, so that the environment static variable is adaptively adjusted according to the parameters of the required deployment environment during service deployment, the service program code can normally run in the deployment environment, the service deployment file for development of the deployment environments of different front ends is not needed, the service deployment cost is reduced, and the deployment efficiency of the service deployment file in different deployment environments is improved.
Fig. 2 is a flowchart of steps of another service deployment method provided in an embodiment of the present application, which is applied to a front end, and the method includes:
step 201, receiving a service deployment data packet sent by a deployment end, where the deployment end is in communication connection with at least two of the front ends.
In this embodiment of the application, the deployment end is a server for distributing the service deployment data package, and a developer may develop and construct the service deployment data package on the deployment end, or may publish the service deployment data package on the deployment end after the construction of the service deployment data package is completed. And when service deployment is needed each time, the service deployment data packet can be sent to a plurality of front ends needing service deployment through the deployment end, so that large-scale deployment of the service deployment data packet is realized.
Step 202, decapsulating the service deployment data packet to obtain a service deployment file, where the service deployment file at least includes: environment static variables and service program code.
In the embodiment of the application, the service deployment file is encapsulated into the service deployment data packet, so that the data transmission quantity required by service deployment can be effectively reduced, and the data transmission pressure of a deployment end during large-scale service deployment can be reduced.
Optionally, the deployment environment parameters include at least: the network address and the domain name of the front end, the environment static variables at least include: a service access identification.
Step 203, generating the access identifier of the front end according to the network address and the domain name.
In the embodiment of the present application, the access identifier is identifier information used for instructing the client to send a service request to the front end when the service information is needed, and the identifier information has an identifier function, for example, a URL (uniform resource locator). For the web service, when acquiring the web data, the client generally generates a web address of the web service and a domain name, that is, an access identifier in the embodiment of the present application, so that the client can analyze the domain name in the web address to acquire the network address, and send a service request carrying the access identifier to the front end.
Step 204, changing the service access identifier into the access identifier of the front end.
In the embodiment of the present application, the service access identifier is a front-end server used for indicating provision of service information, and it can be understood that the service access identifier needs to indicate the front-end server, but because the environment static variable in the embodiment of the present application is not separately developed for a certain front-end server, the service access identifier in the environment static variable is an initial value of a service access identifier such as localhost, and the initial value of the service access identifier does not indicate the front-end server, and the service access identifier needs to be changed to adapt to the access identifier of the front-end server that needs to be deployed for service before being normally used. The environment static variable can be provided with a service access identifier for setting change, so that adaptive change is performed according to the access identifier of the front end required to be deployed, and the network service container provides service information to the client when receiving the service request.
According to the method and the device, the static environment variable is changed according to the network address and the domain name of the front end, so that the service deployment file can be normally deployed in the front ends of different network addresses and different domain names, the service deployment cost is reduced, and the service deployment efficiency is improved.
Step 205, copying the changed environment static variables and the service program code into a static directory of a network service container, wherein the network service container is constructed in advance after the deployment environment of the front end is generated.
In this embodiment, the network service container is generated in advance according to the container construction logic of the deployment environment when the front end constructs the deployment environment, and the specific manner may refer to related prior art, which is not described herein again. According to the method and the device, the changed environment static variables and the changed service program codes are directly copied into the static directory of the network service container to realize service deployment, the network service container does not need to be reconstructed by the front end, and the service deployment efficiency is improved.
Step 206, the web services container is started to execute the service program code in the deployment environment of the front end.
This step can refer to the detailed description of step 104, and is not described herein again.
And step 207, when receiving a service request sent by the client according to the service access identifier, executing the service program code through the network service container to obtain service information.
Step 208, sending the service information to the client.
In this embodiment of the application, the front-end server receives a service request carrying a service access identifier sent by the client, the network service container claims the service request according to the service access identifier and starts to execute the service program code to obtain service information, where the service information may be generated by the network service container, or may be extracted from the front-end server or obtained from another server by the network service container, as long as the service information can be obtained, and the service information may be specifically set according to actual requirements, and is not limited here.
Optionally, the step 206 may include: executing the service program code through the network service container to enable the network service container to obtain service information from a backend interface address, wherein the backend interface address is obtained based on a reverse proxy policy of the network service container or the environment static variable.
In the embodiment of the present application, the reverse proxy policy refers to a policy in which a network service container obtains service information from a server other than the local server, for example, obtaining service information from the backend server 1 for a service request sent by the client 1, and obtaining service information from the backend server 2 for a service request sent by the client 2; the reverse proxy policy may also be a data transmission policy in the process of reverse proxy, for example, transmission configuration such as timeout retransmission, packet return acknowledgement and the like when the network service container sends a service information acquisition request to the back-end server, and the specific reverse proxy policy may be set according to actual requirements, which is not limited herein. The network service container can determine the address of the rear-end interface according to the reverse proxy strategy after receiving the service request each time, and can extract the address of the rear-end interface from the environment static variable, so that developers can adjust the address of the rear-end interface by configuring the reverse proxy strategy of the network service container or configuring the environment static variable, thereby flexibly setting the acquisition equipment of the service information and improving the flexibility of acquiring the service information.
Optionally, referring to fig. 3, before the step 205, the method further includes:
step 209, receiving the container adjustment information input for the web service container.
Step 210, changing the reverse proxy policy of the network service container according to the container adjustment information.
In this embodiment of the application, the container adjustment information is information used for parameter configuration of the network service container, and may be input by a user or automatically generated by a system, and may be specifically set according to actual requirements, which is not limited herein.
Specifically, fig. 4 is a schematic diagram illustrating a service deployment method according to an embodiment of the present application.
The construction server may be a deployment end in this embodiment, and the environments 1 to N may be different deployment environments of a front end in this embodiment.
Step S1, the construction server can firstly obtain the source code of the application service program developed based on the development framework such as vue, html, css, js and the like through the git tool, and obtain the latest code on the construction server by using the gitpull command;
step S2, the build server builds the service program code of the application through npm build command;
step S3, the construction server compiles the compiled service program codes and the files containing the environment static variables after code confusion to generate service deployment files;
step S4, the construction server subpackages the generated service deployment files to obtain service deployment data packets;
step S5, the construction server distributes the service deployment data packet to different deployment environments of the front end;
step S6, the front ends in different deployment environments 1-N obtain service deployment files by decompressing service deployment data;
step S7, the front end configures the static variables of the service deployment file according to the parameters of the deployment environment of the front end, so as to adapt to the personalized configuration of the deployment environment;
step S8, adding the configured service deployment file to a network service (web) container;
step S9, the container is started to complete the service deployment.
Before the network service container is started, the reverse proxy policy in the network service container may be changed through the container adjustment information, so that the network service container adapts to different network services to adjust the reverse proxy policy, for example, for the same network service, only a part of the network service container is temporarily developed, that is, the reverse proxy policy may be set to be disabled to display the part of the network service container to temporarily provide the service, or for the same network service, different backend servers may be allocated to different network service containers to provide data support, and the like, which may be specifically set according to actual requirements, and is not limited herein.
According to the embodiment of the application, the reverse proxy strategy is configured before the network service container is started, so that service deployment can be managed conveniently.
According to the other service deployment method provided by the embodiment of the application, the changeable environment static variable is set in the service deployment file, so that the environment static variable is adaptively adjusted according to the parameters of the required deployment environment during service deployment, the service program code can normally run in the deployment environment, the service deployment file for development of the deployment environments of different front ends is not needed, the service deployment cost is reduced, and the deployment efficiency of the service deployment file in different deployment environments is improved.
Fig. 5 is a block diagram of a service deployment apparatus 30 according to an embodiment of the present application, applied to a front end, where the apparatus includes:
an obtaining module 301 configured to obtain a service deployment file, where the service deployment file includes at least: environment static variables and service program code;
an update module 302 configured to change the environment static variable in response to a deployment environment parameter of the front end;
a deployment module 303 configured to add the changed environment static variables and the service program code to a network service container;
an initiation module 304 configured to initiate the web services container to execute the service program code in a deployment environment of the front end.
Optionally, the deployment environment parameters include at least: the network address and the domain name of the front end, and the environment static variables at least comprise: a service access identifier; the update module 303 is further configured to:
generating an access identifier of the front end according to the network address and the domain name;
and changing the service access identification into the access identification of the front end.
Optionally, the apparatus further comprises:
a service providing module configured to:
when a service request sent by a client according to the service access identifier is received, executing the service program code through the network service container to acquire service information;
and sending the service information to the client.
Optionally, the service providing module is further configured to:
executing the service program code through the network service container to enable the network service container to obtain service information from a backend interface address, wherein the backend interface address is obtained based on a reverse proxy policy of the network service container or the environment static variable.
Optionally, the deployment module 303 is further configured to:
receiving container adjustment information input for the web service container;
and changing the reverse proxy strategy of the network service container according to the container adjustment information.
Optionally, the obtaining module 301 is further configured to:
receiving a service deployment data packet sent by a deployment terminal, wherein the deployment terminal is in communication connection with at least two front ends;
and decapsulating the service deployment data packet to obtain a service deployment file.
Optionally, the deployment module 303 is further configured to:
and copying the changed environment static variables and the service program codes into a static directory of a network service container, wherein the network service container is constructed in advance after the deployment environment of the front end is generated.
The service deployment device provided in the embodiment of the present application has a functional module corresponding to the execution of the service deployment method, can execute the service deployment method provided in the embodiments of the present application from fig. 1 to fig. 4, and can achieve the same advantageous effects.
In another embodiment provided by the present application, there is also provided an electronic device, which may include: the processor executes the program to implement the processes of the embodiment of the service deployment method, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here. For example, as shown in fig. 6, the electronic device may specifically include: a processor 401, a storage device 402, a display screen 403 with touch functionality, an input device 404, an output device 405, and a communication device 406. The number of the processors 401 in the electronic device may be one or more, and one processor 401 is taken as an example in fig. 6. The processor 401, the storage means 402, the display 403, the input means 404, the output means 405 and the communication means 406 of the electronic device may be connected by a bus or other means.
In yet another embodiment provided by the present application, there is also provided a computer-non-transitory readable storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the service deployment method described in any of the above embodiments.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the service deployment method of any of the above embodiments.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. A service deployment method, applied to a front end, the method comprising:
obtaining a service deployment file, wherein the service deployment file at least comprises: environment static variables and service program code;
changing the environment static variable according to the deployment environment parameter of the front end;
adding the changed environment static variable and the service program code to a network service container;
the web services container is launched to execute the service code in a deployment environment of the head end.
2. The method of claim 1, wherein the deployment environment parameters comprise at least: the network address and the domain name of the front end, and the environment static variables at least comprise: a service access identifier; the changing the environment static variable by the deployment environment parameter adapted to the front end includes:
generating an access identifier of the front end according to the network address and the domain name;
and changing the service access identification into the access identification of the front end.
3. The method according to claim 1 or 2, wherein after said initiating the web service container, the method further comprises:
when a service request sent by a client according to the service access identifier is received, executing the service program code through the network service container to acquire service information;
and sending the service information to the client.
4. The method of claim 3, wherein the executing the service program code by the web service container to obtain service information comprises:
executing the service program code through the network service container to enable the network service container to obtain service information from a backend interface address, wherein the backend interface address is obtained based on a reverse proxy policy of the network service container or the environment static variable.
5. The method according to claim 1 or 2, wherein prior to said initiating said web services container, said method further comprises:
receiving container adjustment information input for the web service container;
and changing the reverse proxy strategy of the network service container according to the container adjustment information.
6. The method of claim 1, wherein obtaining the service deployment file comprises:
receiving a service deployment data packet sent by a deployment terminal, wherein the deployment terminal is in communication connection with at least two front ends;
and decapsulating the service deployment data packet to obtain a service deployment file.
7. The method of claim 1, wherein adding the changed static variables of the environment and the service program code to a web services container comprises:
and copying the changed environment static variables and the service program codes into a static directory of a network service container, wherein the network service container is constructed in advance after the deployment environment of the front end is generated.
8. A service deployment apparatus, applied to a front end, the apparatus comprising:
an obtaining module configured to obtain a service deployment file, the service deployment file including at least: environment static variables and service program code;
an update module configured to change the environmental static variable in response to a deployment environment parameter of the front end;
a deployment module configured to add the changed environment static variables and the service program code to a network service container;
a launch module configured to launch the web services container to execute the service program code in a deployment environment of the front end.
9. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the service deployment method of any one of claims 1 to 7.
10. A computer non-transitory readable storage medium, wherein the readable storage medium stores thereon a computer program, which when executed by a processor implements the service deployment method of any one of claims 1 to 7.
CN202110218050.7A 2021-02-26 2021-02-26 Service deployment method, device, electronic equipment and storage medium Pending CN114968267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110218050.7A CN114968267A (en) 2021-02-26 2021-02-26 Service deployment method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110218050.7A CN114968267A (en) 2021-02-26 2021-02-26 Service deployment method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114968267A true CN114968267A (en) 2022-08-30

Family

ID=82973360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110218050.7A Pending CN114968267A (en) 2021-02-26 2021-02-26 Service deployment method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114968267A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017019684A1 (en) * 2015-07-27 2017-02-02 Datagrid Systems, Inc. Techniques for evaluating server system reliability, vulnerability and component compatibility using crowdsourced server and vulnerability data
CN106610853A (en) * 2015-10-26 2017-05-03 阿里巴巴集团控股有限公司 Application deployment method and device
CN109726132A (en) * 2019-01-03 2019-05-07 京东方科技集团股份有限公司 A kind of method for testing software and software test automation management system
CN110175029A (en) * 2019-04-15 2019-08-27 深圳壹账通智能科技有限公司 The forming method of front-end and back-end automatically dispose tool based on data analysis
CN110879769A (en) * 2019-10-16 2020-03-13 中国航空工业集团公司洛阳电光设备研究所 Embedded system test environment construction method based on dynamically configurable framework
CN111190743A (en) * 2018-11-14 2020-05-22 千寻位置网络有限公司 Method and device for solving cross-domain problem of front-end local development
CN111767092A (en) * 2020-06-30 2020-10-13 深圳前海微众银行股份有限公司 Job execution method, device, system and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017019684A1 (en) * 2015-07-27 2017-02-02 Datagrid Systems, Inc. Techniques for evaluating server system reliability, vulnerability and component compatibility using crowdsourced server and vulnerability data
CN106610853A (en) * 2015-10-26 2017-05-03 阿里巴巴集团控股有限公司 Application deployment method and device
CN111190743A (en) * 2018-11-14 2020-05-22 千寻位置网络有限公司 Method and device for solving cross-domain problem of front-end local development
CN109726132A (en) * 2019-01-03 2019-05-07 京东方科技集团股份有限公司 A kind of method for testing software and software test automation management system
CN110175029A (en) * 2019-04-15 2019-08-27 深圳壹账通智能科技有限公司 The forming method of front-end and back-end automatically dispose tool based on data analysis
CN110879769A (en) * 2019-10-16 2020-03-13 中国航空工业集团公司洛阳电光设备研究所 Embedded system test environment construction method based on dynamically configurable framework
CN111767092A (en) * 2020-06-30 2020-10-13 深圳前海微众银行股份有限公司 Job execution method, device, system and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109725909B (en) Code file packaging deployment method, continuous integrated server and system
US20080046882A1 (en) Deploying j2ee web applications in an osgi environment
CN101853152B (en) Method and system for generating graphical user interface
CN107729014B (en) Page jump method and structure based on Android
CN103064663A (en) Browser plug-in generating, issuing, loading and updating method and system
CN106569880B (en) Method and system for dynamically sharing resources between Android applications
CN108319463A (en) A kind of application upgrade method, apparatus
CN104077162A (en) Mobile terminal application template updating and issuing method and device
CN108804100B (en) Method and device for creating interface element, storage medium and mobile terminal
CN108845800B (en) Method, device, equipment and storage medium for realizing component extension function
CN111414261B (en) Cross-network calling method and device of distributed system and related components
CN110928545B (en) Component distribution method, development method and device of single-page application and storage medium
CN109213533A (en) A kind of advertisement SDK dynamic loading method, device and terminal
CN101964742B (en) Method, system and device for using network open ability
CN112035122A (en) Interface deployment method, system and storage medium
CN111367685B (en) Interface calling method and device, computer equipment and storage medium
CN103561082A (en) Compressing request processing method and server
CN114968267A (en) Service deployment method, device, electronic equipment and storage medium
CN116755788A (en) On-line rule modification method, device, equipment and storage medium
CN112114871B (en) Code sharing method, device, server, terminal and medium
CN111443920B (en) Frame migration method and device
CN112925715A (en) Application debugging method and device of mobile terminal
CN113760481A (en) Distributed timed task scheduling system and method
CN112486539B (en) Application updating method, device, equipment and storage medium
Schmidt et al. SoapME: a lightweight Java ME web service container

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