【问题标题】:Publish Azure Web Role : package not created发布 Azure Web 角色:未创建包
【发布时间】:2014-09-18 17:14:31
【问题描述】:

为了创建、配置和部署我的 Azure 云 PHP 服务,我使用的是 Windows Azure Powershell 上的 cmdlet。

通过“Web 平台安装程序”工具,我更新了以下程序:

  • Windows Azure PowerShell - 0.8.8.1
  • 微软 Azure SDK - 2.4.1.0
  • Microsoft Azure SDK for .NET (VS 2013) - 2.4

自此更新以来,包创建(本地或云)及其部署不再起作用。我无法更新或安装新的云 PHP 服务(Web 角色或辅助角色)

这是我正在使用的主要步骤,用于创建新的 PHP Web 角色

    Select-AzureSubscription XXXX -Verbose
    New-AzureServiceProject -ServiceName ntgTest
    Set-AzureServiceProject -Location "West Europe" -Slot Staging -Storage ntgTestStorage
    Add-AzurePHPWebRole -Name manageTest -I 1 -Verbose
    Set-AzureServiceProjectRole manageTest php 5.4.0
    Set-AzureServiceProjectRole manageTest -VMSize ExtraSmall
    Set-AzureServiceProjectRole manageTest -Instances 1
    Publish-AzureServiceProject -ServiceName ntgTest -Slot Staging -Location "West Europe"

我遇到问题和错误消息(对不起,由于我的环境,有些错误是法语)

  1. 当我运行“Publish-AzureServiceProject”cmdlet 将我的服务发布到云时,未创建包“cloud_package.cspkg”。

    错误消息:Publish-AzureServiceProject:找不到文件'C:\WORKSPACES\CLOUD\azure\production\ntgTest\cloud_package.cspkg'

  2. Publish-AzureServiceProject cmdlet 表示 -PackageOnly 选项仅创建包(示例部分:http://msdn.microsoft.com/en-us/library/dn495166.aspx)不支持此选项!!!

    错误消息:Publish-AzureServiceProject : Impossible de trouver un paramètre 对应 au nom « PackageOnly »。

  3. 当我想通过“Start-AzureEmulator”cmdlet 启动模拟器以在本地测试我的服务时,未创建包“local_package.csx”

    错误消息:Start-AzureEmulator:发生意外故障。

    详细信息:C:\WORKSPACES\CLOUD\azure\production\ntgTest\ServiceConfiguration.Local.cscfg:错误 CloudService51:Marque d'ordre d'octet Unicode manquante。 Impossible de basculer en Unicode。创建部署时出错。

    异常详情:Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabricException:

    • 处理服务配置文件时出错:C:\WORKSPACES\CLOUD\azure\production\ntgTest\ServiceConfiguration.Local.cscfg
    • 到 Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabric.ProcessModel(String ucxDir, String cscfg, DeploymentOptions deploymentOptions, ServiceDefinitionModel& sdm, ServiceConfigurationModel& scm, TranslateOptions& transOpts)
    • 到 Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabric。 CreateSingleInstanceDeployment (String serviceDirectory, String cscfgFile, DeploymentOptions deploymentOptions)
    • 到 Microsoft.ServiceHosting.Tools.CloudServiceRun.DoActions.Run(DirectoryInfo dir, FileInfo serviceConfiguration, Boolean launchBrowser, Boolean paused, String debugger, Boolean useIISExpress, List`1 portOverrides)
  4. cmdlet New-AzureServiceProject 使用 utf-16 编码创建配置文件(ServiceDefinition.csdef 和 ServiceConfiguration.XXX.cscfg):

    <?xml version="1.0" encoding="utf-16"?>

    • 生成包(云端或本地)时出现什么问题?
    • 是否有遗漏或无效的步骤?
    • 我可以为配置文件指定 utf-8 编码吗? (这似乎是我的问题的一部分)

【问题讨论】:

标签: azure deployment powershell-3.0 azure-web-roles cmdlets


【解决方案1】:

更新:

看起来有一个针对它的问题:

Publish-AzureServiceProject : 云和本地包未创建 #2926 在 github https://github.com/Azure/azure-sdk-tools/issues/2926


升级到 Azure cmdlet 版本 0.8.8.1 后,我的部署脚本停止工作。罪魁祸首是 New-AzureServiceProject cmdlet。它现在在顶部创建初始 csdef/cscfg,就像您的情况一样。我会将 Azure cmdlet 降级到以前的版本来临时解决这个问题。谢谢你的建议。但从长远来看,我必须找到一种方法来解决这个问题,这样我才能利用新的和增强的 Azure cmdlet。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-20
    • 1970-01-01
    • 1970-01-01
    • 2012-11-08
    • 2014-07-22
    • 2013-03-26
    • 1970-01-01
    相关资源
    最近更新 更多