为多个微服务部署创建服务连接的最佳实践是什么?

发布于 2025-02-05 17:13:11 字数 354 浏览 1 评论 0原文

背景 - 我正在为Web API微服务项目的Azure DevOps CICD管道工作,该项目内置于ASP.NET Core。我正在为Azure DevOps实施多个微服务项目。这些Web API在具有因资源(SQL DB等)的单独资源组中部署在Azure Web App服务上。

问题 - 在创建CD管道时,我们必须为Web App Service创建服务连接。就我而言,我必须为每个Web应用程序服务创建单独的服务连接,因为这些服务位于不同的Azure资源组中。那么,为多个Web App服务创建服务连接的最佳实践是什么?如何通过位于多个资源组下的多个Web应用程序服务的单个服务连接来实现这一目标?

Background - I'm working on Azure DevOps CICD pipelines for web API microservices project which built in ASP.NET core. There are multiple microservices projects for which I'm implementing the CICD on Azure DevOps. These web APIs are deployed on Azure Web App services in separate resource groups with dependent resources(SQL DB etc).

Issue -
While creating CD pipeline, we have to create service connection for web app service. In my case, I have to create separate service connections for each web app service as those are located in different Azure Resource Groups. So what is the best practice to create service connection for multiple web app services? How I can achieve this with single service connection for multiple web app services located under multiple resource groups?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拥抱我好吗 2025-02-12 17:13:11

我如何通过位于多个资源组下的多个Web应用程序服务的单个服务连接来实现此目标?

为了实现此要求,您可以在创建服务连接时跳过指定资源组名称。

例如:

“在此处输入图像描述”

然后,服务连接将可以访问Azure订阅中的所有资源组。

How I can achieve this with single service connection for multiple web app services located under multiple resource groups?

To achieve this requirement, you can skip specifying the Resource Group name when you create the service connection.

For example:

enter image description here

Then the service connection will have access to all Resource Groups in the Azure Subscription.

心如荒岛 2025-02-12 17:13:11

在Azure AD中,您可以授予您创建订阅级别权限的服务原理,然后由该订阅中的每个资源组继承。

In azure AD, you can grant one the service principals you create subscription level permissions and those are then inherited by every resource group in that subscription.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文