【发布时间】: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"
我遇到问题和错误消息(对不起,由于我的环境,有些错误是法语)
-
当我运行“Publish-AzureServiceProject”cmdlet 将我的服务发布到云时,未创建包“cloud_package.cspkg”。
错误消息:Publish-AzureServiceProject:找不到文件'C:\WORKSPACES\CLOUD\azure\production\ntgTest\cloud_package.cspkg'
-
Publish-AzureServiceProject cmdlet 表示 -PackageOnly 选项仅创建包(示例部分:http://msdn.microsoft.com/en-us/library/dn495166.aspx)不支持此选项!!!
错误消息:Publish-AzureServiceProject : Impossible de trouver un paramètre 对应 au nom « PackageOnly »。
-
当我想通过“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)
-
cmdlet New-AzureServiceProject 使用 utf-16 编码创建配置文件(ServiceDefinition.csdef 和 ServiceConfiguration.XXX.cscfg):
<?xml version="1.0" encoding="utf-16"?>- 生成包(云端或本地)时出现什么问题?
- 是否有遗漏或无效的步骤?
- 我可以为配置文件指定 utf-8 编码吗? (这似乎是我的问题的一部分)
【问题讨论】:
-
我不得不降级到0.8.7.1 version
标签: azure deployment powershell-3.0 azure-web-roles cmdlets