APP下载

微服务容器化部署的研究

2019-08-13付琳琳邹素雯

计算技术与自动化 2019年4期

付琳琳 邹素雯

摘   要:随着分布式系统和云计算的飞速发展,微服务和容器的应用越来越广泛,通过将微服务容器化实现自动化部署和持续集成,从而简化部署和加快开发也是企业应用的研究重点。通过对微服务特性和容器核心技术的研究,给出了微服务容器化部署的理论支持,并对几种常见的微服务部署模式进行了比较,最后着重介绍了微服务容器化部署模式的一般流程和总体设计方案,包括微服务应用的开发、容器镜像的构建、管理和容器部署编排,并给出了微服务容器镜像构建的优化方案,对企业的应用开发部署具有一定的理论参考价值。

关键词:微服务;容器;镜像;微服务部署;镜像优化

中图分类号:TP399                                                    文献標识码:A

Research on Container Deployment of Microservices

FU Lin-lin1?覮,ZOU Su-wen2

(1. Wuhan Research Institude of Posts and Telecommunications,Wuhan ,Hubei 430074,China;

2. Wuhan Fiberhome Information Integration Technology Company Limited,Wuhan,Hubei 430074,China)

Abstract:With the development of distributed systems and cloud computing,the application of micro-services and containers is becoming more and more extensive.The automated deployment and continuous integration through microservices containerization to simplify deployment and accelerate development is also the focus of enterprise researches. Based on the research of the characteristics of microservices and the core technology of docker,this paper gives the theoretical support for the container deployment of microservices,than compares several common microservices deployment patterns. Finally,the general process and overall design scheme of microservices container deployment mode are introduced,including the development of microservices application,the construction of container image,the management and the arrangement of container deployment. And put forward some optimization scheme for microservices container image construction,which has certain theoretical reference value for enterprise application development deployment.

Key words:microservices;docker;image;deployment of microservices;image optimization

随着计算机技术的发展,软件架构从单体到微服务,从垂直到分布式,不断的更新发展以适应不断庞大的业务需求。其中微服务架构从提出到现在一直备受企业和开发人员的关注,相关开源项目的社区也极为活跃,如何更好的进行微服务应用的业务拆分,稳定而快捷的服务通信,使整个项目开发迭代快,稳定高可用,部署维护成本低,一直都是开发人员的研究重点,而容器等新的新技术产生,更是为微服务开发、部署、维护等过程提供了新的思路。

1   微服务和容器

1.1   微服务概述

不同于单体应用,微服务是一种将大型应用系统进行由大到小拆分的架构风格,根据业务功能将其拆分成多个相互独立的小型服务模块,各自拥有自己的数据存储系统、开发模式并独自运行,然后通过某些通信协议,如基于HTTP的RESTful API进行服务间的通讯[1]。……

登录APP查看全文