CN113986269A - Containerized application deployment method and device, electronic equipment and storage medium - Google Patents

Containerized application deployment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113986269A
CN113986269A CN202111293227.6A CN202111293227A CN113986269A CN 113986269 A CN113986269 A CN 113986269A CN 202111293227 A CN202111293227 A CN 202111293227A CN 113986269 A CN113986269 A CN 113986269A
Authority
CN
China
Prior art keywords
application
component
containerized
server
configuration information
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
CN202111293227.6A
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.)
Beijing Ruian Technology Co Ltd
Original Assignee
Beijing Ruian 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 Beijing Ruian Technology Co Ltd filed Critical Beijing Ruian Technology Co Ltd
Priority to CN202111293227.6A priority Critical patent/CN113986269A/en
Publication of CN113986269A publication Critical patent/CN113986269A/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
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The invention discloses a containerized application deployment method and device, electronic equipment and a storage medium. The method comprises the following steps: executing the application installation script, and acquiring application configuration information and component configuration information of the containerized application from the configuration file; installing a container operation environment according to the application configuration information, and installing containerized applications in the container operation environment; and installing the components for supporting various functions of the containerized application according to the component configuration information. The technical scheme of the invention can be used for installing and deploying a plurality of servers and a plurality of containerized applications, and the installation and deployment method is simple and easy to learn, is quick to enter, and greatly improves the deployment efficiency of the servers and the containerized applications.

Description

