简体   繁体   中英

Deploy Azure Web App Package using ARM

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM