gpt4 book ai didi

azure - 从 Visual Studio Online 部署 Azure 云服务

转载 作者:行者123 更新时间:2023-12-03 00:14:24 24 4
gpt4 key购买 nike

我们能否将 Azure 云服务部署设置为构建过程的一部分,以获得与 Visual Studio 向导给出的类似结果?

VS Publish Cloud Service Wizard

UPD。我们找到了“Azure 云服务部署”构建步骤,但它失败并出现以下意外错误(因为实际设置了存储帐户,请参阅下面的完整日志)。

Build step

CurrentStorageAccountName is not set. Use Set-AzureSubscriptionsubname -CurrentStorageAccountName storageaccount to set it.

完整日志:

Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\tasks\AzureCloudPowerShellDeployment\1.0.13\Publish-AzureCloudDeployment.ps1Looking for Azure PowerShell module at C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1AzurePSCmdletsVersion= 0.9.1Get-ServiceEndpoint -Name ***cut** -Context Microsoft.TeamFoundation.DistributedTask.Agent.Worker.Common.TaskContextUsername= ***cut**Add-AzureAccount -Credential $psCredentialazureSubscriptionId= ***cut**azureSubscriptionName= ***cut**Select-AzureSubscription -SubscriptionId ***cut**ConnectedServiceName= ***cut** ServiceName= ***cut**ServiceLocation= East USStorageAccount= ***cut**CsPkg= C:\a\c409f63f\***cut**.cspkgCsCfg= C:\a\c409f63f\***cut**.cscfgSlot= ProductionAllowUpgrade= trueFind-Files -SearchPattern C:\a\c409f63f\***cut**.cscfgserviceConfigFile= C:\a\c409f63f\***cut**.cscfgFind-Files -SearchPattern C:\a\c409f63f\***cut**.cspkgservicePackageFile= C:\a\c409f63f\***cut**.cspkgGet-AzureService -ServiceName ***cut** -ErrorAction SilentlyContinueApplying any configured diagnostics extensions.New-AzureServiceDiagnosticsExtensionConfig -Role ***cut** -StorageContext  -DiagnosticsConfigurationPath C:\a\c409f63f\***cut**.xmlNew-AzureServiceDiagnosticsExtensionConfig -Role ***cut** -StorageContext  -DiagnosticsConfigurationPath C:\a\c409f63f\***cut**.xmlGet-AzureDeployment -ServiceName crgd-scheduler -Slot Production -ErrorAction SilentlyContinueSet-AzureDeployment -Upgrade -ServiceName ***cut** -Package C:\a\c409f63f\***cut**.cspkg -Configuration C:\a\c409f63f\***cut**.cscfg -Slot Production -ExtensionConfiguration CurrentStorageAccountName is not set. Use Set-AzureSubscription subname -CurrentStorageAccountName storageaccount to set it.

最佳答案

我们最终成功地完成了“Azure PowerShell”通用构建步骤和使用 Azure API 创建/更新 Azure 部署的自定义 PS 脚本(New-AzureDeploymentSet-AzureDeployment) >)。

vso build step

包含完整脚本的精彩文章在这里:http://www.kenneth-truyers.net/2014/02/06/deploying-cloud-services-to-azure-with-powershell/ .

关于azure - 从 Visual Studio Online 部署 Azure 云服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31117826/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com