CN115617360A - Automatic deployment method and system of micro-service - Google Patents

Automatic deployment method and system of micro-service Download PDF

Info

Publication number
CN115617360A
CN115617360A CN202211277563.6A CN202211277563A CN115617360A CN 115617360 A CN115617360 A CN 115617360A CN 202211277563 A CN202211277563 A CN 202211277563A CN 115617360 A CN115617360 A CN 115617360A
Authority
CN
China
Prior art keywords
module
middleware
deployment
micro
database
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
CN202211277563.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.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information 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 Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202211277563.6A priority Critical patent/CN115617360A/en
Publication of CN115617360A publication Critical patent/CN115617360A/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
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a system for automatically deploying micro-services, relating to the technical field of micro-service deployment; aiming at an operation and maintenance integrated platform, automatic deployment of a database middleware, a containerized middleware, an ELK component and a message queue middleware is carried out by using an ansable, build and push of a micro-service mirror image are realized by using a contiainer module of the ansable according to the deployed middleware, the micro-service mirror image is automatically pulled by using the containerized middleware, related micro-services are started, and the micro-service automatic deployment is completed.

Description

Automatic deployment method and system of micro-service
Technical Field
The invention discloses a method and a system, relates to the technical field of micro-service deployment, and particularly relates to an automatic deployment method and system of micro-services.
Background
With the development of the data era, high access amount and high concurrency amount are more and more common, the data amount tends to be massive, a single application framework is difficult to meet the requirements of the new era, and in order to better face the problem of high concurrency mass data, a micro-service framework and a distributed system are generated to face massive data access processing.
However, at present, no solution for developing and deploying micro services is available, and the system has the functions of supporting lateral extension of services, automatic registration and discovery, unified monitoring of system states, unified monitoring of service quality and the like, simplifying a middleware deployment process, and reducing labor and time costs.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a system for automatically deploying micro services, which are used for realizing the automatic deployment of containerized micro services based on an anchor automatic operation and maintenance tool and a docker and increasing the usability of the system on the basis of keeping high availability.
The specific scheme provided by the invention is as follows:
the invention provides an automatic deployment method of micro-services, which aims at an operation and maintenance integrated platform, utilizes ansable to automatically deploy database middleware, containerized middleware, ELK components and message queue middleware, utilizes a contiiner module of ansable to realize build and push of micro-service images according to the deployed middleware, utilizes the containerized middleware to automatically pull the micro-service images and start related micro-services, and completes the automatic deployment of the micro-services.
Preferably, in the method for automatically deploying microservice, the automatically deploying the database middleware, the containerization middleware, the ELK component and the message queue middleware by using the ansable includes:
the Mysql database, the redis database, the minio database and the influxdb database are subjected to database middleware deployment,
containerized middleware deployment is performed for Docker and Docker-compound,
ELK component deployment is carried out on the elastic search, the filebeat, the logstack and the kibana,
and performing message queue middleware deployment on the Nginx message queue middleware.
Preferably, the automated deployment of the middleware in the method for automatically deploying the microservice includes an online mode or an offline mode.
Preferably, in the online mode in the method for automatically deploying the micro-service, the ansable yum module is used for installing the Mysql database, the redis database, the minio database and the inflixdb database, and the Mysql module, the redis module or the contiiner module, the inflixdb module, the shell module and the template module are respectively used for configuring to complete the automatic deployment,
and in the offline mode, an ansiblerpm module is used for installing the installation package, and a mysql module, a redis or contiiner module and a shell module are respectively used for configuring to complete automatic deployment.
Preferably, in the automatic deployment method of the microservice, the online mode utilizes an allowed yum module to install the docker, utilizes a wget module to download the docker-composition binary file, utilizes a template module to configure, and completes the automatic deployment,
the offline mode utilizes the ansiblerpm module to install the installation packages of the docker and the docker-compound, utilizes the template module to configure, and completes the automatic deployment.
Preferably, in the method for automatically deploying the micro-service, the online mode utilizes an allowed yum module to install the ELK component, utilizes a template module to configure, completes the automatic deployment,
the offline mode utilizes the ansible rpm module to install the ELK assembly installation package, and utilizes the template module to configure, thereby completing the automatic deployment.
Preferably, in the method for automatically deploying the micro-service, the online mode and the offline mode both utilize an available container module to automatically deploy nginx.
Preferably, in the method for automatically deploying the micro-service, load balancing is performed on the docker registry by utilizing the minio cluster through nginx.
The invention also provides an automatic deployment system of the microservice, which comprises an automatic deployment module,
the automatic deployment module is used for automatically deploying the database middleware, the containerized middleware, the ELK component and the message queue middleware by using the ansable aiming at the operation and maintenance integrated platform, the build and push of the micro-service mirror image are realized by using the ansable container module according to the deployed middleware, the micro-service mirror image is automatically pulled by using the containerized middleware, the related micro-service is started, and the micro-service automatic deployment is completed.
The invention also provides an automatic deployment device of the micro service, which comprises at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is used for calling the machine readable program and executing the automatic deployment method of the microservice.
The invention has the advantages that:
the invention provides an automatic deployment method of micro-services, which is characterized in that middleware is deployed based on ansible, and micro-services are automatically deployed based on containerized middleware docker, so that the time and labor cost for deployment are greatly reduced, and the expenditure is saved for companies; meanwhile, the deployment work efficiency is improved, the trend of operation and maintenance automation is more met, and the containerized deployment micro-service has the advantages of continuous deployment and testing, cross-cloud platform support, high resource utilization rate, isolation, more convenience in management and the like.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the embodiments or technical solutions in the prior art are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of the method for deploying middleware by using the infrastructure.
FIG. 2 is a flow chart illustrating the deployment of microservices by the method of the present invention.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
The invention provides an automatic deployment method of micro-services, which aims at an operation and maintenance integrated platform, utilizes ansable to automatically deploy database middleware, containerized middleware, ELK components and message queue middleware, utilizes a contiiner module of ansable to realize build and push of micro-service images according to the deployed middleware, utilizes the containerized middleware to automatically pull the micro-service images and start related micro-services, and completes the automatic deployment of the micro-services.
The method of the invention deploys the middleware based on the ansible, deploys the micro-service automatically based on the containerized middleware docker, can realize the deployment in two modes of online and offline, realizes the customized micro-service deployment, and realizes the high availability of docker registry.
In specific application, in some embodiments of the method, aiming at the deployment stage of the intelligent operation and maintenance integrated platform, various middleware is deployed by using an ansable self-contained module (such as a shell module, a copy module, a yum module, a container module and the like) and a self-defined module, and configuration files of the corresponding middleware are automatically changed by changing tool configuration files, so that the method can be perfectly adapted to various fields; meanwhile, the docker is deployed, the resource utilization rate is improved through containerization, the overall cost is reduced, and the usability is improved.
The method of the invention utilizes the module corresponding to the infrastructure to carry out automatic deployment, relates to the deployment of an online mode and an offline mode,
when the automated deployment of the database middleware, the containerization middleware, the ELK component and the message queue middleware is carried out, the method comprises the following steps:
the Mysql database, the redis database, the minio database and the influxdb database are subjected to database middleware deployment,
containerized middleware deployment is performed for Docker and Docker-compound,
ELK component deployment is carried out on the elastic search, the filebeat, the logstack and the kibana,
and performing message queue middleware deployment on the Nginx message queue middleware.
Further, an ansable yum module is used for installing a Mysql database, a redis database, a minio database and an inflixdb database, and a Mysql module, a redis module or a contiiner module, an inflixdb module, a shell module and a template module are respectively used for configuring to complete automatic deployment, wherein the redis is started by using a container,
and in the offline mode, an ansiblerpm module is used for installing an installation package, and a mysql module, a redis or conconer module and a shell module are respectively used for configuring to complete automatic deployment, wherein the redis is started by using a container.
Furthermore, the online mode utilizes an addressable yum module to carry out docker installation, utilizes a wget module to download a docker-composition binary file, utilizes a template module to carry out configuration, completes automatic deployment,
the offline mode utilizes the ansiblerpm module to install the installation packages of the docker and the docker-compound, utilizes the template module to configure, and completes the automatic deployment.
Furthermore, the online mode utilizes an ansable yum module to install the ELK component, utilizes a template module to configure, completes automatic deployment,
the offline mode utilizes an ansible rpm module to install an ELK assembly installation package, utilizes a template module to configure, and completes automatic deployment.
Further, the online mode and the offline mode both utilize an allowed container module to perform nginx automatic deployment, wherein preferably, the mini cluster is utilized by nginx to perform load balancing on the docker registry. Corresponding parameters are required to be set to be compatible with an s3 mode when the minio is deployed, a unified minio entry is achieved through a minio cluster and a kepalived proxy, a corresponding configuration file is modified in the process of starting the docker registry to enable the docker registry to be involved in the minio, finally related contents of a mirror image are stored in the minio, the minio can be accessed again through restarting a new docker registry after the docker registry is hung up, all data cannot be lost before, and the high-availability characteristic is achieved.
The method is simple to deploy, only needs to run the ansable and the docker, is simple to execute, and can realize the customization of the deployed plug-ins and the microservices by modifying the configuration files; an automation tool is also provided for operation and maintenance by using the ansable, and new playbook can be directly added to realize operation and maintenance automation; high availability of the docker warehouse is achieved.
When the method of the invention is applied, the method,
on-line: installing the anchor and configuring relevant files, including the installation of the docker and the docker-compound by using the anchor,
the command for one-touch deployment is executed,
and checking the deployment result of each component and the micro-service.
Under the line: uploading the installation package of each middleware, installing the ansible and configuring related files, wherein the installation comprises the installation of the docker and the docker-compound by using the ansible,
the command for one-key deployment is executed,
and checking the deployment result of each component and the micro-service.
The invention also provides an automatic deployment system of the microservice, which comprises an automatic deployment module,
the automatic deployment module is used for automatically deploying the database middleware, the containerized middleware, the ELK component and the message queue middleware by using the ansable aiming at the operation and maintenance integrated platform, the build and push of the micro-service mirror image are realized by using the ansable container module according to the deployed middleware, the micro-service mirror image is automatically pulled by using the containerized middleware, the related micro-service is started, and the micro-service automatic deployment is completed.
The information interaction, execution process and other contents between the modules in the system are based on the same concept as the method embodiment of the present invention, and specific contents can be referred to the description in the method embodiment of the present invention, and are not described herein again.
Similarly, the system of the invention deploys the middleware based on the ansible, and automatically deploys the micro-service based on the containerized middleware docker, thereby greatly reducing the time and labor cost for deployment and saving the expenses for companies; meanwhile, the deployment work efficiency is improved, the trend of implementing operation and maintenance automation is better met, and the containerized deployment micro-service has the advantages of continuous deployment and testing, cross-cloud platform support, high resource utilization rate, isolation, more convenience in management and the like.
The invention also provides an automatic deployment device of the microservice, which comprises at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is used for calling the machine readable program and executing the automatic deployment method of the microservice.
For the information interaction, the readable program execution process and other contents of the processor in the above device, the specific contents may refer to the description in the embodiment of the method of the present invention because the same conception is based on, and are not described herein again.
Similarly, the device carries out the deployment of the middleware based on the ansable, carries out the automatic deployment of the microservice based on the containerized middleware docker, greatly reduces the time and labor cost for the deployment, and saves the expenses for the company; meanwhile, the deployment work efficiency is improved, the trend of implementing operation and maintenance automation is better met, and the containerized deployment micro-service has the advantages of continuous deployment and testing, cross-cloud platform support, high resource utilization rate, isolation, more convenience in management and the like.
It should be noted that not all steps and modules in the above flows and system structures are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.

