将War文件部署到Azure [英] Deploying a War file to Azure
问题描述
我正在尝试将一个Web服务的War文件上传到Azure,运行tomcat 8.
我在onedrive上的相关webapps文件夹中有war文件,但部署始终失败,令人沮丧它没有错误消息。
我很确定如果我不能使用涉及将二进制文件上传到Azure的方法,我就无法使用Azure。当使用像github这样的存储库时,由于引用问题,构建会失败,所以我认为这不是一个选项。
不幸的是我必须使用Azure,我知道有了像AWS这样的其他服务,我可以在5分钟内完成,因为你可以直接上传而不需要任何微软(tm)麻烦。
通常,有四种方法可以在Azure Web Apps上部署war文件:FTP,存储库,如Github / BitBucket或OneDrive / Dropbox,Kudu工具,Azure Toolkit for Eclipse / IntelliJ。
首先,你需要知道
- 使用像GitHub这样的存储库,你可以参考Kudu wiki页面
- 一种方便快捷的方法是使用Kudu工具拖动和放大将您的war文件放入
webapps
目录,如下所示。
- 如果您安装了Azure Toolkit for Eclipse / IntelliJ,则可以参考将Java Web Apps部署到Azure使用Eclipse 或 IntelliJ:将Java Web应用程序部署到Azure 来执行此操作。
希望它有所帮助。如有任何疑虑,请随时告诉我。
I am attempting to upload a War file of a web service to Azure, running tomcat 8.
I have the war file in the relevant webapps folder on onedrive, however the deployment consistently fails, and frustratingly it does so without an error message.I'm pretty sure that if I can't use a method involving uploading the binary file to Azure, I cannot use Azure. When using repositories like github, the build would fail due to reference issues, so I believe that is not an option.
Unfortunately I must use Azure, I'm aware that with other services like AWS I'd be done in 5 minutes as you can directly upload without any Microsoft (tm) hassle.
解决方案Normally, there are 4 ways to deploy a war file on Azure Web Apps: FTP, repository like Github/BitBucket or OneDrive/Dropbox, Kudu Tool, Azure Toolkit for Eclipse/IntelliJ.
First of all, you need to know File structure on azure. The Java war file must be deployed at the directory
webapps
under thewwwroot
path of Azure Web Apps. You can access the Kudu tool urlhttps://<your-webapp-name>.scm.azurewebsites.net/DebugConsole
to lookup it.- Using FTP for deployment, you can refer to the Kudu wiki page
Accessing files via ftp
to know it, and set the FTP user & password via Azure portal as below.
- Using repository like GitHub, you can refer to the Kudu wiki page
Deploying from GitHub
to know it. Please first make sure the file structure on GitHub repository as the same as its under yourwwwroot
directory, as below.
- A convenient and fast way is using Kudu tool to drag & drop your war file into the
webapps
directory, as below.
- If you had installed Azure Toolkit for Eclipse/IntelliJ, you can refer to Deploy Java Web Apps to Azure using Eclipse or IntelliJ: Deploy Java Web Apps to Azure to do it.
Hope it helps. Any concern, please feel free to let me know.
这篇关于将War文件部署到Azure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 一种方便快捷的方法是使用Kudu工具拖动和放大将您的war文件放入