CN116521185A - Application deployment method, device, equipment and medium - Google Patents

Application deployment method, device, equipment and medium Download PDF

Info

Publication number
CN116521185A
CN116521185A CN202310488498.XA CN202310488498A CN116521185A CN 116521185 A CN116521185 A CN 116521185A CN 202310488498 A CN202310488498 A CN 202310488498A CN 116521185 A CN116521185 A CN 116521185A
Authority
CN
China
Prior art keywords
application
target application
service component
component
environment variable
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
CN202310488498.XA
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.)
Shenzhen Jiuniuyimao Intelligent Internet Of Things Technology Co ltd
Original Assignee
Shenzhen Jiuniuyimao Intelligent Internet Of Things Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jiuniuyimao Intelligent Internet Of Things Technology Co ltd filed Critical Shenzhen Jiuniuyimao Intelligent Internet Of Things Technology Co ltd
Priority to CN202310488498.XA priority Critical patent/CN116521185A/en
Publication of CN116521185A publication Critical patent/CN116521185A/en
Pending legal-status Critical Current

Links

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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of Internet, and provides an application deployment method, device, equipment and medium, which can abstract a service component and a service component on the basis of an application, and when a target application is deployed, a middleware on which the target application depends is deployed at the same time, so that the overall deployment and unified management of the target application are realized, and meanwhile, a shared environment variable in the application is automatically generated, and the service component is configured to access the service component according to the shared environment variable, so that the problem that relevant addresses need to be reconfigured during sharing delivery is solved.

Description

