【Azure Fabric Service】分享使用Visual Studio 2022发布中国区Service Fabric服务应用的办法

本文涉及的产品
任务调度 XXL-JOB 版免费试用,400 元额度,开发版规格
应用实时监控服务-应用监控,每月50GB免费额度
函数计算FC,每月15万CU 3个月
简介: 本文介绍了在Visual Studio 2022中无法直接创建Service Fabric Cluster服务时的替代方案。通过使用PowerShell命令或修改Cloud.xml文件,可将应用部署到已创建的SF Cluster。具体步骤包括:1) 在Azure门户创建Service Fabric服务并安装客户端证书;2) 获取服务端和客户端证书指纹;3) 修改Cloud.xml中的ClusterConnectionParameters后发布应用。最后附有参考资料以供进一步学习。

问题描述

使用Visual Studio 2022如何发布Service Fabric到中国区云服务呢? 因为使用VS2022中的插件无法创建Service Fabric Cluster服务。

那么,是否又比较好的替代方案呢?

 

问题解答

是的,有替代方案。

除了昨天介绍使用的Powershell命令外( 【Azure Fabric Service】演示使用PowerShell命令部署SF应用程序(.NET) : https://www.cnblogs.com/lulight/p/18778636),也可以对SF Project中 PublishProfiles文件夹中的Cloud.xml文件进行修改后,部署到已经创建好的SF Cluster中。

 

第一步:登录Azure门户,创建Service Fabric 服务

门户创建成功后,需要在本地安装客户端证书后,才能访问Service Fabric Explorer(https://<your sf cluster name>.<chinanorth3>.cloudapp.chinacloudapi.cn:19080/Explorer/index.html#/), 查看当前集群中服务,应用,节点的状态。

PS: 如果创建集群时,选择的是Key Vault中自签名证书,则可以从Key Vault Certificate页面下载证书后,安装在本地。

打开Service Fabric Explorer时,提示选择证书(即安装的客户端证书)。 如果选错了,则需要清空缓存或历史记录才能再次打开。或直接使用隐私模式。

 

 

第二步:获取服务端和客户端证书指纹

在Azure 管理门户中,同时获取这两个证书指纹值(Azure 门户 --> SF Overview页面 --> JSON View -> 查看 Properties 值), 复制如下两个属性值。

  • clusterCertificateThumbprints
  • clients.thumbprint

 

第三步:修改Cloud.xml的ClusterConnectionParameters,发布应用

回归 Visual Studio 2022,打开项目文件 PublishProfiles --> Cloud.xml, 修改ClusterConnectionParameters内容:

然后:点击发布,选择Cloud.xml, 查看发布日志,在SF Explorer中验证应用发布结果!

 

 

参考资料

【Azure Fabric Service】演示使用PowerShell命令部署SF应用程序(.NET) : https://www.cnblogs.com/lulight/p/18778636

 



当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

相关文章
|
8月前
|
数据安全/隐私保护
【Azure Service Fabric】关于Service Fabric的相关问题
【Azure Service Fabric】关于Service Fabric的相关问题
|
1月前
|
JSON 数据格式
【Azure Fabric Service】演示使用PowerShell命令部署SF应用程序(.NET)
本文详细介绍了在中国区微软云Azure上使用Service Fabrics服务时,通过PowerShell命令发布.NET应用的全过程。由于Visual Studio 2022无法直接发布应用,需借助PowerShell脚本完成部署。文章分三步讲解:首先在Visual Studio 2022中打包应用部署包,其次连接SF集群并上传部署包,最后注册应用类型、创建实例并启动服务。过程中涉及关键参数如服务器证书指纹和服务端证书指纹的获取,并附带图文说明,便于操作。参考官方文档,帮助用户成功部署并运行服务。
129 72
|
8月前
|
安全 API 数据安全/隐私保护
【Azure App Service】通过Visual Studio部署Azure App Service 遇见 401 'Unauthorized'错误
【Azure App Service】通过Visual Studio部署Azure App Service 遇见 401 'Unauthorized'错误
|
8月前
【Azure Fabric Service】Service Fabric 托管群集通过 Connect-ServiceFabricCluster 连接时候报错 CertificatedNotMatched
【Azure Fabric Service】Service Fabric 托管群集通过 Connect-ServiceFabricCluster 连接时候报错 CertificatedNotMatched
|
8月前
|
安全 数据可视化 数据安全/隐私保护
【Azure 微服务】新创建的Service Fabric集群,如何从本地机器上连接到Service Fabric Explorer(Service Fabric状态/错误查看工具)呢?
【Azure 微服务】新创建的Service Fabric集群,如何从本地机器上连接到Service Fabric Explorer(Service Fabric状态/错误查看工具)呢?
【Azure 微服务】新创建的Service Fabric集群,如何从本地机器上连接到Service Fabric Explorer(Service Fabric状态/错误查看工具)呢?
|
8月前
【Azure Fabric Service】Service Fabric部署失败问题 Provisioning of VM extension ConfigureVM has timed out.
【Azure Fabric Service】Service Fabric部署失败问题 Provisioning of VM extension ConfigureVM has timed out.
|
8月前
【Azure Fabric Service】怎样关闭 Azure Service Fabric?
【Azure Fabric Service】怎样关闭 Azure Service Fabric?
|
8月前
|
API Windows 容器
【Azure Fabric Service】Service Fabric 遇见错误信息记录 - The process/container terminated with exit code:2148734499
【Azure Fabric Service】Service Fabric 遇见错误信息记录 - The process/container terminated with exit code:2148734499
|
8月前
|
微服务
【Azure 微服务】记一次错误的更新Service Fabric 证书而引发的集群崩溃而只能重建
【Azure 微服务】记一次错误的更新Service Fabric 证书而引发的集群崩溃而只能重建
|
开发框架 .NET 区块链
Hyperledger fabric部署链码(五)初始化与链码升级
fabric部署chaincode-go(智能合约)系列之五
268 0
下一篇
oss创建bucket