CN114253564A - Container cluster mirror image template generation method and device - Google Patents

Container cluster mirror image template generation method and device Download PDF

Info

Publication number
CN114253564A
CN114253564A CN202111603491.5A CN202111603491A CN114253564A CN 114253564 A CN114253564 A CN 114253564A CN 202111603491 A CN202111603491 A CN 202111603491A CN 114253564 A CN114253564 A CN 114253564A
Authority
CN
China
Prior art keywords
component
mirror image
file
script
configuration
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.)
Withdrawn
Application number
CN202111603491.5A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111603491.5A priority Critical patent/CN114253564A/en
Publication of CN114253564A publication Critical patent/CN114253564A/en
Withdrawn 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
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention provides a method and a device for generating a container cluster mirror image template, belonging to the technical field of container cluster mirror image construction, wherein the method comprises the following steps: defining detailed configuration files by an open source automation manager, wherein the detailed configuration files comprise a mirror image generation tool, an automation deployment installation tool, component roles, script file definitions, a main script file and parameter configuration files; calling a mirror image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template mirror image configuration file, starting a temporary virtual machine, and configuring an application program; and calling an automatic deployment installation tool, acquiring a parameter configuration file, analyzing component configuration parameters, executing a script file of the script, transmitting the component configuration parameters to component roles, completing the configuration of each component, and generating a container cluster virtual machine template mirror image. The invention realizes the automatic generation of the container cluster mirror image template and avoids the defects of more repetitive work and low efficiency of manual construction.

Description