Claims (10)

1. The method is characterized in that aiming at an operation and maintenance integrated platform, ansable is utilized to carry out automatic deployment of a database middleware, a containerized middleware, an ELK component and a message queue middleware, according to the deployed middleware, a build module and a push module of a microservice image are utilized, the containerized middleware is utilized to automatically pull the microservice image and start related microservices, and the microservice automatic deployment is completed.
2. The method according to claim 1, wherein the utilizing of the ansable for the automated deployment of the database middleware, the containerization middleware, the ELK component, and the message queue middleware comprises:
the Mysql database, the redis database, the minio database and the influxdb database are deployed with database middleware,
containerized middleware deployment is performed for Docker and Docker-compound,
ELK component deployment is carried out on the elastic search, the filebeat, the logstack and the kibana,
and performing message queue middleware deployment on the Nginx message queue middleware.
3. The method of claim 1 or 2, wherein the automated deployment of the middleware comprises an online mode or an offline mode.
4. The method of claim 3, wherein the online model utilizes an ansable yum module to install Mysql, redis, minio, and inflixdb databases, and utilizes the Mysql, redis, or contiainer, inflixdb, shell, and template modules to configure and complete the automated deployment,
and in the offline mode, an ansiblerpm module is used for installing the installation package, and a mysql module, a redis or contiiner module and a shell module are respectively used for configuring to complete automatic deployment.
5. The method of claim 3, wherein the online model uses an allowed yum module for socket installation, a wget module for downloading socket-composition binary files, and a template module for configuration to complete automatic deployment,
the offline mode utilizes the ansiblerpm module to install the installation packages of the docker and the docker-compound, utilizes the template module to configure, and completes the automatic deployment.
6. The method of claim 3, wherein the online model utilizes an allowed yum module for ELK component installation and a template module for configuration to complete automated deployment,
the offline mode utilizes the ansible rpm module to install the ELK assembly installation package, and utilizes the template module to configure, thereby completing the automatic deployment.
7. The method according to claim 3, wherein the online mode and the offline mode both utilize an allowed container module to perform nginx automated deployment.
8. The method for automated deployment of microservices according to claim 7, wherein docker registry is load balanced by nginx using minio clusters.
9. An automatic deployment system of micro-services is characterized by comprising an automatic deployment module,
the automatic deployment module is used for automatically deploying the database middleware, the containerized middleware, the ELK component and the message queue middleware by using the ansable aiming at the operation and maintenance integrated platform, the build and push of the micro-service mirror image are realized by using the ansable container module according to the deployed middleware, the micro-service mirror image is automatically pulled by using the containerized middleware, the related micro-service is started, and the micro-service automatic deployment is completed.
10. An automatic deployment device of microservices is characterized by comprising at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program to perform the method for automated deployment of microservices according to any one of claims 1 to 8.
CN202211277563.6A 2022-10-19 2022-10-19 Automatic deployment method and system of micro-service Pending CN115617360A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211277563.6A CN115617360A (en) 2022-10-19 2022-10-19 Automatic deployment method and system of micro-service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211277563.6A CN115617360A (en) 2022-10-19 2022-10-19 Automatic deployment method and system of micro-service

