我正在使用awsdeploy部署彈性beanstalk ASP.NET MVC應用程序。該應用程序需要Crystal Reports,只能通過運行.msi安裝程序(CRRuntime_64bit_13_0_6.msi)進行安裝。awsdeploy - > msdeploy - > runCommand timeout
運行作爲部署的一部分,我已經添加了一個自定義的目標,像這樣安裝程序:
<!--install msi-->
<Target Name="InstallCrystalReports" AfterTargets="AddIisSettingAndFileContentsToSourceManifest">
<Message Text="Install Crystal Reports msi" />
<ItemGroup>
<MsDeploySourceManifest Include="runCommand">
<Path>c:\mypath\installCrystalReports.cmd</Path>
<waitAttempts>20</waitAttempts>
<waitInterval>300000</waitInterval>
<dontUseCommandExe>false</dontUseCommandExe>
<AdditionalProviderSettings>waitAttempts;waitInterval;dontUseCommandExe</AdditionalProviderSettings>
</MsDeploySourceManifest>
</ItemGroup>
</Target>
的安裝可能需要大約一分鐘,我可以通過安裝人員看到,查看創建的日誌文件它已經開始OK。然而,runCommand只會讓它運行一個5秒鐘的最大值,然後終止一個錯誤。更改waitAttempts和waitInterval似乎沒有影響。
下面摘錄自「C:\ Program Files \ Amazon \ ElasticBeanstalk \ logs \ AWSDeployment.log」,其中顯示了awsdeploy/msdeploy如何過早終止安裝。
2013-08-19 12:42:11,428 INFO 5 DeploymentLog - C:\mypath>msiexec /i CRRuntime_64bit_13_0_6.msi /quiet /norestart /l C:\mypath\CRRuntime_64bit_13_0_6.txt
2013-08-19 12:42:12,426 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 1 of 5).
2013-08-19 12:42:12,426 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 1 of 5).
2013-08-19 12:42:13,440 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 2 of 5).
2013-08-19 12:42:13,440 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 2 of 5).
2013-08-19 12:42:14,454 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 3 of 5).
2013-08-19 12:42:14,454 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 3 of 5).
2013-08-19 12:42:15,468 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 4 of 5).
2013-08-19 12:42:15,468 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 4 of 5).
2013-08-19 12:42:16,482 WARN 1 AWSBeanstalkCfnDeploy.DeploymentUtils - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 5 of 5).
2013-08-19 12:42:16,482 WARN 1 DeploymentLog - The process 'C:\Windows\system32\cmd.exe' (command line '') is still running. Waiting for 1000 ms (attempt 5 of 5).
2013-08-19 12:42:16,482 ERROR 1 AWSBeanstalkCfnDeploy.DeploymentUtils - Exception during deployment.
任何想法如何增加超時,使安裝程序將運行成功?或者我可以如何讓安裝程序作爲部署的一部分運行?
輝煌!謝謝工作完美。比使用runcommand提供者要容易得多。 –
對於那些與msbuild和runcommand提供者苦苦掙扎的人,我認爲問題在於,當msbuild使用目標來構建archive.xml清單文件時,它不尊重waitInterval參數。其中一種解決方法可能是使用[此方法](http://www.codeproject.com/Articles/539088/Amazon-AWSDeploy-To-Provision-Multiple-Websites?fid=1825739&df=90&mpp=25&noise=1&prof=True&sort = Position&view = None&spc = Relaxed)並手動編寫頂級清單文件,以便您可以在runCommand元素上指定waitInteval屬性。 –