Container cluster mirror image template generation method and device
Technical Field
The invention belongs to the technical field of container cluster mirror image construction, and particularly relates to a method and a device for generating a container cluster mirror image template.
Background
At present, informationization high-speed turning, various applications or services are accelerated to cloud, the virtual machines running on various clouds are generally taken as loads in the form of application cloud, usually, service application programs are manually packaged into the virtual machines and are distributed as virtual machine template images, and the mode of manually constructing the images seems to have many defects or shortcomings at present. For example, every time a new application is released, the template needs to be manually reconstructed repeatedly by people, and the mechanical repetitive work is more; when different personnel construct the template mirror image of the virtual machine, the personnel are required to master the detailed configuration of the components such as the application program, the system and the like in the construction process in detail to ensure that the application in the template mirror image is normally available, which has high requirements on the skills of the personnel and inevitably ensures that no errors or omissions occur. Second, the manual approach is inefficient, depends entirely on the skill level of the person, and does not take full advantage of the current advanced computing capabilities. And thirdly, the expansibility is not good in the process of constructing the template, when an application function module needs to be newly added, the complex operation needs to be repeated, and modularization is not achieved. In addition, the integrity or consistency of the application components cannot be better guaranteed due to the lack of a verification mechanism. Finally, it cannot be effectively integrated with the applied CI/CD system, and there is a break in the flow.
Therefore, it is very necessary to provide a method and an apparatus for generating a container cluster mirror template to overcome the above-mentioned drawbacks in the prior art.
Disclosure of Invention
Aiming at the defects of multiple repetitive work, low efficiency, high requirement on personnel, poor expansibility, lack of a checking mechanism and flow splitting of the manual mirror image constructing mode in the prior art, the invention provides a method and a device for generating a container cluster mirror image template so as to solve the technical problems.
In a first aspect, the present invention provides a method for generating a container cluster mirror template, including the following steps:
s1, defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises a mirror image generation tool definition, an automatic deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file;
s2, calling a mirror image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template mirror image configuration file, starting a temporary virtual machine, and configuring an application program;
and S3, calling an automatic deployment installation tool by the main script file, acquiring the parameter configuration file, analyzing the component configuration parameters, executing the script file corresponding to the defined component roles, transmitting the component configuration parameters to the component roles, completing the configuration of each component, and automatically generating the container cluster virtual machine template mirror image.
Further, the step S1 specifically includes the following steps:
s11, defining a detail configuration file and an acquisition mode, a version and a check code of the detail configuration file through an open source automation manager (ansable);
s12, defining a mirror image generation tool in the detailed configuration file through an open source automation manager, wherein the mirror image generation tool adopts a packer plug-in and is used for starting the temporary virtual machine and generating a mirror image of the container cluster virtual machine template;
s13, defining an automatic deployment installation tool through an open source automation manager (ansable), wherein the automatic deployment installation tool is an installation deployment configuration tool of application software;
s14, defining component roles through an open source automation manager (ansable), wherein each component corresponds to one role, and the roles are responsible for automatic installation of the components;
s15, defining a script file of the script through an open source automation manager (ansable), wherein the script file of the script is a sub script file for installing and configuring each component;
s16, defining a main script file through an open source automation manager (ansable), wherein the main script file adopts a shell script and is a main script for generating a container cluster virtual machine template mirror image;
s17, defining a parameter configuration file through an open source automation manager, wherein the parameter configuration file comprises component configuration parameters, temporary virtual machine parameters, basic operating system parameters, application software parameters and component configuration parameters. The detail configuration file is a general entry of the container cluster mirror image template configuration file and is a packer configuration file; the role corresponds to an independent component, the component comprises a system component and an application program component, and the components needing automatic installation can be defined as the role; script files are template-specific automated scripts, each template may have a script, which is an automated container cluster template mirroring process.
Further, the step S2 specifically includes the following steps:
s21, calling a mirror image generation tool by the main script file to acquire a parameter configuration file;
s22, analyzing temporary virtual machine parameters, basic operating system parameters and application software parameters in the parameter configuration file by using the image generation tool;
and S23, starting the temporary virtual machine by the mirror image generation tool, installing a basic operating system, and deploying application software. And taking a temporary virtual machine with specified specifications in the parameter configuration file as a foundation and a generation environment of the container cluster mirror image template, and installing a basic operating system for deploying application software on the temporary virtual machine.
Further, the step S3 specifically includes the following steps:
s31, calling an automatic deployment installation tool by the main script file to obtain a parameter configuration file;
s32, analyzing component configuration parameters from the parameter configuration file by the automatic deployment and installation tool;
s33, calling script files of each script by an automatic deployment and installation tool, performing installation, deployment, management and configuration of each component, and starting component services;
s34, transmitting the component configuration parameters to the roles of the components by the script file of the script, and executing the roles in sequence;
s35, the role of the component completes the configuration of the corresponding component, the component is installed and deployed, the configuration of the component is managed, the service program and the predefined parameter name are managed, and the configuration of the component is completed;
and S36, analyzing template mirror image configuration parameters in the parameter configuration file by using a mirror image generation tool, and finally generating the container cluster virtual machine template mirror image by combining the configured components. The local script file executes the automatic deployment component and transmits the detailed information of the system and the application program component to the role through the component configuration parameters; the role realizes the installation, deployment and configuration modification of the components, and meanwhile, the role receives detailed information of the container cluster system and the application program components and guides the role to run.
Further, the component configuration parameters include a component name, a component version, a component storage path, and a component integrity check code. The component integrity check code adopts the md5 format or sha256sum format check code.
Further, the template mirror image configuration parameters include the size, version, format, default storage location, memory and CPU specification, network card interface type parameters, download address and check file of the virtual cluster template.
In a second aspect, the present invention provides an apparatus for generating a container cluster mirror template, including:
the detail configuration file definition module is used for defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises a mirror image generation tool definition, an automation deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file;
the image generation tool starting module is used for calling an image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template image configuration file, starting the temporary virtual machine and configuring an application program;
and the template mirror image generation module is used for calling the automatic deployment installation tool by the main script file, acquiring the parameter configuration file, analyzing the component configuration parameters, executing the script file corresponding to the defined component role, transmitting the component configuration parameters to the component role, completing the configuration of each component and automatically generating the template mirror image of the container cluster virtual machine.
Further, the detail profile definition module includes:
the detail configuration file definition unit is used for defining the detail configuration file and the acquisition mode, version and check code of the detail configuration file through an open source automation manager (ANSIBLE);
the system comprises a mirror image generation tool definition unit, a container cluster virtual machine template mirror image generation tool and a virtual machine template mirror image generation tool, wherein the mirror image generation tool definition unit is used for defining a mirror image generation tool in a detail configuration file through an open source automation manager (ANSIE), and the mirror image generation tool adopts a packer plug-in and is used for starting a temporary virtual machine and generating a container cluster virtual machine template mirror image;
the deployment and installation tool definition unit is used for defining an automatic deployment and installation tool through an open source automation manager (ANSIE), and the automatic deployment and installation tool is an installation and deployment configuration tool of application software;
the role definition unit is used for defining component roles through an open source automation manager (ANSILE), each component corresponds to one role, and the roles are responsible for the automatic installation of the components;
the script definition unit is used for defining script files through the open source automation manager (ansable), and the script files are sub script files for installing and configuring each component;
the main script definition unit is used for defining a main script file through an open source automation manager (ansable), wherein the main script file adopts a shell script and is a main script for generating a container cluster virtual machine template mirror image;
and the parameter configuration file definition unit is used for defining a parameter configuration file through the open source automation manager, wherein the parameter configuration file comprises component configuration parameters, temporary virtual machine parameters, basic operating system parameters, application software parameters and component configuration parameters.
Further, the image generation tool start module includes:
the first acquisition unit of the parameter configuration file is used for calling a mirror image generation tool by the main script file to acquire the parameter configuration file;
the virtual machine parameter analyzing unit is used for analyzing temporary virtual machine parameters, basic operating system parameters and application software parameters in the parameter configuration file by the image generation tool;
and the virtual machine starting and application software deploying unit is used for starting the temporary virtual machine by the image generating tool, installing the basic operating system and deploying application software.
Further, the template image generation module comprises:
the second acquisition unit of the parameter configuration file is used for calling the automatic deployment installation tool by the main script file to acquire the parameter configuration file;
the component configuration parameter analyzing unit is used for analyzing the component configuration parameters from the parameter configuration file by the automatic deployment and installation tool;
the script execution unit is used for automatically deploying the installation tool to call script files of each script, performing installation deployment and management configuration of each component, and starting component service;
the module configuration parameter transmission unit is used for transmitting the module configuration parameters to the roles of each module by the script file of the script and executing each role in sequence;
the role execution component configuration unit is used for completing the configuration of the corresponding component by the role of the component, installing and deploying the component, managing the configuration of the component, managing a program of service and a predefined parameter name, and completing the configuration of the component;
and the template mirror image generation unit is used for analyzing template mirror image configuration parameters in the parameter configuration file by the mirror image generation tool and finally generating the container cluster virtual machine template mirror image by combining the configured components.
The invention has the beneficial effects that:
the method and the device for generating the container cluster mirror image template have the advantages that the detail configuration file is used as an entrance, the automatic generation of the container cluster mirror image template is realized through the mirror image generation tool and the automatic deployment installation tool, the role of the component and the script file of the script are combined, the repeated work caused by manually constructing the container cluster mirror image is avoided, the efficiency is low, the component can be exaggerated through the role, the integrity and the consistency of the applied component can be verified, and the effective integration with a CI/CD system is facilitated.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a schematic flow diagram of embodiment 1 of a method for generating a container cluster mirror template according to the present invention.
Fig. 2 is a schematic flow diagram of embodiment 2 of a method for generating a container cluster mirror template according to the present invention.
Fig. 3 is a schematic diagram of a container cluster mirror template generation apparatus according to the present invention.
In the figure, 1-detail profile definition module; 1.1-detail profile definition unit; 1.2-mirror image generation tool definition unit; 1.3-deploy installation tool definition unit; 1.4-role definition unit; 1.5-script definition unit; 1.6-master script definition unit; 1.7-parameter configuration file definition unit; 2-mirror image generation tool starting module; 2.1-a first acquisition unit of the parameter configuration file; 2.2-a virtual machine parameter analysis unit; 2.3-a virtual machine starting and application software deploying unit; 3-a template mirror image generation module; 3.1-parameter configuration file second obtaining unit; 3.2-component configuration parameter analysis unit; 3.3-script execution unit; 3.4-component configuration parameter passing unit; 3.5-role execution component configuration unit; 3.6-template mirror image generation unit.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
CI/CD, is the abbreviation of Continuous Integration/Continuous Delivery, and is the term in software development.
The ansable is a new automatic operation and maintenance tool, is developed based on Python, integrates the advantages of a plurality of operation and maintenance tools, and realizes functions of batch system configuration, batch program deployment, batch operation commands and the like.
Example 1:
as shown in fig. 1, the present invention provides a method for generating a container cluster mirror template, which includes the following steps:
s1, defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises a mirror image generation tool definition, an automatic deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file;
s2, calling a mirror image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template mirror image configuration file, starting a temporary virtual machine, and configuring an application program;
and S3, calling an automatic deployment installation tool by the main script file, acquiring the parameter configuration file, analyzing the component configuration parameters, executing the script file corresponding to the defined component roles, transmitting the component configuration parameters to the component roles, completing the configuration of each component, and automatically generating the container cluster virtual machine template mirror image.
Example 2:
as shown in fig. 2, the present invention provides a method for generating a container cluster mirror template, which includes the following steps:
s1, defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises a mirror image generation tool definition, an automatic deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file; the method comprises the following specific steps:
s11, defining a detail configuration file and an acquisition mode, a version and a check code of the detail configuration file through an open source automation manager (ansable);
s12, defining a mirror image generation tool in the detailed configuration file through an open source automation manager, wherein the mirror image generation tool adopts a packer plug-in and is used for starting the temporary virtual machine and generating a mirror image of the container cluster virtual machine template;
s13, defining an automatic deployment installation tool through an open source automation manager (ansable), wherein the automatic deployment installation tool is an installation deployment configuration tool of application software;
s14, defining component roles through an open source automation manager (ansable), wherein each component corresponds to one role, and the roles are responsible for automatic installation of the components;
s15, defining a script file of the script through an open source automation manager (ansable), wherein the script file of the script is a sub script file for installing and configuring each component;
s16, defining a main script file through an open source automation manager (ansable), wherein the main script file adopts a shell script and is a main script for generating a container cluster virtual machine template mirror image;
s17, defining a parameter configuration file through an open source automation manager (ANSIBLE), wherein the parameter configuration file comprises component configuration parameters, temporary virtual machine parameters, basic operating system parameters, application software parameters and component configuration parameters; the component configuration parameters comprise component names, component versions, component storage paths and component integrity check codes; the template mirror image configuration parameters comprise the size, version, format, default storage position, memory and CPU specification of the virtual cluster template, network card interface type parameters, download addresses and check files;
s2, calling a mirror image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template mirror image configuration file, starting a temporary virtual machine, and configuring an application program; the method comprises the following specific steps:
s21, calling a mirror image generation tool by the main script file to acquire a parameter configuration file;
s22, analyzing temporary virtual machine parameters, basic operating system parameters and application software parameters in the parameter configuration file by using the image generation tool;
s23, starting a temporary virtual machine by using a mirror image generation tool, installing a basic operating system and deploying application software;
s3, calling an automatic deployment installation tool by the main script file, acquiring a parameter configuration file, analyzing component configuration parameters, executing a script file corresponding to a defined component role, transmitting the component configuration parameters to the component role, completing the configuration of each component, and automatically generating a container cluster virtual machine template mirror image; the method comprises the following specific steps:
s31, calling an automatic deployment installation tool by the main script file to obtain a parameter configuration file;
s32, analyzing component configuration parameters from the parameter configuration file by the automatic deployment and installation tool;
s33, calling script files of each script by an automatic deployment and installation tool, performing installation, deployment, management and configuration of each component, and starting component services;
s34, transmitting the component configuration parameters to the roles of the components by the script file of the script, and executing the roles in sequence;
s35, the role of the component completes the configuration of the corresponding component, the component is installed and deployed, the configuration of the component is managed, the service program and the predefined parameter name are managed, and the configuration of the component is completed;
and S36, analyzing template mirror image configuration parameters in the parameter configuration file by using a mirror image generation tool, and finally generating the container cluster virtual machine template mirror image by combining the configured components.
Example 3:
as shown in fig. 3, the present invention provides an apparatus for generating a container cluster mirror template, including:
the detail configuration file definition module 1 is used for defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises a mirror image generation tool definition, an automation deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file;
the mirror image generation tool starting module 2 is used for calling a mirror image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template mirror image configuration file, starting the temporary virtual machine and configuring an application program;
and the template mirror image generation module 3 is used for calling the automatic deployment installation tool by the main script file, acquiring the parameter configuration file, analyzing the component configuration parameters, executing the script file corresponding to the defined component role, transmitting the component configuration parameters to the component role, completing the configuration of each component, and automatically generating the template mirror image of the container cluster virtual machine.
Example 4:
as shown in fig. 3, the present invention provides an apparatus for generating a container cluster mirror template, including:
the detail configuration file definition module 1 is used for defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises a mirror image generation tool definition, an automation deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file; the detail profile definition module 1 includes:
the detail configuration file definition unit 1.1 is used for defining the detail configuration file and the acquisition mode, version and check code of the detail configuration file through an open source automation manager (ANSIBLE);
the mirror image generation tool definition unit 1.2 is used for defining a mirror image generation tool in the detailed configuration file through an open source automation manager (ANSIBLE), wherein the mirror image generation tool adopts a packer plug-in and is a tool for starting the temporary virtual machine and generating a mirror image of the container cluster virtual machine template;
the deployment and installation tool definition unit 1.3 is used for defining an automatic deployment and installation tool through an open source automation manager (ANSIBLE), and the automatic deployment and installation tool is an installation, deployment and configuration tool of application software;
the role definition unit 1.4 is used for defining component roles through an open source automation manager (ANSIBLE), each component corresponds to one role, and the roles are responsible for automatic installation of the components;
the script definition unit 1.5 is used for defining script files through an open source automation manager (ANSIBLE), wherein the script files are sub script files for installing and configuring each component;
the main script definition unit 1.6 is used for defining a main script file through an open source automation manager (ANSIBLE), wherein the main script file adopts a shell script and is a main script for generating a container cluster virtual machine template mirror image;
a parameter configuration file defining unit 1.7, configured to define a parameter configuration file through an open source automation manager (ANSIBLE), where the parameter configuration file includes component configuration parameters, temporary virtual machine parameters, basic operating system parameters, application software parameters, and component configuration parameters; the component configuration parameters comprise component names, component versions, component storage paths and component integrity check codes; the template mirror image configuration parameters comprise the size, version, format, default storage position, memory and CPU specification of the virtual cluster template, network card interface type parameters, download addresses and check files;
the mirror image generation tool starting module 2 is used for calling a mirror image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template mirror image configuration file, starting the temporary virtual machine and configuring an application program; the image creation tool start module 2 includes:
a first parameter configuration file acquiring unit 2.1, configured to invoke a mirror image generation tool by the main script file to acquire a parameter configuration file;
the virtual machine parameter analyzing unit 2.2 is used for analyzing temporary virtual machine parameters, basic operating system parameters and application software parameters in the parameter configuration file by the image generation tool;
the virtual machine starting and application software deploying unit 2.3 is used for starting the temporary virtual machine by the image generating tool, installing a basic operating system and deploying application software;
the template mirror image generation module 3 is used for calling an automatic deployment installation tool by the main script file, acquiring a parameter configuration file, analyzing component configuration parameters, executing a script file corresponding to a defined component role, transmitting the component configuration parameters to the component role, completing the configuration of each component and automatically generating a container cluster virtual machine template mirror image; the template image generation module 3 includes:
a second parameter configuration file obtaining unit 3.1, configured to invoke the automated deployment installation tool by the main script file, and obtain the parameter configuration file;
the component configuration parameter analyzing unit 3.2 is used for analyzing the component configuration parameters from the parameter configuration file by the automatic deployment and installation tool;
the script execution unit 3.3 is used for calling script files of each script by an automatic deployment and installation tool, carrying out installation deployment and management configuration on each component, and starting component services;
the component configuration parameter transmission unit 3.4 is used for transmitting the component configuration parameters to the roles of the components by the script file of the script and executing the roles in sequence;
a role execution component configuration unit 3.5, configured to complete the configuration of the corresponding component by the role of the component, install and deploy the component, manage the configuration of the component, manage the program of the service and the predefined parameter name, and complete the configuration of the component;
and the template mirror image generation unit 3.6 is used for analyzing template mirror image configuration parameters in the parameter configuration file by the mirror image generation tool and finally generating the container cluster virtual machine template mirror image by combining the configured components.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for generating a container cluster mirror image template is characterized by comprising the following steps:
s1, defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises a mirror image generation tool definition, an automatic deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file;
s2, calling a mirror image generation tool by the main script file, acquiring a parameter configuration file, analyzing a template mirror image configuration file, starting a temporary virtual machine, and configuring an application program;
and S3, calling an automatic deployment installation tool by the main script file, acquiring the parameter configuration file, analyzing the component configuration parameters, executing the script file corresponding to the defined component roles, transmitting the component configuration parameters to the component roles, completing the configuration of each component, and automatically generating the container cluster virtual machine template mirror image.
2. The method for generating a container cluster mirror template according to claim 1, wherein the step S1 specifically comprises the following steps:
s11, defining a detail configuration file and an acquisition mode, a version and a check code of the detail configuration file through an open source automation manager (ansable);
s12, defining a mirror image generation tool in the detailed configuration file through an open source automation manager, wherein the mirror image generation tool adopts a packer plug-in and is used for starting the temporary virtual machine and generating a mirror image of the container cluster virtual machine template;
s13, defining an automatic deployment installation tool through an open source automation manager (ansable), wherein the automatic deployment installation tool is an installation deployment configuration tool of application software;
s14, defining component roles through an open source automation manager (ansable), wherein each component corresponds to one role, and the roles are responsible for automatic installation of the components;
s15, defining a script file of the script through an open source automation manager (ansable), wherein the script file of the script is a sub script file for installing and configuring each component;
s16, defining a main script file through an open source automation manager (ansable), wherein the main script file adopts a shell script and is a main script for generating a container cluster virtual machine template mirror image;
s17, defining a parameter configuration file through an open source automation manager, wherein the parameter configuration file comprises component configuration parameters, temporary virtual machine parameters, basic operating system parameters, application software parameters and component configuration parameters.
3. The method for generating a container cluster mirror template according to claim 2, wherein the step S2 specifically comprises the following steps:
s21, calling a mirror image generation tool by the main script file to acquire a parameter configuration file;
s22, analyzing temporary virtual machine parameters, basic operating system parameters and application software parameters in the parameter configuration file by using the image generation tool;
and S23, starting the temporary virtual machine by the mirror image generation tool, installing a basic operating system, and deploying application software.
4. The method for generating a container cluster mirror template according to claim 3, wherein the step S3 specifically comprises the following steps:
s31, calling an automatic deployment installation tool by the main script file to obtain a parameter configuration file;
s32, analyzing component configuration parameters from the parameter configuration file by the automatic deployment and installation tool;
s33, calling script files of each script by an automatic deployment and installation tool, performing installation, deployment, management and configuration of each component, and starting component services;
s34, transmitting the component configuration parameters to the roles of the components by the script file of the script, and executing the roles in sequence;
s35, the role of the component completes the configuration of the corresponding component, the component is installed and deployed, the configuration of the component is managed, the service program and the predefined parameter name are managed, and the configuration of the component is completed;
and S36, analyzing template mirror image configuration parameters in the parameter configuration file by using a mirror image generation tool, and finally generating the container cluster virtual machine template mirror image by combining the configured components.
5. The method for generating a container cluster mirror template according to claim 4, wherein the component configuration parameters include a component name, a component version, a component storage path, and a component integrity check code.
6. The method for generating a container cluster mirror template according to claim 4, wherein the template mirror configuration parameters include the size, version, format, default storage location, memory and CPU specification, network card interface type parameters, download address and check file of the virtual cluster template.
7. An apparatus for generating a container cluster mirror template, comprising:
the detail configuration file definition module (1) is used for defining a detail configuration file through an open source automation manager, wherein the detail configuration file comprises an image generation tool definition, an automation deployment installation tool definition, a component role definition, a script file definition, a main script file and a parameter configuration file;
the mirror image generation tool starting module (2) is used for calling a mirror image generation tool by the main script file, acquiring the parameter configuration file, analyzing the template mirror image configuration file, starting the temporary virtual machine and configuring the application program;
and the template mirror image generation module (3) is used for calling the automatic deployment installation tool by the main script file, acquiring the parameter configuration file, analyzing the component configuration parameters, executing the script file corresponding to the defined component role, transmitting the component configuration parameters to the component role, completing the configuration of each component, and automatically generating the container cluster virtual machine template mirror image.
8. The container cluster mirror template generation apparatus according to claim 7, wherein the detail profile definition module (1) comprises:
the detail configuration file definition unit (1.1) is used for defining the detail configuration file and the acquisition mode, version and check code of the detail configuration file through an open source automation manager (ANSIBLE);
the mirror image generation tool definition unit (1.2) is used for defining a mirror image generation tool in the detailed configuration file through an open source automation manager (ANSIBLE), wherein the mirror image generation tool adopts a packer plug-in and is a tool for starting the temporary virtual machine and generating a mirror image of the container cluster virtual machine template;
the deployment and installation tool definition unit (1.3) is used for defining an automatic deployment and installation tool through an open source automation manager (ANSIBLE), and the automatic deployment and installation tool is an installation deployment configuration tool of application software;
the role definition unit (1.4) is used for defining component roles through an open source automation manager (ANSIBLE), each component corresponds to one role, and the roles are responsible for automatic installation of the components;
the script definition unit (1.5) is used for defining script files through the open source automation manager (ansable), and the script files are sub script files for installing and configuring each component;
the main script definition unit (1.6) is used for defining a main script file through an open source automation manager (ansable), wherein the main script file adopts a shell script and is a main script for generating a container cluster virtual machine template mirror image;
and the parameter configuration file definition unit (1.7) is used for defining a parameter configuration file through the open source automation manager, wherein the parameter configuration file comprises component configuration parameters, temporary virtual machine parameters, basic operating system parameters, application software parameters and component configuration parameters.
9. The generation apparatus of a container cluster mirror template according to claim 8, wherein the mirror generation tool start module (2) comprises:
a first parameter configuration file acquisition unit (2.1) for calling a mirror image generation tool by the main script file to acquire the parameter configuration file;
the virtual machine parameter analyzing unit (2.2) is used for analyzing temporary virtual machine parameters, basic operating system parameters and application software parameters in the parameter configuration file by the image generation tool;
and the virtual machine starting and application software deploying unit (2.3) is used for starting the temporary virtual machine by the image generation tool, installing the basic operating system and deploying application software.
10. The generation apparatus of a container cluster mirror template according to claim 9, characterized in that the template mirror generation module (3) comprises:
a second parameter configuration file acquisition unit (3.1) for calling the automatic deployment installation tool by the main script file to acquire the parameter configuration file;
the component configuration parameter analyzing unit (3.2) is used for analyzing the component configuration parameters from the parameter configuration file by the automatic deployment and installation tool;
the script execution unit (3.3) is used for calling script files of each script by an automatic deployment and installation tool, carrying out installation deployment and management configuration on each component and starting the component service;
the component configuration parameter transmission unit (3.4) is used for transmitting the component configuration parameters to the roles of all the components by the script file of the script and executing all the roles in sequence;
the role execution component configuration unit (3.5) is used for completing the configuration of the corresponding component by the role of the component, installing and deploying the component, managing the configuration of the component, managing a service program and a predefined parameter name of the component and completing the configuration of the component;
and the template mirror image generation unit (3.6) is used for analyzing template mirror image configuration parameters in the parameter configuration file by the mirror image generation tool and finally generating the container cluster virtual machine template mirror image by combining the configured components.
CN202111603491.5A 2021-12-24 2021-12-24 Container cluster mirror image template generation method and device Withdrawn CN114253564A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111603491.5A CN114253564A (en) 2021-12-24 2021-12-24 Container cluster mirror image template generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111603491.5A CN114253564A (en) 2021-12-24 2021-12-24 Container cluster mirror image template generation method and device

