微服务:如何存储许多微服务的源代码? [英] Microservices: How to store source code of many microservices?

查看:92
本文介绍了微服务:如何存储许多微服务的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我有一个项目的 20个微服务.并且每个微服务都存储在单独的GIT存储库中. 随后,服务数量将增加到200(或更多).

Currently, I have 20 microservices for one project. And every microservice stored in separate GIT reposotiry. Subsequently, the number of services will increase to 200 (or more).

每个服务都有单元测试和集成测试.每个服务都内置在TeamCity(连续集成服务器)中.

Every service has unit tests and integration tests. Every service has build in TeamCity (Continuous integration server).

问题:如何为一个项目存储200个微服务的源代码?在一个存储库中还是在单独的存储库中?

Question: How to store source code of 200 microservices for one project? In one repository or in separate repositories?

推荐答案

除非这些微服务紧密耦合(这意味着仅下载其中的一些微服务是没有意义的,并且您只能使用 all ),建议将它们分别保存在单独的Git存储库中.

Unless those micro-services are tightly coupled (meaning it wouldn't make sense to download only some of them, and you would only work with all of them), keeping them each in a separate Git repo is recommended.

但是您仍然可以将它们引用为 子模块 在父仓库中,以便在任何给定时间跟踪其状态.

But you can still reference them as submodule in a parent repo in order to keep track of their state at any given time.

这篇关于微服务:如何存储许多微服务的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