将War文件部署到Azure [英] Deploying a War file to Azure

查看:284
本文介绍了将War文件部署到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。



首先,你需要知道


  1. 使用像GitHub这样的存储库,你可以参考Kudu wiki页面


    1. 一种方便快捷的方法是使用Kudu工具拖动和放大将您的war文件放入 webapps 目录,如下所示。


    1. 如果您安装了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 the wwwroot path of Azure Web Apps. You can access the Kudu tool url https://<your-webapp-name>.scm.azurewebsites.net/DebugConsole to lookup it.

    1. 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.

    1. 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 your wwwroot directory, as below.

    1. A convenient and fast way is using Kudu tool to drag & drop your war file into the webapps directory, as below.

    1. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