Publications (1)

Publication Number Publication Date
CN114253564A true CN114253564A (en) 2022-03-29

Family

ID=80797664

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111603491.5A Withdrawn CN114253564A (en) 2021-12-24 2021-12-24 Container cluster mirror image template generation method and device

Country Status (1)

Country Link
CN (1) CN114253564A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115700465A (en) * 2022-11-09 2023-02-07 安超云软件有限公司 Movable electronic equipment and application thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115700465A (en) * 2022-11-09 2023-02-07 安超云软件有限公司 Movable electronic equipment and application thereof

Similar Documents

Publication Publication Date Title
CN110389900B (en) Distributed database cluster testing method and device and storage medium
US9152402B2 (en) Automated deployment and servicing of distributed applications
CN107566165B (en) Method and system for discovering and deploying available resources of power cloud data center
CN108920250B (en) Application program containerization method and device
CN105487892A (en) Inter-cloud GIS service deploying system in Linux environment
CN106126273A (en) A kind of method of upgrading BIOS
CN109558147A (en) A kind of continuous integrating platform construction method based on Jenkins and Gitlab
CN111444104B (en) OpenStack function test method
CN111324599B (en) Block chain experiment system and management method
CN113434158A (en) User-defined management method, device, equipment and medium for big data component
CN103685567A (en) Virtual application server configuration method under cloud environment
CN113778486A (en) Containerization processing method, device, medium and equipment for code pipeline
CN114253564A (en) Container cluster mirror image template generation method and device
CN114912897A (en) Workflow execution method, workflow arrangement method and electronic equipment
CN111371589A (en) Batch deployment method and system for server operating systems
CN112000567A (en) Regulation and control software test service method based on cloud platform
CN110727575B (en) Information processing method, system, device and storage medium
CN113900676A (en) Method for automatically upgrading containerized cloud platform
CN113254054A (en) Intelligent contract one-stop development system and method
CN114443294B (en) Big data service component deployment method, system, terminal and storage medium
CN107193635A (en) A kind of method for realizing virtualization content library, apparatus and system
CN111026413B (en) Requirement-oriented complex system 'pull' mode deployment system and method thereof
CN114564213A (en) Pre-installed software deployment method, system, terminal and storage medium
CN115357258B (en) Application deployment method and device, storage medium and electronic device
CN112783653A (en) Resource scheduling method and device based on containerization

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220329