Containerized application deployment method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of computer software and application, in particular to a containerized application deployment method, a containerized application deployment device, electronic equipment and a medium.
Background
With the continuous development of virtualization technology, the virtual container environment can package our applications into virtual containers, and then release and apply the applications to different operating systems, so that the installation and deployment work of the applications is simplified, and the virtual container environment is now widely used in various industries.
Docker is used as a popular virtual container environment at present, installation and deployment methods are various, for example, installation and deployment of Docker containerized application executed through a Docker command and containerized application on a plurality of hosts installed and deployed through Kubernets are simple in operation and fast in entry, but only can be deployed on a single server through single application, and installation and deployment need to be carried out repeatedly according to a plurality of servers and a plurality of containerized applications, so that installation and deployment time is greatly prolonged; the latter makes the application of deployment containerization simple and efficient, but increases the learning time cost of operation and maintenance personnel, improves the operation and maintenance difficulty, and increases the overhead of hardware servers.
At present, the development of the virtual container environment is limited by the installation and deployment operations which cannot combine the automatic installation and deployment of multiple servers and multiple containerized applications and are simple and easy to learn.
Disclosure of Invention
The invention provides a containerized application deployment method, a device, an electronic device and a medium, which can be used for installing and deploying a plurality of servers and a plurality of containerized applications, and the installation and deployment method is simple and easy to learn and quick to enter, so that the deployment efficiency of the servers and the containerized applications is greatly improved.
In a first aspect, an embodiment of the present invention provides a containerized application deployment method, including:
executing the application installation script, and acquiring application configuration information and component configuration information of the containerized application from the configuration file;
installing a container operation environment according to the application configuration information, and installing containerized applications in the container operation environment;
and installing the components for supporting various functions of the containerized application according to the component configuration information.
In a second aspect, an embodiment of the present invention further provides a containerized application deployment apparatus, where the apparatus includes:
the configuration information acquisition module is used for executing the application installation script and acquiring the application configuration information and the component configuration information of the containerized application from the configuration file;
the application installation module is used for installing a container operation environment according to the application configuration information and installing containerized application in the container operation environment;
and the component installation module is used for installing components for supporting various functions of the containerized application according to the component configuration information.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the containerized application deployment method according to any one of the embodiments of the present invention.
In a fourth aspect, the embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the containerized application deployment method according to any one of the embodiments of the present invention.
According to the technical scheme, application configuration information and component configuration information of the containerized application are obtained from the configuration file by executing the application installation script; installing a container operation environment according to the application configuration information, and installing containerized applications in the container operation environment; and installing the components for supporting various functions of the containerized application according to the component configuration information. According to the technical scheme, the disposition of the containerized application is realized through the designed script and the configuration file, the installation and disposition can be performed on a plurality of servers and a plurality of containerized applications, the installation and disposition method is simple and easy to learn, the entry is fast, and the disposition efficiency of the servers and the containerized applications is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a containerized application deployment method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for deploying a containerized application according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a containerized application deployment apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Fig. 1 is a flowchart of a containerized application deployment method according to an embodiment of the present invention, where the present embodiment may be applied to a case where a plurality of servers and a plurality of containerized applications are installed and deployed, and the method may be executed by a containerized application deployment apparatus according to an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and in a specific embodiment, the apparatus may be integrated in an electronic device, such as a computer. In the following, the device is integrated in an electronic device as an example, and as shown in fig. 1, the method specifically includes the following steps:
s101, executing the application installation script, and acquiring the application configuration information and the component configuration information of the containerized application from the configuration file.
The application installation script refers to an executable file which is written by a specific descriptive language according to a certain format and is related to application installation, specifically, the descriptive language may be Xshell, Pycharm, Django, and the like, which is not limited in the embodiment of the present invention.
Specifically, the configuration file includes configuration information of the containerized application, such as a containerized application name, a containerized application installation package name, a storage location of the containerized application installation package, and the like, and component configuration information, such as a component installation package name, a storage location of the component installation package, a container restart policy, a component mapping port, and the like, which is not limited in the embodiment of the present invention.
S102, installing a container running environment according to the application configuration information, and installing a containerized application in the container running environment.
The container operating environment is software responsible for operating the container, and in the present invention, the container operating environment is a basis for containerized application installation and application, which is not limited in the embodiments of the present invention.
The configuration information of the containerized application includes a name of the containerized application, a name of a containerized application installation package, a storage location of the containerized application installation package, and the like, which is not limited in the embodiment of the present invention.
Specifically, for a plurality of servers such as a local server and a remote server, a container operating environment is installed in the server, and then, three servers, namely a local server a and remote servers B and C, are installed to install containerized applications required to be used by the servers, wherein the containerized applications to be installed on the server a are a, B and C, the containerized applications to be installed on the server B are B, C and d, and the containerized applications to be installed on the server C are a, C and d. The installation and deployment sequence can be that the server A is deployed with the container operation environment and the containerized application, the server B is deployed with the container operation environment and the containerized application, and the server C is deployed with the container operation environment and the containerized application; alternatively, the server A, B and C may be deployed with the container operating environment first, and then the server A, B and C may be deployed with the required containerized applications, which is not limited in this embodiment of the present invention.
Specifically, the installation process of the containerized application includes: determining a containerized application to be deployed according to the containerized application name in the configuration information; determining a server to be installed of the containerized application according to the server address in the configuration information; and acquiring an installation package of the containerized application according to the name of the containerized application installation package and the storage position of the containerized application installation package, and installing the containerized application on the server to be installed.
Illustratively, there are three servers, local server a, and remote servers B and C, where the containerized applications to be installed on server a are a, B and C, the containerized applications to be installed on server B are B, C and d, and the containerized applications to be installed on server C are a, C and d. The installation and deployment sequence is that the container operation environment and the containerized application are deployed for the server A, then the container operation environment and the containerized application are deployed for the server B, and finally the container operation environment and the containerized application are deployed for the server C, so that the containerized operation environment is installed for the server A firstly, and then the containerized applications a, B and C are installed; secondly, a containerized operating environment is installed in the server B, and then containerized applications B, c and d are installed; finally, a containerized runtime environment is installed for server C, followed by containerized applications a, C, and d.
In this embodiment, the server is defaulted to not install the container operating environment and any containerized application during first deployment, and when subsequent deployment is performed, the container operating environment and the containerized application inside the server need to be detected, if the corresponding container operating environment and the corresponding containerized application are not installed in the server, installation and deployment of the container operating environment and the containerized application are performed, and if the corresponding container operating environment and the corresponding containerized application are installed in the server, an installation prompt is given, and the installed container operating environment and the installed containerized application do not need to be installed repeatedly.
S103, installing components for supporting various functions of the containerized application according to the component configuration information.
The component configuration information includes a component name, a component installation package name, a storage location of the component installation package, a container restart policy, a component mapping port, and the like, which is not limited in the embodiment of the present invention.
Specifically, the installation process of the assembly comprises: determining a component to be deployed according to the component name in the configuration information; determining a server to be installed of the component according to the server address in the configuration information; determining an external access port of the component according to the component mapping port in the configuration information; and acquiring an installation package of the component according to the name of the component installation package and the storage position of the component installation package, and installing the component on the server to be installed.
Specifically, for a plurality of servers such as a local server and a remote server, two deployment sequences are provided for components required to be installed on each server, three servers are set, the local server a, the remote servers B and C, and the servers A, B and C are all provided with components a, B, C and d, and the installation deployment sequence can be that all the components are deployed for the server a first, and then the components are deployed for the servers B and C in sequence; alternatively, the component a may be deployed to the server A, B and C, the component b may be deployed to the server A, B and C, the component C may be deployed to the server A, B, and the component d may be deployed to the server A, B and C, which is not limited in this embodiment of the present invention.
Illustratively, there are three servers, a local server a, remote servers B and C, and components a, B, C and d to be installed on the servers A, B and C, and the installation and deployment sequence is that the required components are deployed for the server a first, then the components are deployed for the server B, and finally the components are deployed for the server C, so that the components a, B, C and d are installed for the server a first; secondly, components a, B, c and d are installed for server B; finally, components a, b, C, and d are installed for server C.
In this embodiment, the server is not provided with any functional component by default during first deployment, the component is directly installed, when subsequent deployment is performed, the component inside the server needs to be detected, if the corresponding component is not installed in the server, installation and deployment of the component are performed, if the corresponding component is installed in the server, an installation prompt is given, the installed component does not need to be repeatedly installed, and waste of resources is avoided.
According to the technical scheme of the embodiment, application configuration information and component configuration information of the containerized application are acquired from the configuration file by executing the application installation script; installing a container operation environment according to the application configuration information, and installing containerized applications in the container operation environment; and installing the components for supporting various functions of the containerized application according to the component configuration information. The technical scheme of the invention can be used for installing and deploying a plurality of servers and a plurality of containerized applications, and the installation and deployment method is simple and easy to learn and quick to enter, thereby greatly improving the deployment efficiency of the servers and the containerized applications.
Fig. 2 is a flowchart of a containerized application deployment method according to an embodiment of the present invention, where the present embodiment may be applied to a case where multiple servers and multiple containerized applications are installed and deployed, and the method may be executed by a containerized application deployment device according to an embodiment of the present invention, where the device may be implemented in a software and/or hardware manner, as shown in fig. 2, the method specifically includes the following steps:
s201, executing the application installation script, and acquiring the application configuration information and the component configuration information of the containerized application from the configuration file.
In this embodiment, the application installation script may also be an executable file about application installation written in a certain format using descriptive languages such as Xshell, Pycharm, and Django, where the configuration file includes configuration information of a containerized application such as a containerized application name, a containerized application installation package name, a storage location of the containerized application installation package, and component configuration information such as a component name, a component installation package name, a storage location of the component installation package, a container restart policy, and a component mapping port.
S202, determining a server to be installed in the container operation environment according to the server address in the application configuration information, and installing the container operation environment on the server to be installed.
The address of the server is attribute information of the server, and corresponds to the server one by one.
Specifically, if the address of the local server a is 192.168.0.101, the address of the remote server B is 192.168.0.102, and the address of the remote server C is 192.168.0.103, the server to be installed in the container operating environment can be determined by identifying the server address in the configuration information.
Illustratively, the address of the local server a is 192.168.0.101, the address of the remote server B is 192.168.0.102, the address of the remote server C is 192.168.0.103, if the server address in the configuration information of the container operating environment is 192.168.0.102, it can be determined through address matching that the server to be installed in the container operating environment is the remote server B, and the container operating environment can be installed on the remote server B according to the installation package of the container operating environment and the information such as the storage location of the installation package.
In this embodiment, the default server does not install the container operating environment when deploying for the first time, and directly installs it, and when subsequently deploying, need detect the inside container operating environment of server, if do not install corresponding container operating environment in the server, then carry out the installation deployment of container operating environment, if install corresponding container operating environment in the server, then give the installation suggestion, need not carry out the reinstallation to the container operating environment who installs, reduced the waste of resource.
S203, installing the containerized application in the container running environment of the server to be installed according to the containerized application name, the containerized application installation package name and the storage position of the containerized application installation package in the application configuration information.
The containerized applications required by the installation of the servers have two installation and deployment sequences, three servers, namely a local server A and remote servers B and C are set, the containerized applications to be installed on the server A are a, B and C, the containerized applications to be installed on the server B are B, C and d, and the containerized applications to be installed on the server C are a, C and d. The installation and deployment sequence can be that firstly the server A is deployed with the containerized application, then the server B is deployed with the containerized application, and finally the server C is deployed with the containerized application; alternatively, a containerized application may be sequentially deployed to the servers A, B and C, which is not limited by the embodiment of the present invention.
Specifically, the installation process of the containerized application includes: determining a containerized application to be deployed according to the containerized application name in the configuration information; determining a server to be installed of the containerized application according to the server address in the configuration information; and acquiring an installation package of the containerized application according to the name of the containerized application installation package and the storage position of the containerized application installation package, and installing the containerized application on the server to be installed.
Illustratively, there are three servers, local server a, and remote servers B and C, where the containerized applications to be installed on server a are a, B and C, the containerized applications to be installed on server B are B, C and d, and the containerized applications to be installed on server C are a, C and d. The installation and deployment sequence is that firstly, the server A is deployed with the containerized application, then the server B is deployed with the containerized application, and finally the server C is deployed with the containerized application, so that firstly, the server A is installed with the containerized applications a, B and C; secondly, install containerized applications for server B as B, c, and d; finally, install containerized applications for server C are a, C, and d.
In this embodiment, when the server is first deployed, it is determined that no containerized application is installed in the server, the containerized application to be installed is directly installed, when the server is subsequently deployed, the containerized application in the server needs to be detected, if the corresponding containerized application is not installed in the server, the installation and deployment of the containerized application are performed, if the corresponding containerized application is installed in the server, an installation prompt is given, the installed containerized application does not need to be repeatedly installed, and waste of resources is reduced.
Optionally, after installing the containerized application in the container running environment of the server to be installed according to the containerized application name, the containerized application installation package name, and the storage location of the containerized application installation package in the application configuration information, the method further includes: and counting the installation information of the containerized application on the server to be installed and displaying the installation information.
Specifically, the installation information of the containerized application on the server to be installed is counted and displayed so as to know the installation condition of the containerized application in real time and visually, so that corresponding adjustment and corresponding measures can be made in time, the efficiency can be improved to a great extent, and unnecessary time consumption and resource waste are reduced.
Optionally, the counting the installation information of the containerized application on the server to be installed includes: counting the names and the number of containerized applications to be installed on a server to be installed; counting the names and the number of the containerized applications successfully installed on the server to be installed; and counting the names and the number of the containerized applications which fail to be installed on the server to be installed and the reason of the failure in installing the containerized applications.
Specifically, counting the reasons for failure in installing the containerized application can facilitate timely making corresponding adjustment and countermeasures, for example, the reason for failure is that the memory allocation is insufficient, 512M is allocated, but 780M is actually needed, the memory is reallocated and adjusted to 1024M, if relevant information is not counted and displayed, a conclusion cannot be intuitively drawn and countermeasures are taken, a code may need to be checked, and consumption in labor and time costs is increased.
Illustratively, the number of containerized applications to be installed on the server to be installed is 5, the names of the containerized applications are A, B, C, D and E respectively, the number of containerized applications successfully installed on the server to be installed is 4, the names of the containerized applications are A, B, D and E respectively, the number of containerized applications failed to be installed on the server to be installed is 1, the name of the containerized application is C, the reason for the failure in installing the containerized applications is that the memory is insufficient, the memory is reallocated, the memory is increased, and the operation of installing the containerized application C is executed again and the installation condition of the containerized application C is counted.
And S204, determining a server to be installed of the component according to the server address in the component configuration information.
The address of the server is attribute information of the server, and corresponds to the server one by one.
Specifically, if the address of the local server a is 192.168.0.101, the address of the remote server B is 192.168.0.102, and the address of the remote server C is 192.168.0.103, the server to be installed of the component can be determined by identifying the server address in the component configuration information.
Illustratively, the address of the local server a is 192.168.0.101, the address of the remote server B is 192.168.0.102, the address of the remote server C is 192.168.0.103, if the server address in the component configuration information is 192.168.0.102, it can be determined that the server to be installed of the component is the remote server B through address matching, and the component can be installed on the remote server B according to the information such as the installation package and the storage location of the installation package of the component.
S205, according to the component name, the component installation package storage position, the container restarting strategy and the component mapping port in the component configuration information, at least one of a data storage function component, an application function component, a platform function component and a common basic module function component is installed on the server to be installed.
The method comprises the steps that for a plurality of servers such as a local server and a remote server, two deployment sequences are provided for components required to be installed on each server, three servers are set, wherein the local server A, the remote servers B and C and the components a, B, C and d to be installed on the servers A, B and C, and the installation deployment sequences can be that all the components are deployed for the server A first and then the components are deployed for the server B and the server C in sequence; alternatively, the component a may be deployed to the server A, B and C, the component b may be deployed to the server A, B and C, the component C may be deployed to the server A, B, and the component d may be deployed to the server A, B and C, which is not limited in this embodiment of the present invention.
Specifically, the installation process of the assembly comprises: determining a component to be deployed according to the component name in the configuration information; determining a server to be installed of the component according to the server address in the configuration information; determining an external access port of the component according to the component mapping port in the configuration information; and acquiring an installation package of the component according to the name of the component installation package and the storage position of the component installation package, and installing the component on the server to be installed.
Illustratively, there are three servers, a local server a, remote servers B and C, and components a, B, C and d to be installed on the servers A, B and C, and the installation and deployment sequence is that the required components are deployed for the server a first, then the components are deployed for the server B, and finally the components are deployed for the server C, so that the components a, B, C and d are installed for the server a first; secondly, components a, B, c and d are installed for server B; finally, components a, b, C, and d are installed for server C.
In this embodiment, the server is not provided with any functional component by default during first deployment, the component is directly installed, when subsequent deployment is performed, the component inside the server needs to be detected, if the corresponding component is not installed in the server, installation and deployment of the component are performed, if the corresponding component is installed in the server, an installation prompt is given, the installed component does not need to be repeatedly installed, and waste of resources is avoided.
Optionally, installing at least one of a data storage function component, an application function component, a platform function component, and a common basic module function component on the to-be-installed server according to the component name, the component installation package name, the storage location of the component installation package, and the component mapping port in the component configuration information, including steps a1-a 4:
step A1: installing a data storage type functional component on a server to be installed according to a data storage component name, a data storage component installation package storage position, an environment variable parameter, memory allocation, a file sharing path, a container restarting strategy and a data storage component mapping port in component configuration information;
step A2: installing an application function component on a server to be installed according to the application component name, the application component installation package storage position, the container restarting strategy and the application component mapping port in the component configuration information;
step A3: installing a platform type functional component on a server to be installed according to a platform component name, a platform component installation package storage position, a container restarting strategy and a platform component mapping port in the component configuration information;
step A4: and installing the common basic module type functional component on the server to be installed according to the common basic module component name, the common basic module component installation package storage position, the container restarting strategy and the common basic module component mapping port in the component configuration information.
The data storage function component, the application function component, the platform function component and the common basic module function component are used for supporting containerized application.
Specifically, the component configuration information includes information such as a server to be installed of the component, an installation package name of the component, and an installation package storage path, and each functional component may be configured to the corresponding server according to the configuration information, which is not limited in the embodiment of the present invention.
Exemplarily, the name of the data storage component is a data component 1, the server to be installed is a local server a, the name of the data storage component installation package is an installation package 1, the storage location of the data storage component installation package is a location 1, the memory allocation is 512M, and the mapping port of the data storage component is a port 1, so that the data component 1 in the data storage class functional component can be installed on the server a according to the information of the installation package 1, the location 1, the 512M memory, the port 1, and the like; the name of the application functional component is an application component 2, the server to be installed is a remote server B, the name of the application functional component installation package is an installation package 2, the storage position of the application functional component installation package is a position 2, and the mapping port of the application functional component is a port 2, so that the application component 2 in the application functional component can be installed on the server B according to the information of the installation package 2, the position 2, the port 2 and the like; and similarly, the platform functional components and the common basic module functional components can be installed.
And S206, executing the application starting, restarting or uninstalling script, and starting, restarting or uninstalling the containerized application.
Specifically, executing an application start, restart, or uninstall script, and starting, restarting, or uninstalling a containerized application specifically includes: executing an application starting script, reading the application configuration information of the containerized application and a component mapping port, an environment variable parameter, a file sharing path and a container restarting strategy in the component configuration information, and starting the containerized application; executing the application restart script, reading the application configuration information of the containerized application and the containerized application name in the component configuration information, and restarting the containerized application; or executing the application unloading script, reading the containerized application name in the application configuration information and the component configuration information according to the containerized application, and unloading the containerized application.
The container restarting strategy comprises that the container is not restarted when the container exits, the container is restarted when the container exits abnormally, the container is restarted when the container exits, and the like, and can be selected according to specific requirements of specific situations.
Specifically, by executing the application starting, restarting or uninstalling script, the control of the multi-server multi-containerized application can be realized by correspondingly starting, restarting or uninstalling the containerized application, and the operation is simple.
For example, the script for starting, restarting or uninstalling the containerized application includes a server to be started, restarted or uninstalled the containerized application, and the containerized application to be started, restarted or uninstalled may be started, restarted or uninstalled on the corresponding server by executing the script.
Optionally, if the configuration information for starting the containerization script is provided with the dependent node, the application of the dependent node needs to be started preferentially, and the application of the dependent node is started continuously only after the dependent node is started.
Optionally, for the containerized application which is not to be restarted or unloaded, corresponding configuration information may be directly annotated in the configuration file, and no processing is performed on the annotated node information.
Optionally, after the containerized application is started, restarted or uninstalled, the method further includes: counting the names and the number of containerized applications needing to be started, restarted and unloaded; counting the names and the number of the containerized applications which are successfully started, restarted and unloaded; and counting the names and the number of the containerized applications which fail to start, restart and unload, and the reasons for the failures of the start, restart and unload of the containerized applications.
Specifically, counting the reasons for the failure in starting, restarting or uninstalling the containerized application may facilitate timely making corresponding adjustment and countermeasures, for example, if the related component for starting, restarting or uninstalling the containerized application is not successfully installed, the containerized application may be started, restarted or uninstalled again after the component is installed, and if the related information is not counted and displayed, a conclusion may not be intuitively drawn and countermeasures may be taken, and a code may need to be checked, which may increase consumption in labor and time costs.
Illustratively, the number of the containerized applications needing to be started, restarted or unloaded is 5, the names of the containerized applications are A, B, C, D and E respectively, the number of the containerized applications successfully started, restarted or unloaded is 4, the names of the containerized applications are A, B, D and E respectively, the number of the containerized applications failing to be started, restarted or unloaded is 1, the name of the containerized applications failing to be started, restarted or unloaded is C, the reason for the failure of starting, restarting or unloading the containerized applications is that the component a is lacked, and then the operation of starting, restarting or unloading the containerized application C is executed again and the installation condition of the containerized application C is counted.
According to the technical scheme of the embodiment, application configuration information and component configuration information of the containerized application are acquired from the configuration file by executing the application installation script; determining a server to be installed of the container operation environment according to the server address in the application configuration information, and installing the container operation environment on the server to be installed; installing the containerized application in a container operation environment of the server to be installed according to the containerized application name, the containerized application installation package name and the storage position of the containerized application installation package in the application configuration information; determining a server to be installed of the component according to the server address in the component configuration information; according to the component name, the component installation package storage position, the container restarting strategy and the component mapping port in the component configuration information, at least one of a data storage function component, an application function component, a platform function component and a common basic module function component is installed on a server to be installed; and executing the application starting, restarting or uninstalling script, and starting, restarting or uninstalling the containerized application. By the technical scheme, the installation and deployment method can be used for installing and deploying a plurality of servers and a plurality of containerized applications, the installation and deployment method is simple and easy to learn, the deployment efficiency of the servers and the containerized applications is improved to a great extent, the containerized applications can be started, restarted or unloaded by executing application starting, restarting or unloading scripts after the containerized applications are installed and deployed, the operation is simple, the efficiency is high, the starting, restarting or unloading information of the containerized applications can be counted after the containerized applications are started, restarted or unloaded, the corresponding scripts can be found and modified conveniently, and the system function is improved.
The containerized application deployment device provided by the embodiment of the invention can execute the containerized application deployment method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 3 is a schematic structural diagram of a containerized application deployment apparatus according to an embodiment, as shown in fig. 3, including: a configuration information acquisition module 301, an application installation module 302, and a component installation module 303.
The configuration information obtaining module 301 is configured to execute the application installation script, and obtain the application configuration information and the component configuration information of the containerized application from the configuration file.
The application installation module 302 is configured to install the container running environment according to the application configuration information, and install the containerized application in the container running environment.
A component installation module 303, configured to install components for supporting various functions of the containerized application according to the component configuration information.
In order to implement the containerized application deployment method in the foregoing embodiment, the containerized application deployment device provided in this embodiment is similar to the foregoing embodiment in implementation principle and technical effect, and is not described here again.
Optionally, the application installation module 302 is specifically configured to determine a to-be-installed server of the container operating environment according to the server address in the application configuration information, and install the container operating environment on the to-be-installed server; and installing the containerized application in the container running environment of the server to be installed according to the containerized application name, the containerized application installation package name and the storage position of the containerized application installation package in the application configuration information.
Optionally, the application installation module 302 is further configured to count installation information of the containerized application on the server to be installed and display the installation information.
Optionally, the application installation module 302 is specifically configured to count names and numbers of containerized applications that need to be installed on the server to be installed; counting the names and the number of the containerized applications successfully installed on the server to be installed; and counting the names and the number of the containerized applications which fail to be installed on the server to be installed and the reason of the failure in installing the containerized applications.
Optionally, the component installation module 303 is specifically configured to determine a to-be-installed server of the component according to the server address in the component configuration information; and installing at least one of a data storage function component, an application function component, a platform function component and a common basic module function component on the server to be installed according to the component name, the component installation package storage position, the container restart strategy and the component mapping port in the component configuration information.
Optionally, the component installation module 303 is specifically configured to install a data storage class functional component on the server to be installed according to the data storage component name, the data storage component installation package storage location, the environment variable parameter, the memory allocation, the file sharing path, the container restart policy, and the data storage component mapping port in the component configuration information; installing an application function component on a server to be installed according to the application component name, the application component installation package storage position, the container restarting strategy and the application component mapping port in the component configuration information; installing a platform type functional component on a server to be installed according to a platform component name, a platform component installation package storage position, a container restarting strategy and a platform component mapping port in the component configuration information; and installing the common basic module type functional component on the server to be installed according to the common basic module component name, the common basic module component installation package storage position, the container restarting strategy and the common basic module component mapping port in the component configuration information.
Optionally, the containerized application deployment apparatus further includes an application management module 304.
Optionally, the application management module 304 is configured to execute an application start script, read application configuration information of the containerized application and a component mapping port, an environment variable parameter, a file sharing path, and a container restart policy in the component configuration information, and start the containerized application; executing the application restart script, reading the application configuration information of the containerized application and the containerized application name in the component configuration information, and restarting the containerized application; or executing the application unloading script, reading the containerized application name in the application configuration information and the component configuration information according to the containerized application, and unloading the containerized application.
Optionally, the application management module 304 is further configured to count names and numbers of containerized applications that need to be started, restarted, and uninstalled; counting the names and the number of the containerized applications which are successfully started, restarted and unloaded; and counting the names and the number of the containerized applications which fail to start, restart and unload, and the reasons for the failures of the start, restart and unload of the containerized applications.
Fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 4 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 4, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. In the electronic device 12 of the present embodiment, the display 24 is not provided as a separate body but is embedded in the mirror surface, and when the display surface of the display 24 is not displayed, the display surface of the display 24 and the mirror surface are visually integrated. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown in FIG. 4, the network adapter 20 communicates with the other modules of the electronic device 12 via the bus 18. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing a containerized application deployment method provided by an embodiment of the present invention, the method including:
executing the application installation script, and acquiring application configuration information and component configuration information of the containerized application from the configuration file;
installing a container operation environment according to the application configuration information, and installing containerized applications in the container operation environment;
and installing the components for supporting various functions of the containerized application according to the component configuration information.
Embodiments of the present invention provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a containerized application deployment method provided in all embodiments of the present invention, where the method includes:
executing the application installation script, and acquiring application configuration information and component configuration information of the containerized application from the configuration file;
installing a container operation environment according to the application configuration information, and installing containerized applications in the container operation environment;
and installing the components for supporting various functions of the containerized application according to the component configuration information.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A containerized application deployment method, comprising:
executing the application installation script, and acquiring application configuration information and component configuration information of the containerized application from the configuration file;
installing a container running environment according to the application configuration information, and installing a containerized application in the container running environment;
installing components for supporting functions of the containerized application according to the component configuration information.
2. The method of claim 1, wherein installing a container runtime environment according to the application configuration information and installing a containerized application in the container runtime environment comprises:
determining a server to be installed in the container operation environment according to the server address in the application configuration information, and installing the container operation environment on the server to be installed;
and installing the containerized application in the container running environment of the server to be installed according to the containerized application name, the containerized application installation package name and the storage position of the containerized application installation package in the application configuration information.
3. The method according to claim 2, wherein after installing the containerized application in the container runtime environment of the server to be installed according to the containerized application name, the containerized application installation package name, and the containerized application installation package storage location in the application configuration information, the method further comprises:
and counting the installation information of the containerized application on the server to be installed and displaying the installation information.
4. The method according to claim 3, wherein the counting the installation information of the containerized application on the server to be installed comprises:
counting the names and the number of containerized applications needing to be installed on the server to be installed;
counting the names and the number of the containerized applications successfully installed on the server to be installed;
and counting the names and the number of the containerized applications which fail to be installed on the server to be installed and the reasons for the failures in installing the containerized applications.
5. The method of claim 1, wherein installing the component for supporting the functions of the containerized application according to the component configuration information comprises:
determining a server to be installed of the component according to the server address in the component configuration information;
and installing at least one of a data storage function component, an application function component, a platform function component and a common basic module function component on the server to be installed according to the component name, the component installation package storage position, the container restart strategy and the component mapping port in the component configuration information.
6. The method according to claim 5, wherein the installing at least one of a data storage class functional component, an application class functional component, a platform class functional component and a common basic module class functional component on the server to be installed according to a component name, a component installation package storage location and a component mapping port in the component configuration information comprises:
installing the data storage type functional component on the server to be installed according to the data storage component name, the data storage component installation package storage position, the environment variable parameter, the memory allocation, the file sharing path, the container restarting strategy and the data storage component mapping port in the component configuration information;
installing the application type functional component on the server to be installed according to the application component name, the application component installation package storage position, the container restarting strategy and the application component mapping port in the component configuration information;
installing the platform type functional component on the server to be installed according to the platform component name, the platform component installation package storage position, the container restarting strategy and the platform component mapping port in the component configuration information;
and installing the common basic module type functional component on the server to be installed according to the common basic module component name, the common basic module component installation package storage position, the container restarting strategy and the common basic module component mapping port in the component configuration information.
7. The method of claim 1, wherein after installing the component for supporting the functions of the containerized application according to the component configuration information, further comprising:
executing an application starting script, reading the application configuration information of the containerized application and a component mapping port, an environment variable parameter, a file sharing path and a container restarting strategy in the component configuration information, and starting the containerized application;
executing an application restart script, reading the containerized application name in the application configuration information and the component configuration information of the containerized application, and restarting the containerized application; or
And executing the application uninstalling script, reading the containerized application name in the application configuration information and the component configuration information according to the containerized application, and uninstalling the containerized application.
8. The method of claim 7, after starting, restarting, or uninstalling the containerized application, further comprising:
counting the names and the number of containerized applications needing to be started, restarted and unloaded;
counting the names and the number of the containerized applications which are successfully started, restarted and unloaded;
and counting the names and the number of the containerized applications which fail to start, restart and unload, and the reasons for the failures of the start, restart and unload of the containerized applications.
9. A containerized application deployment apparatus, comprising:
the configuration information acquisition module is used for executing the application installation script and acquiring the application configuration information and the component configuration information of the containerized application from the configuration file;
the application installation module is used for installing a container operation environment according to the application configuration information and installing a containerized application in the container operation environment;
and the component installation module is used for installing components for supporting various functions of the containerized application according to the component configuration information.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the containerized application deployment method of any one of claims 1 to 8 when executing the program.
CN202111293227.6A 2021-11-03 2021-11-03 Containerized application deployment method and device, electronic equipment and storage medium Pending CN113986269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111293227.6A CN113986269A (en) 2021-11-03 2021-11-03 Containerized application deployment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111293227.6A CN113986269A (en) 2021-11-03 2021-11-03 Containerized application deployment method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113986269A true CN113986269A (en) 2022-01-28