Application deployment method, device, equipment and medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to an application deployment method, apparatus, device, and medium.
Background
In recent years, with the development of container technology and cloud native technology, the deployment mode of applications is gradually migrated to the cloud, and the cost for infrastructure operation and maintenance is gradually simplified, so that compared with the traditional applications, a developer only needs to pay attention to the business development of a PaaS (Platform as a Service ) layer or even a SaaS (Software as a Service, software as a service) layer, and can simply release the applications to the network.
However, in the current cloud deployment mode of applications, the applications and the dependent middleware are usually deployed separately, and the middleware is used as a part of application dependence, so that overall deployment and unified management cannot be achieved. And when an application needs to be shared or copied, the exposed address of the newly deployed component in the new application is not the original address, so that the code configuration association component needs to be modified again, and the application cannot be shared or copied quickly by one key.
Disclosure of Invention
In view of the foregoing, it is necessary to provide an application deployment method, device, apparatus and medium, which aim to solve the problem that middleware cannot be uniformly deployed and managed when an application is deployed in a cloud, and the problem that the deployed application is inconvenient to share or copy.
An application deployment method, the application deployment method comprising:
acquiring a target application created on a cloud platform, and deploying a service component of the target application;
configuring component information and an exposed port of the service component;
generating access connection of the service component according to the exposed port, and generating a shared environment variable of the service component in the target application according to the component information;
Binding the access connection with the shared environment variable;
acquiring a service component of the created target application, and configuring access of the service component to the service component according to the shared environment variable;
configuring additional function information of the target application;
and deploying the target application.
According to a preferred embodiment of the present invention, the service component for deploying the target application includes:
displaying at least one middleware on a configuration interface;
when any middleware in the at least one middleware is received to be selected, determining the selected middleware as the service component;
the service component is deployed.
According to a preferred embodiment of the present invention, the generating the access connection of the service component according to the exposed port includes:
and mapping the exposed port from the Kubernetes container to the public network by using a load balancing server to obtain the access connection.
According to a preferred embodiment of the present invention, the generating the shared environment variable of the service component in the target application according to the component information includes:
acquiring the component name of the service component from the component information;
acquiring a preset field;
and combining the component name with the preset field to obtain the shared environment variable.
According to a preferred embodiment of the present invention, the configuring additional function information of the target application includes:
configuring a log acquisition function of the target application, wherein the log acquisition function is used for acquiring an operation log of the target application according to configured acquisition rules;
and configuring the checking function of the target application, wherein the checking function is used for checking the return code of the configuration interface at intervals of preset time and determining whether the working state of the configuration interface is normal or not according to the return code.
According to a preferred embodiment of the present invention, the deploying the target application includes:
and converting the configuration file format of the target application into the configuration file format of the Kubernetes, and deploying the target application based on the Kubernetes cluster.
According to a preferred embodiment of the present invention, after deploying the target application, the method further comprises:
when a replication or sharing instruction for the target application is received, a configuration file of the target application is derived;
deploying a new application according to the exported configuration file, and taking the new application as a copy application or a sharing application of the target application;
and the service component of the new application accesses the service component of the new application according to the shared environment variable in the exported configuration file.
An application deployment apparatus, the application deployment apparatus comprising:
the deployment unit is used for acquiring a target application created on the cloud platform and deploying a service component of the target application;
the configuration unit is used for configuring the component information and the exposed port of the service component;
the generation unit is used for generating access connection of the service component according to the exposure port and generating a shared environment variable of the service component in the target application according to the component information;
a binding unit, configured to bind the access connection and the shared environment variable;
the configuration unit is further used for acquiring the created service component of the target application and configuring the access of the service component to the service component according to the shared environment variable;
the configuration unit is also used for configuring additional function information of the target application;
the deployment unit is further configured to deploy the target application.
A computer device, the computer device comprising:
a memory storing at least one instruction;
and the processor executes the instructions stored in the memory to realize the application deployment method.
A computer-readable storage medium having stored therein at least one instruction that is executed by a processor in a computer device to implement the application deployment method.
According to the technical scheme, on one hand, the service component and the service component can be abstracted on the basis of application, and middleware on which the target application depends is deployed simultaneously when the target application is deployed, so that the overall deployment and unified management of the target application are realized; on the other hand, the method and the device can automatically generate the shared environment variable in the application, and configure the access of the service component to the service component according to the shared environment variable so as to solve the problem that the related address needs to be reconfigured during sharing delivery.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the application deployment method of the present invention.
FIG. 2 is a schematic diagram of the present invention binding access connections with shared environment variables.
FIG. 3 is a functional block diagram of a preferred embodiment of the application deployment apparatus of the present invention.
FIG. 4 is a schematic diagram of a computer device implementing a preferred embodiment of the application deployment method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of a preferred embodiment of the application deployment method of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The application deployment method is applied to one or more computer devices, wherein the computer device is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the computer device comprises, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device and the like.
The computer device may be any electronic product that can interact with a user in a human-computer manner, such as a personal computer, tablet computer, smart phone, personal digital assistant (Personal Digital Assistant, PDA), game console, interactive internet protocol television (Internet Protocol Television, IPTV), smart wearable device, etc.
The computer device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
S10, acquiring a target application created on a cloud platform, and deploying a service component of the target application.
In this embodiment, the entire application deployment process may be based on a platform providing corresponding DevOps (Development & Operations) services, i.e., the cloud platform. The Development (Development) and operation (Operations) can be integrated through the DevOps service, and part of operation and maintenance work can be completed through tool-assisted Development, so that the cost is reduced.
The target application is an empty application at the initial creation, and user application software for users is finally formed after cloud deployment is realized through various subsequent configurations.
Wherein, the service component is a middleware needed in application development, and the service component can include, but is not limited to, one or more of the following combinations: mySQL, mongoDB, kafka, nacos, etc.
In this embodiment, a deployment template for middleware may be provided and support for deploying proprietary service components for applications, or existing service components may be bound.
Specifically, the service component for deploying the target application includes:
displaying at least one middleware on a configuration interface;
when any middleware in the at least one middleware is received to be selected, determining the selected middleware as the service component;
the service component is deployed.
Wherein the configuration interface may be an interface for interaction with a user. Specifically, various middleware such as MySQL, mongoDB, kafka, nacos is displayed on the configuration interface for selection by the user.
Through the embodiment, the middleware is deployed simultaneously when the application is deployed, so that the problems of overall deployment and unified management of the application and the dependent middleware are solved.
S11, configuring the component information and the exposed port of the service component.
Wherein the component information may include, but is not limited to, one or more of the following:
code instrumentation, code compilation scripts, deployment scripts, resource usage, application packages, images, git source code, and the like.
Wherein access to the service component is enabled through the exposed port.
Specifically, the component information and the exposed port can be configured according to actual use requirements of the application.
S12, generating access connection of the service component according to the exposed port, and generating a shared environment variable of the service component in the target application according to the component information.
It will be appreciated that the exposed port is exposed to the Kubernetes container and cannot be accessed by the outside world, and therefore, in order for the outside world to use the exposed port, it is also necessary to map the exposed port to the public network to finally form the access connection.
Wherein the Kubernetes is an open source for managing containerized applications on multiple hosts in a cloud platform.
Specifically, the generating the access connection of the service component according to the exposed port includes:
The access connection is obtained by mapping the exposed port from the Kubernetes container to the public network using a load balancing server (Server Load Balancing, SLB).
In this embodiment, the generating the shared environment variable of the service component in the target application according to the component information includes:
acquiring the component name of the service component from the component information;
acquiring a preset field;
and combining the component name with the preset field to obtain the shared environment variable.
For example: and after the port is configured for MySQL, combining the component name with the preset field to automatically generate a shared environment variable MySQL-component1-addr in the application.
S13, binding the access connection and the shared environment variable.
In general, assuming that the component1 (service component) needs to access the component 2 (MySQL), an exposed port of the component 2 is configured, and after the deployment, the platform forms an access address link for the component 2, at this time, we need to modify the code configuration of the component1, modify the address of the connection MySQL into link, and after deployment, the component1 can access the component 2. In the above scenario, when the application is shared or replicated, since the exposed address of the newly deployed component in the new application is no longer link, the code needs to be modified again to configure the associated component, and the application cannot be shared quickly.
In order to solve the above problem, the present embodiment can configure the access of the service component to the service component according to the shared environment variable by binding the access connection and the shared environment variable, so as to solve the problem that the related address needs to be reconfigured during the sharing delivery.
For example: after each component is created, a unique component name in the application is generated, as shown in fig. 2, and the component name of the service component1 is: user-component1, service component1 (MySQL) component name: mysql-component1. After the port exposure is configured for MySQL, the platform automatically generates an environment variable MySQL-component1-addr shared in the application and binds a call address link1 exposed by MySQL. The component1 can access the service component1 in the configuration by using the form of $ { mysql-component1-addr } environment variable, when the application is shared or copied, the newly deployed application also generates unique component names in the two applications, namely user-component1 and mysql-component1, and the exposed address of the service component1 is bound to the shared environment variable mysql-component1-addr in the application although the address is not link1 any more, so that the component1 can access the exposed address of the service component1 through the form of the environment variable.
S14, acquiring the created business component of the target application, and configuring the access of the business component to the service component according to the shared environment variable.
The service components are components configured according to different service requirements, are usually application packages or mirror images constructed by codes, and can also be constructed into products by source codes through pipeline definition.
In this embodiment, the target application may be formed by a plurality of components to support a scenario where a plurality of service modules together form an application. Wherein, for a single application, one application is one component; for micro-service applications, one component corresponds to one micro-service. Corresponding components are created under the application and are the smallest unit of service deployment.
S15, configuring additional function information of the target application.
In this embodiment, the configuring the additional function information of the target application includes:
configuring a log acquisition function of the target application, wherein the log acquisition function is used for acquiring an operation log of the target application according to configured acquisition rules;
and configuring the checking function of the target application, wherein the checking function is used for checking the return code of the configuration interface at intervals of preset time and determining whether the working state of the configuration interface is normal or not according to the return code.
Wherein, the collection rule can comprise collection time, sampling points and the like.
The preset time interval can be configured according to actual requirements, for example, 5 minutes.
Wherein the form and properties of the return code may be different depending on the type of interface. For example: for an HTTP (Hyper Text Transfer Protocol ) interface, when the return code is 200, the interface is determined to be working properly.
Through the above embodiment, the additional functions of the application are configured while the application is deployed, so as to further perfect the application.
S16, deploying the target application.
In this embodiment, the deploying the target application includes:
and converting the configuration file format of the target application into the configuration file format of the Kubernetes, and deploying the target application based on the Kubernetes cluster.
In the above embodiment, the user configuration of the target application is finally converted into the configuration definition of Kubernetes, and the application is deployed through the Kubernetes cluster, so that the quick release and sharing of the application are realized based on the characteristics of the container technology and the cloud application, and the delivery cost of the application is simplified.
In this embodiment, after the target application is deployed, the method further includes:
When a replication or sharing instruction for the target application is received, a configuration file of the target application is derived;
deploying a new application according to the exported configuration file, and taking the new application as a copy application or a sharing application of the target application;
and the service component of the new application accesses the service component of the new application according to the shared environment variable in the exported configuration file.
In the embodiment, when the application needs to be shared, the user configuration is only needed to be exported, the configuration is generated in the same way, deployment can be completed without one-step reconfiguration, deployment efficiency is effectively improved, meanwhile, access of the service component is realized by combining the automatically generated shared environment variable in the application, delivery cost of the application is simplified, and further rapid replication or sharing of the application on the cloud can be realized.
In this embodiment, in the whole application deployment process, a corresponding construction pipeline may also be configured, and the configuration is simplified through a template. For example: for some default configurations of Java, it may be performed as a template, with only a portion of the personalized data being changed.
According to the technical scheme, on one hand, the service component and the service component can be abstracted on the basis of application, and middleware on which the target application depends is deployed simultaneously when the target application is deployed, so that the overall deployment and unified management of the target application are realized; on the other hand, the method and the device can automatically generate the shared environment variable in the application, and configure the access of the service component to the service component according to the shared environment variable so as to solve the problem that the related address needs to be reconfigured during sharing delivery.
FIG. 3 is a functional block diagram of a preferred embodiment of the application deployment apparatus of the present invention. The application deployment device 11 includes a deployment unit 110, a configuration unit 111, a generation unit 112, and a binding unit 113. The module/unit referred to in the present invention refers to a series of computer program segments, which are stored in a memory, capable of being executed by a processor and of performing a fixed function. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The deployment unit 110 is configured to obtain a target application created on a cloud platform, and deploy a service component of the target application.
In this embodiment, the entire application deployment process may be based on a platform providing corresponding DevOps (Development & Operations) services, i.e., the cloud platform. The Development (Development) and operation (Operations) can be integrated through the DevOps service, and part of operation and maintenance work can be completed through tool-assisted Development, so that the cost is reduced.
The target application is an empty application at the initial creation, and user application software for users is finally formed after cloud deployment is realized through various subsequent configurations.
Wherein, the service component is a middleware needed in application development, and the service component can include, but is not limited to, one or more of the following combinations: mySQL, mongoDB, kafka, nacos, etc.
In this embodiment, a deployment template for middleware may be provided and support for deploying proprietary service components for applications, or existing service components may be bound.
Specifically, the deployment unit 110 deploys service components of the target application including:
displaying at least one middleware on a configuration interface;
when any middleware in the at least one middleware is received to be selected, determining the selected middleware as the service component;
the service component is deployed.
Wherein the configuration interface may be an interface for interaction with a user. Specifically, various middleware such as MySQL, mongoDB, kafka, nacos is displayed on the configuration interface for selection by the user.
Through the embodiment, the middleware is deployed simultaneously when the application is deployed, so that the problems of overall deployment and unified management of the application and the dependent middleware are solved.
The configuration unit 111 is configured to configure component information and an exposed port of the service component.
Wherein the component information may include, but is not limited to, one or more of the following:
code instrumentation, code compilation scripts, deployment scripts, resource usage, application packages, images, git source code, and the like.
Wherein access to the service component is enabled through the exposed port.
Specifically, the component information and the exposed port can be configured according to actual use requirements of the application.
The generating unit 112 is configured to generate an access connection of the service component according to the exposed port, and generate a shared environment variable of the service component in the target application according to the component information.
It will be appreciated that the exposed port is exposed to the Kubernetes container and cannot be accessed by the outside world, and therefore, in order for the outside world to use the exposed port, it is also necessary to map the exposed port to the public network to finally form the access connection.
Wherein the Kubernetes is an open source for managing containerized applications on multiple hosts in a cloud platform.
Specifically, the generating unit 112 generates the access connection of the service component according to the exposed port includes:
The access connection is obtained by mapping the exposed port from the Kubernetes container to the public network using a load balancing server (Server Load Balancing, SLB).
In this embodiment, the generating unit 112 generates the shared environment variable of the service component in the target application according to the component information, including:
acquiring the component name of the service component from the component information;
acquiring a preset field;
and combining the component name with the preset field to obtain the shared environment variable.
For example: and after the port is configured for MySQL, combining the component name with the preset field to automatically generate a shared environment variable MySQL-component1-addr in the application.
The binding unit 113 is configured to bind the access connection and the shared environment variable.
In general, assuming that the component1 (service component) needs to access the component 2 (MySQL), an exposed port of the component 2 is configured, and after the deployment, the platform forms an access address link for the component 2, at this time, we need to modify the code configuration of the component1, modify the address of the connection MySQL into link, and after deployment, the component1 can access the component 2. In the above scenario, when the application is shared or replicated, since the exposed address of the newly deployed component in the new application is no longer link, the code needs to be modified again to configure the associated component, and the application cannot be shared quickly.
In order to solve the above problem, the present embodiment can configure the access of the service component to the service component according to the shared environment variable by binding the access connection and the shared environment variable, so as to solve the problem that the related address needs to be reconfigured during the sharing delivery.
For example: after each component is created, a unique component name in the application is generated, as shown in fig. 2, and the component name of the service component1 is: user-component1, service component1 (MySQL) component name: mysql-component1. After the port exposure is configured for MySQL, the platform automatically generates an environment variable MySQL-component1-addr shared in the application and binds a call address link1 exposed by MySQL. The component1 can access the service component1 in the configuration by using the form of $ { mysql-component1-addr } environment variable, when the application is shared or copied, the newly deployed application also generates unique component names in the two applications, namely user-component1 and mysql-component1, and the exposed address of the service component1 is bound to the shared environment variable mysql-component1-addr in the application although the address is not link1 any more, so that the component1 can access the exposed address of the service component1 through the form of the environment variable.
The configuration unit 111 is further configured to obtain a service component of the created target application, and configure access of the service component to the service component according to the shared environment variable.
The service components are components configured according to different service requirements, are usually application packages or mirror images constructed by codes, and can also be constructed into products by source codes through pipeline definition.
In this embodiment, the target application may be formed by a plurality of components to support a scenario where a plurality of service modules together form an application. Wherein, for a single application, one application is one component; for micro-service applications, one component corresponds to one micro-service. Corresponding components are created under the application and are the smallest unit of service deployment.
The configuration unit 111 is further configured to configure additional function information of the target application.
In this embodiment, the configuration unit 111 configures additional function information of the target application including:
configuring a log acquisition function of the target application, wherein the log acquisition function is used for acquiring an operation log of the target application according to configured acquisition rules;
And configuring the checking function of the target application, wherein the checking function is used for checking the return code of the configuration interface at intervals of preset time and determining whether the working state of the configuration interface is normal or not according to the return code.
Wherein, the collection rule can comprise collection time, sampling points and the like.
The preset time interval can be configured according to actual requirements, for example, 5 minutes.
Wherein the form and properties of the return code may be different depending on the type of interface. For example: for an HTTP (Hyper Text Transfer Protocol ) interface, when the return code is 200, the interface is determined to be working properly.
Through the above embodiment, the additional functions of the application are configured while the application is deployed, so as to further perfect the application.
The deployment unit 110 is further configured to deploy the target application.
In this embodiment, the deploying unit 110 deploys the target application including:
and converting the configuration file format of the target application into the configuration file format of the Kubernetes, and deploying the target application based on the Kubernetes cluster.
In the above embodiment, the user configuration of the target application is finally converted into the configuration definition of Kubernetes, and the application is deployed through the Kubernetes cluster, so that the quick release and sharing of the application are realized based on the characteristics of the container technology and the cloud application, and the delivery cost of the application is simplified.
In this embodiment, after the target application is deployed, when a copy or share instruction for the target application is received, a configuration file of the target application is derived;
deploying a new application according to the exported configuration file, and taking the new application as a copy application or a sharing application of the target application;
and the service component of the new application accesses the service component of the new application according to the shared environment variable in the exported configuration file.
In the embodiment, when the application needs to be shared, the user configuration is only needed to be exported, the configuration is generated in the same way, deployment can be completed without one-step reconfiguration, deployment efficiency is effectively improved, meanwhile, access of the service component is realized by combining the automatically generated shared environment variable in the application, delivery cost of the application is simplified, and further rapid replication or sharing of the application on the cloud can be realized.
In this embodiment, in the whole application deployment process, a corresponding construction pipeline may also be configured, and the configuration is simplified through a template. For example: for some default configurations of Java, it may be performed as a template, with only a portion of the personalized data being changed.
According to the technical scheme, on one hand, the service component and the service component can be abstracted on the basis of application, and middleware on which the target application depends is deployed simultaneously when the target application is deployed, so that the overall deployment and unified management of the target application are realized; on the other hand, the method and the device can automatically generate the shared environment variable in the application, and configure the access of the service component to the service component according to the shared environment variable so as to solve the problem that the related address needs to be reconfigured during sharing delivery.
FIG. 4 is a schematic diagram of a computer device implementing a preferred embodiment of the application deployment method of the present invention.
The computer device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program, such as an application deployment program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation of the computer device 1, the computer device 1 may be a bus type structure, a star type structure, the computer device 1 may further comprise more or less other hardware or software than illustrated, or a different arrangement of components, for example, the computer device 1 may further comprise an input-output device, a network access device, etc.
It should be noted that the computer device 1 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
The memory 12 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 may in some embodiments be an internal storage unit of the computer device 1, such as a removable hard disk of the computer device 1. The memory 12 may in other embodiments also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 12 may be used not only for storing application software installed on the computer device 1 and various types of data, such as code of an application deployment program, but also for temporarily storing data that has been output or is to be output.
The processor 13 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like. The processor 13 is a Control Unit (Control Unit) of the computer device 1, connects the respective components of the entire computer device 1 using various interfaces and lines, executes programs or modules stored in the memory 12 (for example, executes an application deployment program, etc.), and invokes data stored in the memory 12 to perform various functions of the computer device 1 and process data.
The processor 13 executes the operating system of the computer device 1 and various types of applications installed. The processor 13 executes the application program to implement the steps of the various application deployment method embodiments described above, such as the steps shown in fig. 1.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program in the computer device 1. For example, the computer program may be divided into a deployment unit 110, a configuration unit 111, a generation unit 112, a binding unit 113.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to execute portions of the application deployment method according to the embodiments of the present invention.
The modules/units integrated in the computer device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on this understanding, the present invention may also be implemented by a computer program for instructing a relevant hardware device to implement all or part of the procedures of the above-mentioned embodiment method, where the computer program may be stored in a computer readable storage medium and the computer program may be executed by a processor to implement the steps of each of the above-mentioned method embodiments.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory, or the like.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one straight line is shown in fig. 4, but not only one bus or one type of bus. The bus is arranged to enable a connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the computer device 1 may further comprise a power source (such as a battery) for powering the various components, preferably the power source may be logically connected to the at least one processor 13 via a power management means, whereby the functions of charge management, discharge management, and power consumption management are achieved by the power management means. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The computer device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described in detail herein.
Further, the computer device 1 may also comprise a network interface, optionally comprising a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the computer device 1 and other computer devices.
The computer device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the computer device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
Fig. 4 shows only a computer device 1 with components 12-13, it will be understood by those skilled in the art that the structure shown in fig. 4 is not limiting of the computer device 1 and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In connection with fig. 1, the memory 12 in the computer device 1 stores a plurality of instructions to implement an application deployment method, the processor 13 being executable to implement:
acquiring a target application created on a cloud platform, and deploying a service component of the target application;
configuring component information and an exposed port of the service component;
generating access connection of the service component according to the exposed port, and generating a shared environment variable of the service component in the target application according to the component information;
binding the access connection with the shared environment variable;
acquiring a service component of the created target application, and configuring access of the service component to the service component according to the shared environment variable;
Configuring additional function information of the target application;
and deploying the target application.
Specifically, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
The data in this case were obtained legally.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The invention is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. The units or means stated in the invention may also be implemented by one unit or means, either by software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. An application deployment method, characterized in that the application deployment method comprises:
acquiring a target application created on a cloud platform, and deploying a service component of the target application;
configuring component information and an exposed port of the service component;
generating access connection of the service component according to the exposed port, and generating a shared environment variable of the service component in the target application according to the component information;
binding the access connection with the shared environment variable;
Acquiring a service component of the created target application, and configuring access of the service component to the service component according to the shared environment variable;
configuring additional function information of the target application;
and deploying the target application.
2. The application deployment method of claim 1, wherein the deploying the service component of the target application comprises:
displaying at least one middleware on a configuration interface;
when any middleware in the at least one middleware is received to be selected, determining the selected middleware as the service component;
the service component is deployed.
3. The application deployment method of claim 1 wherein the generating an access connection for the service component from the exposed port comprises:
and mapping the exposed port from the Kubernetes container to the public network by using a load balancing server to obtain the access connection.
4. The application deployment method of claim 1 wherein the generating the shared environment variable of the service component within the target application from the component information comprises:
acquiring the component name of the service component from the component information;
Acquiring a preset field;
and combining the component name with the preset field to obtain the shared environment variable.
5. The application deployment method of claim 1, wherein the configuring additional function information of the target application comprises:
configuring a log acquisition function of the target application, wherein the log acquisition function is used for acquiring an operation log of the target application according to configured acquisition rules;
and configuring the checking function of the target application, wherein the checking function is used for checking the return code of the configuration interface at intervals of preset time and determining whether the working state of the configuration interface is normal or not according to the return code.
6. The application deployment method of claim 1, wherein the deploying the target application comprises:
and converting the configuration file format of the target application into the configuration file format of the Kubernetes, and deploying the target application based on the Kubernetes cluster.
7. The application deployment method of claim 1, wherein after deploying the target application, the method further comprises:
when a replication or sharing instruction for the target application is received, a configuration file of the target application is derived;
Deploying a new application according to the exported configuration file, and taking the new application as a copy application or a sharing application of the target application;
and the service component of the new application accesses the service component of the new application according to the shared environment variable in the exported configuration file.
8. An application deployment apparatus, the application deployment apparatus comprising:
the deployment unit is used for acquiring a target application created on the cloud platform and deploying a service component of the target application;
the configuration unit is used for configuring the component information and the exposed port of the service component;
the generation unit is used for generating access connection of the service component according to the exposure port and generating a shared environment variable of the service component in the target application according to the component information;
a binding unit, configured to bind the access connection and the shared environment variable;
the configuration unit is further used for acquiring the created service component of the target application and configuring the access of the service component to the service component according to the shared environment variable;
the configuration unit is also used for configuring additional function information of the target application;
The deployment unit is further configured to deploy the target application.
9. A computer device, the computer device comprising:
a memory storing at least one instruction;
a processor executing instructions stored in the memory to implement the application deployment method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized by: the computer-readable storage medium having stored therein at least one instruction for execution by a processor in a computer device to implement the application deployment method of any of claims 1 to 7.
CN202310488498.XA 2023-04-28 2023-04-28 Application deployment method, device, equipment and medium Pending CN116521185A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310488498.XA CN116521185A (en) 2023-04-28 2023-04-28 Application deployment method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310488498.XA CN116521185A (en) 2023-04-28 2023-04-28 Application deployment method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116521185A true CN116521185A (en) 2023-08-01