Publications (1)

Publication Number Publication Date
CN115617360A true CN115617360A (en) 2023-01-17

Family

ID=84862119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211277563.6A Pending CN115617360A (en) 2022-10-19 2022-10-19 Automatic deployment method and system of micro-service

Country Status (1)

Country Link
CN (1) CN115617360A (en)

Similar Documents

Publication Publication Date Title
CN112416524B (en) Method and device for implementing CI/CD of cross-platform based on docker and kubernetes offline
US10365626B2 (en) Extending the functionality of a programmable logic controller (PLC) with apps without changing the PLC programming
US8095923B2 (en) System and method for deploying and managing intelligent nodes in a distributed network
US7165108B2 (en) Method and apparatus for providing application specific strategies to a JAVA platform including load balancing policies
CN109885316A (en) Hdfs-hbase dispositions method and device based on kubernetes
CN110569250B (en) Management method and device for analysis library of Internet of things network element
CN115061717B (en) Application management method, application subscription method and related equipment
CN111796838B (en) Automatic deployment method and device for MPP database
CN112328361A (en) Method for rapidly deploying kubenetes cluster
CN111966366A (en) Cluster deployment method and device of multi-CPU architecture
CN113448686A (en) Resource deployment method and device, electronic equipment and storage medium
CN104699503A (en) Method and device for replacing function execution logic in Android system
CN109639818A (en) Service discovery method, device, server and storage medium under a kind of cloud environment
Dorofeev et al. Agile operational behavior for the control-level devices in plug&produce production environments
CN113779477A (en) Assembly line publishing method and system based on PaaS cloud platform
CN115328529B (en) Application management method and related equipment
CN101221498B (en) System and method for managing service modules
CN115248692A (en) Device and method for supporting cloud deployment of multiple deep learning framework models
WO2002075541A3 (en) Method and apparatus for providing application specific strategies to a java platform including start and stop policies
CN109815034B (en) Engineering software resource cloud service method
CN115617360A (en) Automatic deployment method and system of micro-service
CN111459510A (en) Cross-network operating system installation method and device, electronic equipment and medium
CN112463289A (en) Method, system, equipment and medium for realizing application service based on virtual machine
CN116028200A (en) Extensible drive acquisition frame system and development method
CN111897599A (en) Service method, device, equipment and storage medium based on microkernel model plug-in mode

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