Family

ID=79746116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111293227.6A Pending CN113986269A (en) 2021-11-03 2021-11-03 Containerized application deployment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113986269A (en)

Similar Documents

Publication Publication Date Title
CN1174307C (en) Method, system and computer readable storage medium for automatic device driver
US20090328023A1 (en) Implementing optimized installs around pre-install and post-install actions
CN111756574A (en) Method and device for remotely updating firmware in batch mode and computer readable storage medium
US10025630B2 (en) Operating programs on a computer cluster
US8918776B2 (en) Self-adapting software system
US8117385B2 (en) System and method of maximization of storage capacity in a configuration limited system
US20120210114A1 (en) Log file processing system and method
CN110333875A (en) A kind of service routine update method, device, server and storage medium
CN113157347A (en) Automatic probe deployment method, electronic device and storage medium
CN112527328A (en) System cloning method, device, electronic equipment and computer readable storage medium
US9852028B2 (en) Managing a computing system crash
CN111694684A (en) Abnormal construction method and device of storage equipment, electronic equipment and storage medium
US9870234B2 (en) Automatic identification of returned merchandise in a data center
CN112631621A (en) Dependency package management method, device, server and storage medium
US8209443B2 (en) System and method for identifying lost/stale hardware in a computing system
US8694989B1 (en) Virtual installation environment
CN109062580B (en) Virtual environment deployment method and deployment device
CN113986269A (en) Containerized application deployment method and device, electronic equipment and storage medium
US8078637B1 (en) Memory efficient peim-to-peim interface database
US7577814B1 (en) Firmware memory management
US20150212866A1 (en) Management system for service of multiple operating environments, and methods thereof
CN113357067B (en) Electric fuel pump control method and device, electronic equipment and storage medium
US11954512B2 (en) Control device and control method
US20070061227A1 (en) Determining a computer system inventory
CN111722879A (en) USB flash disk identification method, Linux system, Linux equipment and readable storage 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