Family

ID=87389818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310488498.XA Pending CN116521185A (en) 2023-04-28 2023-04-28 Application deployment method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116521185A (en)

Similar Documents

Publication Publication Date Title
US11093216B2 (en) Automatic discovery of microservices from monolithic applications
CN110851167B (en) Container environment updating method, device, equipment and storage medium
WO2015126409A1 (en) Migrating cloud resources
CN113704665B (en) Dynamic service release method and device, electronic equipment and storage medium
CN103297493A (en) Partition aware quality of service feature
CN112085217A (en) Method, device, equipment and computer medium for deploying artificial intelligence service
CN113806434B (en) Big data processing method, device, equipment and medium
WO2023226197A1 (en) Cloud native storage method and apparatus based on kubernetes, and device and medium
CN112256989A (en) Page loading method and device based on offline package, terminal equipment and storage medium
CN114341847A (en) Correspondence of external operations on containers to mutation events
CN115314570B (en) Data issuing method, device, equipment and medium based on protocol development framework
CN113923218B (en) Distributed deployment method, device, equipment and medium for coding and decoding plug-in
US20180107723A1 (en) Content oriented analysis of dumps
CN116823437A (en) Access method, device, equipment and medium based on configured wind control strategy
CN111651158A (en) Form page generation method, device, terminal and storage medium
CN114185502B (en) Log printing method, device, equipment and medium based on production line environment
CN116521185A (en) Application deployment method, device, equipment and medium
CN113286014B (en) Dynamic configuration method and device of basic domain name and related equipment
CN114356379A (en) Backup-based service upgrading method, device, equipment and storage medium
CN114020414A (en) Symbiotic method and device of Android system and bottom layer Linux, electronic equipment and storage medium
CN116414366B (en) Middleware interface generation method, device, equipment and medium
CN115934576B (en) Test case generation method, device, equipment and medium in transaction scene
CN114860314B (en) Deployment upgrading method, device, equipment and medium based on database compatibility
CN116306591B (en) Flow form generation method, device, equipment and medium
CN116414699B (en) Operation and maintenance testing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination