单个 Visual Studio Azure Project 部署多个云服务
Single Visual Studio Azure Project deploy multiple Cloud Service
Azure 有点新。我们有 3 个不同的云服务帐户 (dev/qa/prod)。我们有相同的 1 个 Web 角色和 2 个我们想要部署到这些云服务帐户的工作者角色。在 Visual Studio (2013) 中,我目前有一个 Azure 项目,其中包含 1 个 Web 角色和 2 个辅助角色。我为每个环境创建了 3 个不同的 ServiceConfigurations。我可以使用相应的 ServiceConfiguration 创建部署包。到目前为止,一切都很好。
现在,我好像只能有一个ServiceDefintion.csdef文件。如果我想为我的环境设置不同的 VM 大小(即每个环境有不同的 ServiceDefinition.csdef 文件),我该如何实现?
找到各种 solutions/options:
- http://blogs.msdn.com/b/philliphoff/archive/2012/07/02/transform-windows-azure-service-model-files-during-packaging.aspx
- Azure: Is there any way to deploy different instance sizes for test/production
不过,我最终在我们的部署服务器 (Octopus) 上解决了这个问题。我有一个定义文件和 2 个配置文件(本地和云)- VS 中的默认值。对于工作站调试,使用本地服务配置。当我构建和打包时,我使用云服务配置作为起点。然后在 Octopus 中,我根据目标部署环境转换/变量替换服务定义和服务配置。
Azure 有点新。我们有 3 个不同的云服务帐户 (dev/qa/prod)。我们有相同的 1 个 Web 角色和 2 个我们想要部署到这些云服务帐户的工作者角色。在 Visual Studio (2013) 中,我目前有一个 Azure 项目,其中包含 1 个 Web 角色和 2 个辅助角色。我为每个环境创建了 3 个不同的 ServiceConfigurations。我可以使用相应的 ServiceConfiguration 创建部署包。到目前为止,一切都很好。
现在,我好像只能有一个ServiceDefintion.csdef文件。如果我想为我的环境设置不同的 VM 大小(即每个环境有不同的 ServiceDefinition.csdef 文件),我该如何实现?
找到各种 solutions/options:
- http://blogs.msdn.com/b/philliphoff/archive/2012/07/02/transform-windows-azure-service-model-files-during-packaging.aspx
- Azure: Is there any way to deploy different instance sizes for test/production
不过,我最终在我们的部署服务器 (Octopus) 上解决了这个问题。我有一个定义文件和 2 个配置文件(本地和云)- VS 中的默认值。对于工作站调试,使用本地服务配置。当我构建和打包时,我使用云服务配置作为起点。然后在 Octopus 中,我根据目标部署环境转换/变量替换服务定义和服务配置。