使用ARM部署Azure Web App程序包 [英] Deploy Azure Web App Package using ARM

查看:94
本文介绍了使用ARM部署Azure Web App程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用powershell命令将现有的WebApp软件包上传到Azure资源组中.

经历了多个链接,例如

给个人资料一个名字;我叫我 WebDeployPkg .接下来,将发布方法设置为 Web部署程序包,然后为程序包位置选择一个文件夹.然后,点击发布.这将在该文件夹中生成Web Deploy软件包(.zip).

将Web Deploy程序包添加到资源组项目中

在项目中添加一个文件夹以存储Web部署程序包.我将其命名为 App .然后,将Web部署程序包复制到此文件夹.如果使用Windows资源管理器执行此操作,请单击工具栏中的显示所有文件按钮,然后右键单击.zip文件,然后选择包含在项目中.

在项目中的DeploymentTemplate.json文件的JSON Outline窗口中,添加 Web Deploy for Web Apps 资源.

使用Azure资源管理器部署Web应用

准备部署资源组时,右键单击资源组项目,然后选择 Deploy> New Deployment .

Web Apps的Web Deploy资源将导致工件存储帐户设置亮起,因此您可以指定将Web部署程序包上载到的位置.在Azure中创建Web应用程序环境后,Azure资源管理器将在此处进行选择.因此,如果您还没有存储帐户,请为此目的创建一个存储帐户.接下来,点击编辑参数按钮.

在编辑参数"对话框中,您将看到Web Deploy软件包的两个参数.对于 PackageFolder 设置,它应该是您的<资源组项目名称>/<在上面创建的文件夹名称> .

对于 PackageFileName 设置,这只是Web Deploy软件包的文件名.

点击保存,然后点击部署.

I want to upload existing WebApp package in azure resource group using powershell commands.

having gone through multiple links, such as this one

http://blogs.technet.com/b/georgewallace/archive/2015/05/10/deploying-a-website-with-content-through-visual-studio-with-resource-groups.aspx

I am still not sure, which parameter in the template json file is required for package contents.

I could create blank web app using azure quick start templates.and this command.

New-AzureRMResourceGroupDeployment

But want to deploy existing web app to resource group.Any suggestions appreciated!

Thanks

解决方案

I know you said you have an existing Web Deploy Package but I'm including the steps to generate this in my answer to hopefully get ahead of any future questions on this.

Create the Web Deploy Package

Using Visual Studio, in the Solution Explorer window right-click on your ASP.NET web application project and select Publish. On the Profile page of the publish dialog, select Custom to create a new profile.

Give the profile a Name; I called mine WebDeployPkg. Next, set the Publish Method to Web Deploy Package and select a folder for the Package location. Then, click Publish. This will generate the Web Deploy Package (a .zip) in that folder.

Add the Web Deploy Package to your Resource Group Project

Add a folder to your project to store your Web Deploy Package in. I named mine App. Then, copy the Web Deploy Package to this folder. If you do this using Windows Explorer, click the Show All Files button in the toolbar and then right-click on the .zip file and select Include in Project.

Using the JSON Outline window for the DeploymentTemplate.json file in your project, add a Web Deploy for Web Apps resource.

Deploy the Web App using Azure Resource Manager

When you're ready to deploy your resource group, right-click on the resource group project and select Deploy > New Deployment.

The Web Deploy for Web Apps resource will cause the Artifact Storage Account setting to light up so you can specify where to upload the web deploy package to. Azure Resource Manager will pick it up from here after it has created your web app environment in Azure. So, create a storage account for this purpose if you don't already have one. Next, click the Edit Parameters button.

In the Edit Parameters dialog you will see two parameters for the Web Deploy Package. For the PackageFolder setting, this should be your <resource group project name>/<folder name you created above>.

For the PackageFileName setting, this is simply the file name of the Web Deploy Package.

Click Save and then Deploy.

这篇关于使用ARM部署Azure Web App程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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